Sei sulla pagina 1di 17

Understanding Routing

What is Routing?

Routing is:

Finding a path between a source and destination (path determination

Moving information across an inter-network from a source to a destination (switching*)

Very complex in large networks because of the many potential intermediate nodes

* The term “switching”, when used to describe a router’s function, is different from a switch (the network device).

A router is:

A network layer device that forwards packets from one network to another and determines the optimal path for forwarding network traffic

In

other words Routing is the process of finding a path to a destination host and

of

moving information across an inter-network from a source to a destination.

Along the way, at least one intermediate node typically is encountered. Routing is very complex in large networks because of the many potential intermediate destinations a packet might traverse before reaching its destination host.

A router is a device that forwards packets from one network to another and

determines the optimal path along which network traffic should be forwarded. Routers forward packets from one network to another based on network layer information. Routers are occasionally called gateways (although this definition of gateway is becoming increasingly outdated).

Routers—Layer 3

It

determines the appropriate network path to send the packet along by

keeping an up-to-date network topology in memory, its routing table.

A router is a more sophisticated device than a hub or a switch

A

router keeps a table of network addresses and knows which path to take

to

get to each network.

Routers keep track of each other’s routes by alternately listening, and periodically sending, route information. When a router hears a routing update, it updates its routing table. Routing is often contrasted with bridging, which might seem to accomplish precisely the same thing to the causal observer. The primary difference between the two is that bridging occurs at Layer 2 (the data link layer) of the OSI reference model, whereas routing occurs at Layer 3 (the network layer). This distinction provides routing and bridging with different information to use in the

process of moving information from source to destination, so that the two functions accomplish their tasks in different ways. In addition, bridges can’t block a broadcast (where a data packet is sent to all nodes on a network). Broadcasts can consume a great deal of bandwidth. Routers are able to block broadcasts, so they provide security and assist in bandwidth control.

You might ask, if bridging is faster than routing, why do companies move from a bridged/switched network to a routed network? There are many reasons, but LAN segmentation is a key reason. Also, routers increase scalability and control broadcast transmissions.

increase scalability and control broadcast transmissions. ∑ Where the Router Used ?  A router can

Where the Router Used ?

A router can perform LAN-to-LAN routing through its ability to route packet traffic from one network to another. It checks its router table entries to determine the best path to the destination network

A router can perform LAN-to-WAN and remote access routing through its ability to route packet traffic from one network to another while handling different WAN services in between. Popular WAN service options include Integrated Services Digital Network, or ISDN, leased lines, Frame Relay, and X.25.

LAN-to-LAN Connectivity

∑ LAN-to-LAN Connectivity This picture illustrates the flow of packets through a routed network using the

This picture illustrates the flow of packets through a routed network using the example of an e-mail message being sent from system X to system Y.

The message exits system X and travel through an organization’s internal network until it gets to a point where it needs an Internet service provider.

The message will bounce through their network and eventually arrive at system Y’s internet provider. While this example shows three routers, the message could actually travel through many different networks before it arrives at its destination. From the OSI model reference point of view, when the e-mail is converted into packets and sent to a different network, a data-link frame is received on one of a router's interfaces.

The router de-encapsulates and examines the frame to determine what type of network layer data is being carried. The network layer data is sent to the appropriate network layer process, and the frame itself is discarded.

The network layer process examines the header to determine the destination network and then references the routing table that associates networks to outgoing interfaces.

The packet is again encapsulated in the link frame for the selected interface and sent on. This process occurs each time the packet transfers to another router. At the router connected to the network containing the destination host, the packet is encapsulated in the destination LAN’s data-link frame type for delivery to the protocol stack on the destination host.

Path Determination

Routing involves two basic activities: determining optimal routing paths and transporting information groups (typically

Routing involves two basic activities: determining optimal routing paths and transporting information groups (typically called packets) through an inter- network. In the context of the routing process, the latter of these is referred to as switching. Although switching is relatively straightforward, path determination can be very complex. During path determination, routers evaluate the available paths to a destination and to establish the preferred handling of a packet.

Routing services use inter-network topology information (such as metrics) when evaluating network paths. This information can be configured by the network administrator or collected through dynamic processes running in the inter- network

After the router determines which path to use, it can proceed with switching the packet: Taking the packet it accepted on one interface and forwarding it to another interface or port that reflects the best path to the packet’s destination

Multiprotocol Routing

Routers can support multiple independent routing algorithms and maintain associated routing tables for several routed

Routers can support multiple independent routing algorithms and maintain associated routing tables for several routed protocols concurrently. This capability allows a router to interleave packets from several routed protocols over the same data links. The various routed protocols operate separately. Each uses routing tables to determine paths and switches over addressed ports in a “ships in the night” fashion; that is, each protocol operates without knowledge of or coordination with any of the other protocol operations. In the example above, as the router receives packets from the users on the networks using IP, it begins to build a routing table containing the addresses of the network of these IP users. As the router receives packets from Macintosh AppleTalk users. Again, the router adds the AppleTalk addresses. Routing tables can contain address information from multiple protocol networks. This process may continue with IPX traffic from Novell NetWare networks and Digital traffic from VAX minicomputers attached to Ethernet networks.

Routing Tables

o

Routing algorithms

 

Initialize

and

maintain

routing

tables

to

help

with

path

 

determination

 

o

Route information types

 

Destination/next-hop associations

 

Path desirability

 

Vary depending on routing algorithm

 

o

Message = Routing table maintenance communications

 

Routing update messages

Link-state advertisement

To aid the process of path determination, routing algorithms initialize and maintain routing tables, which contain route information. Route information varies depending on the routing algorithm used. Routing algorithms fill routing tables with a variety of information. Two examples are destination/next hop associations and path desirability.

Destination/next hop associations tell a router that a particular destination is linked to a particular router representing the “next hop” on the way to the final destination. When a router receives an incoming packet, it checks the destination address and attempts to associate this address with a next hop.

With path desirability, routers compare metrics to determine optimal routes. Metrics differ depending on the routing algorithm used. A metric is a standard of measurement, such as path length, that is used by routing algorithms to determine the optimal path to a destination.

Routers communicate with one another and maintain their routing tables through the transmission of a variety of messages.

Routing update messages may include all or a portion of a routing table. By analyzing routing updates from all other routers, a router can build a detailed picture of network topology.

Link-state advertisements inform other routers of the state of the sender’s link so that routers can maintain a picture of the network topology and continuously determine optimal routes to network destinations.

Routing Algorithm Goals

o

Optimality

 

Selecting the best route based on metrics and metric weightings used in the calculation

o

Simplicity and low overhead

 

Efficient routing algorithm functionality with a minimum of software and utilization overhead

o

Robustness and stability

 

Correct

performance

in

the

face

of

unusual

 

or unforeseen circumstances (e.g., high load)

 

o

Rapid convergence

 

Fast agreement, by all routers, on optimal routes

 

o

Flexibility

 

Quick and accurate adaptation to changes in router availability, bandwidth, queue size, etc.

Routing tables contain information used by software to select the best route. But how, specifically, are routing tables built? What is the specific nature of the information they contain? How do routing algorithms determine that one route is preferable to others? Routing algorithms often have one or more of the following design goals:

Optimality - the capability of the routing algorithm to select the best route, depending on metrics and metric weightings used in the calculation. For example, one algorithm may use a number of hops and delays, but may weight delay more heavily in the calculation.

Simplicity and low overhead - efficient routing algorithm functionality with a minimum of software and utilization overhead. Particularly important when routing algorithm software must run on a computer with limited physical resources.

Robustness and stability - routing algorithm should perform correctly in the face of unusual or unforeseen circumstances, such as hardware failures, high load conditions, and incorrect implementations. Because of their locations at network junctions, failures can cause extensive problems.

Rapid convergence - Convergence is the process of agreement, by all routers, on optimal routes. When a network event causes changes in router availability, recalculations are need to reestablish networks. Routing algorithms that converge slowly can cause routing loops or network outages.

Flexibility - routing algorithm should quickly and accurately adapt to a variety of network circumstances. Changes of consequence include router availability, changes in network bandwidth, queue size, and network delay.

Routing Metrics

o

Path Length

Total hop count or sum of cost per network link

o

Reliability

Dependability (bit error rate) of each network link

o

Delay

Useful because it depends on bandwidth, queues, network congestion, and physical distance

o

Communication cost

Operating expenses of links (private versus public)

o

Bandwidth and load

Routing algorithms have used many different metrics to determine the best route. Sophisticated routing algorithms can base route selection on multiple metrics, combining them in a single (hybrid) metric. All the following metrics have been used:

Path length - The most common metric. The sum of either an assigned cost per network link or hop count, a metric specify the number of passes through network devices between source and destination.

Reliability - dependability (bit-error rate) of each network link. Some network links might go down more often than others. Also, some links may be easier or faster to repair after a failure.

Delay - The length of time required to move a packet from source to destination through the inter-network. Depends on bandwidth of intermediate links, port queues at each router, network congestion, and physical distance. A common and useful metric.

Bandwidth - available traffic capacity of a link.

Load - Degree to which a network resource, such as a router, is busy (uses CPU utilization or packets processed per second).

Communication cost - operating expenses of network links (private versus public lines).

Network and Node Addresses

versus public lines). ∑ Network and Node Addresses Each network segment between routers is is identified

Each network segment between routers is is identified by a network address. These addresses contain information about the path used by the router to pass packets from a source to a destination. For some network layer protocols, a network administrator assigns network addresses according to some preconceived inter-network addressing plan. For other network layer protocols, assigning addresses is partially or completely dynamic. Most network protocol addressing schemes also use some form of a node address. The node address refers to the device’s port on the network. The figure in this slide shows three nodes sharing network address 1 (Router 1.1, PC 1.2, and PC 1.3). For LANs, this port or device address can reflect the real Media Access Control or MAC address of the device.

Unlike a MAC address that has a pre established and usually fixed relationship to a device, a network address contains a logical relationship within the network topology The hierarchy of Layer 3 addresses across the entire inter-network improves the use of bandwidth by preventing unnecessary broadcasts. Broadcasts invoke unnecessary process overhead and waste capacity on any devices or links that do not need to receive the broadcast. By using consistent end-to-end addressing to represent the path of media connections, the network layer can find a path to the destination without unnecessarily burdening the devices or links on the inter- network with broadcasts.

Addressing Examples

the inter- network with broadcasts. ∑ Addressing Examples Let’s look at some examples. For TCP/IP, dotted

Let’s look at some examples. For TCP/IP, dotted decimal numbers show a network part and a host part. Network 10 uses the first of the four numbers as the network part and the last three numbers—8.2.48-as a host address. The mask is a companion number to the IP address. It communicates to the router the part of the number to interpret as the network number and identifies the remainder available for host addresses inside that network. For Novell IPX, the network address 1aceb0b is a hexadecimal (base 16) number that cannot exceed a fixed maximum number of digits. The host address 0000.0c00.6e25 (also a hexadecimal number) is a fixed 48 bits long. This host address derives automatically from information in the hardware of the specific LAN device.

Subnetwork Addressing

Subnetworks or subnets are networks arbitrarily segmented by a network administrator in order to provide

Subnetworks or subnets are networks arbitrarily segmented by a network administrator in order to provide a multilevel, hierarchical routing structure while shielding the subnetwork from the addressing complexity of attached networks.

Subnetting allows single routing entries to refer either to the larger block or to its individual constituents. This permits a single, general routing entry to be used through most of the Internet, more specific routes only being required for routers in the subnetted block.

A subnet mask is a 32-bit number that determines how an IP address is split

into network and host portions, on a bitwise basis. For example, 131.108.0.0

is a standard Class B subnet mask; the first two bytes identify the network

and the last two bytes identify the host.

A subnet mask is a 32-bit address mask used in IP to indicate the bits of an

IP address that are being used for the subnet address. Sometimes referred to simply as mask. The term mask derives from the fact that the non-host portions of the IP address bits are masked by 0’s to form the subnet mask. Subnetting helps to organize the network, allows rules to be developed and applied to the network, and provides security and shielding. Subnetting also enables scalability by controlling the size of links to a logical grouping of nodes that have reason to communicate with each other (such as within Human Resources, R&D, or Manufacturing).

Routing Algorithm Types

o

Single-path versus multi-path

o

Flat versus hierarchical

o

Host-intelligent versus router-intelligent

o

Intradomain versus interdomain

o

Static versus dynamic routing

o

Link state versus distance vector

Routing algorithms can be classified by type. Key differentiators include:

Single-path versus multi-path: Multi-path routing algorithms support multiple paths to the same destination and permit traffic multiplexing over multiple lines. Multi-path routing algorithms can provide better throughput and reliability.

Flat versus hierarchical: In a flat routing system, the routers are peers of all others. In a hierarchical routing system, some routers form what amounts to a routing backbone. In hierarchical systems, some routers in a given domain can communicate with routers in other domains, while others can communicate only with routers in their own domain.

Host-intelligent versus router-intelligent: In host-intelligent routing algorithms, the source end-node determines the entire route and routers act simply as store-and-forward devices. In router-intelligent routing algorithms, host are assumed to know nothing about routes and routers determine the optimal path.

Intradomain versus interdomain: Some routing algorithms work only within domains; others work within and between domains.

Static versus dynamic - this classification will be discussed in the following two slides.

Link state versus distance vector: will be discussed after static versus dynamic routing.

Static Routing

o Manual table updates by a network administrator o Benefits  Reflects administrator’s special

o

Manual table updates by a network administrator

o

Benefits

Reflects administrator’s special topology knowledge

Private—Not conveyed to other routers in updates

Avoids the overhead of dynamic routing

o

Stub network

When a node is accessible by only one path, a static route is sufficient

Point-to-point or circuit-switched connection

Static routing knowledge is administered manually: a network administrator enters it into the router’s configuration. The administrator must manually update this static route entry whenever an inter-network topology change requires an update. Static knowledge is private—it is not conveyed to other routers as part of an update process. Static routing has several useful applications when it reflects a network administrator’s special knowledge about network topology. When an inter-network partition is accessible by only one path, a static route to the partition can be sufficient. This type of partition is called a stub network. Configuring static routing to a stub network avoids the overhead of dynamic routing.

Dynamic Routing

∑ Dynamic Routing After the network administrator enters configuration commands to start dynamic routing, route

After the network administrator enters configuration commands to start dynamic routing, route knowledge is updated automatically by a routing process whenever new topology information is received from the internetwork. Changes in dynamic knowledge are exchanged between routers as part of the update process. Dynamic routing tends to reveal everything known about an internetwork. For security reasons, it might be appropriate to conceal parts of an internetwork. Static routing allows an internetwork administrator to specify what is advertised about restricted partitions. In the illustration above, the preferred path between routers A and C is through router D. If the path between Router A and Router D fails, dynamic routing determines an alternate path from A to C. According to the routing table generated by Router A, a packet can reach its destination over the preferred route through Router D. However, a second path to the destination is available by way of Router B. When Router A recognizes that the link to Router D is down, it adjusts its routing table, making the path through Router B the preferred path to the destination. The routers continue sending packets over this link. When the path between Routers A and D is restored to service, Router A can once again change its routing table to indicate a preference for the counterclockwise path through Routers D and C to the destination network.

Routing Protocols

Routed versus Routing Protocols

∑ Routed protocols : used between routers to direct user traffic; also called network protocols
∑ Routed protocols : used between routers to direct user traffic; also called network protocols

Routed protocols : used between routers to direct user traffic; also called network protocols Examples: IP, IPX, DECnet, AppleTalk, NetWare, OSI, VINES

Routing protocols : used between routers to maintain routing tables Examples: RIP, IGRP, OSPF, BGP, EIGRP

Confusion often exists between the similar terms routing protocol and routed protocol. Routed protocols are any network protocol suite that provides enough information in its network layer address to allow a packet to direct user traffic. Routed protocols define the format and use of the fields within a packet. Packets generally are conveyed from end system to end system. The Internet IP protocol and Novell’s IPX are examples of routed protocols. Other examples include DECnet, AppleTalk, Novell NetWare, Open Systems Interconnect (OSI), Banyan VINES, and Xerox Network System (XNS). A routing protocol supports a routed protocol by providing mechanisms for sharing routing information. Routing protocol messages move between the routers. A routing protocol allows the routers to communicate with other routers to update and maintain tables. Routing protocol messages do not carry end-user

traffic from network to network. A routing protocol uses the routed protocol to pass information between routers. TCP/IP examples of routing protocols are the Routing Information Protocol (RIP), Interior Gateway Routing Protocol (IGRP), Open Shortest Path First (OSPF), Border Gateway Protocol (BGP), and Enhanced IGRP (EIGRP).

Routing Protocol Evolutions

and Enhanced IGRP (EIGRP). ∑ Routing Protocol Evolutions Distance Vector • RIP - Routing Information Protocol.

Distance Vector

RIP - Routing Information Protocol. The most common IGP in the Internet. RIP uses hop count as a routing metric.

IGRP - Interior Gateway Routing Protocol. IGP developed by Cisco

to

address

the

issues

associated

with

routing in large,

heterogeneous networks.

 

Link State

OSPF - Open Shortest Path First. Link-state, hierarchical IGP routing algorithm proposed as a successor to RIP in the Internet community. OSPF features include least-cost routing, multipath routing, and load balancing. OSPF was derived from an early version of the IS-IS protocol.

NLSP - NetWare Link Services Protocol. Link-state routing protocol based on IS-IS.

IS-IS - Intermediate System-to-Intermediate System. OSI link-state hierarchical routing protocol based on DECnet Phase V routing, whereby ISs (routers) exchange routing information based on a single metric, to determine network topology.

Hybrid

EIGRP - Enhanced Interior Gateway Routing Protocol. Advanced version of IGRP developed by Cisco. Provides superior convergence properties and operating efficiency, and combines the advantages of link state protocols with those of distance vector protocols.

Routing Protocol Evolutions

distance vector protocols. ∑ Routing Protocol Evolutions RIP takes the path with the least number of

RIP takes the path with the least number of hops, but does not account for the speed of the links. It only counts hops. The limitation of RIP is about 15 hops. This creates a scalability issue when routing in large, heterogeneous networks. IGRP was developed by Cisco and works only with Cisco products (although it has been licensed to some other vendors). It accounts for the varying speeds of each link. Additionally, IRGP can handle 224 to 252 hops, depending on the IOS version. However, IGRP only supports IP.

OSPF & EIGRP

OSPF - Open Shortest Path First. Link-state, hierarchical IGP routing algorithm proposed as a successor

OSPF - Open Shortest Path First. Link-state, hierarchical IGP routing algorithm proposed as a successor to RIP in the Internet community. OSPF features include least-cost routing, multipath routing, and load balancing. OSPF was derived from an early version of the IS-IS protocol. EIGRP - Enhanced Interior Gateway Routing Protocol. Advanced version of IGRP developed by Cisco. Provides superior convergence properties and operating efficiency, and combines the advantages of link state protocols with those of distance vector protocols.

Summary

o

Routers move data across networks from a source to a destination

o

Routers determine the optimal path for forwarding network traffic

o

Routing protocols communicate reachability information between routers