CMPE 252A: Computer Networks Set 9a : IP Int nter ernet networ orking king 1 Internetworking Arbitrary collection of physical networks interconnected to provide an end-to-end (host-to- host) packet delivery service. Networks differ in many ways: Service offered: datagrams vs connections Protocols and mechanisms used Address space Topology and physical media An internetwork should make all these differences transparent to end nodes. 2 IP Internetworking Based on Cerf ’ s catenet model V.G. Cerf, “ The Catenet Model for Internetworking, ” IEN 48, July 1978. Basic premises: Heterogeneous transmission media Heterogeneous hardware and OS in hosts and gateways Common protocol for network interconnection runs in all gateways and hosts! Common protocol used for data transfer and signaling Common address space used to identify where a host or router is in the internetwork An address states at which network a node attaches to the internetwork 3 1
Catenet Model NET NET G G G G NET NET A network is the address of a host in the internet A single address space, with addresses that are globally unique A single protocol for delivering all user and control data Common protocol runs in all gateways and hosts A common definition of services 4 Service Model: Theory and Practice The Internet Protocol (IP) evolved from the catenet model. Theory: Datagram Delivery is assumed, so that packets can get lost, out of order, and multiple copies can be delivered. Practice: TCP needs in-order delivery of packets to work efficiently, and (as we will see) Internet routing protocols provide a single path for each destination and do not adapt very rapidly. Too many destinations! 5 IP Internet Today R R R R R R R R R A single path to each destination, link costs are static. Starting with NSFNET, routers run IP and the Internet is based on routers running IP interconnecting autonomous systems. 6 2
IP Internet Today Semi-hierarchical topology Tier 2 IXP IXP ISP Tier 2 Tier 2 ISP ISP Large Content Tier 1 ISP Large Content Distributor Distributor (e.g., Google ) (e.g., Akamai ) Tier 2 Tier 1 ISP Tier 1 ISP ISP Tier 2 Tier 2 Tier 2 Tier 2 Tier 2 ISP ISP ISP ISP ISP IXP: Internet Exchange Point 7 IP Internet Today Internet Protocol (IP) is the glue A Success tale of “ two worlds with a little glue ” R “ Networking ” is R R R independent of R R R processing and R R storage of content. “ Simple ” store-and-forward networking “ Rich ” end-to-end services: Processing and storage of content 8 Hierarchical Routing Scale: 100 ’ s millions of destinations: Routing table cannot store an entry for each destination! Routing table exchange would swamp links. Administrative autonomy Internet is a network of networks Each network administrator may want to control routing in its own network. 9 3
Hierarchical Routing Autonomous routing domains Gateway Routers (ARD): Group of physical networks using IP with one routing Special routers in AS policy (e.g., campus network, ISP Run intra-AS routing internal network, corporate protocol with all other routers in AS networks) R esponsible for routing to Autonomous Systems (ASes) destinations outside AS An ARD with an autonomous run inter-AS routing system number (ASN) protocol with other Routers in same ARD run same gateway routers (BGP). routing protocol. Routers in different ASes can run different intra-AS (intra-domain) routing protocol 10 Intra-AS and Inter-AS Routing C.b Gateways: B.a • Perform inter-AS A.a routing amongst b c A.c themselves a a C b • Perform intra-AS a B routers with other d c routers in their AS b A network layer inter-AS, intra-AS link layer routing in physical layer gateway A.c 11 Intra-AS and Inter-AS Routing Inter-AS routing between A and B C.b B.a A.a b c A.c Host D a a C b a B d c b Intra-AS routing A Host S within AS B Intra-AS routing within AS A 12 4
Layers in Internet Routing Routing Routing Routing Routing APPLICATION APPLICATION Table Protocol Protocol Table PRESENTATION PRESENTATION SESSION SESSION TRANSPORT (TCP or UDP) TRANSPORT Routing Routing Table Table NETWORK NETWORK IP IP LINK LINK PHYSICAL PHYSICAL 13 IPv4 Packet Information 0 23 31 3 7 15 version HLen TOS length flags identifier offset TTL protocol checksum source address destination address Options (variable) pad (variable) data Typically no options and header is 20 bytes 14 IPv4 Datagram Format IP protocol version 32 bits total datagram number length (bytes) header length head. type of ver len service length (words) for “ type ” of data fragment fragmentation 16-bit identifier flgs offset and max number time to upper Internet reassembly remaining hops live layer checksum (decremented at 32 bit source IP address each router) 32 bit destination IP address upper layer protocol to deliver payload to Options (if any) e.g., timestamp, record route how much overhead with data taken, specify TCP? (variable length, list of routers 20 bytes of TCP typically a TCP to visit. or UDP segment) 20 bytes of IP = 40 bytes + app layer overhead 15 5
IPv4 Header TTL (time to live indicates how long the packet can stay in the network; it is specified in hops and is decremented each time the packet is forwarded. Default is 64 hops; nodes can play with the field to limit the scope Protocol specifies the type of payload Checksum is computed considering the entire header as a sequence of 16-bit words, adding them up with 1 ’ s complement arithmetic and taking the 1 ’ s complement of the result. This checksum is NOT as powerful as a CRC but is simple to do in software. Why this way? Because it is (was) done at each hop in software What if we process headers in hardware? 16 IPv4 Addresses IP addresses are global and, unlike MAC addresses, they are hierarchical. IP address has a network part and a host part and specifies host@network A host has an address for each network to which it attaches. IP addresses are denoted using the dotted-decimal notation: Each byte of the address is written in its decimal form and is separated by a dot from the other bytes, e.g., 5.7.2.1 => 00000101 00000111 00000010 00000001 17 IPv4 Addresses 223.1.1.1 IP address: 32-bit identifier for host, 223.1.2.1 223.1.1.2 router interface 223.1.1.4 223.1.2.9 Interface: connection 223.1.2.2 between host or 223.1.3.27 223.1.1.3 router and physical link Router ’ s typically have 223.1.3.2 223.1.3.1 multiple interfaces Host may have multiple interfaces IP addresses associated 223.1.1.1 = 11011111 00000001 00000001 00000001 with each interface 223 1 1 1 18 6
IPv4 Addresses Routing table entries 223.1.2.* 223.1.1.* referring to destinations in the same AS refer to networks only. 223.1.3.* 19 IPv4 Addressing Problems There were too few networks left due to the class structure used in IP address assignments There are many more IP devices and appliances coming. Routing tables cannot have millions of entries. Solutions: Aggregation of addresses without classes (CIDR) New and much bigger global address space (IPv6) Locally unique addresses (NAT and other techniques) Go to names? 20 Class-based IPv4 Addresses (past) 8 16 0 24 31 Class A 0 network host 126 16 million Class B 10 network host 16,382 65,534 110 network host Class C 2 million 254 Class D multicast address 1110 Class E 11110 reserved address 21 7
IP Addressing: CIDR Classful addressing: Inefficient use of address space, address space exhaustion. A class B address has enough addresses for 65K hosts, even if only a few more than 256 hosts are located in that network CIDR: Classless InterDomain Routing Eliminate the strict assignment of address portion in class-full addressing. Enable a network portion of address of arbitrary length. CIDR Address Format: a.b.c.d/x, where x is # bits in network portion of address host network part part 11001000 00010111 00010000 00000000 200.23.16.0/23 22 Assigning IP Addresses to Hosts Hard-coded by system administrator in a file Wintel: control-panel->network->configuration-> tcp/ip->properties UNIX: /etc/rc.config Obtain address from a server dynamically ( “ plug-and-play ” ) This is the purpose of DHCP: Dynamic Host Configuration Protocol: 23 Assigning Network Portion of IP Address to a Network An ISP obtains a block of the address space. Net is allocated portion of its provider ISP ’ s address space. ISP's block 11001000 00010111 00010000 00000000 200.23.16.0/20 Organization 0 11001000 00010111 0001 000 0 00000000 200.23. 16 .0/23 Organization 1 11001000 00010111 0001 001 0 00000000 200.23. 18 .0/23 Organization 2 11001000 00010111 0001 010 0 00000000 200.23. 20 .0/23 ... … .. … . … . Organization 7 11001000 00010111 0001 111 0 00000000 200.23. 30 .0/23 24 8
Recommend
More recommend