0% found this document useful (0 votes)
8 views

Ch4 Network Layer Part1

Uploaded by

aldardiseaseel
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Ch4 Network Layer Part1

Uploaded by

aldardiseaseel
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 28

Chapter 4

Network
Layer:
Data Plane

Part1
Computer Networking: A
Top-Down Approach
8th edition
Jim Kurose, Keith Ross
Pearson, 2020
Network layer: our goals
 understand principles • instantiation, implementation
behind network layer in the Internet
services, focusing on data • IP protocol
plane: • NAT, middleboxes
• network layer service models
• forwarding versus routing
• how a router works
• addressing
• generalized forwarding
• Internet architecture

Network Layer: 4-2


Network layer: “data plane” roadmap

• Network layer: overview


• data plane
• control plane
 What’s inside a router
• input ports, switching, output ports
• buffer management, scheduling
 IP: the Internet Protocol  Generalized Forwarding, SDN
• datagram format • Match+action
• addressing • OpenFlow: match+action in action
• network address translation
• IPv6  Middleboxes
Network Layer: 4-3
Ch3: Transport services and protocols
application
transport

 provide logical communication mobile


network
network
data link
physical

between application processes national or global ISP

running on different hosts

log
ica
 transport protocols actions in end

le
n d-
systems:

e nd
local or

tra
• sender: breaks application messages regional ISP

nsp
into segments, passes to network layer

ort
home network content
• receiver: reassembles segments into provider
network
messages, passes to application layer application
transport
datacenter
network
network
 two transport protocols available to data link
physical

Internet applications enterprise


network
• TCP, UDP
Transport Layer: 3-4
Ch3: Transport vs. network layer services and protocols

 network layer: logical household analogy:


communication between 12 kids in Ann’s house sending
hosts letters to 12 kids in Bill’s house:
 hosts = houses
 transport layer: logical
 processes = kids
communication between  app messages = letters in
processes envelopes
• relies on, enhances, network  transport protocol = Ann and Bill
layer services who demux to in-house siblings
 network-layer protocol = postal
service
Transport Layer: 3-5
Network-layer services and protocols
 transport segment from sending to mobile network

receiving host national or global ISP

• sender: encapsulates segments into


datagrams, passes to link layer application
transport

• receiver: delivers segments to network


link

transport layer protocol physical


network
link
network
link

 network layer protocols in every


physical physical

Internet device: hosts, routers network


link network
link
physical

 routers: physical network


link
physical
datacenter
network

• examines header fields in all IP


datagrams passing through it application
transport
network
enterprise
• moves datagrams from input ports to network
link
physical

output ports to transfer datagrams


along end-end path Network Layer: 4-6
Two key network-layer functions
network-layer functions: analogy: taking a trip
• forwarding: move packets from  forwarding: process of getting
a router’s input link to through single interchange
appropriate router output link  routing: process of planning trip
 routing: determine route taken from source to destination
by packets from source to
destination
• routing algorithms

forwarding

routing
Network Layer: 4-7
Network layer: Data Plane, Control
Plane
Data Plane: Control Plane
 local, per-router function • network-wide logic
 determines how datagram • determines how datagram is
arriving on router input port routed among routers along end-
is forwarded to router end path from source host to
output port destination host
values in arriving  two control-plane approaches:
packet header
• Traditional Routing Algorithms:
0111 1 implemented in routers (per-router)
3
2
• Software-Defined Networking (SDN):
logically centralized control
implemented in (remote) servers
Network Layer: 4-8
Per-router control plane
Individual routing algorithm components in each and every router
interact with each other in control plane to compute forwarding
tables
Routing
Algorithm
control
plane

data
plane

values in arriving
packet header
0111 1
2
3

Network Layer: 4-9


Software-Defined Networking (SDN) control plane

• Remote controller
computes, installs
forwarding tables in Remote Controller
routers
• A distinct (typically control
plane
remote) controller data
interacts with local plane

Control Agents (CAs) CA


in routers to
CA CA CA CA
compute forwarding values in arriving
tables packet header

0111 1
2
3
Network Layer: 4-10
Network layer: “data plane” roadmap

• Network layer: overview


• data plane
• control plane
• What’s inside a router
• input ports, switching, output ports
• buffer management, scheduling
• IP: the Internet Protocol
• datagram format  Generalized Forwarding, SDN
• addressing • Match+action
• network address translation • OpenFlow: match+action in action
• IPv6  Middleboxes
Network Layer: 4-11
Router architecture overview
high-level view of generic router architecture:
routing, management
routing control plane (software)
processor operates in millisecond
time frame
forwarding data plane
(hardware) operates
in nanosecond
timeframe
high-speed
switching
fabric

