Chapter 4a - Network Layer - The Data Plane
Chapter 4a - Network Layer - The Data Plane
Network Layer:
The Data Plane
host network
network
data link
network
data link
on sending side
physical physical
data link
physical network network
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
4
Separate the Networks
Routers
Two key network-layer
functions
network-layer functions: analogy: taking a trip
forwarding: move forwarding: process
packets from router’s of getting through
input to appropriate single interchange
router output
routing: determine
route taken by packets
routing: process of
from source to planning trip from
destination source to
• routing algorithms destination
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
Network Layer: Control Plane 5-10
Chapter 4: outline
4.1 Overview of 4.4 Generalized
Network layer Forward and SDN
• data plane • match
• control plane • action
4.2 What’s inside a • OpenFlow
router examples of
4.3 IP: Internet Protocol match-plus-action
• datagram format in action
• fragmentation
• IPv4 addressing
• network address
translation
• IPv6
Network Layer: Data Plane 4-11
Network Layer Devices
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 Plane 4-14
Destination-based
forwarding
forwarding table
Destination Address Range Link Interface
otherwise 3
examples:
DA: 11001000 00010111 00010110 10100001 which interface?
DA: 11001000 00010111 00011000 10101010 which interface?
Network Layer: Data Plane 4-16
Router Routing Tables
Routing IP Packets
19
Routing IP Packets
20
Routing IP Packets
21
Routing IP Packets
22
Routing IP Packets
23
Routing Table Routes
24
Routing
Table
Routes
192.168.11.0/24 10.1.2.0/24
R1#show ip route ( Used to check the routing table of the router)
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Serial interfaces
LAN interfaces
27
Switching fabrics
transfer packet from input buffer to
appropriate output buffer
switching rate: rate at which packets
can be transfer from inputs to outputs
• often measured as multiple of input/output line rate
• N inputs: switching rate N times line rate desirable
three types of switching fabrics
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
Network Layer: Data Plane 4-33
Output port queueing
switch
switch
fabric
fabric
packet packet
arrivals queue link departures
(waiting area) (server)
send highest
priority queued classify link
(server)
packet low priority queue
(waiting area)
multiple classes, 2
with different arrivals
1 3 4 5
priorities
packet
• real world in 1 3 2 4 5
example? service
departures
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
…
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 Plane 4-42
IP fragmentation, reassembly
The Data Link layer passes the MTU upward to the network layer which
determines then how large to create the packets.
4-43
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
Any IP address within the network 127.0.0.0/8 refers to the local host.
Used by the host different application to communicate with each other.
Useful for testing purposes.
C:\Users\Admin>
Hosts are on the same network : sending host and receiving host share the same
network address.
.10
PC1 192.168.10.0/24
.1
.11 G0/0
PC2
R1
.10 G0/1
PC3 .1
.11 192.168.11.0/24
PC4
Host
When a host is on a remote network, the hosts do not share the same network
address.
A default gateway IP address is required.
.10
PC1 192.168.10.0/24
.1
.11 G0/0
PC2
R1
.10 G0/1
PC3 .1
.11 192.168.11.0/24
PC4
.10
PC1 192.168.10.0/24
.1
.11 G0/0
PC2
R1
.10 G0/1
PC3 .1
.11 192.168.11.0/24
PC4
• When the host is to send data , it uses the subnet mask to check if the destination packet is on
the same network.
• So, it knows whether to encapsulate the IP packet into an Ethernet frame with:
The Destination MAC Address of the host with the Destination IP address of the packet.
172.16.10.100/16
Network Address
192.168.1.0/30
172.16.10.55/16
ISP
Internet
192.168.1.2/30
172.16.1.1/16
192.168.1.1/30 172.16.10.3/16
Network Address
192.168.1.0/30
172.16.10.55/16
ISP Gateway: 172.16.1.1
Internet
192.168.1.2/30
172.16.1.1/16
192.168.1.1/30 172.16.10.3/16 Gateway: 172.16.1.1
• All hosts in the same network will typically have the same default gateway IP
address.
• The ipconfig or ifconfig commands at the command line are used in windows and
Linux .
Default Gateway
Addresses?
7
• Internet Assigned Numbers Authority (IANA) (http://www.iana.net) is the master holder of the IP
addresses.
• Public addresses are required on the Internet and they must be unique.
• IANA allocated IP addresses to various other registries to manage for particular purposes or for
regional areas.
each isolated
network is called 223.1.3.0/24
a subnet
subnet mask: /24
Network Layer: Data Plane 4-71
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
Please refer to :
IP Addressing and
Subnetting
Workbook
4-81
6 subnets needed : 201.45.222.000 00000
4-82
4-83
VLSM – Variable Length Subnet Mask
Workbook
223.1.2.0/24
223.1.3.1 223.1.3.2
223.1.3.0/24
Network Layer: Data Plane 4-88
DHCP: Dynamic Host Configuration
Protocol
goal: allow host to dynamically obtain its IP address from network
server when it joins network
• can renew its lease on address in use
• allows reuse of addresses (only hold address while
connected/“on”)
• support for mobile users who want to join network (more shortly)
DHCP overview:
• host broadcasts “DHCP discover” msg
• DHCP server responds with “DHCP offer” msg
• host requests IP address: “DHCP request” msg
• DHCP server sends address: “DHCP ack” msg
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-90
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
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”
10.0.0.4
10.0.0.2
138.76.29.7
10.0.0.3
data Next
NextHeader
Header(8 (8bits)
bits)
–– Field
Fieldisisequivalent
equivalentto
tothe
theIPv4
IPv4Protocol
Protocol
field.
field.
32 bits –– ItItindicates
indicatesthethedata
datapayload
payloadtype typethatthatthethe
packet is carrying, enabling the
packet is carrying, enabling the network network
layer
layerto topass
passthe
thedata
datatotothe
theappropriate
appropriate
upper-layer protocol.
upper-layer protocol.
–– This
Thisfield
fieldisisalso
alsoused
usedififthere
thereare areoptional
optional
extension headers
extension headers addedadded to the
to the IPv6
Network Layer:IPv6
Data Plane 4-106
packet.
packet.
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 Plane 4-108
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 Plane 4-110
IPv6:
adoption
Google: 8% of clients access services via
IPv6
NIST: 1/3 of all US government domains
are IPv6 capable