IP ADDRESSING
Outline
à Network architecture à Address format à Netmask
NETWORK ARCHITECTURE
Network Architecture
H2 H3
IP net 1
IP net 3 IP net 6
IP net 7
IP net 9 ATM CDN
H4
Ethernet
R5
R4
R3 xDSL
xDSL
Ethernet WIFI
Host
Logical subnet
R1
Router (Gateway)
Physical network
R2
Logical IP Subnet (LIS)
Set of interfaces with common address prefix
Prefix
1 physical network
1 logical IP network
Logical and Physical Networks à All interfaces with the same address prefix must be connected to the same physical network
à All interfaces of the same physical network must have the same address prefix
What does this imply?
A Network Identifier
Host Network
à Network part à Host part
Address prefix is unique to a given (physical/logical) network
Scalability!
IP net 1
IP net 3 IP net 6
IP net 7
IP net 9
R1
R2
R5
R4
R3
rou<ng are closely related
Addressing and
Does It Come for Free?
à Address space waste à Addressing efficiency
à Commonly below 25%
ADDRESS FORMAT
IP Addresses
à 32 bits (4 bytes) à Represented in dotted
decimal notation
à Each byte expressed as a decimal number separated by a dot
à 12.4.56.38 193.129.3.215 à Each element from O to 255
How Large is the Prefix? à Fixed size is too limited à Three sizes:
à Class A: 1 byte à Class B: 2 bytes à Class C: 3 bytes
Check the first byte!
Class A à E.g., 84.24O.2O.1
à Max 128 network prefixes à Max 16M host addresses
Host 1 7 8 31 Network
0 127
0
à E.g., 153.24O.2O.1
à Max 16K network prefixes à Max 64K host addresses
2 7 16 31
128 191
Host Network 1 0
Class B
à E.g., 2O3.24O.2O.1
à Max 2M network prefixes à Max 255 host addresses
2 7 16 31
1 0 1 Host Network 192 223
Class C
And It Goes On … à Class D à E.g., 225.24O.2O.1
à Used for multicast à Class E: anycast à Not associated to interfaces
2 7 31 Mul<cast Address 1 0 1 1
224 239
Reserved Host Field Values
à All ones: directed broadcast à E.g., 2O3.24O.2O.255 à Routed à Cannot be associated
to an interface
à All zeros: the LIS à E.g., 2O3.24O.2O.O à Could be associated to an interface
Available Host Identifiers
n bit host field ê
2n-2 available identifiers
Possibly 2n-1 if network address is associated to an interface
Reserved Addresses
à All ones: limited broadcast à 255.255.255.255 à Not received by all stations
à Not routed à This host: O.O.O.O à Loopback: 127.*.*.*
NETMASK
Issues With Classful Addressing
à Lack of flexibility à Low addressing efficiency
à Centralized address space assignment
Netmask and Classless Addressing
à Associated to IP address à Marks boundary of network and host parts
à Any size network/host part
1 1 0 0 0 0 0 0 . 1 0 1 0 1 0 0 0 . 0 0 0 0 1 0 1 0 . 0 1 0 0 0 1 0 1
1 24 32 2 3 25 27 1 1 1 1 1 1 1 1 . 1 1 1 1 1 1 1 1 . 1 1 1 1 1 1 1 1 . 1 1 0 0 0 0 0 0 255 . 255 . 255 . 192
Netmask
192 . 168 . 10 . 69 Address
Network part Host part
Valid Netmask Byte Values
à 0 0000 0000 à 128 1000 0000 à 192 1100 0000 à 224 1110 0000 à 240 1111 0000 à 248 1111 1000 à 252 1111 1100 à 254 1111 1110 à 255 1111 1111
Natural Netmaks/Prefixes
à Class A è 255.O.O.O à Class B è 255.255.O.O à Class C è 255.255.255.O
à Subnetting: prefix shorter than natural one
à Supernetting: prefix longer than natural one
Subnetting and Supernetting
SubneKng Examples 0 1 23 24 31 2 3
Host 1 Network 0 1 25
From 129
to 190
1 0 0 0 0 0 0 1
1 0 1 1 1 1 1 0
From 65
to 126
1 1 0 0 0 0 0 0 . 1 0 1 0 1 0 0 0 . 0 0 0 0 1 0 1 0 . 0 1 0 0 0 0 0 1 0 1 1 1 1 1 1 0 192 . 168 . 10 .
Network field
26
Host
255 . 255 . 255 . 192
1 1 1 1 1 1 1 1 . 1 1 1 1 1 1 1 1 . 1 1 ì1 1 1 1 1 1 . 1 1 0 0 0 0 0 0 Netmask
Net (natural prefix)
Subnet
Subnetting and Centralized Address Assignment à Addresses assigned to organization in natural prefixes
à One large set of addresses à Organizations use subnetting to devise a prefixes for each network