Sei sulla pagina 1di 123

The Network Layer

Chapter 5

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Network Layer Design Issues

• Store-and-forward packet switching


• Services provided to transport layer
• Implementation of connectionless service
• Implementation of connection-oriented service
• Comparison of virtual-circuit and datagram
networks

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Store-and-Forward Packet Switching

ISP’s equipment

The environment of the network layer protocols.

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Services Provided to the Transport Layer

1. Services independent of router technology.


2. Transport layer shielded from number, type,
topology of routers.
3. Network addresses available to transport
layer use uniform numbering plan
– even across LANs and WANs

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Implementation of Connectionless Service
ISP’s equipment

A’s table (initially) A’s table (later) C’s Table E’s Table

Routing within a datagram network


Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Implementation of
Connection-Oriented Service
ISP’s equipment

A’s table C’s Table E’s Table

Routing within a virtual-circuit network


Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Comparison of Virtual-Circuit
and Datagram Networks

Comparison of datagram and virtual-circuit networks


Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Routing Algorithms (1)

• Optimality principle
• Shortest path algorithm
• Flooding
• Distance vector routing
• Link state routing
• Routing in ad hoc networks

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Routing Algorithms (2)

• Broadcast routing
• Multicast routing
• Anycast routing
• Routing for mobile hosts
• Routing in ad hoc networks

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Fairness vs. Efficiency

Network with a conflict between fairness and efficiency.

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
The Optimality Principle

(a) A network. (b) A sink tree for router B.

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Shortest Path Algorithm (1)

The first five steps used in computing the shortest path from A
to D. The arrows indicate the working node
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Distance Vector Routing

a) Completely decentralized
b) No node has complete information about the costs of all
network links
c) Gradual calculation of path by exchanging information with
neighbors
– Remember -- network as a graph ?

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
An Example
B A B C D E F G
C
A
D A 0 1 1 ∞ 1 1 ∞
E
B 1 0 1 ∞ ∞ ∞ ∞
F G
C 1 1 0 1 ∞ ∞ ∞
• Internal Information at each D ∞ ∞ 1 0 ∞ ∞ 1
node ----->
E 1 ∞ ∞ ∞ 0 ∞ ∞
F 1 ∞ ∞ ∞ ∞ 0 1
G ∞ ∞ ∞ 1 ∞ 1 0
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Routing Tables

Cost Next
B

Hop
A
D

B 1 B
E

C 1 C
F G

a) With this
information, routing
D ∞ -
table at A is --> E 1 E
F 1 F
G ∞ -
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Evolution of the table.

a) Each node sends a message to


neighbors with a list of
Cost Next
distances. Hop
b) F --> A with G is at a distance 1
c) C --> A with D at distance 1. B 1 B
C 1 C
B D 2 C
E 1 E
C
A
D

E F 1 F
F G G 2 F
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Final Distance Matrix

B A B C D E F G
C
A
D A 0 1 1 2 1 1 2
E
B 1 0 1 2 2 2 3
F G
C 1 1 0 1 2 2 2
D 2 2 1 0 3 2 1
E 1 2 2 3 0 2 3
F 1 2 2 2 2 0 1
G 2 3 2 1 3 1 0
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Routing updates
a) When are routing updates sent ?
1. Periodic updates
– Even if nothing has changed, send periodically. Main reason is to
let other nodes know that the sender is alive.
– Refresh information that might be needed if some of the routes
were to become unavailable.
2. Triggered updates
– When a node receives an update from one of its neighbors which
may lead to a change in its routing tables (could be due to
change in link cost).
o Note: typically order of periodicity is seconds to
several minutes.

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Link/Node Failures

a) Nodes that first notice send new lists of distances to


neighbors.
b) How do they detect failures ?
– Route updates don’t arrive
– Probing with test packets.

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Example Revisited

a) Let link from F to G fail.


