Вы находитесь на странице: 1из 70

Understands and Utilizes Layer 3 Information Forward packets towards their destination networks on a hop-by-hop basis

The forwarding router does not know if a next hop router is the destination router just another hop Maintains Tables to aid in decision Each Port on a Router is a Network or Subnet Translation of Protocols - LAN Based (IP, IPX) to WAN Based (Frame Relay)

Act as addressing center for network


Interconnects LANs and WANs

Multiprotocol Routing
Provides Like Services for All Routed Protocols like IP, IPX, DEC, Novell etc.

Best Path Determination With dynamic routing enabled, it provides alternate route for a failed route

That part of the NW layer software responsible for deciding which output line an incoming packet should be transmitted on. If subnet uses datagrams, decision is made afresh for every arriving pkt since best route may have changed since last time. If subnet uses VCs, routing decisions are made only when a new VC is being established; thereafter the pkts follow previously established route (Session Routing).

Correctness

Simplicity
Robustness
Ability to cope with the changes in the topology and traffic without requiring all the jobs in all the hosts to be aborted and the NW to be rebooted everytime some router crashes. Continued efficient performance giving the desired output over a period of time.

Stability

Fairness
Giving an equal chance to everybody

Rapid Convergence

Convergence is the process of agreement, by all routers, on optimal routes.


When NW topology changes, routers distribute routing update messages that permeate NWs, stimulating recalculation of optimal routes and eventually causing all routers to agree on these routes. Routing algorithms that converge slowly can cause routing loops or network outages.

Optimality
Reducing the number of hops to reduce delay and bandwidth consumed thereby improving the throughput.

Optimality Principle It states that if a router J is on the optimal path from router I to router K, then the optimal path from J to K also falls along the same route.

Thus, set of optimal routes from all sources to a given destination form a tree rooted at the destination. Such a tree is called a sink tree.

A sink tree does not contain any loops, so each packet will be delivered within a finite and bounded number of hops. In practice, life is not quite this easy. Links and routers can go down and come back up during operation, so different routers may have different ideas about the current topology. Also, we have quietly finessed the issue of whether each router has to individually acquire the information on which to base its sink tree computation, or whether this information is collected by some other means.

A routing protocol sets up routing table in routers.

Router makes a local choice depending on global topology


To make correct local decisions, each router must know something about global state Global state is inherently large, dynamic and hard to collect

A routing protocol must intelligently summarize relevant information

Non-Adaptive Algorithms
Do not base their routing decisions on estimates of current traffic and topology. The choice of routes to get from I to J, is computed offline, in advance and downloaded to the router. The procedure is also called Static Routing.

Adaptive Algorithms
Change their routing decisions to reflect changes in traffic and topology. Where they get their info from?
Locally From adjacent routers, or From all routers Every delta T secs When the load changes When the topology changes Distance No of hops Estimated transit time.

Adaptive algorithms differ in

When do they change their routes?


What metric is used for optimization?


Static Route Uses a route that a network administrator enters into the router

Dynamic Route Uses a route that a network protocol adjusts automatically for topology or traffic changes

Route table acquires information in two ways. The information may be entered manually, by means of a static route entry, or automatically by one of several systems of automatic information discovery and sharing known as dynamic routing protocols. The procedure for statically routing an internetwork has three steps:
For each data link within the internetwork, identify all addresses (subnet or network). For each router, identify all data links not directly connected to that router. For each router, write a route statement for each data link not directly connected to it.

(config)# ip route 192.168.1.0 255.255.255.0 192.168.1.193 (config)# ip route 10.4.6.0 255.255.255.0 192.168.1.193 (config)# ip route 10.4.7.0 255.255.255.0 192.168.1.193

Dynamic routing protocols are built around an algorithm Routing algorithm must, at a minimum, specify the following: A procedure for passing reachability information about networks to other routers. A procedure for receiving reachability information from other routers A procedure for determining optimal routes based on the reachability information it has and for recording this information in a route table A procedure for reacting to, compensating for, and advertising topology changes in an internetwork

All networks within an internetwork must be connected to a router, and wherever a router has an interface on a network that interface must have an address on the network. This address is the originating point for reachability information. Routing path selection parameters: metric is a variable assigned to routes as a means of ranking them from best to worst or from most preferred to least preferred but it simply counts router hops bandwidth plays a role in how efficiently traffic travels through the networks. Reliability:- The path with highest reliability would be selected as best.

Shortest Path Routing


