Upload
bernard-hines
View
239
Download
6
Tags:
Embed Size (px)
Citation preview
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Network Layer:19.1 Internetworks19.2 Addressing
Classful, Classless addressing, NAT
19.3 Routing
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Example Example
A router inside the organization receives the same packet with destination address 190.240.33.91. Show how it finds the subnetwork address to route the packet.
SolutionSolution
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, 190.240.33.91. The subnet
address is 190.240.32.0. 3. 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 address
Interface
191.240.11.0191.240.12.0190.240.32.0
f1f2f3
191.240.12.0
190.240.32.0
191.240.11.0
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.
NoteNote::
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Communication at the network layer in the Internet is connectionless.
NoteNote::
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
19.3 Routing19.3 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 19.31 Default routing
Network address 0.0.0.0
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.
Static Dynamic
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Example 10Example 10
Using the table in Figure 19.32, the router receives a packet for destination 192.16.7.1. 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).
192.16.7.1 11000000 00010000 00000111 0000000111111111 11111111 11111111 1111111111000000 00010000 00000111 00000001
/32
192.16.7.1
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Example 11Example 11
Using the table in Figure 19.32, the router receives a packet for destination 193.14.5.22. 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).
193.14.5.22 11000001 00001110 00000101 0001011011111111 11111111 11111111 0000000011000001 00001110 00000101 00000000
/24
193.14.5.0
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Example 12Example 12
Using the table in Figure 19.32, the router receives a packet for destination 200.34.12.34. 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 m0.
200.34.12.34 11001000 00100010 00001100 0010001000000000 00000000 00000000 0000000000000000 00000000 00000000 00000000
/0
0.0.0.0
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Figure 19.32 Classless addressing routing table
Mask Destination address
Next-hop address
Interface
/24/24…/24/25/25
190.100.0.0190.100.1.0
…190.100.63.0190.100.64.0190.100.64.12
8
118.45.23.8
202.45.9.3…
84.78.8.12146.11.10.
614.1.10.5
m0m1…m3m0m2
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 routingMask Destination
addressNext-hop address
Interface
/24/24/24/25/25/24/24/24/25/25/24/24/24/25/25
ABCDEFGHIJKLMOPQ
-BCBBBBBBCCCCCCC
-M0M1M0M0M0M0M0M0M1M1M1M1M1M1M1
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Hierarchical routing (2-level)Mask Destination
addressNext-hop address
Interface
/24/24/24/25/25/24/24
ABC
Region 2Region 3Region 4Region 5
-BCBBCC
-M0M1M0M0M1M1
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 networkNational 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