320 likes | 332 Views
What Are Routers?. Routers are an intermediate system at the network layer that is used to connect networks together based on a common network layer protocol. Router types. Main routing components include:. Routing interface Routing protocol Routing table. What Are Routing Interfaces?.
E N D
What Are Routers? • Routers are an intermediate system at the network layer that is used to connect networks together based on a common network layer protocol
Main routing components include: • Routing interface • Routing protocol • Routing table
What Are Routing Interfaces? • A routing interface is an interface over which IP packets are forwarded
What Are Routing Protocols? • A routing protocol is a set of messages that routers use to determine the appropriate path to forward data OSPF RIP • Designed for small to medium-size networks • Uses a routing table • Easier to configure and manage • Does not scale well • Designed for large to very large networks • Uses a link-state database • Complex to configure and manage • Operates efficiently in large networks
What Are Routing Tables? • A routing table is a series of entries called routes that contain information about the location of the network IDs in the internetwork
Interior Routing Protocols • The internet is a connection of many different networks. We have seen how to navigate around this big system • How do we make our routing decisions within a network?
Autonomous Systems • Owned and administered by a single organization • Frequently a backbone system connecting a number of LANs (e.g., University) • Usually connected to the Internet at one or more points • Use routers to connect the LANS
Autonomous System LAN 1 LAN 2 LAN 3 LAN 4 LAN 5 LAN 6 Backbone link
Large Autonomous System • The Autonomous System of a large organization could include many routers, and cover a wide geographical area • Telstra’s AS includes about 400 routing nodes
Routing Problem in AS • Much of the traffic generated within the AS would be addressed to stations within the AS • Traffic to or from the Internet needs to reach the correct LAN • If it is a WAN, it might be used by the Internet to conduct packets over long distances
Routing Problem in AS • Any of these situations reduce to the following problem. What is the “best” way to get a packet from router A to router B? • Router A is the first router to receive the packet • Router B is the router connected to the LAN where the destination station is connected or is the router which passes the packet onto its next hop
Routing Problem in AS • We assign a weight to each link • To avoid congestion, or balance load, the weight is a function of the utilization of the link, eg u2 • Usually, traffic will be different in each direction, in the same link • The same link must then have two different weights for the two directions
Weight Function • Why not use a weight function which is simply equal to the utilization? • An extremely simple example will show why - two routers and two links
Weight Function • Total traffic is 100 Mbps, bandwidth of each link is 100 Mbps • Might split traffic 50-50, or, say, 75-25 • Sutilisation = 0.5 + 0.5 = 1 (first case) • Sutilisation = 0.75 + 0.25 = 1 (second case) • Cannot discriminate between these cases • Cannot tell us which is the “best”
Weight Function • However, if weight is u2 • Su2 = 0.52 + 0.52 = 0.25 + 0.25 = 0.5 (first case) • Su2 = 0.752 + 0.252 = 0.5625 + 0.0625 = 0.625 (second case) • Prefer first case, ie 50-50 (80% of 0.625) • Higher powers, eg u4, give stronger discrimination
Weight Function u4 • Su4 = 0.54 + 0.54 = 0.0625 + 0.0625 = 0.125 (first case) • Su4 = 0.754 + 0.254 = 0.3164 + 0.0039 = 0.3203 (second case) • Prefer first case, ie 50-50 • First case gives total weight 39% of second case
One Solution • Based on Bellman-Ford (distance vector) algorithm • Neighboring routers send each other their routing tables
RIP Protocol • Routing Information Protocol (RIP) uses weight of 1 for each link min hop count • Max hop count allowed is only 16 - after that, RIP assumes destination is unreachable • Uses elapsed time as cost function
Dijkstra’s (Link State) Algorithm • Every router has a map of the complete network • All link costs are available to every router • Router computes best route, independently of other routers • Routers use Dijkstra’s algorithm for this computation
Dijkstra’s Algorithm • Algorithm to find lowest cost from router ‘s’ to all other routers in the network • Algorithm proceeds by looking at routers directly connected to router “p” • Step 1. Set RC(s) = 0, mark this RC as permanent (route cost to router “s”). Set RC to all other routers = . They are temporary. Set p = s.
Dijkstra’s Algorithm • Step 2. For all routers, “x”, connected to router p, and which have temporary RCs, update the RC as follows RC = min(present RC, RC(p) + c(p,x)) where c(p,x) = cost of link from p to x • Step 3. Find minimum of all temporary RCs. Let this be RC(i)
Dijkstra’s Algorithm • Step 4. Make this RC permanent. Set p = i • Step 5. If all RC are permanent, stop. Otherwise, return to step 2
Example Network 4 2 3 1 3 7 6 3 3 1 6 5 4 4 5 4
Two Way Traffic • In practice, we will find different traffic flow in the two directions through one link • If the link cost is a measure of flow, speed or congestion, it should be different in the two directions • Thus a single link, as shown in diagrams so far, should be replaced with two directed links
Network with Directed Links 4 1 2 2 1 4 5 1 3 2 4 7 3 6 4 5 3 c(1,2) c(2,1)
Effect of Routing Tables on Traffic Pattern • A single change in a routing table produces a change in the traffic pattern • This produces a change in the link costs • Which may produce a change in a routing table, and so on • The system may settle down, or may continue in a “limit cycle”
Possibility of alternate routes • Routing table normally defines one route for any source/destination pair • Can achieve better utilisation of network if two (or more) routes are used • Effect is greater if network is small
OSPF • The most popular link state protocol is OSPF (Open Shortest Path First) • Developed by the IETF • Capable of calculating more than one “best” path
Similar Protocols • Similar protocols are Intermediate Host to Intermediate Host (IS-IS) • IS-IS is designed for OSI networks • Extended Interior Gateway Routing Protocol (EIGRP) • Developed by Cisco before OSPF came out