Data Communication & Network
Download
Report
Transcript Data Communication & Network
Computer Communication &
Networks
Lecture 22
Network Layer: Delivery, Forwarding, Routing (contd.)
http://web.uettaxila.edu.pk/CMS/coeCCNbsSp09/index.asp
Waleed Ejaz
[email protected]
1
Network Layer
2
Network Layer Topics to Cover
Logical Addressing
Internet Protocol
Address Mapping
Delivery, Forwarding, Routing
3
Two-node Instability:
Counting to Infinity Problem
4
Split Horizon and Split Horizon with
Poisoned Reverse
• Reverse Route
– a route pointing to the node where it has arrived
– it creates potential cycle
R2
Subnet N
R1
Reverse Route
• Split Horizon
– min cost to a given destination is not sent to a neighbor if the neighbor is
the next node along the shortest path
– a route is not broadcast on the interface through which the node has
learnt it
• Split Horizon with Poisoned Reverse
N1
N2
N3
N4
– send infinity
Initial (2,3)
(3,2)
(4,1)
(4,0)
1
1
1
1
2
3
4
1
(2,3)
(3,2)
2
3
(2,3)
(-1,)
(-1,)
(-1,)
(-1,)
(-1,)
(-1,)
(4,0)
(4,0)
(4,0)
5
RIP ( Routing Information Protocol)
Uses the distance-vector algorithm
u
v
A
z
C
B
D
w
x
y
destination hops
u
1
v
2
w
2
x
3
y
3
z
2
6
Routing Information Protocol (RIP)
Runs on top of UDP, port number 520
Metric: number of hops
Max limited to 15
suitable for small networks (local area
environments)
value of 16 is reserved to represent infinity
small number limits the count-to-infinity problem
7
RIP Operation
Router sends update message to neighbors every 30 sec
A router expects to receive an update message from each
of its neighbors within 180 seconds in the worst case
If router does not receive update message from neighbor
X within this limit, it assumes the link to X has failed and
sets the corresponding minimum cost to 16 (infinity)
Uses split horizon with poisoned reverse
Convergence speeded up by triggered updates
neighbors notified immediately of changes in distance
vector table
8
Example of a Domain using RIP
9
Open Shortest Path First
Fixes some of the deficiencies in RIP
Enables each router to learn complete network topology
Each router monitors the link state to each neighbor and
floods the link-state information to other routers
Each router builds an identical link-state database
Allows router to build shortest path tree with router as root
OSPF typically converges faster than RIP when there is a
failure in the network
10
Path Vector Routing
11
EGP: Exterior Gateway Protocol
designed for tree-structured Internet
concerned with reachability, not optimal
routes
BGP – Border Gateway Protocol
12
Exterior Gateway Protocols
Within each AS, there is a consistent set of routes
connecting the constituent networks
EGP enables two AS’s to exchange routing
information about:
The networks that are contained within each AS
The AS’s that can be reached through each AS
EGP path selection guided by policy rather than
path optimality
Trust, peering arrangements, etc
13
EGP Example
Only EGP
routers are
shown
R2
R3
AS2
R1
N1 reachable
through AS3
R4
N1
AS1
AS3
•
R4 advertises that network N1 can be reached through AS3
•
R3 examines announcement & applies policy to decide whether it will
forward packets to N1 through R4
•
If yes, routing table updated in R3 to indicate R4 as next hop to N1
•
IGP propagates N1 reachability information through AS2
14
EGP Example
N1 reachable
through AS2
R2
R3
AS2
R1
R4
N1
AS1
AS3
•
EGP routers within an AS, e.g. R3 and R2, are kept consistent
•
Suppose AS2 willing to handle transit packets from AS1 to N1
•
R2 advertises to AS1 the reachability of N1 through AS2
•
R1 applies its policy to decide whether to send to N1 via AS2
15
EGP Requirements
Scalability to global Internet
Provide connectivity at global scale
Link-state does not scale
Fully distributed
EGP path selection guided by policy rather
than path optimality
Trust, peering arrangements, etc
EGP should allow flexibility in choice of paths
16
Internet inter-AS routing: BGP
BGP provides each AS a means to:
1.
Obtain subnet reachability information from
neighboring ASs.
2.
Propagate the reachability information to all
routers internal to the AS.
3.
Determine “good” routes to subnets based on
reachability information and policy.
Allows a subnet to advertise its existence to rest
of the Internet: “I am here”
17
Initial routing tables in path vector routing
18
Stabilized tables for three autonomous systems
19
BGP Policy
Examples of policy:
Never use AS X
Never use AS X to get to a destination in AS Y
Never use AS X and AS Y in the same path
Import policies to accept, deny, or set preferences on route
advertisements from neighbors
Export policies to determine which routes should be
advertised to which neighbors
A route is advertised only if AS is willing to carry traffic on
that route
20
Why different Intra- and Inter-AS routing ?
Policy:
Inter-AS: admin wants control over how its traffic routed, who
routes through its net.
Intra-AS: single admin, so no policy decisions needed
Scale:
hierarchical routing saves table size, reduced update traffic
Performance:
Intra-AS: can focus on performance
Inter-AS: policy may dominate over performance
21
22