Documente Academic
Documente Profesional
Documente Cultură
Slides are adapted from the companion web site of the book,
as modified by Anirban Mahanti (and Carey Williamson).
Network layer
transport segment from
sending to receiving host application
transport
on sending side
network
data link network
physical
encapsulates segments
network data link network
data link physical data link
physical physical
into datagrams network
data link
on rcving side, delivers physical network
data link
layer network
data link
data link
physical
physical
network layer protocols network
data link application
1
Interplay between routing and forwarding
routing algorithm
value in arriving
packet’s header
0111 1
3 2
Link layer
physical layer
2
IP datagram format
IP protocol version 32 bits
number total datagram
header length length (bytes)
ver head. type of length
(bytes) len service for
“type” of data fragment fragmentation/
16-bit identifier flgs
offset reassembly
max number time to upper Internet
remaining hops live layer checksum
(decremented at
32 bit source IP address
each router)
32 bit destination IP address
upper layer protocol
to deliver payload to Options (if any) E.g. timestamp,
record route
how much overhead data taken, specify
with TCP? (variable length, list of routers
20 bytes of TCP typically a TCP to visit.
or UDP segment)
20 bytes of IP
= 40 bytes + app
layer overhead
N/W Layer Addressing 7
3
IPv4 Addressing
IP address: 32-bit 223.1.1.1
Classful Addressing
Network
Addresses consists of: 0 (7 bits) Host (24 bits)
Network part
Class A
Host part
IP addresses divided into five
classes: A, B, C, D, and E. 1 0
Network Host
(14 bits) (16bits)
Problems ??
Class B
Network Host
110 1110 Multicast address
(21 bits) (8bits)
Class C Class D
Class E
Subnets: Motivation
The “classful” addressing scheme proposes
that the network portion of a IP address
uniquely identifies one physical network.
Any network with more than 255 hosts needs a
class B address. Class B addresses can get
exhausted before we have 4 billion hosts!
4
Subnets
IP address: 223.1.1.1
Subnets 223.1.1.0/24
223.1.2.0/24
Recipe
To determine the
subnets, detach each
interface from its
host or router,
creating islands of
isolated networks.
Each isolated network
is called a subnet. 223.1.3.0/24
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
5
Addressing in the Internet
CIDR: Classless InterDomain Routing
subnet portion of address of arbitrary length
address format: a.b.c.d/x, where x is # bits in
subnet portion of address
Before CIDR, Internet used a class-based
addressing scheme where x could be 8, 16, or 24
bits. These corrsp to classes A, B, and C resp.
subnet host
part part
11001000 00010111 00010000 00000000
200.23.16.0/23
N/W Layer Addressing 16
6
Hierarchical addressing: route aggregation
ISP has an address block; it can further divide this block into sub blocks
and assign them to subscriber organizations.
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”
Examples
7
NAT: Network Address Translation
10.0.0.4
10.0.0.2
138.76.29.7
10.0.0.3
NAT is controversial:
routers should only process up to layer 3
violates end-to-end argument
• NAT possibility must be taken into account by app
designers, eg, P2P applications
address shortage should instead be solved by
IPv6
8
ICMP: Internet Control Message Protocol
IPv6
Initial motivation: 32-bit address space soon
to be completely allocated.
Additional motivation:
header format helps speed processing/forwarding
header changes to facilitate QoS
IPv6 datagram format:
fixed-length 40 byte header
no fragmentation allowed
9
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
Tunneling
A B E F
Logical view: tunnel
A B C D E F
Physical view:
IPv6 IPv6 IPv4 IPv4 IPv6 IPv6
data data
A-to-B: E-to-F:
B-to-C: B-to-C:
IPv6 IPv6
IPv6 inside IPv6 inside
IPv4 IPv4
N/W Layer Addressing 30
10