Professional Documents
Culture Documents
application
transport
network
link
physical
Network layer
guaranteed delivery
guaranteed delivery with < 40ms delay
for a ow of datagrams:
Service
model
Internet
best-eort
ATM
CBR
ATM
VBR
Guarantees?
Bandwidth
Loss
Order
Timing
Congestion
feedback
none
constant
rate
guaranteed
rate
ATM
ABR
guaranteed
minimum
ATM
UBR
none
(inferred via
loss)
N/A (no
congestion)
N/A (no
congestion)
service
VC network: network-layer connection service
Like transport layer, except
host-to-host service
no choice - network is one or the other
implementation is in the core, not the edge
Virtual circuits
src-to-dest path behaves like telephone circuit
VC comprises
VC forwarding table
63
18
17
97
87
...
...
...
...
Routers maintain
connection state
information
Datagram networks
no call setup at network layer
routers have no state about end-to-end connections
packets forwarded using destination host address
00000000
11111111
00000000
11111111
00000000
11111111
Link interfac#
0
1
2
3
Prex matching
Prex match
Link interfac#
2
3
otherwise
DA
Link interfac#
11001000
00010111
00010110
10100001
11001000
00010111
00011000
10101010
Datagram vs. VC
Internet
ATM
data exchange among
evolved from telephony mindset
computers
human conversation
elastic service, no strict
strict timing, reliability reqs
timing requirements
need for guaranteed service
smar end systems (computers) dumb end systems (phones)
can adapt, recover from
complexity inside network
errors
simple inside network,
complex edge
many link types
dierent characteristics
uniform service dicult
Routers
Two main functions:
Input ports
Decentralised switching
Switching fabric
The heart of the router
switching via memory (earliest type of router)
Output ports
e.g., drop-tail
AQM - mark or drop packets pre-emptively
Forwarding
table
IP protocol
addressing conventions
datagram format
packet handling
conventions
Link layer
Physical layer
type of
service
ID
time to live
length (bytes)
ags
upper layer
protocol,
e.g., TCP
fragment oset
all for
fragmentation/
reassembly
Internet checksum
source IP address
destination IP address
options (variable length) (e.g. timestamp, record route)
data
(e.g. a TCP or UDP segment)
Overhead?
20 bytes TCP
20 bytes IP
IP addressing
Subnets
IP address:
high-order bits = subnet par'
low-order bits = host par'
Subnet:
device interfaces share same
subnet part of IP address
can physically reach each
other without router
CIDR
Recipe:
a.b.c.d/x, left-most x bits are detach each interface from host
subnet part
or router, create islands of
223.1.3.0/24 = left-most 24
isolated networks
bits are subnet part
subnet mask: 255.255.255.0
Getting an IP address
How does a host get an IP address?
Ask Wayne
Getting an IP address
How does network get subnet part of IP address?
Allocated by ISP
Classful addressing
Before CIDR, we had classes
Referenc#
[RFC1700, p4]
[RFC1918]
[RFC1700, p181]
-[RFC1797]
[RFC1700, p5]
--[RFC1918]
--[RFC3068]
[RFC1918]
[RFC2544]
-[RFC3171]
[RFC1700, p4]
A routing table
Genmask
255.255.255.0
255.255.252.0
255.255.0.0
0.0.0.0
Flags
U
U
U
UG
MSS
0
0
0
0
Window
0
0
0
0
irtt
0
0
0
0
Iface
eth1
eth0
eth0
eth1
NAT
But...
NAT breaks end-to-en principle
ICMP
Internet Control Message Protocol
Used by hosts & routers to communicate networklevel information
traceroute
You played with traceroute earlier
Source sends series of UDP segments to destination
IPv6
Next-generation IP datagram format. Why?
Address space allocation
xed-length header
no fragmentation - let end systems take care of it
ow label
hop limit
(TTL)
next header
data
Priority
identify priority among
datagrams in ow
Flow label
identify datagrams in same
ow
Next header
identify upper layer
protocol for data
e.g., 3ffe:2101:7:4:2e0:18ff:fe34:150b
good luck...
Dual-stack
Tunneling
http://www.6bone.net
Some applications need explicit IPv6 support
Dicult to change network layer
Routing
Routing = determining goo paths between src & dst
(hosts attached to default router, so only consider src & dst routers)
Link costs
c(x,x) = cost of link (x,x)
e.g., c(w,z) = 5
cost of path (x1,x2,x3,...,xb) =
c(x1,x2) + c(x2,x3) + ... c(xb-1,xb)
Routing algorithms
Global or decentralised information?
Global
all routers have complete topology and link cost information
link state
Decentralised
router knows physically-connected neighbours and costs
iterative process of computation, exchanging info with neighbours
distance vector
Static or dynamic?
Static
routes change slowly over time
Dynamic
routes change more quickly - periodic changes, or in response to
link cost changes
Link-state routing
Use Dijkstras algorithm to compute least-cost paths
Link-state example
Step
2,u
5,u
ux
2,u
4,x
uxy
2,u
3,y
4,y
uxyv
3,y
4,y
uxyvw
uxyvwz
1,u
2,x
4,y
Bellman-Ford equation
DV example
cost to
x y z
0
2
7
x
y 2 0 1
7
1 0
z
cost to
x y
2
x 0
2
0
y
z 7 1
1
0
from
from
cost to
x y z
x 0 22 37
2 0
1
y
z
from
cost to
x y z
x
y
z 7 1 0
from
cost to
x y z
x
y 2 0 1
z
from
Node zs table
from
Node ys table
from
from
from
z
3
1
0
cost to
x y
x 0 2
y 2 0
z 3 1
z
3
1
0
cost to
x y
x 0 2
y 2 0
z 3 1
z
3
1
0
Routing loops in DV
y will send datagrams destined for x via z will send datagrams destined for x via y
How to solve?
Hierarchical routing
How does routing scale to the Internet?
Administrative autonomy
Gateway routers
Interconnecting ASes
inter-AS routing
RIP
One of the earlier Internet routing protocols
hops
1
2
2
3
3
2
RIP example
A
B
57
...
...
...
Ds routing table
As advertisement
RIP implementation
Advertisements every 30 seconds
OSPF
O = Open = public (good!)
link state
OSPF advertisement carries one entry per neighbour
Hierarchical OSPF
Hierarchical OSPF
BGP allows AS to
BGP
BGP example
AS-PATH: contains the ASes through which the advert for the
prex passed, e.g. AS 67 AS 17
AS numbers assigned by ICANN (like IP blocks)
NEXT-HOP: indicates the specic internal-AS router to nexthop AS (may be multiple links from current to next-hop AS)
Policy
Broadcast routing
Single source sends a datagram to all nodes in network
Spanning tree
Multicast routing
Single node delivers to a subset of network nodes
Useful for lots of applications
Source-based trees
Group-shared trees
Steiner Tree: minimum-cost tree connecting all routers
with attached group members
NP-complete
But heuristics available
But requires knowledge about entire network
ISPs scared?
Dont understand?
No business model?