5. Classless and Subnet Address Extensions 최 양 희 서울대학교 컴퓨터공학부 1
Introduction In the original IP addressing scheme, each physical network is assigned a unique network address Individual sites can have the freedom to modify addresses and routes as long as the modifications remain invisible to other sites 2009 Yanghee Choi 2
Minimizing Network Numbers Rapid growth of Internet size - large population of networks with trivial size Immense administrative overhead Routing tables become extremely large Address space will eventually be exhausted Routing overhead is high Original address scheme could not accommodate the number of networks currently in the global Internet - especially class B addresses 2009 Yanghee Choi 3
Subnet Addressing Subnet addressing, subnet routing, subnetting Required part of IP addressing Example :a site has a single class B IP network address assigned to it, but has two or more physical networks Network 128.10.1.0 128.10.1.1 128.10.1.2 REST OF THE INTERNET R H1 H2 Network 128.10.2.0 128.10.2.1 128.10.2.2 all traffic to H3 H4 2009 Yanghee Choi 128.10.0.0 4
Subnet Addressing Conceptual interpretation of a 32-bit IP address Internet part local part Internet part physical network host Hierarchical addressing, hierarchical routing E.g., telephone system 2009 Yanghee Choi 5
Flexibility in Subnet Address Assignment To allow maximum flexibility in choosing how to partition subnet address, the TCP/IP subnet standard permits subnet interpretation to be chosen independently for each physical network. Once a subnet partition has been selected, all machines on that network must honor it Network 1 R1 To rest of Internet R2 R3 Network 2 Network 3 R4 R5 Network 4 Network 5 2009 Yanghee Choi 6
Subnet Mask A site using subnet addressing must choose a 32-bit subnet mask for each network Example 11111111 11111111 11111111 00000000 11111111 11111111 00011000 01000000 Subnet mask representation Dotted decimal notation e.g.) 255.255.255.0 {<network number>, <subnet number>, <host number>} e.g.) { 128.10, 1, 0 } 2009 Yanghee Choi 7
Subnet Routing Algorithm Conventional routing table entry (network address, next hop address) Subnet routing table entry (subnet mask, network address, next hop address) 2009 Yanghee Choi 8
Algorithm: Subnet Routing Algorithm Route_IP_Datagram(datagram, routing_table) Extract destination IP address, I D, from datagram; Compute IP address of destination network, I N ; if I N matches any directly connected network address send datagram to destination over that network (This involves resolving I D to a physical address, encapsulating the datagram, and sending the frame.) else for each entry in routing table do Let N be the bitwise-and of I D and the subnet mask If N equals the network address field of the entry then route the datagram to the specified next hop address endforloop If no matches were found, declare a routing error; 2009 Yanghee Choi 9
Classless Addressing To accommodate growth until the new version of IP could be standardized and adopted, temporary solutions were found Subnet addressing Classless addressing Classless Addressing: allows the use of many IP network addresses for a single organization IP does not divide network addresses into classes equally Class C numbers were being requested slowly At the rate class B numbers were being assigned, all numbers would be exhausted in only a few years ROADS(Running Out of Address Space) problem To conserve class B numbers, the supernetting scheme assigns an organization a block of class C addresses instead of a single class B number 2009 Yanghee Choi 10
CIDR CIDR(Classless Inter-Domain Routing) Collapses a block of contiguous class C addresses into a single entry: (network address, count) network: the smallest network address in the block count: total number of network addresses in the block e.g.) (192.5.48.0, 3) = (192.5.48.0, 192.5.49.0, 192.5.50.0) each block of addresses is a power of two, and uses a bit mask to identify the size of the block -> reduce size of routing table CIDR notation ex) 128.211.168.0/21 Dotted decimal 32-bit binary equivalent lowest 128.211.168.0 10000000 11010011 10101000 00000000 highest 128.211.175.255 10000000 11010011 10101111 11111111 CIDR mask 1111111111111111111111000 00000000 2009 Yanghee Choi 11
Classless Lookup CIDR address is not self-identifying : router cannot determine the division between prefix and suffix by looking at the address Lookup algorithm : speed for lookup, speed of making changes LPM (Longest Prefix Matching) Binary Trie Patricia Trie Level Compressed Trie Many other patented algorithms compete in the market 2009 Yanghee Choi 12
2009 Yanghee Choi 13
2009 Yanghee Choi 14
2009 Yanghee Choi 15
2009 Yanghee Choi 16
2009 Yanghee Choi 17
2009 Yanghee Choi 18
2009 Yanghee Choi 19
2009 Yanghee Choi 20
2009 Yanghee Choi 21