Chapter 4: outline
Chapter 4
Network Layer 4.1 introduction
4.2 virtual circuit and
4.5 routing algorithms
link state
datagram networks distance vector
A note on the use of these ppt slides:
We’re making these slides freely available to all (faculty, students, readers). 4.3 what’s inside a router hierarchical routing
They’re in PowerPoint form so you see the animations; and can add, modify,
and delete slides (including this one) and slide content to suit your needs. 4.4 IP: Internet Protocol 4.6 routing in the Internet
They obviously represent a lot of work on our part. In return for use, we only
RIP
ask the following:
If you use these slides (e.g., in a class) that you mention their source
Computer datagram format
OSPF
IPv4 addressing
(after all, we’d like people to use our book!)
Networking: A Top BGP
If you post any slides on a www site, that you note that they are adapted
ICMP
from (or perhaps identical to) our slides, and note our copyright of this
material.
Down Approach IPv6 4.7 broadcast and multicast
6th edition
Thanks and enjoy! JFK/KWR Jim Kurose, Keith Ross routing
All material copyright 1996-2012 Addison-Wesley
J.F Kurose and K.W. Ross, All Rights Reserved March 2012
The course notes are adapted for Bucknell’s CSCI 363
Xiannong Meng
Spring 2016
Application Layer 2-1 Network Layer 4-2
Intra-AS Routing RIP ( Routing Information Protocol)
included in BSD-UNIX distribution in 1982
also known as interior gateway protocols (IGP) distance vector algorithm
most common intra-AS routing protocols: distance metric: # hops (max = 15 hops), each link has cost 1
DVs exchanged with neighbors every 30 sec in response message (aka
RIP: Routing Information Protocol (Distance advertisement) in UDP packet
Vector) each advertisement: list of up to 25 destination subnets (in IP addressing
sense)
OSPF: Open Shortest Path First (Link State)
IGRP: Interior Gateway Routing Protocol
(Cisco proprietary) from router A to destination subnets:
u v subnet hops
w u 1
A B
v 2
w 2
x x 3
z C D y 3
y z 2
Network Layer 4-3 Network Layer 4-4
RIP: example RIP: example
A-to-D advertisement
dest next hops
w - 1
x - 1
z z
….
C
… ...
4
z
w x y y
B w x
A D D B
A
C C
routing table in router D routing table in router D
destination subnet next router # hops to dest destination subnet next router # hops to dest
w A 2 w A 2
y B 2 y B 2
A 5
z B 7 z B 7
x -- 1 x -- 1
…. …. .... …. …. ....
Network Layer 4-5 Network Layer 4-6
1
RIP: link failure, recovery RIP table processing
if no advertisement heard after 180 sec -->
neighbor/link declared dead RIP routing tables managed by application-level
routes via neighbor invalidated
process called route-d (daemon)
new advertisements sent to neighbors advertisements sent in UDP packets, periodically
neighbors in turn send out new advertisements (if tables repeated
changed)
routed routed
link failure info quickly (?) propagates to entire net
poison reverse used to prevent ping-pong loops (infinite transport transprt
distance = 16 hops) (UDP) (UDP)
network forwarding forwarding network
(IP) table table (IP)
link link
physical physical
Network Layer 4-7 Network Layer 4-8
RIP current status OSPF (Open Shortest Path First)
In most current networking environments, RIP is not “open”: publicly available
the preferred choice for routing as its time to uses link state algorithm
converge and scalability are poor compared to EIGRP, LS packet dissemination
OSPF, or IS-IS (the latter two being link-state routing topology map at each node
protocols), and (without RMTI) a hop limit severely route computation using Dijkstra’s algorithm
limits the size of network it can be used in. (quote OSPF advertisement carries one entry per neighbor
from Wikipedia advertisements flooded to entire AS
http://en.wikipedia.org/wiki/Routing_Information_
carried in OSPF messages directly over IP (rather than
Protocol) TCP or UDP
IS-IS routing protocol: nearly identical to OSPF (IS-IS:
Intermediate System to Intermediate System), except
that it is under the OSI-ISO 7-layer model
Network Layer 4-9 Network Layer 4-10
OSPF “advanced” features (not in RIP) Hierarchical OSPF
security: all OSPF messages authenticated (to prevent boundary router
malicious intrusion) backbone router
multiple same-cost paths allowed (only one path in
backbone
RIP) area
for each link, multiple cost metrics for different TOS border
routers
(e.g., satellite link cost set “low” for best effort ToS;
high for real time ToS)
integrated uni- and multicast support: area 3
Multicast OSPF (MOSPF) uses same topology data
base as OSPF internal
routers
hierarchical OSPF in large domains. area 1
area 2
Network Layer 4-11 Network Layer 4-12
2
Hierarchical OSPF Internet inter-AS routing: BGP
BGP (Border Gateway Protocol): the de facto
two-level hierarchy: local area, backbone. inter-domain routing protocol
link-state advertisements only in area “glue that holds the Internet together”
each nodes has detailed area topology; only know BGP provides each AS a means to:
direction (shortest path) to nets in other areas. eBGP: obtain subnet reachability information from
area border routers: “summarize” distances to nets in neighboring ASs. (‘e’ for extended)
own area, advertise to other Area Border routers. iBGP: propagate reachability information to all AS-
backbone routers: run OSPF routing limited to internal routers. (‘i’ for internal)
backbone. determine “good” routes to other networks based on
reachability information and policy.
boundary routers: connect to other AS’s.
allows subnet to advertise its existence to rest of
Internet: “I am here”
BGP use TCP to communicate with each other
Network Layer 4-13 Network Layer 4-14
BGP basics BGP basics: distributing path information
BGP session: two BGP routers (“peers”) exchange BGP using eBGP session between 3a and 1c, AS3 sends prefix
messages: reachability info to AS1.
advertising paths to different destination network prefixes (“path vector” 1c can then use iBGP do distribute new prefix info to all routers
protocol) in AS1
exchanged over semi-permanent TCP connections 1b can then re-advertise new reachability info to AS2 over 1b-to-
2a eBGP session
when AS3 advertises a prefix to AS1: (prefix eg: 132.84.3.12/18)
AS3 promises it will forward datagrams towards that prefix
when router learns of new prefix, it creates entry for
AS3 can aggregate prefixes in its advertisement prefix in its forwarding table.
3c eBGP session
BGP
3a message 3a iBGP session
3b 3b
AS3 2c other AS3 2c other
1c 2a networks 1c 2a networks
other 1a 2b other 1a 2b
networks 1b AS2 networks 1b AS2
AS1 1d AS1 1d
Network Layer 4-15 Network Layer 4-16
Path attributes and BGP routes BGP route selection
advertised prefix includes BGP attributes router may learn about more than 1 route to
prefix + attributes = “route” destination AS, selects route based on:
two important attributes: 1. local preference value attribute: policy decision
AS-PATH: contains ASs through which prefix 2. shortest AS-PATH
advertisement has passed: e.g., AS 67, AS 17 3. closest NEXT-HOP router: hot potato routing
NEXT-HOP: indicates specific internal-AS router to next- 4. additional criteria
hop AS. (may be multiple links from current AS to next-
hop-AS)
gateway router receiving route advertisement uses
import policy to accept/decline
e.g., never route through AS x
policy-based routing
Network Layer 4-17 Network Layer 4-18
3
BGP messages BGP routing policy
legend: provider
BGP messages exchanged between peers over TCP B network
connection X
BGP messages: W A
customer
OPEN: opens TCP connection to peer and authenticates C network:
sender Y
UPDATE: advertises new path (or withdraws old)
KEEPALIVE: keeps connection alive in absence of A,B,C are provider networks
UPDATES; also ACKs OPEN request X,W,Y are customer (of provider networks)
NOTIFICATION: reports errors in previous msg; also X is dual-homed: attached to two networks
used to close connection
X does not want to route from B via X to C
.. so X will not advertise to B a route to C
Network Layer 4-19 Network Layer 4-20
BGP routing policy (2) Why different Intra-, Inter-AS routing ?
B
legend: provider
network
policy:
W
X inter-AS: admin wants control over how its traffic
A
customer routed, who routes through its net.
C network:
intra-AS: single admin, so no policy decisions needed
Y
scale:
A advertises path AW to B
hierarchical routing saves table size, reduced update
B advertises path BAW to X
traffic
Should B advertise path BAW to C?
No way! B gets no “revenue” for routing CBAW since neither W nor performance:
C are B’s customers intra-AS: can focus on performance
B wants to force C to route to w via A
B wants to route only to/from its customers! inter-AS: policy may dominate over performance
Network Layer 4-21 Network Layer 4-22
Some interesting router statistics
http://www.cidr-report.org/as2.0/
http://mrtg.net.princeton.edu/statistics/routers.ht
ml
Network Layer 4-23