Académique Documents
Professionnel Documents
Culture Documents
Network Layer
into datagrams
network
data link
physical network
on the receiving side, it data link
physical
delivers the segments to the
transport layer
network
network data link
data link physical
network layer protocols exist physical
routing algorithm
value in arriving
packet’s header
0111 1
3 2
call setup for each call before the data can flow
call teardown for each call after the data transfer is complete
each packet carries a VC identifier (not a destination host
address)
every router on the source-destination path maintains a “state”
for each passing connection
the link and router resources (e.g., bandwidth, buffers) may be
allocated to the VC
12 22 32
1 3
2
1 12 3 22
2 63 1 18
3 7 2 17
1 97 3 87
… … … …
application
6. Receive data application
transport 5. Data flow begins
network 4. Call connected 3. Accept call transport
data link 1. Initiate call 2. incoming call network
data link
physical
physical
application
application
transport
transport
network
data link 1. Send data 2. Receive data network
data link
physical
physical
otherwise 3
Network Layer 4-17
Longest prefix matching
Prefix Match Link Interface
11001000 00010111 00010 0
11001000 00010111 00011000 1
11001000 00010111 00011 2
otherwise 3
Examples
Physical layer:
bit-level reception
Decentralized switching:
Data link layer: given a packet dest., lookup the output port using
e.g., Ethernet the forwarding table in input port memory
see chapter 5 an updated copy of the forwarding table is stored
in each input port avoiding a processing
bottleneck at routing processor
goal: complete input port processing at ‘line speed’
queuing: occurs if a new packet arrives faster
than the forwarding rate into switch fabric
System Bus
Network Layer 4-25
Switching Via a Bus
packet from input port memory to output port memory via a
shared bus
one packet at a time can be transferred
bus contention: switching speed is limited by the bus
bandwidth (at least as fast as all input port together)
example: 1 Gbps bus, Cisco 1900: sufficient speed for access
and enterprise routers (not regional or backbone)
Recipe
To determine the subnets,
detach each interface
from its host or router,
creating islands of isolated
networks. Each isolated
network is called a subnet.
223.1.1.3
223.1.9.2 223.1.7.0
223.1.9.1 223.1.7.1
223.1.8.1 223.1.8.0
223.1.2.6 223.1.3.27
subnet host
part part
11001000 00010111 00010000 00000000
200.23.16.0/23
Network Layer 4-45
IP addresses: how to get one?
Q: How does a host get an IP address?
Organization 0
200.23.16.0/23
Organization 1
“Send me anything
200.23.18.0/23 with addresses
Organization 2 beginning
200.23.20.0/23 . Fly-By-Night-ISP 200.23.16.0/20”
.
. . Internet
.
Organization 7 .
200.23.30.0/23
“Send me anything
ISPs-R-Us
with addresses
beginning
199.31.0.0/16”
Network Layer 4-48
Hierarchical addressing: more specific routes
Fly-By-Night acquires ISPs-R-Us and connect Organization 1 through it:
Organization 1 renumbers all its routers and hosts (very costly solution)
Organization 1 keeps the same numbers, which are specifically advertised by
ISPs-R-Us benefiting from the longest-prefix-match routing feature
Organization 0
200.23.16.0/23
“Send me anything
with addresses
Organization 2 beginning
200.23.20.0/23 . Fly-By-Night-ISP 200.23.16.0/20”
.
. . Internet
.
Organization 7 .
200.23.30.0/23
“Send me anything
ISPs-R-Us
with addresses
Organization 1 beginning 199.31.0.0/16
or 200.23.18.0/23”
200.23.18.0/23
10.0.0.4
10.0.0.2
138.76.29.7
10.0.0.3
A B C D E F
Physical view:
IPv6 IPv6 IPv4 IPv4 IPv6 IPv6
data data
A-to-B: E-to-F:
B-to-C: B-to-C:
IPv6 IPv6
IPv6 inside IPv6 inside
IPv4 IPv4
Network Layer 4-64
Chapter 4: Network Layer
4. 1 Introduction 4.5 Routing algorithms
4.2 Virtual circuit and Link state
datagram networks Distance Vector
Hierarchical routing
4.3 What’s inside a
router 4.6 Routing in the
4.4 IP: Internet Internet
RIP
Protocol
OSPF
Datagram format
BGP
IPv4 addressing
ICMP 4.7 Broadcast and
IPv6 multicast routing
routing algorithm
value in arriving
packet’s header
0111 1
3 2
E = set of edges (or links ) = { (u,v), (u,x), (v,x), (v,w), (x,w), (x,y), (w,y), (w,z), (y,z) }
3 - e.g., c(w,z) = 5
v w 5
2
u 2 1 z • cost could always be 1, or
3 inversely related to
1 2
x 1
y bandwidth, or inversely
related to congestion
Default, first-hop, Destination router
or source router
5
3
v w 5
2
u 2 1 z
3
1 2
x 1
y
v w
u z
x y
1 A A A A
1+e 2+e 0 0 2+e 2+e 0
D 0 0 B D 1+e 1 B D B D 1+e 1 B
0 0
0 e 0 0 1 1+e 0 e
1
C C C C
1
e
… recompute … recompute … recompute
initially
routing
Network Layer 4-75
Chapter 4: Network Layer
4. 1 Introduction 4.5 Routing algorithms
4.2 Virtual circuit and Link state
datagram networks Distance Vector
Hierarchical routing
4.3 What’s inside a
router 4.6 Routing in the
4.4 IP: Internet Internet
RIP
Protocol
OSPF
Datagram format
BGP
IPv4 addressing
ICMP 4.7 Broadcast and
IPv6 multicast routing
from
from
y ∞∞ ∞ y 2 0 1
from
y 2 0 1
z ∞∞ ∞ z 7 1 0 z 3 1 0
node y table cost to
cost to cost to
x y z x y z x y z y
2 1
x ∞ ∞ ∞ x 0 2 7 x 0 2 3 x z
from
y 2 0 1 y 2 0 1 7
from
from
y 2 0 1
z ∞∞ ∞ z 7 1 0 z 3 1 0
node z table
cost to cost to cost to
x y z x y z x y z
x ∞∞ ∞ x 0 2 7 x 0 2 3
from
from
y 2 0 1 y 2 0 1
from
y ∞∞ ∞
z 71 0 z 3 1 0 z 3 1 0
time
Network Layer 4-82
Distance Vector: link cost changes
Link cost changes: 1
node detects local link cost change y
4 1
updates routing info, recalculates
x z
distance vector 50
if DV changes, notify neighbors
Gateway router
direct link to a routers in another AS
3c
3a 2c
3b 2a
AS3 2b
1c AS2
1a 1b
1d AS1
Network Layer 4-90
Example: Setting forwarding table in router 1d