McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Network Layer: 19.1 Internetworks 19.2 Addressing Classful, Classless addressing, NAT 19.3 Routing
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Figure 19.2 Links in an internetwork
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Figure 19.3 Network layer in an internetwork
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Figure 19.4 Network layer at the source
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 IP Packet Header bits
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Figure 19.5 Network layer at a router
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Example A router inside the organization receives the same packet with destination address Show how it finds the subnetwork address to route the packet. Solution The router follows three steps: 1.The router must know the mask. Assume it is /19. 2.The router applies the mask to the address, The subnet address is The router looks in its routing table to find how to route the packet to this destination.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Next-hop addressInterface f1 f2 f
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Figure 19.6 Network layer at the destination
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Figure 19.7 Switching
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Figure 19.7 Switching
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Figure 19.7 Switching
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Figure 19.8 Datagram approach
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Switching at the network layer in the Internet is done using the datagram approach to packet switching. Note:
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Communication at the network layer in the Internet is connectionless. Note:
McGraw-Hill©The McGraw-Hill Companies, Inc., Routing Routing Techniques Static Versus Dynamic Routing Routing Table for Classful Addressing Routing Table for Classless Addressing
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Routing Techniques Next-hop routing Network-specific routing Host-specific routing Default routing
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Figure Next-hop routing
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Figure Network-specific routing
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Figure Host-specific routing
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Figure Default routing Network address
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Static and Dynamic Routing Tables Routes manually entered By administrator If Internet changes, table is updated manually Good for small internet, experiments, troubleshooting Routes periodically updated By protocols like RIP, OSPF, BGP (ch21) If Internet changes, protocols update tables. Good for big internet such as the Internet. StaticDynamic
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Figure Classful addressing routing table
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Example 10 Using the table in Figure 19.32, the router receives a packet for destination For each row, the mask is applied to the destination address until a match with the destination address is found. In this example, the router sends the packet through interface m0 (host specific) /
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Example 11 Using the table in Figure 19.32, the router receives a packet for destination For each row, the mask is applied to the destination address until a match with the next-hop address is found. In this example, the router sends the packet through interface m2 (network specific) /
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Example 12 Using the table in Figure 19.32, the router receives a packet for destination For each row, the mask is applied to the destination address, but no match is found. In this example, the router sends the packet through the default interface m /
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Figure Classless addressing routing table MaskDestination address Next-hop address Interface /24 … /24 / … … m0 m1 … m3 m0 m2
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 An example of address allocation and distribution by an ISP
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 No Hierarchical routing MaskDestination address Next-hop address Interface /24 /25 /24 /25 /24 /25 ABCDEFGHIJKLMOPQABCDEFGHIJKLMOPQ -BCBBBBBBCCCCCCC-BCBBBBBBCCCCCCCC - M0 M1 M0 M1
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Hierarchical routing (2-level) MaskDestination address Next-hop address Interface /24 /25 /24 A B C Region 2 Region 3 Region 4 Region 5 -BCBBCC-BCBBCC - M0 M1 M0 M1
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Geographic routing A U.S. backbone A European backbone Leased transatlantic lines Leased lines to Asia Regional network National network
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Summary Classful addressing (obsolete) Wasteful address archetecture Network boundaries are fixed at 8, 16 and 24 bits (class A, B, and C) Classless addressing Efficient address architecture Network boundaries may occur at any bit (/12, /16,/19,/24, etc) Best Current Practice
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Summary NAT allows private network to use a set of private addresses internally, and global addresses externally. Routing Static / Dynamic Classful / Classless routing Hierarchical / Geographical routing Alleviates IP depletion Prevent immense routing table sizes Used for the Internet