b) F sets new distance to G to ∞;
sends update to A.
c) A was initially routing to G via F. So
it now sets link cost to G to ∞.
d) Next update from C; A learns that C
has 2 hop path to G.
e) A now can reach G in 3 hops via C.
B
f) A sends an update to F. Thus, F C
now, can reach G via A in 4 hops. A
D

F G

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Count to Infinity

a) A discovers that link to E is lost. • The process


b) If before A’s message (saying that link continues and
cost to E is ∞) is received, if B or C
thus, the system
advertise that they can reach E in two
hops, then A can be confused. does not stabilize.
c) Another possibility, B gets A’s update • This is the count
followed by C’s update which says to infinity problem.
that E is reachable in 2 hops.
d) So B tells A this, and A thinks it can
now reach E via B in 3 hops. B
e) This information reaches C who now C
thinks that it can reach E in 4 hops via A
D
A.
E

F G

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Split Horizon
a) One solution would be to approximate ∞ to say 16
hops.
b) With Split Horizon, when a node sends a routing table
update to its neighbors, it “does not” send those routes
it learned from “a particular” neighbor, back to that
neighbor.
– For example, B had E, 2, A. When it sends a route update to
A, it does not include this.
c) With split horizon with poison reverse, this update is
reported but the link weight is set to ∞.
– For example B sends (E, ∞) to A.

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Does this work ?

a) Works only if there is a loop with only 2 nodes.


b) Typically, in static networks where link failures/node
failures are rare, this may be enough.
c) Speed of convergence is why, link state routing may
be preferable -- it takes a while before routes
converge.

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Link State Routing

a) Also called shortest path first (SPF) forwarding


– Named after Dijkstra’s algorithm (1959) which it uses to compute
routes
b) All routers have tables which contain a representation of the
entire network topology
– In the form of lists of routers and information about each router’s
neighbours and the connection between the two

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Link State Routing

a) Each router creates a link state packet (LSP) which


contains names (e.g. network addresses) and cost
to each of its neighbours
– The LSP is transmitted to all other routers, who each
update their own records
– When a routers receives LSPs from all routers, it can use
(collectively) that information to make topology-level
decisions

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Link State Packets

a) LSPs are generated and distributed when:


– A time period passes
– New neighbours connect to the router
– The link cost of a neighbour has changed
– A link to a neighbour has failed (link failure)
– A neighbour has failed (node failure)

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Link State Packets

a) LSP are essentially a list of tuples, containing:


– The name of a neighbour to a router
• Which may be a router or a network
– The cost of the link to that neighbour

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Link State Packets

a) Distribution of LSPs can be difficult


– Routers themselves are the means for delivering messages
– How do routers deliver their own messages, particularly when routers
are in an inconsistent state
• e.g. During link failure, before each router has been notified
of the problem

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Dijkstra’s LSR Algorithm
a) Consider the following network:

6 2
A B C 5

2 1 2
G
2 4
D E F 1

Link state database:

A B C D E F G
B 6 A 6 B 6 A 2 B 1 C 2 C 5
D 2 C 2 F 2 E 2 D 2 E 4 F 1
E 1 G 5 F 4 G 1
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Dijkstra’s LSR Algorithm
a) Now, if we want to generate a PATH for
C:
– First, we add (C,0,0) to PATH
C (0)

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Dijkstra’s LSR Algorithm
a) Examine C’s LSP
– Add F, G, and B to TENT

C (0)

(2) (5) (2)


F G B

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Dijkstra’s LSR Algorithm
a) Place F in PATH (shown as solid line)
– Add G and E to TENT (adding costs)

C (0)

(2) (5) (2)


F G B

(3) (6)
G
E

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Dijkstra’s LSR Algorithm
a) G exists in TENT twice, keep only the
best
– The new G is a better path than the old (3 <
5)
C (0)

(2) (5) (2)


F G B

(3) (6)
G
E

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Dijkstra’s LSR Algorithm
a) Put B into path (shown as solid line)
– Add A and E to TENT

C (0)

(2) (2)
F B

(3) (6) (3) (8)


