0% found this document useful (0 votes)
18 views57 pages

Chapter 4 - Network Layer

The document provides an overview of the network layer, including concepts such as subnets, IP address formats, and routing protocols. It discusses IPv4 and IPv6 datagram formats, tunneling, and the services provided by the network layer. Additionally, it covers routing techniques like destination-based forwarding, longest prefix matching, and route aggregation, along with insights into router architecture and queuing mechanisms.

Uploaded by

f20220457
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views57 pages

Chapter 4 - Network Layer

The document provides an overview of the network layer, including concepts such as subnets, IP address formats, and routing protocols. It discusses IPv4 and IPv6 datagram formats, tunneling, and the services provided by the network layer. Additionally, it covers routing techniques like destination-based forwarding, longest prefix matching, and route aggregation, along with insights into router architecture and queuing mechanisms.

Uploaded by

f20220457
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 57

Network Layer

Subnets
223.1.1.1

223.1.2.1

223.1.1.2
223.1.1.4 223.1.2.9

223.1.3.27
223.1.1.3
223.1.2.2

223.1.3.1 223.1.3.2
S: 128.119.40.0
D:173.194.36.31 IP Address:176.194.36.31
S: 128.119.40.0
Host S: 10.0.0.1 D:173.194.36.31
A D:173.194.36.31
IP Address:128.119.40.0 Server S
IP Address:10.0.0.1 Router
R
S: 173.194.36.31
D: 128.119.40.0
S: 173.194.36.31
Host S: 10.0.0.2 D: 128.119.40.0
B D:173.194.36.31
IP Address:10.0.0.2 WAN Side LAN Side
128.119.40.0 10.0.0.1
128.119.40.0 10.0.0.2
Home Network NAT Translation Table
S: 128.119.40.0, 3345
D:173.194.36.31, 80 IP Address:176.194.36.31
S: 128.119.40.0, 950
Host S: 10.0.0.1, 3345 D:173.194.36.31, 80
A D:173.194.36.31, 80
IP Address:128.119.40.0 Server S
IP Address:10.0.0.1 Router
R
S: 173.194.36.31, 80
D: 128.119.40.0, 3345
S: 173.194.36.31, 80
Host S: 10.0.0.2, 950 D: 128.119.40.0, 950
B D:173.194.36.31, 80
IP Address:10.0.0.2 WAN Side LAN Side
128.119.40.0, 3345 10.0.0.1, 3345
128.119.40.0, 950 10.0.0.2, 950
Home Network NAT Translation Table
S: 128.119.40.0, 950
D:173.194.36.31, 80 IP Address:176.194.36.31
S: 128.119.40.0, 950
Host S: 10.0.0.1, 950 D:173.194.36.31, 80
A D:173.194.36.31, 80
IP Address:128.119.40.0 Server S
IP Address:10.0.0.1 Router
R
S: 173.194.36.31, 80
D: 128.119.40.0, 950
S: 173.194.36.31, 80
Host S: 10.0.0.2, 950 D: 128.119.40.0, 950
B D:173.194.36.31, 80
IP Address:10.0.0.2 WAN Side LAN Side
128.119.40.0, 950 10.0.0.1, 950
128.119.40.0, 950 10.0.0.2, 950
Home Network NAT Translation Table
S: 128.119.40.0, 5120
D:173.194.36.31, 80 IP Address:176.194.36.31
S: 128.119.40.0, 2210
Host S: 10.0.0.1, 950 D:173.194.36.31, 80
A D:173.194.36.31, 80
IP Address:128.119.40.0 Server S
IP Address:10.0.0.1 Router
R
S: 173.194.36.31, 80
D: 128.119.40.0, 5120
S: 173.194.36.31, 80
Host S: 10.0.0.2, 950 D: 128.119.40.0, 2210
B D:173.194.36.31, 80
IP Address:10.0.0.2 WAN Side LAN Side
128.119.40.0, 5120 10.0.0.1, 950
128.119.40.0, 2210 10.0.0.2, 950
Home Network NAT Translation Table
IP Datagram format
32 bits

ver head. type of length


len service
fragment
16-bit identifier flgs
offset
time to upper header
live layer checksum
source IP address
destination IP address

options (if any)


overhead
▪ 20 bytes of TCP payload data
▪ 20 bytes of IP (variable length,
▪ = 40 bytes + app typically a TCP
layer overhead for or UDP segment)
TCP+IP
Network Layer: 4-17
IPv6 datagram format
32 bits
ver pri flow label
payload len next hdr hop limit
source address
(128 bits)
destination address
(128 bits)

payload (data)
Tunneling
A B IPv4 tunnel E F
connecting IPv6 routers
logical view:
IPv6 IPv6/v4 IPv6/v4 IPv6