Build a graph of the subnet
Each node of the graph represents a router and each arc of the graph represents a link. To choose a route between a pair of routers, the algorithm finds the shortest path between them on the graph. No of hops Geographical distance Mean queuing and transmission delay Bandwidth utilization Communication cost Average traffic

Metrics for determination of shortest path


Shortest Path Routing - General Case Labels on the arc computed as functions of distance, BW, average traffic, comn cost, mean queuing length, measured delay etc. By changing the weighting function the algorithm would then compute the shortest path measured according to:
any one criteria, or combination of criteria.

B 2 A 2 1 G B (2,A) A E(4,B) E

7 F 2 4 (a) 2 3

C 3 D 2 H C (9,B) F(&,-) D (&,-) A A

B (2,A) E(&,-)

C (&,-) F(&,-) D (&,-)

G (6,A) B (2,A)

(b)

H (&,-)
C (9,B) F(6,E) D (&,-)

E(4,B)

G (6,A)
B (2,A)

(c)

H (&,-) C (9,B) F(6,E) D (&,-)

G (5,E) B (2,A)

(d)

H (&,-) C (9,B) F(6,E) D (&,-)

E(4,B)

E(4,B)

G (5,E)

(e)

H (9,G)

G (5,E)

(f)

H (8,F)

Every incoming pkt is sent out on every outgoing line except the one it arrived on Generates a vast number of duplicate pkts. Flooding is not practical in most applications.
Can be used in mil applications ,due to its tremendous robustness, it can handle losses of a part of the subnet. Can be used in distributed database applications to update data concurrently

Optimisation - dampen the process of flooding.


Hop counter
Contained in the header of each pkt Decremented at each hop Pkt discarded when the counter reaches zero Hop counter initialized to the length of the path from source to destn If length not known the counter can be initialized to the worst case, i.e. the full diameter of the subnet. Routers do not send every incoming pkt on every outgoing line, but only on those lines that are going approx in the right direction.

Selective flooding

Developed by Cisco in the mid-1980s as a better alternative solution to RIP (Routing Information Protocol).
A distance vector protocol Main goal was to be a robust protocol for routing within an autonomous system IGRP was initially decided to run in any network environments, but ported to run in OSI Connectionless-Network Protocol (CLNP).

Many organizations with large internetworks replaced RIP with IGRP, because it is superior than RIP in:
More scalability with supported hop-count up to 255 More flexibility with sophisticated metric, a composite metric of 5 variables; and Multi-path support across unequal path. 3

Routing Protocols

Interior

Exterior

Dist-Vector

Link-State

Hybrid

BGP

EGP

RIP

IGRP

OSPF

EIGRP

Interior Routing protocols operated within an Autonomous System. Exterior Routing protocols operated between Autonomous Systems.

Definition:
Collection of routers and networks under the same administration or routing policy. Usually under single ownership, trust and administrative control.

When using AS:


Multi-home networks to different providers. Routing policy is different to external peers.

Characteristics: Internal connectivity: All parts of an AS must remain connected, meaning that its all routers must exchange routing information in order to maintain the connectivity. A single routing protocol required to run in an AS, between all routers. In 1982, terminology, routers inside an AS were called interior gateways and the protocol was an Interior Gateway Protocol (IGP). Each AS is identified by a 16-bit AS number. EGP is used to
exchange information among Ass.

Distance Vector Routing

Mathematically compare routes using some measurement of distance (distance vector). Routers send all or a portion of their routing table in a routing-update message at regular intervals to each of their neighboring routers. As routing information proliferates, routers:
Identify new destinations Learn failure through the network Calculate distance to all known destinations.

Distance Vector Routing (2/3)

Routing table E

Destination A B C

Outgoing Link Local 1 2

Distance 0 1 1

Initially, each router initializing its local knowledge: remember its own address and be able to identify the links attached to it. It then broadcasts its routing table to all its neighbors.

Routing table A A 1
Update broadca st

Update Broadcast

It updates its routing table when noticing a change.


The process continues until the network converges

2
Update Broadcast

B
Destination A B C Outgoing Link 1 Local 1 Distance 1 0 2

C
Destination A B C Outgoing Link 2 2 Local Distance 1 2 0

Routing table B

Routing table C 10

Count To Infinity

A 1 2

A captures the change Update routing table

Destination
A B C

Outgoing Link
Local 1 2

Distance
0 1 1 Inf 3

Routing table A B
Updating

Destination
A B C

Outgoing Link
1 Local 1

Distance
1 0 2 4

Routing table B 11

Split Horizon

Solution: Split Horizon