G A
E E

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Dijkstra’s LSR Algorithm
a) E exists in TENT twice, keep only the
best
– The new E is better than the old (3 < 6)
C (0)

(2) (2)
F B

(3) (6) (3) (8)


G A
E E

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Dijkstra’s LSR Algorithm
a) Place E in PATH (shown as solid line)
– Add D to TENT

C (0)

(2) (2)
F B

(3) (3) (8)


G A
E

(5)
D

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Dijkstra’s LSR Algorithm
a) Place G in PATH (shown as solid line)
– All G’s LSP elements already exist in TENT

C (0)

(2) (2)
F B

(3) (3) (8)


G A
E

(5)
D

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Dijkstra’s LSR Algorithm
a) Place D in PATH (shown as solid line)
– Add path to A since it is better than old A

C (0)

(2) (2)
F B

(3) (3) (8)


G A
E

(5)
D

(7)
A
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Dijkstra’s LSR Algorithm
a) Place A in PATH (shown as solid line)
– All A’s LSP elements already exist in PATH

C (0)

(2) (2)
F B

(3) (3)
G
E

(5)
D

(7)
A
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Dijkstra’s LSR Algorithm
a) We are done since all routes from TENT
were placed into PATH

C (0)

(2) (2)
F B

(3) (3)
G
E

(5)
D

(7)
A
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Dijkstra’s LSR Algorithm
a) We can now create a forwarding database:

Forwarding Database
C (0) Destination Port

(2) (2) C C
F B
F F
(3) (3)
G
E
G F
B B
(5) E B
D
D B
(7)
A A B
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
LSR Topology Changes
a) LSR forwarding tables must be recalculated
whenever a topology change occurs
– For example, a new router and/or link is added to the
network
• This new link may provide a more efficient route to one or more other
nodes
– For example, a given link’s cost is reduced
• This new link may now provide the lowest total cost route to a destination
that was previously forwarded in another direction
– For example, a given link’s cost is increased
• This new link may no longer provide the lowest total cost route to a given
destination, and another route should now be chosen

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
LSR Topology Changes

a) In a nutshell, LSR routers should invalidate (indicate that it


needs to be regenerated) its PATH data structure, and thus its
forwarding table
– The entire PATH generation algorithm (e.g. Dijkstra’s algorithm) should
be reapplied

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Topology Change Example
a) Let’s consider our previously generated PATH
structure for the router C

C (0)

(2) (2)
F B

(3) (3)
G
E

(5)
D

(7)
A
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Topology Change Example
a) Say we receive an LSP from router B, indicating the
link cost from B to E is now 6

C (0)

(2) (2)
F B

(3) (3)
G
E

(5)
D

(7)
A
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Topology Change Example
a) The total route costs are different in PATH:

C (0)

(2) (2)
F B

(3) (8)
G
E

(10)
D

(12)
A
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Topology Change Example
a) Consider for now, only the cost to A

C (0)

(2) (2)
F B

(3) (8)
G
E

(10)
D

(12)
A
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Topology Change Example
a) Recall that another path to A existed
b) Now, that path is more efficient

C (0)

(2) (2)
F B

(3) (8) (8)


G A
E

(10)
D

(12)
A
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Topology Change Example
a) The PATH data structure is complete, the
forwarding table can now be regenerated

C (0)

(2) (2)
F B

(3) (8) (8)


G A
E

(10)
D

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Topology Change Example

a) In a router, which will be running as a


computer program, finding if a new path
exists essentially requires complete re-
execution of Dijkstra’s algorithm
b) For example, there could have been many
routes to A, each of which would have to be
compared to find the most efficient route

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Hierarchical Routing

Hierarchical routing.

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Broadcast Routing

Reverse path forwarding. (a) A network. (b) A sink tree.


(c) The tree built by reverse path forwarding.

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Multicast Routing (1)

(a) A network. (b) A spanning tree for the leftmost router. (c) A
multicast tree for group 1. (d) A multicast tree for group 2.
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Multicast Routing (2)

