CCN - Chapter - 4
CCN - Chapter - 4
host network
network
data link
network
data link
on sending side
physical physical
data link
physical network network
into datagrams
network
on receiving side,
network
data link data link
physical physical
delivers segments to
network
data link
physical
transport layer network
application
transport
network layer protocols network
data link
physical
network
data link
network
data link
Routing
Algorithm
control
plane
data
plane
values in arriving
packet header
0111 1
2
3
Remote Controller
control
plane
data
plane
CA
CA CA CA CA
values in arriving
packet header
0111 1
2
3
routing, management
routing control plane (software)
processor operates in millisecond
time frame
forwarding data plane
(hardware) operttes
in nanosecond
timeframe
high-seed
switching
fabric
physical layer:
bit-level reception
data link layer: decentralized switching:
e.g., Ethernet using header field values, lookup
see chapter 5 output port using forwarding table in
input port memory (“match plus
action”)
goal: complete input port processing at
‘line speed’
queuing: if datagrams arrive faster
than forwarding rate into switch fabric
Network Layer: Data 4-12
Plane
Input port functions
lookup,
link forwarding
line layer switch
termination protocol fabric
(receive)
queueing
physical layer:
bit-level reception decentralized switching:
data link layer: using header field values, lookup output
e.g., Ethernet port using forwarding table in input port
see chapter 5 memory (“match plus action”)
destination-based forwarding: forward
based only on destination IP address
(traditional)
generalized forwarding: forward based
on any set of header field values
otherwise 3
examples:
DA: 11001000 00010111 00010110 10100001 which interface?
DA: 11001000 00010111 00011000 10101010 which interface?
Network Layer: Data 4-15
Plane
Longest prefix matching
we’ll see why longest prefix matching is
used shortly, when we study addressing
longest prefix matching: often
performed using ternary content
addressable memories (TCAMs)
• content addressable: present address to
TCAM: retrieve address in one clock cycle,
regardless of table size
• Cisco Catalyst: can up ~1M routing table
entries in TCAM
memory
input output
port memory port
(e.g., (e.g.,
Ethernet) Ethernet)
system bus
switch switch
fabric fabric
datagram
switch buffer link
fabric layer line
protocol termination
queueing (send)
buffering required when datagrams arrive from fabric faster than the
transmission rate Datagram (packets) can be
scheduling discipline chooses among queued datagrams for transmission
lost due to congestion, lack of
buffers
Priority scheduling – who gets best
performance, network neutrality
switch
switch
fabric
fabric
packet packet
arrivals queue link departures
(waiting area) (server)
priorities 2
1 3 4 5
• class may depend arrivals
on marking or
other header info, packet
in 1 3 2 4 5
e.g. IP source/dest, service
2
1 3 4 5
arrivals
packet
in 1 3 2 4 5
service
departures
1 3 3 4 5
physical layer
…
in: one large datagram
• different link types, out: 3 smaller datagrams
different MTUs
large IP datagram
divided (“fragmented”)
within net reassembly
• one datagram
becomes several
datagrams
…
• “reassembled” only at
final destination
• IP header bits used to
identify, order related
fragments
Network Layer: Data 4-32
Plane
IP fragmentation,
reassembly
length ID fragflag offset
example: =4000 =x =0 =0
4000 byte
datagram one large datagram becomes
several smaller datagrams
MTU = 1500
bytes
1480 bytes in length ID fragflag offset
data field =1500 =x =1 =0
connection between
host/router and 223.1.1.3
223.1.3.27
each isolated
network is called 223.1.3.0/24
a subnet
subnet mask: /24
Network Layer: Data 4-38
Plane
Subnets 223.1.1.2
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
223.1.2.0/24
223.1.3.1 223.1.3.2
223.1.3.0/24
DHCP offer
src: 223.1.2.5, 67
Broadcast: I’m a DHCP
dest: 255.255.255.255, 68
server! Here’s an IP
yiaddrr: 223.1.2.4
transaction
address youID:can
654 use
lifetime: 3600 secs
DHCP request
src: 0.0.0.0, 68
dest:: 255.255.255.255, 67
Broadcast: OK. I’ll
yiaddrr: 223.1.2.4
take that IPID:address!
transaction 655
lifetime: 3600 secs
DHCP ACK
src: 223.1.2.5, 67
dest: 255.255.255.255,
Broadcast: 68
OK. You’ve
yiaddrr: 223.1.2.4
gottransaction
that IPID:address!
655
lifetime: 3600 secs
encapsulation of
DHCP DHCP DHCP server, frame
DHCP UDP forwarded to client,
DHCP IP demuxing up to
Eth router with DHCP
DHCP
DHCP at client
client
DHCP
Phy server built into now knows its
router IP address, name
and IP address of
DSN server, IP
address of its first-
hop router
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”
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
data
32 bits
Network Layer: Data 4-60
Plane
Other changes from IPv4
checksum: removed entirely to reduce
processing time at each hop
options: allowed, but outside of header,
indicated by “Next Header” field
ICMPv6: new version of ICMP
• additional message types, e.g. “Packet Too
Big”
• multicast group management functions
IPv6 datagram
IPv4 datagram
Network Layer: Data 4-62
Plane
Tunneling
A B IPv4 tunnel E F
connecting IPv6 routers
logical view:
IPv6 IPv6 IPv6 IPv6
A B C D E F
physical view:
IPv6 IPv6 IPv4 IPv4 IPv6 IPv6
A B C D E F
physical view:
IPv6 IPv6 IPv4 IPv4 IPv6 IPv6
data data
A-to-B: E-to-F:
IPv6 B-to-C: B-to-C: IPv6
IPv6 inside IPv6 inside
IPv4 IPv4 Network Layer: Data 4-64
Plane
IPv6:
adoption
Google: 8% of clients access services via
IPv6
NIST: 1/3 of all US government domains
are IPv6 capable
control plane
data plane
local flow table
headers counters actions
1
0100 1101
3 2
values in arriving
packet’s header
Network Layer: Data 4-67
Plane
OpenFlow data plane abstraction
flow: defined by header fields
generalized forwarding: simple packet-handling rules
• Pattern: match values in packet header fields
• Actions: for matched packet: drop, forward, modify, matched
packet or send matched packet to controller
• Priority: disambiguate overlapping patterns
• Counters: #bytes and #packets
* : wildcard
1. src=1.2.*.*, dest=3.4.5.* drop
2. src = *.*.*.*, dest=3.4.*.* forward(2)
3. src=10.1.2.3, dest=*.*.*.* send to controller
OpenFlow: Flow Table
Entries
Rule Action Stats
3 4
Host h5
10.3.0.5
1 s1 1 s2
2 Host h4
4 2 4
Host h1 10.2.0.4
3 3
10.1.0.1
Host h2
10.1.0.2 match action
match action Host h3
ingress port = 2
10.2.0.3 forward(3)
ingress port = 1 IP Dst = 10.2.0.3
IP Src = 10.3.*.* forward(4) ingress port = 2
forward(4)
IP Dst = 10.2.*.* IP Dst = 10.2.0.4
Chapter 4: done!
4.1 Overview of 4.4 Generalized
Network layer: data Forward and SDN
plane and control • match plus action
plane • OpenFlow example
4.2 What’s inside a
router
4.3 IP: Internet Protocol
Question: how do forwarding tables
• datagram format (destination-based forwarding) or
• fragmentation flow tables (generalized forwarding)
computed?
• IPv4 addressing Answer: by the control plane (next
• NAT chapter)
• IPv6