A
1

Split horizon is based on very simple precaution: it is never useful to send information about a route back in the direction from which it came. 2

B
Update

Routing table A
The Network converges !

Destination A B C

Outgoing Link 1 Local 1

Distance 1 0 2 inf

Destination A B C

Outgoing Link Local 1 2

Distance 0 1 inf

Routing table B 12

Poison-reverse update

Solution: Poison-reverse update


A 1 Is a way in which a router tells its neighboring router that one of the routers is no longer connected; or disqualifies A Destination Outgoing Link Distance a route back a long the interface on which it learned the captures A Local 0 and route by setting the unconnected router to a defined updates 2 number. B 1 1
C 2 1

Routing table A

The Network converges ! Destination Outgoing Link A Destination A B C Outgoing Link 1 Local 1 Distance 1 0 2 inf B
B modifies C routing table before sending

Distance 0 1 inf

Local 1 2

Routing table B 13

Triggered Update

Solution: Triggered Update


A 1 Is an attempt to increase the responsiveness of the protocol by requesting nodes to send message as soon A captures A send Destination Outgoing Link Distance as they notice the update change a change in their routing table with out Aof the period. Local 0 havingimmediately toand wait for the end updates to B 2 B 1 1
C 2 1 inf

B
Update

Routing table A
The Network converges !

Destination A B C

Outgoing Link 1 Local 1

Distance 1 0 2 inf

Routing table B 14

Original ARPANET routing algorithm. Each router maintains a table containing one entry for each router in the subnet. Each entry has two parts:
preferred outgoing line to use for that destination, and an estimate of the time or distance to that destination.

These tables are updated by exchanging info with the neighbors. RIP and IGRP are distance-vector routing protocols.

Distance Vector Routing has a serious drawback in practice known as Count-To-Infinity problem. It reacts rapidly to good news, but slowly to bad news. Example: Consider a five node linear subnet with the delay metric being the no of hops

Many ad hoc solutions to the count-to-infinity problem have been proposed in the literature, each one more complicated and less useful than the one before it. The split horizon algorithm works the same way as distance vector routing, except that the distance to X is not reported on the line that packets for X are sent on (actually, it is reported as infinity).

1 inf inf inf inf

2 2 inf inf inf

3 4 3 4 3 4 inf 4 inf inf

inf=infinity

When CD line goes down. A thinks it has a path to D through B and B thinks it has a path to D through A. A and B will count to infinity.

Distance Vector Routing replaced by Link State Routing due to following problems: Delay metric did not take line bandwidth into account. Algorithm often took too long to converge.

In Link State Routing each router must: Discover its neighbors and learn their NW address. Measure delay to each of its neighbors. Construct a packet telling all it has just learned. Send this pkt to all other routers. Compute the shortest path to every other router.

Learning about neighbours On booting router sends special hello packet on each point-to-point line. Routers on other end reply by sending their globally unique names.

Measuring Line Delay/ Cost


Each router must have a reasonable estimate of delay to each of its neighbors. Determined by sending a special ECHO Packet over the line that the other side is reqd to send back imdtly. To take current load in account, round trip timer is started when Echo Packet is queued. Otherwise timer is started when it reaches head of queue. Should we take load into account?

Including queuing cost: can use the best line, but may lead to routing table oscillating.

Same bandwidth on the two links

Building Link State Packets Once the info is collected, pkts containing all the data are built. Pkt contains ID of sender, sequence No, age and list of neighbors. Delay to each neighbor is also given. These pkts may be built after regular intervals or on some significant event.

Distributing Link State Pkts


Flooding is used to distribute pkts. Each pkt contains a sequence No which is incremented for each new pkt sent. Sequence No of new pkt is checked against that already seen. New pkt is fwd on all lines except the one it came on else it is discarded.

Distributing Link State Pkts (Contd)


Problems:
Wrapping around of sequence No. will cause confusion thus 32 bit sequence No. is used. If a router crashes it will start again with seq no zero which will be rejected as duplicate. Sequence No. may get corrupted leading to discarding of subsequent pkts.

Solution - Include the age of each pkt and decrement it once per second/hop.A pkt is discarded when the age hits zero. All link state pkts are acknowledged on point to point lines.

Distributing Link State Pkts Data structure used to buffer pkts at a router

Computing New Routes


After accumulating full set of link state pkts, a router constructs the entire subnet graph. Then, Shortest Path Algorithm is used to determine the routing tables and normal operation resumed. Disadvantages:
For large subnets, large memory reqd to store input data. Computational time is large.

