Bài giảng Mạng máy tính - Chapter 4: Network Layer - The data plane - Nguyễn Lê Duy Lai
Computer Networks
Lectured by:
Nguyen Le Duy Lai
(lai@hcmut.edu.vn)
Computer
Networking: A Top
Down Approach
7th Edition, Global Edition
Jim Kurose, Keith Ross
Pearson
April 2016
Introduction 1-1
Chapter 4
Network Layer:
The Data Plane
Computer
Networking: A Top
Down Approach
7th Edition, Global Edition
Jim Kurose, Keith Ross
Pearson
April 2016
Network Layer: Data Plane 4-2
Chapter 4: outline
4.1 Overview of Network
layer
4.4 Generalized Forward and
SDN
• data plane
• control plane
• match
• action
4.2 What’s inside a router
4.3 IP: Internet Protocol
• datagram format
• fragmentation
• OpenFlow examples of
match-plus-action in
action
• IPv4 addressing
• network address
translation (NAT)
• IPv6
Network Layer: Data Plane 4-3
Chapter 4: network layer
chapter goals:
▪ understand principles behind network layer
services, focusing on data plane
• network layer service models
• forwarding versus routing
• how a router works
• generalized forwarding
▪ instantiation, implementation in the Internet
Network Layer: Data Plane 4-4
Network layer
application
transport
k
data link
physical
▪ transport segment from
sending to receiving host
network
data link
physical
network
data link
physical
network
data link
physical
▪ on sending side,
encapsulates segments into
datagrams
network
data link
physical
network
data link
physical
network
data link
physical
network
data link
physical
▪ on receiving side, delivers
network
segments to transport layer
data link
physical
application
transport
rk
data link
physical
▪ network layer protocols
implemented in every host,
router
network
data link
physical
network
data link
physical
network
data link
physical
▪ router examines IP header
fields in all IP datagrams
passing through it
Network Layer: Data Plane 4-5
Two key network-layer functions
network-layer functions:
analogy: taking a trip
▪ forwarding: move
packets from router’s
input to appropriate
router output
▪ routing: determine route
taken by packets from
source to destination
• routing algorithms
▪ forwarding: process of
getting through single
interchange
▪ routing: process of
planning trip from source
to destination
Network Layer: Data Plane 4-6
Network layer: data plane, control plane
Control plane
▪ network-wide logic
Data plane
▪ local, per-router function
▪ determines how datagram is
routed among routers along
end-end path from source host
to destination host
▪ determines how datagram
arriving on router input
port is forwarded to
router output port
▪ two control-plane approaches:
▪ forwarding function
• traditional routing algorithms:
values in arriving
packet header
implemented in routers
• software-defined networking
(SDN): implemented in
(remote) servers
1
0111
2
3
Network Layer: Data Plane 4-7
Per-router control plane
Individual routing algorithm components in each and every
router interact in the control plane
Routing
Algorithm
control
plane
data
plane
values in arriving
packet header
1
0111
2
3
Network Layer: Control Plane 5-8
Logically centralized control plane
A distinct (typically remote) controller interacts with local
control agents (CAs)
Remote Controller
control
plane
data
plane
CA
CA
CA
CA
CA
values in arriving
packet header
1
0111
2
3
Network Layer: Control Plane 5-9
Network service model
Q:What service model for “channel” transporting
datagrams from sender to receiver?
example services for a
example services for
individual datagrams:
▪ guaranteed delivery
flow of datagrams:
▪ in-order datagram
delivery
▪ guaranteed delivery with
▪ guaranteed minimum
less than 40 msec delay
bandwidth to flow
▪ restrictions on changes in
inter-packet spacing
Network Layer: Data Plane 4-10
Network layer service models
Guarantees?
Network Service
Architecture Model
Congestion
feedback
Bandwidth Loss
Order Timing
none
no
Internet best effort
ATM CBR
no no
no (inferred
via loss)
no
congestion
no
congestion
yes
constant yes
rate
guaranteed yes
rate
guaranteed no
minimum
none
yes yes
yes yes
yes no
yes no
ATM VBR
ATM ABR
no
ATM UBR
no
Network Layer: Data Plane 4-11
Chapter 4: outline
4.1 Overview of Network
layer
4.4 Generalized Forward and
SDN
• data plane
• control plane
• match
• action
4.2 What’s inside a router
4.3 IP: Internet Protocol
• datagram format
• fragmentation
• OpenFlow examples
of match-plus-action in
action
• IPv4 addressing
• network address
translation
• IPv6
Network Layer: Data Plane 4-12
Router architecture overview
▪ high-level view of generic router architecture:
routing, management
control plane (software)
operates in millisecond
time frame
routing
processor
forwarding data plane
(hardware) operates
in nanosecond time
frame
high-seed
switching
fabric
router input ports
router output ports
Network Layer: Data Plane 4-13
Input port functions
lookup,
link
forwarding
layer
line
termination
switch
fabric
protocol
(receive)
queueing
physical layer:
bit-level reception
decentralized switching:
data link layer:
(e.g., Ethernet
see chapter 5)
▪ lookup: using header field values, lookup
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
Input port functions
lookup,
link
forwarding
layer
line
termination
switch
fabric
protocol
(receive)
queueing
physical layer:
bit-level reception
decentralized switching:
data link layer:
e.g., Ethernet
see chapter 5
▪ using header field values, lookup output
port using forwarding table in input port
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
Network Layer: Data Plane 4-15
Destination-based forwarding
forwarding table
Destination Address Range
Link Interface
11001000 00010111 00010000 00000000
through
0
1
11001000 00010111 00010111 11111111
11001000 00010111 00011000 00000000
through
11001000 00010111 00011000 11111111
11001000 00010111 00011001 00000000
2
3
through
11001000 00010111 00011111 11111111
otherwise
Q: but what happens if ranges don’t divide up so nicely?
Network Layer: Data Plane 4-16
Longest prefix matching
longest prefix matching
when looking up a forwarding table entry for given
destination address, use longest address prefix that
matches destination address.
Destination Address Range
Link interface
0
1
2
3
11001000 00010111 00010*** *********
11001000 00010111 00011000 *********
11001000 00010111 00011*** *********
otherwise
examples:
DA: 11001000 00010111 00010110 10100001
which interface?
which interface?
DA: 11001000 00010111 00011000 10101010
Network Layer: Data Plane 4-17
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
Network Layer: Data Plane 4-18
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
bus
memory
crossbar
Network Layer: Data Plane 4-19
Switching via memory
first generation routers:
▪ traditional computers with switching under direct control
of CPU
▪ packet copied to system’s memory
▪ speed limited by memory bandwidth (2 bus crossings per
datagram)
output
port
input
port
memory
(e.g.,
(e.g.,
Ethernet)
Ethernet)
system bus
Network Layer: Data Plane 4-20
Tải về để xem bản đầy đủ
Bạn đang xem 20 trang mẫu của tài liệu "Bài giảng Mạng máy tính - Chapter 4: Network Layer - The data plane - Nguyễn Lê Duy Lai", để tải tài liệu gốc về máy hãy click vào nút Download ở trên
File đính kèm:
bai_giang_mang_may_tinh_chapter_4_network_layer_the_data_pla.pdf