Académique Documents
Professionnel Documents
Culture Documents
(part 1)
IP routing
❚ Each router or host makes its own routing
decisions
❚ Sending machine does not have to determine
the entire path to the destination
❚ Sending machine just determines the next-
hop along the path.
❙ This process is repeated until the destination is
reached
❚ Forwarding table consulted to determine the
next-hop
IP routing
❚ Classless routing
❙ route entries include
❘ destination
❘ next-hop
❘ mask (prefix-length) indicating size of address space
described by the entry
❚ Longest match
❙ for a given destination, find longest prefix match
in the routing table
❙ example: destination is 35.35.0.0/19
❘ routing table entries are 35.0.0.0/8 and 35.35.0.0/16
IP routing
❚ Default route
❙ where to send packets if don’t have an
entry for the destination in the routing
table
❙ most machines have a single default
route
❙ often referred to as a default gateway
Static routing
❚ each router manually configured
with a list of destinations and the
next hop to reach those destinations
❚ ideal for small number of
destinations or “stub” networks
❙ stub network - network with only one or
two paths to the rest of the network
Dynamic Routing
❚ routers compute routing tables
dynamically based on information
provided by other routers in the network
❚ routers communicate topology to each
other via different protocols
❚ routers then compute one or more next
hops for each destination - trying to
calculate the most optimal path
Static and Dynamic
Routing
A B C
D E
3
A B
15
4 4
C D
7
Link State
Algorithm
❚ Each router maintains a database
containing map of the whole topology
❙ Links
❙ State (including cost)
❚ All routers have the same information
❚ All routers calculate the best path to
every destination
Link State Algorithm (con)
❚ Any link state changes are flooded
across the network
❚ "Global spread of local knowledge”
Link State vs. Distance
vector
❚ Distance Vector
❙ views net topology from neighbor’s
perspective
❙ adds distance vectors from route to
router
❙ frequent, periodic updates; slow
convergence
❙ passes copies of routing table to
neighbor routers
Link State vs. Distance
vector
❚ Link-State
❙ gets common view of entire network
topology
❙ calculates the shortest path to other
routers
❙ event-triggered updates; faster
convergence
❙ passes link-state routing updates to
other routers
Distance Vector and Link
State Protocols
❚ Distance vector routers compute the
best path from information passed to
them from neighbors
❚ Link State routers each have a copy
of the entire network map
❚ Link State routers compute best
routes from this local map
Note: Routing is not the same
as Forwarding
❚ Forwarding: passing packets along to the next
hop
❙ There is only one forwarding table
❙ Just has prefix and next-hop info
❚ Routing: populating the forwarding table
❙ You might have multiple routing databases - e.g. both
OSPF and BGP
❙ Routing databases have more information
Routing and
Forwarding
BGP
OSPF Static
Forwarding
Table
HELLO HELLO
❙ Router priority
❙ Hello interval
❙ Router dead interval
❙ Network mask
❙ List of neighbors These must match
Neighbo
rs
❚ Bi-directional communication
❚ Result of OSPF hello packets
❚ Need not exchange routing information
Who is
adjacent?
A B
C D
Broadcast
medium
DR BDR
Other nice features of
OSPF (optional)
❚ Authentication
❚ Equal-cost multipath
❙ more than one "best" path - share traffic
❚ Proper classless support (CIDR)
❚ Multiple areas
❙ For very large networks (>150 routers)
❙ Aggregate routes across area boundaries
❙ Keep route flaps within an area
❙ Proper use of areas reduce bandwidth and CPU utilisation
❙ Backbone is Area 0
Cisco OSPF commands and
configuration
❚ show ip route
❚ show ip ospf neighbor
❚ show ip ospf database
Configuring OSPF
❚ router ospf <process-id>
❚ network x.x.x.x m.m.m.m area <area-id>
❚ m.m.m.m = wildcard mask
❚ 0 = don’t care bit
❚ 1 = check bit
❚ 0.0.0.0 mask for exact match
❚ network 203.167.177.10 0.0.0.0 area 0
❚ network 203.167.177.0 0.0.0.255 area 0
Classroom Layout
HUB HUB
A B
PC Router Router PC
HUB HUB
C D
PC Router Router PC
HUB HUB
E F
PC Router Router PC
HUB HUB
G H
PC Router Router PC
HUB HUB
I J
PC Router Router PC
SWITCH
Serial Links for exercise
A B
133.27.162.96/28 133.27.162.112/28
133.27.162.48/30
133.27.162.60/30
C D
133.27.162.16/28
133.27.162.128/28 133.27.162.144/28
E F
133.27.162.160/28 133.27.162.176/28
133.27.162.52/30 133.27.162.64/30
G H
133.27.162.192/28 133.27.162.208/28
I J
133.27.162.224/28 133.27.162.240/28
133.27.162.56/30