Example Protocols: OSPF, IS-IS(Intermediate system, Intermediate System)

Link-state algorithm floods routing information to all nodes in the internetwork. Each router, however, sends only the portion of the routing table that describes the state of its own links. Thus, each router builds a picture of the entire network in its routing tables. In Distance vector algorithm, each router sends all or some portion of its routing table to its neighbors only. Distance vector algorithms know only about their neighbors. In essence, link-state algorithms send small updates everywhere, while distance vector algorithms send larger updates only to neighboring routers.

Link-state algorithms are less prone to routing loops and converge faster than distance vector algorithms. Link-state algorithms require more CPU power and memory than distance vector algorithms more expensive to implement and support. Link-state protocols are generally more scalable than distance vector protocols.

As the size of the NW increases:


Routing table grow proportionally. More router memory consumed. More CPU time needed to scan the tables. More bandwidth required to send the status reports.

NW may grow to a point where it is no longer feasible for every router to have an entry for every other router.

In Hierarchical routing the routers are divided into regions. Each router knows how to route pkts to destinations within its own region. It knows nothing about the internal structure of other regions. For very large networks, these regions may be grouped into clusters, the clusters into zones, the zones into groups, and so on

Advantages?

Unfortunately, the gain in routing table space are not free. There is a penalty to be paid in the form of increased path length. For example, the best route from 1A to 5C is via region 2, but with hierarchical routing all traffic to region 5 goes via region 3, because that is better for most destinations in region 5. When a single network becomes very large, how many levels should the hierarchy have? Answer: The optimal number of levels for an N router subnet is ln N.

When a new user enters an area, either by connecting to it, or just wandering into the cell, his computer must register itself with the foreign agent there.

Find a foreign agent ? The mobile host registers with the foreign agent, giving its:
home address, current data link layer address, and some security information.

The foreign agent contacts the mobile hosts home agent.


The message from the foreign agent to the home agent contains the foreign agents network address. It also includes the security information, to convince the home agent that the mobile host is really there.

The home agent examines the security information, which contains a time stamp, to prove that it was generated within the past few seconds. On being satisfied, it tells the foreign agent to proceed. When the foreign agent gets the acknowledgement from the home agent, it makes an entry in its tables and informs the mobile host that it is now registered. The event of user leaving an area should also be ideally announced to allow deregistration. But many users abruptly turn off their computers when done. So, what do you do?

Used in appln where msg has to be send to all hosts. One method could be sending a distinct packet to each destination.
Requires no special feature from subnet Wastes bandwidth and require the source to have a complete list of all destinations. Least desired method.

Second method is Flooding .


Generates too many packets and consumes too much bandwidth.

Third method is multi-destination routing.

Each packet contains either a list of destinations or a bit map indicating the desired destinations. When a packet arrives at a router, the router checks all the destinations to determine the set of output lines that will be needed. The router generates a new copy of the packet for each output line to be used and includes in each packet only those destinations that are to use the line. In effect, the destination set is partitioned among the output lines. After some hops each pkt will carry only one dest and can be treated as normal pkt

A fourth broadcast algorithm makes explicit use of the sink tree for the router initiating the broadcast, or any other convenient spanning tree. This method makes excellent use of bandwidth, generating the absolute minimum number of packets necessary to do the job. The only problem is that each router must have knowledge of some spanning tree for it to be applicable.

dynamic routing is always better than static routing. It's important to keep in mind that the primary duty of a dynamic routing protocol is to automatically detect and adapt to topological changes in the internetwork. The price of this "automation" is paid in bandwidth and maybe queue space, in memory, and in processing time. A frequent objection to static routing is that it is hard to administer. This criticism may be true of medium to large topologies with many alternative routes, but it is certainly not true of small internetworks with few or no alternative routes

Protocol
Distance Vector

Examples
RIP v1 and RIP v2 Interior Gateway Routing Protocol (IGRP)

Characteristics
Copies routing tables to neighbors Updates frequently RIP v1 / v2 use hop count as metric Views the network from the perspective of the neighbors Slow to converge Susceptible to routing loops Easy to configure and administer Consumes a lot of bandwidth

Link-state

Open Shortest Path First (OSPF) Intermediate-System to IntermediateSystem (IS-IS)

Uses shortest path Updates are event triggered Sends link-state packets to all network routers Has common view of network Fast to converge Not as susceptible to routing loops Harder to configure Requires more memory and processing power than distance vector Consumes less bandwidth than distance vector

Вам также может понравиться