Title: Unicast Routing
1Unicast Routing Protocols
- Acute Communication Corp.
- Edward Jin-Ru Chen
- jzchen_at_acutecomm.com.tw
2Content
- Introduction
- Algorithms
- Distance Vector, Link State and Hybrid
- Routing Protocols
- RIP, OSPF, IGRP, EIGRP and BGP
- Testing Issue
3Roles in the Protocol Stack
- OSI seven layers
- Physical, Data link, Network, Transport, Session,
Presentation and Application - Network layer
- Provides upper layers with independence from the
data transmission and switching technologies used
to connect systems - Performs switching and routing function
- Such as Internet Protocol (IP)
4IP Version 4 Header Format
5IP Address
- IPv4 defines a 32-bit address space
- Each host contains unique address
- Divide into network space and host space
6IP Subnet
- Divide the subnet into class A, B or C
- Using subnet mask to represent the network
portion of the IP address - Can use classless subnet (only depend on the
subnet mask)
7Autonomous System (AS)
8AS (II)
- Each AS has unique 16-bit number
- Inside the autonomous system using the identical
interior or intra-domain routing protocol - Such as RIP, OSPF
- Outside the autonomous system, using the exterior
or inter-domain routing protocol - Such as BGP
9What Is Routing?
6
2
3
1
5
4
10Why Routing Protocol?
- Static Route VS Dynamic Route
- Find the way automatically
11Default Route
- Static route for unknown destination
- 0.0.0.0 at RIP
12Switch VS Protocol
- Cooperation between protocol engine and
forwarding engine - Protocol engine
- Used to be real-time OS working over processor
- Forwarding engine
- ASIC
- FPGA
- ASIC with embedded micro-processor
13Switch VS Protocol (II)
- Protocol engine decide the forwarding port and
tell the forwarding engine - Forwarding engine just follow the known
information to forwarding the multicast packet - Address search
- Best match (or longest match)
- Best match cooperate with cache (exactly match)
- Exactly match
14Routing Algorithms
- Distance Vector
- Link State
- Combination of upper two classes
15Distance Vector
- Provide the route sign
- All propagated routing information are processed
after collected - Keep and use the processed information
- Such as Routing Information Protocol
16Example of Distance Vector
A
B
C
D
E
17Link State
- Provide the road map
- All propagated information are bare information
about the link status - Keep the bare information and use the processed
information - Such as Open Shortest Path First
18Example of Link State
A
A
5
5
3
3
1
1
B
C
B
C
5
1
5
1
2
2
D
E
D
E
19Routing Information Protocol
- Derived from XNS
- Novell IPX also uses RIP
- Distance Vector
- uses hop count as metric
- Router broadcasts table every 30 sec
- Maximum network diameter is 15 hops
- Does not support variable-length subnet masks
- subnet mask is not contained in routing updates
- Suitable for small networks
20RIP Version 2
- Enhancement to RIP Version 1
- RIP- 2 Messages now carry
- route tag specifies origin of route information
- subnet mask
- authentication
- next hop
- RIP- 2 can use IP Multicast to send updates
- option to use 224.0.0. 9
21RIP Characteristics
- Bellman-Ford (Distance Vector) Algorithm
- D(i, i) 0, for all i
- D(i, j) min d(i, k) D(k, j), otherwise
- Constrained by 16 hop counts
- Periodic exchange routing information
- Routing information is similar to forwarding
information
22Count to Infinity in RIP
Time
23Improving the Robustness
- Split horizon
- Simple split horizon
- Split horizon with poison reverse
- Triggered update
24Split Horizon
- Simple split horizon
- Instability may caused by neighbors engaged in a
pattern of mutual deception - It is never useful to claim reachability for a
destination network to the neighbor(s) from which
the route was learned - Omit routes learned from one neighbor in updates
sent to that neighbor
25Simple Split Horizon
Net A, Metric 3
Router
No Net A entry
26Split Horizon
- Split horizon with poisoned reverse
- Advertising reverse routes with a metric of
infinite (16) - If two routers have routes pointing at each
other, poison reverse will break the loop
immediately. - Disadvantage is to increases the size of the
routing messages
27Split Horizon with Poison Reverse
Net A, Metric 3
Router
Net A, Metric 16 (Infinite)
28Incompleteness of Split Horizon
A
C
B
29Triggered Update
- Whenever a router changes the metric for a route,
it is required to send update messages almost
immediately - combines with the rules for computing new metrics
- The receiving router believes the new
information, whether the new metric is higher or
lower than the old one.
30Triggered Update (II)
Transmit immediately
Net A, Metric n1
Router
Net A, Metric n1
Net A, Metric n
Net A, Metric n1
31RIP Timers
- Period update timer (30 sec)
- Timeout timer (180 sec)
- Garbage-collection timer (120 sec)
32Open Shortest Path First (OSPF)
- Link-state protocol
- Shortest path first protocol
- Distributed-database protocol
- Depending on the link information to construct
shortest path to each destination - Use the area to reduce link-state database size
- Use the Designated Router to reduce routing
information traffic
33OSPF (II)
- Equal cost multi-path support
- TOS-based routing support
- Separate SPF for each TOS value
- IP subnetting support
- Attach an IP address mask to each advertised route
34OSPF Operation
AS sample
35OSPF Operation (II)
- RT12 advertisement
- RT12 ? N9 1
- RT12 ? N10 2
- RT12 ? H1 10
- N9 advertisement
- N9 ? RT9 0
- N9 ? RT11 0
- N9 ? RT12 0
36OSPF Operation (III)
From
Directed Graph
To
37OSPF Operation (IV)
The SPF tree for Router RT6
38OSPF Area
39OSPF Area (II)
- Divide Autonomous System into two levels
- Area 0 (Backbone area)
- Other areas transmit summarized information into
backbone area - Link information stored in each router, which
belongs to the same area, is identical
40OSPF Area Operation
AS with Area sample
41OSPF Area Operation (II)
From
Area 1's Database
To
42OSPF Area Operation (III)
From
Backbone's Database
To
43OSPF Hello Protocol
- Periodic send the hello packet containing the
discovered neighbors - Discover OSPF neighbors
- May use multicast (AllSPFRouters) on broadcast or
point- to- point links or configuration may be
required - Elect the Designated router
- DR only elected on broadcast and point- to- point
links
44OSPF Hello Protocol (II)
- Establish Adjacencies between Neighboring Routers
- Only adjacent routers exchange routing table
updates - Use to control the distribution of routing
information
45OSPF Designated Router
- Elected through Hello Protocol
- High priority first
- High router ID first
- Originate network links advertisement on behalf
of the network - Adjacent to all other routers on the network
46OSPF LSA
- Router links advertisements
- Network links advertisements
- Summary link advertisements
- Advertise routes to networks
- Advertise routes to AS boundary routers
- AS external link advertisements
- Type 1 external metric equivalent to the link
state metric - Type 2 external metric greater than any internal
metric
47OSPF Routing
- Synchronize Link-State Databases
- adjacent routers exchange database description
packets - link- state request/ updates provide neighbors
with most recent LSA - flooded within area - Calculate the routing table
48OSPF Extension
- Functions and Services provided by OSPF can be
easily extended - define new information and use LSA advertisements
to flood throughout routing domain - OSPF Opaque LSA (RFC2370) designed to carry new
information - routers may use this information or other
applications may use OSPF to flood data
49OSPF Extension (II)
- Two New OSPF Services make use of the Opaque LSA
- Address Resolutions Advertisements (ARA)
- Optimized Multipath (OMP)
50OSPF ARA
- Utilize fast and reliable OSPF topology updates
to propagate link- layer information (IP/ ATM
address mappings) to OSPF ATM- attached routers - Not subject to packet loss like NHRP and no need
to query address resolution server - Supports point- to- point, point- to- multipoint
and multipoint- to- point connections
51OSPF ARA (II)
- Interoperate with existing mechanisms (MPOA,
NHRP) - Associate group of routers into a single logical
network (VPN) - attached logical network ID value to ARA packets
52Multipath Forwarding
- More than one path of equal cost may exist
between two points in the network (termed Equal
Cost Multipath) - Routing protocols such as OSPF may support this
- Multipath forwarding means that the router
maintains multiple next hop entries for a
destination
53Multipath Forwarding (II)
- Forwarding can be done on a per-packet
round-robin basis - however different paths may exhibit different
delay, bandwidth and MTU characteristics - problematic for TCP sender and receiver
- possible to generate out-of-order transmission
- error loss retransmission may happen
54Multipath Forwarding (III)
- Another technique is to divide traffic equally
across multiple paths by applying next-hop
identifier (hash) to each source/destination
address pair - Still no knowledge of load or capacity of equal
cost paths
55OSPF OMP (Optimized Multipath)
- Use OSPF Opaque LSA to distribute loading
information for equal cost paths - LSA_ OMP_ LINK_ LOAD measures load, capacity
and packets dropped from a particular link - LSA_ OMP_ PATH_ LOAD
- Adjust distribution of traffic across multiple
paths based on advertised OMP loading information
56OSPF OMP Forwarding
- Hash boundary (meaning percentage of traffic
flowing over equal cost paths) may move depending
on load information conveyed by OMP updates
57Interior Gateway Routing Protocol
- Proposed by Cisco Systems, Inc.
- Is a distance vector interior-gateway protocol
- Use a combination of metrics
- Internetwork delay, bandwidth, reliability, and
traffic load - Reliability and load can be ranged from 1 to 255
- Bandwidth can be ranged from 1.2kbps to 10gbps
- Delay can be ranged from 1 to 2 to 24th power
58IGRP (II)
- Permit multipath routing
- Dual equal-bandwidth lines may run in round-robin
fashion, with automatic switch over to other when
one line goes down - Multipath can be used even with different metrics
(if bandwidth is 31, offered load set to be 31)
59IGRP Stability Features
- Hold-downs tell routers to hold down any changes
that might affect routs for some period of time
to avoid the update information polluted by
regular update - Split Horizon
- Poison Reverse Updates
60IGRP Timers
- Update timer
- The time to send the routing update message (90s)
- Invalid timer
- The time to decide the route invalid without
refreshed information - Hold-time period
- Flush timer
- Time to flushed from the routing table
61Enhanced IGRP
- Combination of link state protocol and distance
vector protocol - Using Diffusing Update Algorithm (DUAL)
- Fast convergence
- Store all of its neighbors routing table
- If not appropriate route exists,queries its
neighbor for an alternate routes - Variable length subnet mask
62Enhanced IGRP (II)
- Parital, bounded updates
- No periodic update
- Send partial updates only when the metric for a
route changes (Less bandwidth requirement) - Multiple network-layer support
- AppleTalk, IP, and Novell NetWare
- Redistribute routes learned from OSPF, RIP,
IS-IS, EGP, or BGP. Novell implementation
redistributes routes learned from Novell RIP or
SAP
63Enhanced IGRP (III)
- Features four new technologies
- Neighbor discovery/recovery
- Using hello packet
- Reliable Transport Protocol
- For update and acknowledgement not for hello
packet - DUAL finite state machine
- Protocol-dependent modules
64Inter-Domain Routing
- Policy Routing - Deciding where to direct
information based on - Cost, Performance, Security, Availability and
Reliability, Traffic Type - Best Effort or Real-
time, Others...
65Border Gateway Protocol
- Designed as a true inter- AS routing protocol for
TCP/ IP- based networks - Uses concept of Path Vectors to represent path to
reachable destination - prevents loops
- Enables policy- based routing by affecting route
selection and controlling the distribution of
specific routes
66BGP (II)
- Uses TCP to reliably exchange routing information
- BGP4 supports route aggregation and variable
length subnet masking - Inter- BGP Router relationships
- Internal BGP between two BGP routers within
same AS - External BGP between two BGP routers in
separate AS - No restrictions on network topology
- RFC1771
67BGP Path Vector
AS 2
Net A, Path 1
Net A, Path 1,2
AS 1
AS 3
Net A
Not accept
Net A, Path 1,2,3
- BGP routers advertise routing information which
contains a sequence AS numbers that a route has
traversed. This is referred to as a Path Vector - A BGP router will not accept an update if it sees
its own AS number in the update - This ensures loop free inter- domain routing
68BGP Routing Process
69BGP Routing Process
- Routing updates are received from other BGP
routers - Input policy engine filters routes and performs
attribute manipulation - Decision process decides what routes BGP router
will use - Output policy engine filters routes and performs
attribute manipulation for routes to be
advertised - Routing updates are advertised to other BGP
routers
70BGP Message Flow
- BGP peers establish a TCP connection with each
other - Initially the entire routing table is exchanged
after that only changes in topology or policy are
sent in UPDATE messages - BGP Updates can announce or withdraw a route
- BGP Updates also carry attributes which are used
by the policy engines and the decision process - AS_ PATH, ORIGIN, NEXT_ HOP, MULTI_ EXIT_ DISC,
LOCAL_ PREF, etc.
71Protocol Verification
- Packet Format
- Lower protocol parameter setting
- Entry field validity
- Timer
- Preciseness of each timer
- Algorithm
- Using entered packet to generate virtual
environment to trigger algorithm calculation
72Protocol Verification
- Input process
- Check the processing result of different input
packets - Output process
- Check the processing result when router generate
packets
73Testing Example
- RIP timer verify
- Divide the RIP process into slots
- Slots is separated by the periodic update
- Procedure
- Transmit a response packet into DUT (Device Under
Test) - Count the number of periodic updates contains the
newly added entry - Verify the time to become invalid and disappear
74Timer Verify
180 sec
120 sec
180 sec
120 sec
Periodic Update
Response
Triggered Update
75Benchmarks
- Throughput (pps)
- Routing entry update delay