Network Layer: Logical Addressing
Introduction The network layer is responsible for the delivery of individual packets from source to the destination host
Logical Addressing A universal addressing system in which each host can be identified uniquely regardless of the underlying physical network
IPv4 Address 32-bit addresses that are unique and universal has 2 32 or 4,294,967,296 address space partitioned into four groups of eight bits (called octets) each octet is treated as independent unit RFC 791
IPv4 Address Notation Binary notation 10000000 11011111 10011101 00010011 Dotted-Decimal notation 128.223.157.19 CMSC 137 Data Communications and Networking ICS-UPLB
Classful Addressing Address space is divided into 5 classes: A, B, C, D and E Classification is determined by the value of the first four bits (bits 0 through 3)
Classful Addressing (2) IP Address in Class A, B and C is divided: Network part (netid) identifies the network Host part (hostid) identifies the host or router on the network Network mask (netmask) 32-bit number made of contiguous 1s followed by contiguous 0s
Classful Addressing (3) Class A Starts with binary 0 Network part is next 7 bits, host part rest 00000000 and 01111111 (127) is reserved Range 1.x.x.x to 126.x.x.x Netmask is 255.0.0.0 Designed for large organizations with large number of attached hosts or router
Classful Addressing (4) Class B Starts with binary 10 Second octet also included in the network address Range 128.x.x.x to 191.x.x.x Netmask is 255.255.0.0 Designed for midsize organizations with tens of thousands of attached hosts or router
Classful Addressing (5) Class C Starts with binary 110 Second and third octet also part of network address Range 192.x.x.x to 223.x.x.x Netmask is 255.255.255.0 Designed for small organizations with small number of attached hosts or router
Classful Addressing (6) Class D Starts with 1110 Second, third and fourth octet part of the network address (no host part) Range 224.x.x.x to 239.x.x.x Used for multicasting Class E Starts with 11110 Second, third and fourth octet part of the network address (no host part) Range 240.x.x.x to 255.x.x.x Reserved for future use
Classful Addressing (7) IP Class A B C D E Format N.H.H.H N.N.H.H N.N.N.H N/A N/A High order bits 0 10 110 1110 11110 Address Range 1.x.x.x to 126.x.x.x 128.x.x.x to 191.x.x.x 192.x.x.x to 223.x.x.x 224.x.x.x to 239.x.x.x 240.x.x.x to 255.x.x.x No of bits for network/host 7/24 14/16 21/8 Not for commercial use N/A Number of network (block) 128 16,384 2,097,152 1 1 Number of host 2 24 2 = 16777214 2 16 2 = 65534 2 8 2 = 254 (268,435,456) (268,435,456) Netmask 255.0.0.0 255.255.0.0 255.255.255.0 Purpose Few large organizations Medium size organizations Relatively small organizations Multicast groups Experimental
Subnetting Subnetting/Supernetting Divide addresses (Class A and B) into several contiguous groups and assign each group to smaller groups (subnet) or share part of address with neighbors Supernetting Combine several class C blocks to create larger range of addresses
Classless Addressing To overcome address depletion and give more organizations access to the Internet No classes, addresses are still granted in blocks (range of addresses) Restrictions: The addresses in a block must be contiguous, one after another The number of addresses in a block must be a power of 2 The first address must be evenly divisible by the number of addresses
Classless Addressing (2) Address is contiguous Number of address is a power of 2 (16 = 2 4 ) First address is divisible by 16 First address when converted to a decimal number is 3,440,387,360
Classless Addressing (3) Mask 32-bit number where n leftmost bits are 1s and the 32-n rightmost bits are 0s Any value from 0 to 32 Classless Interdomain Routing (CIDR) notation (/n notation) In IPv4 addressing, a block of addresses can be defined as x.y.z.t/n in which x.y.z.t defines one of the addresses and the /n defines the mask
Classless Addressing (4) The first address in the block can be found by setting the rightmost 32 n bits to 0s The last address in the block can be found by setting the rightmost 32 n bits to 1s The number of addresses in the block can be found using the formula 2 32-n
Classless Addressing (5) Question: A block of addresses is granted to a small organization. We know that one of the addresses is 205.16.37.39/28 What is the first address in the block? What is the last address in the block? Find the number of addresses in the block?
Classless Addressing (6) Binary representation is 11001101 00010000 00100101 00100111 Set 32 28 rightmost bits to 0 11001101 00010000 00100101 00100000 or 205.16.37.32 Set 32 28 rightmost bits to 1 11001101 00010000 00100101 00101111 or 205.16.37.47 Value of n is 28, so 232 28 2 4 = 16
Network Address When organization is given a block of address, it is free to allocate the addresses to devices that need to be connected to the Internet The first address (normally) is treated as a special address and defines the organization to the rest of the world
Network Address (2)
Two-level Heirarchy: No Subnetting Prefix leftmost n bits that define the network Suffix rightmost 32 n bits define the hosts
Three-level Heirarchy: Subnetting Example: An organization is given the block 17.12.40.0/26 which contains 64 addresses. The organization has 3 offices and needs to divide addresses into 3 sub blocks of 32, 16 and 16 addresses New mask First subnet must be 2 32 n1 = 32, n1 = 27 Second subnet must be 2 32 n2 = 16, n2 = 28 Third subnet must be 2 32 n3 = 16, n3 = 28
Three-level Heirarchy: Subnetting (2)
Three-level Heirarchy: Subnetting (3) In subnet 1, the address 17.12.14.29/27 can give the subnet address if /27 mask is used Host: 00010001 00001100 00001110 00011101 Mask: 11111111 11111111 11111111 11100000 (/27) Subnet: 00010001 0001100 00001110 00000000 (17.12.14.0) In subnet 2, the address 17.12.14.45/28 can give the subnet address if /28 mask is used Host: 00010001 00001100 00001110 00101101 Mask: 11111111 11111111 11111111 11110000 (/28) Subnet: 00010001 0001100 00001110 00100000 (17.12.14.32)
Three-level Heirarchy: Subnetting (4)
Address Allocation Internet Corporation for Assigned Names and Numbers (ICANN) global authority for address allocation Internet Assigned Numbers Authority (IANA) Manages the DNS root, the.int and.arpa domains Coordinates the global pool of IP and AS numbers, providing them to Regional Internet Registries Manages internet protocol's numbering system
Address Allocation (2)
Network Address Translation Enables to have a large set of addresses internally and one address, or a small set of addresses externally RFC 3022
Network Address Translation (2) Private Address (RFC 1928 for IPv4) reserved addresses for private network Also known as Network 10 address
Network Address Translation (3)
Network Address Translation (4) Translation table Using one IP Address Using a pool of IP Addresses Using both IP Addresses and Port Numbers
Network Address Translation (5)
Network Address Translation (6)
IPv6 Address 128-bit address (16 bytes/octets) RFC 2460 Uses hexadecimal colon notation
IPv6 Address (2)
IPv6 Prefix
IPv6 Prefix (2)
Unicast Address Defines a single computer Two types Geographically based Provider-based
Unicast Address (2) Type identifier 3-bit field that defines the address as a provider-based address Registry identifier 5-bit field that indicates the agency that registered the address Provider identifier variable-length field that identifies the provider for Internet access. (16-bit length recommended)
Unicast Address (3) Subscriber identifier assigned to an organization when subscribed to the Internet through a provider (24-bit length recommended) Subnet identifier defines a specific subnetwork under the territory of the subscriber (32-bit length recommended) Node identifier identity of the node connected to a subnet (48-bit length recommended)
Defines a group of hosts Multicast Address A packet sent to a multicast address must be delivered to each member of the group
Anycast Address Defines a group of nodes like multicast A packet destined for an anycast address is delivered to only one member of the anycast group, the nearest one. Possible use is to assign an anycast address to all routers of an ISP that covers a large logical area in the Internet
Reserved Address
Reserved Address (2) Unspecified address used when a host does not know its own address and sends an inquiry to find its address Loopback address used by a host to test itself without going into the network Compatible address used when a computer using IPv6 wants to send a message to another computer using IPv6, but the message needs to pass through a part of the network that still operates in IPv4 Mapped address used when a computer that has migrated to IPv6 wants to send a packet to a computer still using IPv4
Local Address Used when organization wants to use IPv6 protocol without being connected to the global Internet Link local address used in an isolated subnet Site local address used in an isolated site with several subnets