router input ports router output ports

Network Layer: 4-12


Input port functions
lookup,
link
layer forwarding
line switch
protocol fabric
termination
(receive)
queueing

physical layer:
bit-level reception
decentralized switching:
link layer:
 using header field values, lookup output port using
e.g., Ethernet
forwarding table in input port memory (“match plus action”)
(chapter 6)
 goal: complete input port processing at ‘line speed’
 input port queuing: if datagrams arrive faster than forwarding
rate into switch fabric
Network Layer: 4-13
Input port functions
lookup,
link
layer forwarding
line switch
protocol fabric
termination
(receive)
queueing

physical layer:
bit-level reception
decentralized switching:
link layer:
 using header field values, lookup output port using
e.g., Ethernet
forwarding table in input port memory (“match plus action”)
(chapter 6)
 destination-based forwarding: forward based only on
destination IP address (traditional)
 generalized forwarding: forward based on any set of header
field values Network Layer: 4-14
Destination-based forwarding

Network Layer: 4-15


Hierarchical addressing: route aggregation
hierarchical addressing allows efficient advertisement of
routing information:
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-16


Longest prefix matching
longest prefix match
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

11001000 00010111 00010110 10100001 which interface?


examples:
11001000 00010111 00011000 10101010 which interface?
Network Layer: 4-17
Longest prefix matching
longest prefix match
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 match!
00010111 00011*** ******** 2
otherwise 3

11001000 00010111 00010110 10100001 which interface?


examples:
11001000 00010111 00011000 10101010 which interface?
Network Layer: 4-18
Longest prefix matching
longest prefix match
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
match!
11001000 00010111 00010110 10100001 which interface?
examples:
11001000 00010111 00011000 10101010 which interface?
Network Layer: 4-19
Longest prefix matching
longest prefix match
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
match!
11001000 00010111 00010110 10100001 which interface?
examples:
11001000 00010111 00011000 10101010 which interface?
Network Layer: 4-20
Switching fabrics
 transfer packet from input link to appropriate output link
 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

R (rate: NR, R
ideally)

...
...

N input ports high-speed N output ports


switching
fabric

R R

Network Layer: 4-21


Switching fabrics
 transfer packet from input link to appropriate output link
 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 major types of switching fabrics:

memory

memory bus interconnection


network
Network Layer: 4-22
Output port queuing
datagram This is a really important slide
switch buffer link
layer line
fabric termination
protocol
(rate: NR) queueing (send) R

 Buffering required when datagrams arrive


from fabric faster than link transmission Datagrams can be lost
rate. Drop policy: which datagrams to due to congestion, lack of
drop if no free buffers? buffers
 Scheduling discipline chooses Priority scheduling – who
among queued datagrams for gets best performance,
transmission network neutrality
Network Layer: 4-23
Output port queuing

switch
switch
fabric
fabric

at t, packets more one packet time later


from input to output

 buffering when arrival rate via switch exceeds output line speed
 queueing (delay) and loss due to output port buffer overflow!

Network Layer: 4-24


Buffer Management
buffer management:
switch
datagram
buffer link
 drop: which packet to add,
fabric layer line R drop when buffers are full
protocol termination
queueing (send) • tail drop: drop arriving
scheduling packet
• priority: drop/remove on
priority basis

Abstraction: queue  marking: which packets to


mark to signal congestion (ECN,
packet
R packet
departures RED)
arrivals queue link
(waiting area) (server)

Network Layer: 4-25


Packet Scheduling: FCFS
packet scheduling: deciding FCFS: packets transmitted in
which packet to send next on order of arrival to output
link port
• first come, first served
 also known as: First-in-first-
• priority
• round robin out (FIFO)
• weighted fair queueing  real world examples?

Abstraction: queue

packet
R packet
departures
arrivals queue link
(waiting area) (server)

Network Layer: 4-26


Scheduling policies: priority
Priority scheduling: high priority queue

arrivals
• arriving traffic classified,
queued by class classify link departures

• any header fields can be low priority queue

used for classification 2


 send packet from highest arrivals
1 3 4 5

priority queue that has packet


buffered packets in
service
1 3 2 4 5

• FCFS within priority class departures


1 3 2 4 5

Network Layer: 4-27


• 4.1 Introduction to the Network Layer:
https://www.youtube.com/watch?v=olbr3WZwrdU&t=181s
• 4.2 What's inside a router? Part 1.:
https://www.youtube.com/watch?v=NfHR94JAO-s
• 4.2 What's inside a router? Part 2: https://www.youtube.com/watch?v=zfzzz9KQOog

You might also like