Chapter 4 Network DataPlane
Chapter 4 Network DataPlane
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
routing, management
routing control plane (software)
processor operates in millisecond
time frame
forwarding data plane
(hardware) operates
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 Plane 4-10
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 port
using forwarding table in input port memory
e.g., Ethernet
(“match plus action”)
see chapter 5 destination-based forwarding: forward based
only on destination IP address (traditional)
generalized forwarding: forward based on any
set of header field values, e.g. for varying delay
and latency, quality of service, in software-
defined networking
otherwise 3
examples:
DA: 11001000 00010111 00010110 10100001 which interface?
DA: 11001000 00010111 00011000 10101010 which interface?
Network Layer: Data Plane 4-13
Longest prefix matching
longest prefix matching
when looking for forwarding table entry
for given destination address, use longest
address prefix that matches destination
address.
Destination Address Range Link interface
11001000 00010111 00010*** ********* 0
11001000 00010111 00011000 ********* 1
11001000 00010111 00011*** ********* 2
otherwise 3
examples:
DA: 11001000 00010111 00010110 10100001 Interface 0
DA: 11001000 00010111 00011000 10101010 which interface?
Network Layer: Data Plane 4-14
Longest prefix matching
longest prefix matching
when looking for forwarding table entry
for given destination address, use longest
address prefix that matches destination
address.
Destination Address Range Link interface
11001000 00010111 00010*** ********* 0
11001000 00010111 00011000 ********* 1
11001000 00010111 00011*** ********* 2
otherwise 3
examples:
DA: 11001000 00010111 00010110 10100001 Interface 0
DA: 11001000 00010111 00011000 10101010 Interface 1
Network Layer: Data Plane 4-15
Longest prefix matching
we’ll see why longest prefix matching is
used shortly, when we study addressing
and subnet
memory
input output
port memory port
(e.g., (e.g.,
Ethernet) Ethernet)
system bus
Network Layer: Data Plane 4-18
Switching via a bus
datagram from input port to
output port via a shared bus
bus contention: switching
speed limited by bus bandwidth
If multiple packets of different
output ports arrive at the same
time, only one packet can
cross the bus at each time bus
forwarding
Other packets must wait
32 Gbps bus, Cisco 5600:
sufficient speed for enterprise
routers
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
Network Layer: Data Plane 4-22
Output port queueing
switch
switch
fabric
fabric
packet packet
arrivals queue link departures
(waiting area) (server)
multiple classes,
with different classify link
(server)
priorities low priority queue
(waiting area)
• class may depend on
2
marking or other
1 3 4 5
header info, e.g. IP
arrivals
source/dest, port
numbers, etc. packet
• real world example? in 1 3 2 4 5
service
• Real-time voice-over-
departures
IP higher priority over
SMTP/IMAP packets 1 3 2 4 5
2
1 3 4 5
arrivals
packet
in 1 3 2 4 5
service
departures
1 3 3 4 5
physical layer
…
Ethernet frame in: one large datagram
out: 3 smaller datagrams
• different link types,
different MTUs
large IP datagram
divided (“fragmented”)
reassembly
within net
• one datagram
becomes several
datagrams …
• “reassembled” only at
final destination
• IP header bits used to
identify, order related
fragments Network Layer: Data Plane 4-32
IP fragmentation,
reassembly
example:
4000 byte datagram
MTU = 1500 bytes length ID fragflag offset
20 bytes IP header + 3980 bytes =4000 =x
data fragmented to (20+1480) *
=0 =0
2 + (20+1020) bytes 3 smaller
datagrams one large datagram becomes
several smaller datagrams
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 Plane 4-38
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
200.23.16.0/23
Total of 2^(32-23) = 2^9 = 512 addresses
223.1.2.0/24
223.1.3.1 223.1.3.2
223.1.3.0/24
Network Layer: Data Plane 4-43
DHCP client-server
scenario
DHCP server: 223.1.2.5 DHCP discover arriving
client
src : 0.0.0.0, 68
Broadcast: is there a
dest.: 255.255.255.255,67
DHCP server
yiaddr: 0.0.0.0out
transaction
there?ID: 654
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 ID: 654
address you can 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
Network Layer: Data Plane 4-44
DHCP: more than IP
addresses
DHCP can return more than just allocated
IP address on subnet:
• address of first-hop router for client
• name and IP address of DNS sever
• network mask (indicating network versus
host portion of address)
encapsulation of DHCP
DHCP DHCP server, frame
DHCP UDP forwarded to client,
DHCP IP demuxing up to DHCP
DHCP Eth router with DHCP at client
DHCP
Phy server built into client now knows its
router IP address, name
and IP address of
DSN server, IP
address of its first-
hop router
10.0.0.4
10.0.0.2
138.76.29.7
10.0.0.3
data
32 bits
Network Layer: Data Plane 4-60
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
Path MTU Discovery: RFC1191 & 8201
determine maximum transmission unit (MTU)
size on network path between two Internet
Protocol (IP) hosts, to avoid IPv4
fragmentation at routers; end-to-end
fragmentation, e.g. for packets larger than
1500 bytes
ICMPv6: new version of ICMP
• additional message types, e.g. “Packet Too Big”
• multicast group management functions
IPv6 datagram
IPv4 datagram
Network Layer: Data Plane 4-62
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: C-to-D: IPv6
IPv6 inside IPv6 inside
IPv4 IPv4 Network Layer: Data Plane 4-64
IPv6:
adoption
Google: 8% of clients access services via
IPv6
NIST: 1/3 of all US government domains
are IPv6 capable