(a) Core-based tree for group 1.


(b) Sending to group 1.
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Anycast Routing

(a) Anycast routes to group 1.


(b) Topology seen by the routing protocol.
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Routing for Mobile Hosts

Packet routing for mobile hosts

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Routing in Ad Hoc Networks

The shaded nodes are


(a) Range of A’s broadcast. new recipients. The
(b) After B and D receive it. dashed lines show
(c) After C, F, and G receive it. possible reverse routes.
(d) After E, H, and I receive it. The solid lines show the
discovered route.
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Congestion Control Algorithms (1)

• Approaches to congestion control


• Traffic-aware routing
• Admission control
• Traffic throttling
• Load shedding

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Congestion Control Algorithms (2)

When too much traffic is offered, congestion sets in and


performance degrades sharply.
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Approaches to Congestion Control

Timescales of approaches to congestion control

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Traffic-Aware Routing

A network in which the East and West parts


are connected by two links.
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Traffic Throttling (1)

(a) A congested network. (b) The portion of the network that is


not congested. A virtual circuit from A to B is also shown.
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Traffic Throttling (2)

Explicit congestion notification

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Load Shedding (1)

A choke packet that affects only the source..


Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Load Shedding (2)

A choke packet that affects each hop it passes through.


Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Quality of Service

• Application requirements
• Traffic shaping
• Packet scheduling
• Admission control
• Integrated services
• Differentiated services

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Application Requirements (1)

How stringent the quality-of-service requirements are.

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Categories of QoS and Examples

1. Constant bit rate


• Telephony
2. Real-time variable bit rate
• Compressed videoconferencing
3. Non-real-time variable bit rate
• Watching a movie on demand
4. Available bit rate
• File transfer
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Traffic Shaping (1)

(a) Shaping packets. (b) A leaky bucket. (c) A token bucket

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Traffic Shaping (2)

(a) Traffic from a host. Output shaped by a token bucket of rate


200 Mbps and capacity (b) 9600 KB, (c) 0 KB.
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Traffic Shaping (3)

Token bucket level for shaping with rate 200 Mbps and capacity
(d) 16000 KB, (e) 9600 KB, and (f) 0KB..
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Packet Scheduling (1)

Kinds of resources can potentially be


reserved for different flows:

1. Bandwidth.
2. Buffer space.
3. CPU cycles.

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Packet Scheduling (2)

Round-robin Fair Queuing

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Packet Scheduling (3)

(a) Weighted Fair Queueing.


(b) Finishing times for the packets.
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Admission Control (1)

An example flow specification

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Admission Control (2)

Bandwidth and delay guarantees with token buckets and WFQ.

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Integrated Services (1)

(a) A network. (b) The multicast spanning tree for host 1.


(c) The multicast spanning tree for host 2.
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Integrated Services (2)

(a) Host 3 requests a channel to host 1. (b) Host 3 then


requests a second channel, to host 2.
(c) Host 5 requests a channel to host 1.
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Differentiated Services (1)

Expedited packets experience a traffic-free network

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Differentiated Services (2)

A possible implementation of assured forwarding

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Internetworking

• How networks differ


• How networks can be connected
• Tunneling
• Internetwork routing
• Packet fragmentation

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
How Networks Differ

Some of the many ways networks can differ

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
How Networks Can Be Connected

(a) A packet crossing different networks.


(b) Network and link layer protocol processing.
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Tunneling (1)

Tunneling a packet from Paris to London.

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Tunneling (2)

Tunneling a car from France to England

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Packet Fragmentation (1)
Packet size issues:

1. Hardware
2. Operating system
3. Protocols
4. Compliance with (inter)national standard.
5. Reduce error-induced retransmissions
6. Prevent packet occupying channel too long.

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Packet Fragmentation (2)

(a) Transparent fragmentation.


(b) Nontransparent fragmentation
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Packet Fragmentation (3)

Fragmentation when the elementary data size is 1 byte.


