Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Review
Message: is the data or information to be communicated. It may consist of text, number, pictures, sound, video
or any a combination of these.
Sender: is a device that sends message. it is also called source or transmitter.
Receiver: is a device that receives message. It is also called sink. The receiver can be computer, printer or
another computer related device.
Medium: is the physical path that connects sender and receiver. It is used to transmit data. The medium can be a
copper wire, a fiber optic cable, microwaves etc. it is also called communication channel.
Network protocols: are formal standards and policies comprised of rules, procedures and formats that define
communication between two or more devices over a network.
Data flow (simplex, half-duplex, and full-duplex)
NETWORKS
1.5
Types of connections: point-to-point and multipoint
THE INTERNET
1.7
Hierarchical organization of the Internet
Part 2
Network Models
LAYERED TASKS
2.10
Tasks involved in sending a letter
Seven layers of the OSI model
An exchange using the OSI model
2.13
Physical layer
Physical Adresses
Logical Adresses
Port Addresses
Addresses in TCP/IP
Relationship of layers and addresses in TCP/IP
Link layer services
•framing, link access:
• encapsulate datagram into frame, adding
header, trailer
• channel access if shared medium
• “MAC” addresses used in frame headers to
identify source, dest
• different from IP address!
•reliable delivery between adjacent nodes
• we learned how to do this already
• seldom used on low bit-error link (fiber,
some twisted pair)
• wireless links: high error rates
• Q: why both link-level and end-end
reliability?
otherwise
0 0
sender: receiver:
§ treat segment contents § compute checksum of
as sequence of 16-bit received segment
integers § check if computed
§ checksum: addition (1 s checksum equals checksum
complement sum) of field value:
segment contents • NO - error detected
§ sender puts checksum • YES - no error detected.
value into UDP But maybe errors
checksum field nonetheless?
6-11
Internet checksum
IPv4 Header Checksum Example
6-12
Internet checksum
IPv4 Header Checksum Example
6-13
Internet checksum
IPv4 Header Checksum Example
6-14
Cyclic redundancy check
§ more powerful error-detection coding
§ view data bits, D, as a binary number
§ choose r+1 bit pattern (generator), G
§ goal: choose r CRC bits, R, such that
• <D,R> exactly divisible by G (modulo 2)
• receiver knows G, divides <D,R> by G. If non-zero remainder:
error detected!
• can detect all burst errors less than r+1 bits
§ widely used in practice (Ethernet, 802.11 WiFi, ATM)
D.2r
R = remainder[ ]
G
Generator Polynomial = x4 + x3 +1
Chapter 5
Network Layer:
The Control Plane
Routing
Algorithm
Routing algorithm control
Control plane plane
Data plane
Local forwarding
table
data
header output
plane
0100 3
0110 2
0111 2
1001 1
Values in arriving
packet’s header
1
1101
2
3
Remote Controller
control
plane
data
plane
CA
CA CA CA CA
v 3 w
2 5
u 2 1 z
3
1 2
x 1
y
graph: G = (N,E)
N = set of routers = { u, v, w, x, y, z }
E = set of links ={ (u,v), (u,x), (v,x), (v,w), (x,w), (x,y), (w,y), (w,z), (y,z) }
notes: 5
4
7
v construct shortest path tree by
8
tracing predecessor nodes
ties can exist (can be broken 3 w z
v u y
arbitrarily) 2
3
7 4
v
Network Layer: Control Plane 5-15
Dijkstra s algorithm: another example
Step N' D(v),p(v) D(w),p(w) D(x),p(x) D(y),p(y) D(z),p(z)
0 u 2,u 5,u 1,u ∞ ∞
1 ux 2,u 4,x 2,x ∞
2 uxy 2,u 3,y 4,y
3 uxyv 3,y 4,y
4 uxyvw 4,y
5 uxyvwz
5
3
v w
2 5
u 2 1 z
3
1 2
x 1
y
v w
u z
x y
1
A 1+e A A A
2+e 0 0 2+e 2+e 0
D 0 0 B D 1+e 1 B D B D 1+e 1 B
0 0
0 e 0 0
1
C C 0 1
C 1+e C 0
1
e
given these costs, given these costs, given these costs,
initially find new routing…. find new routing…. find new routing….
resulting in new costs resulting in new costs resulting in new costs
Network Layer: Control Plane 5-18
Chapter 5: outline
5.1 introduction 5.5 The SDN control plane
5.2 routing protocols 5.6 ICMP: The Internet
§ link state Control Message
§ distance vector Protocol
5.3 intra-AS routing in the 5.7 Network management
Internet: OSPF and SNMP
5.4 routing among the ISPs:
BGP
let
dx(y) := cost of least-cost path from x to y
then
dx(y) = min
v
{c(x,v) + dv(y) }
from
from
y ∞∞ ∞ y 2 0 1
z ∞∞ ∞ z 7 1 0
node y cost to
table x y z y
2 1
x ∞ ∞ ∞
x z
from
y 2 0 1 7
z ∞∞ ∞
node z cost to
table x y z
x ∞∞ ∞
from
y ∞∞ ∞
z 7 1 0
time
Network Layer: Control Plane 5-25
Dx(z) = min{c(x,y) +
Dx(y) = min{c(x,y) + Dy(y), c(x,z) + Dz(y)}
= min{2+0 , 7+1} = 2 Dy(z), c(x,z) + Dz(z)}
= min{2+1 , 7+0} = 3
node x cost to cost to cost to
table x y z x y z x y z
x 0 2 7 x 0 2 3 x 0 2 3
from
from
y ∞∞ ∞ y 2 0 1 y 2 0 1
from
z ∞∞ ∞ z 7 1 0 z 3 1 0
node y cost to cost to cost to
table x y z x y z x y z y
2 1
x ∞ ∞ ∞ x 0 2 7 x 0 2 3 x z
from
y 2 0 1 y 2 0 1 7
from
y 2 0 1
from
z ∞∞ ∞ z 7 1 0 z 3 1 0
x ∞∞ ∞ x 0 2 7 x 0 2 3
from
from
y 2 0 1 y 2 0 1
from
y ∞∞ ∞
z 7 1 0 z 3 1 0 z 3 1 0
time
Network Layer: Control Plane 5-26
Distance vector: link cost changes
link cost changes: 1
v node detects local link cost change 4
y
1
v updates routing info, recalculates x z
distance vector 50
v if DV changes, notify neighbors
Routing
Algorithm
Routing algorithm control
Control plane plane
Data plane
Local forwarding
table
data
header output
plane
0100 3
0110 2
0111 2
1001 1
Values in arriving
packet’s header
1
1101
2
3
Remote Controller
control
plane
data
plane
CA
CA CA CA CA
• Guaranteed delivery with bounded delay. This service not only guarantees delivery
of the packet, but delivery within a specified host-to-host delay bound (for
example, within 100 msec).
• In-order packet delivery. This service guarantees that packets arrive at the destination
in the order that they were sent.
VC consist of:
§ A path ( series of links and routers)
§ VC number for each link
§ Entries in the forwarding table
VC Phases:
§ VC Setup
§ Data Transfer
§ VC Teardown
To send a packet:
§ Stamp the packet with the destination address
§ Pops the packet on the network
segments to transport
physical physical
network
data link
layer network
physical
application
transport
§ network layer protocols network
data link
physical
network
data link
network
data link
Routing
Algorithm
Routing algorithm control
Control plane plane
Data plane
Local forwarding
table
data
header output
plane
0100 3
0110 2
0111 2
1001 1
Values in arriving
values in arriving
packet’s header
1
packet header 1101
2
3
0111 1
2
3
otherwise 3
otherwise 3
examples:
DA: 11001000 00010111 00010110 10100001 which interface?
DA: 11001000 00010111 00011000 10101010 which interface?
Network Layer: Data Plane 4-8
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
physical layer
…
frame 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-12
IP fragmentation, reassembly
length ID fragflag offset
example: =4000 =x =0 =0
v 4000 byte datagram
one large datagram becomes
v MTU = 1500 bytes
several smaller datagrams
223 1 1 1
4-15
IP addressing: introduction
§ What is an IPv4 Address?
• Is a logical network address that identifies a particular host
• Configured and is unique on the network for
communications
• Is associated with a network interface card
4-16
IP addressing: introduction
223.1.1.1
Q: how are interfaces 223.1.2.1
actually connected?
A: we’ll learn about that 223.1.1.2
223.1.1.4 223.1.2.9
in chapter 5, 6.
223.1.3.27
223.1.1.3
223.1.2.2
is called a subnet
223.1.3.0/24
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
subnet host
part part
11001000 00010111 00010000 00000000
200.23.16.0/23
DHCP
223.1.1.0/24
server
223.1.1.1 223.1.2.1
223.1.2.0/24
223.1.3.1 223.1.3.2
223.1.3.0/24
DHCP offer
src: 223.1.2.5, 67
Broadcast: I’m a DHCP
dest: 255.255.255.255, 68
server!
yiaddrr:Here’s an IP
223.1.2.4
transaction ID:
address you can use654
lifetime: 3600 secs
DHCP request
src: 0.0.0.0, 68
dest:: 255.255.255.255, 67
Broadcast: OK. I’ll take
yiaddrr: 223.1.2.4
that IP address!
transaction ID: 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
got that IPID:
transaction address!
655
lifetime: 3600 secs
5-1
Cont: Subnetting Example
v 3 w
2 5
u 2 1 z
3
1 2
x 1
y
graph: G = (N,E)
N = set of routers = { u, v, w, x, y, z }
E = set of links ={ (u,v), (u,x), (v,x), (v,w), (x,w), (x,y), (w,y), (w,z), (y,z) }
let
dx(y) := cost of least-cost path from x to y
then
dx(y) = min
v
{c(x,v) + dv(y) }
notes: 5
4
7
v construct shortest path tree by
8
tracing predecessor nodes
ties can exist (can be broken 3 w z
v u y
arbitrarily) 2
3
7 4
v
Network Layer: Control Plane 5-26
Shortest Path Routing
Internet Control Message Protocol (ICMP)
§ ICMP-Redirect
• From router to a source host
• With a better route information
ICMP always reports error messages to the original source.
21.29
Important points about ICMP error messages:
No ICMP error message will be generated in
response to a datagram carrying an ICMP error
message.
No ICMP error message will be generated for a
fragmented datagram that is not the first fragment.
No ICMP error message will be generated for a
datagram having a multicast address.
No ICMP error message will be generated for a
datagram having a special address such as
127.0.0.0 or 0.0.0.0.
application underlying
application layer protocol transport protocol
… …