A B C D E F
physical view:
IPv6 IPv6/v4 IPv4 IPv4 IPv6/v4 IPv6

flow: X src:B src:B src:B flow: X


src: A dest: E dest: E src: A
dest: F
dest: E
dest: F
Flow: X Flow: X Flow: X
Src: A Src: A Src: A
data Dest: F Dest: F Dest: F data

data data data

A-to-B: E-to-F:
B-to-C: B-to-C: B-to-C:
IPv6 IPv6
IPv6 inside IPv6 inside IPv6 inside
IPv4 IPv4 IPv4
IPv6: adoption
• Google1: ~ 30% of clients access services via IPv6
• NIST: 1/3 of all US government domains are IPv6 capable

https://www.google.com/intl
/en/ipv6/statistics.html
Host A Router R Host B

Application Layer Application Layer

Transport Layer Transport Layer

Network Layer Network Layer Network Layer

Link Layer Link Layer Link Layer

Physical Layer Physical Layer Physical Layer


Services that Network Layer can provide
• Guaranteed Delivery
• Guaranteed Delivery with bounded delay
• In-order delivery
• Guaranteed minimal bandwidth
• Security

Network layer protocol of the Internet – Internet Protocol (IP)


Does IP provide these services?
Destination Based Forwarding
Destination Address Range Link Interface
11001000 00010111 00010000 00000000
through 0
11001000 00010111 00010111 11111111
11001000 00010111 00011000 00000000
through 1
11001000 00010111 00011000 11111111
11001000 00010111 00011000 00000000
through 2
11001000 00010111 00011111 11111111
Otherwise 3
Longest prefix matching

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?
Forwarding Table – Different Representations
Network Address Link Interface
200.23.16.0/21 0
200.23.24.0/24 1
200.23.24.0/21 2
Otherwise 3

Network Address Subnet Mask Link Interface


200.23.16.0 255.255.248.0 0
200.23.24.0 255.255.255.0 1
200.23.24.0 255.255.248.0 2
Otherwise - 3
Route Aggregation
University First Address Last Address How Many Prefix
Cambridge 194.24.0.0 194.24.7.255 2048 194.24.0.0/21
Edinburgh 194.24.8.0 194.24.11.255 1024 194.24.8.0/22
(Available) 194.24.12.0 194.24.15.255 1024 194.24.12.0/22
Oxford 194.24.16.0 194.24.31.255 4096 194.24.16.0/20

194.24.0.0/21
Cambridge

194.24.16.0/20
New York London
Oxford
Router Router
194.24.0.0/19
(1 aggregate prefix)

194.24.8.0/22 Edinburgh
Route Aggregation
The set of available addresses is assigned to a university in San Francisco.

194.24.0.0/21
Cambridge

194.24.16.0/20
San Francisco New York London
Oxford
Router Router Router
194.24.0.0/19
(1 aggregate prefix)
194.24.12.0/22 194.24.8.0/22 Edinburgh
What’s Inside a Router
routing
processor

high-speed
switching
fabric

router input ports router output ports


Input port functions
Host Router

Message Application Layer Message


𝐻𝑇 Transport Layer Header

𝐻𝑇 Message Transport Layer Segment


𝐻𝑁 Network Layer Header

𝐻𝑁 𝐻𝑇 Message Network Layer Datagram 𝐻𝐿 Link Layer Header

𝐻𝐿 𝐻𝑁 𝐻𝑇 Message Link Layer Frame

lookup,
link
layer forwarding
line switching
termination protocol fabric
The physical layer transmits bits in a (receive)
frame after encoding and modulation. queueing
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
Output Port Router Host

Message Application Layer Message

𝐻𝑇 Transport Layer Header 𝐻𝑇 Message Transport Layer Segment

𝐻𝑁 Network Layer Header 𝐻𝑁 𝐻𝑇 Message Network Layer Datagram

𝐻𝐿 Link Layer Header Link Layer Frame


𝐻𝐿 𝐻𝑁 𝐻𝑇 Message

datagram
switch buffer link
layer line
fabric termination
protocol
(rate: NR) queueing (send) R The physical layer transmits bits in a
frame after encoding and modulation.
Input Port Queuing
Output Port Queuing
If 𝑅𝑠𝑤𝑖𝑡𝑐ℎ > 𝑁𝑅𝑙𝑖𝑛𝑒 , output
queuing can occur
FIFO Discipline
FIFO Discipline
Priority-based Scheduling
Priority-based Scheduling
Round Robin Scheduling
Weighted Fair Queuing
Net Neutrality – Basic Idea
2b

2a 2c

2d

AS2
1b 3b

1a 1c 3a 3c

1d 3d

AS1 AS3

You might also like