(a) Original packet, containing 10 data bytes.
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Packet Fragmentation (4)

Fragmentation when the elementary data size is 1 byte


(b) Fragments after passing through a network
with maximum packet size of 8 payload bytes plus header.
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Packet Fragmentation (5)

Fragmentation when the elementary data size is 1 byte


(c) Fragments after passing through a size 5 gateway.
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Packet Fragmentation (6)

Path MTU Discovery

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
The Network Layer Principles (1)

1. Make sure it works


2. Keep it simple
3. Make clear choices
4. Exploit modularity
5. Expect heterogeneity
...

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
The Network Layer Principles (2)

...
6. Avoid static options and parameters
7. Look for good design (not perfect)
8. Strict sending, tolerant receiving
9. Think about scalability
10. Consider performance and cost

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
The Network Layer in the Internet (1)

• The IP Version 4 Protocol


• IP Addresses
• IP Version 6
• Internet Control Protocols
• Label Switching and MPLS
• OSPF—An Interior Gateway Routing Protocol
• BGP—The Exterior Gateway Routing Protocol
• Internet Multicasting
• Mobile IP
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
The Network Layer in the Internet (2)

The Internet is an interconnected collection of many networks.

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
The IP Version 4 Protocol (1)

The IPv4 (Internet Protocol) header.

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
The IP Version 4 Protocol (2)

Some of the IP options.

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
IP Addresses (6)

IP address formats

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
IP Addresses (7)

Special IP addresses

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
IP Addresses (1)

An IP prefix.

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
IP Addresses (2)

Splitting an IP prefix into separate networks with subnetting.

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
IP Addresses (3)

A set of IP address assignments

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
IP Addresses (4)

Aggregation of IP prefixes

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
IP Addresses (5)

Longest matching prefix routing at the New York router.

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
IP Addresses (8)

Placement and operation of a NAT box.

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
IP Version 6 Goals
• Support billions of hosts
• Reduce routing table size
• Simplify protocol
• Better security
• Attention to type of service
• Aid multicasting
• Roaming host without changing address
• Allow future protocol evolution
• Permit coexistence of old, new protocols. . .
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
IP Version 6 (1)

The IPv6 fixed header (required).

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
IP Version 6 (2)

IPv6 extension headers

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
IP Version 6 (3)

The hop-by-hop extension header for


large datagrams (jumbograms).
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
IP Version 6 (4)

The extension header for routing.

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Internet Control Protocols (1)

The principal ICMP message types.

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Internet Control Protocols (2)

Two switched Ethernet LANs joined by a router

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Label Switching and MPLS (1)

Transmitting a TCP segment using IP, MPLS, and PPP.

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Label Switching and MPLS (2)

Forwarding an IP packet through an MPLS network

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
OSPF—An Interior Gateway
Routing Protocol (1)

An autonomous system

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
OSPF—An Interior Gateway
Routing Protocol (2)

A graph representation of the previous slide.

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
OSPF—An Interior Gateway
Routing Protocol (3)

The relation between ASes, backbones, and areas in OSPF.

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
OSPF—An Interior Gateway
Routing Protocol (4)

The five types of OSPF messages

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
BGP—The Exterior Gateway
Routing Protocol (1)
Examples of routing constraints:

1. No commercial traffic for educat. network


2. Never put Iraq on route starting at Pentagon
3. Choose cheaper network
4. Choose better performing network
5. Don’t go from Apple to Google to Apple

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
BGP—The Exterior Gateway
Routing Protocol (2)

Routing policies between four Autonomous Systems

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
BGP—The Exterior Gateway
Routing Protocol (3)

Propagation of BGP route advertisements

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Mobile IP
Goals
1. Mobile host use home IP address anywhere.
2. No software changes to fixed hosts
3. No changes to router software, tables
4. Packets for mobile hosts – restrict detours
5. No overhead for mobile host at home.

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
End

Chapter 5

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011

Potrebbero piacerti anche