Repeaters and bridges are simple hardware devices capable of executing specific tasks.Routers are more sophisticated.They have access to network layer addresses and contain software that enable them to determine which of several possible paths between those addresses is the best for a particular transmission.Routers operate in the physical. Data link and network layers of the OSI model.
Routers relay packets among multiple interconnected networks.They route packets from one network to any of a number of potential destination networks on an internet.Please see the figure as below :
The figure as above show a possible internetwork of five networks.A packet sent from a station on one network to a station on a neighboring network goes first to the jointly held router,which switches it over to the destination network.If there is no one router connected to both the sending and receiving networks,the sending router transfers the packet across one of its connected networks to the next router in the direction of the ultimate destination.That router forwards the packet to the next router on the path,and so on until the destination is reached.
Routers act like stations on a network.But unlike most stations,which are members of only one network,routers have addresses on,and links to two or more networks at the same time.In their simplest function they receive packets from one connected network and pass them to a second connected network.How ever,if a received packet is addressed to a node on a network of which the router is not a member,the router is capable of determining which of its connected networks is the best next relay point for the packet.Once a router has identified the best route for a packet to travel.It passed the packet along the appropriate network to another router.That router checks the destination address,find what it considers the best route for the packet,and passes it to the destination network(if that network is a neighbor) or across a neighboring network to the next router on the chosen path.Routing Concepts
As we have seen,the job of routers is to forward packets through an inter network of compatible networks,Imagine ,for example that we want to move a packet from network A to network C via router(network) B.Often,however,more than one pathway exists between the point of origin and the point of destination. For example,the packet could reach network C by going through router D instead of router B, or possible even going directly from A to C.Whenever there are multiple options,the router chooses the path way.
Least-Cost Routing
But which path does it choose? The decision is based on efficiency which of the available pathways is the cheapest or in networking terminology the shortest.A value is assigned to each link,the length of a particular route is equal to the total of the value of the component links.The term shortest .In this context can mean either of two things depending on the protocol.In some cases, shortest means the route requiring the smallest number of relays or hops,For example : a direct link from A to D would be considered shorter than the route A-B-C-D even if actual distance covered by the latter is the same or less.In other cases,shortest means fastest,cheapest,most reliable ,most secure or best of any other quality that can make one particular link(or combination of links) more attractive than another.Usually,shortest means a combination of all of these.
In routing the term shortest can mean the combination of many factors including shortest,cheapest, fastest,most reliable and so on.
When shortest means the pathway requiring the smallest number of relays,it is called hop-count routing in which every link is considered to be of equal length and given the value 1. Equal link value make hop-count routing simple : One-hop routes are always equal to 1, two-hop routes are always equal to 2, and so on.Routes need updating only when a link becomes unavailable.In that case,the value of the link becomes infinite and an alternate is found.Hop-count algorithms usually limit the routes known by a single router to those within fifteen hops. For transmissions with special requirements(e.g: military transmissions that require highly secure lines) a particular hop-count algorithm way be customized.In such cases,some links will be given a value of 1.While others will have higher values and will be avoided.Novell, AppleTalk, OSI and TCP/IP protocols all use hop count as the basis for their routing algorithms.
Other protocols factor a number of qualities relevant to the functioning of a link before assigning a value to a link.These qualities can include speed,traffic congestion, and link medium(telephone line,satellite transmission,etc.).When all relevant factors for a particular link are combined, a number that represents the value or length of the link is issued.This number represents an assessment of efficiency not a physical distance : thus it is called the symbolic length of the link.
We can combine all of the factors affecting a link into one number and call that number the symbolic length of the link.
In some protocols,each link in a network is assigned a length based on whatever qualities are considered important to that network.If the link between two routers is half-duplex or full-duplex(has two-way traffic).The length of the link in one direction might be differnet from the length of the link in the other direction. The physical distance that the signal has to travel is not changed.But other factors,such as traffic leoad or quality of the cable may differ.As with hop-count routing the decision of which route is best is based on shortest distance,calculated by totaling the lengths of every link used by a given path .In hop-count routing all three-hop paths have a total length of 3 and are considered longer than two-hop paths.When different links are assigned different lengths,however the total length of a three-hop link may turn out to be shorter than that of a two-hop link.
Distributed routing
In some routing protocols,once a pathway to a destination has been selected the router sends all packets for that destination along that one route.Other routing protocols employ a technique called distributed routing ,by which a router may select a new route for each packet(even packets belonging to the same transmission) in response to changes in the relative lengths of the links.Given a transmission from network A to network D, a router may send the first packet by way of network B,the second packet by way of network C and the third packet by way of network Q,depending on which route is most efficient at the moment.
Packet Lifetime
Once a router has decided on a pathway, it passes the packet to the next router on that path and forgets about it.The next router,however may choose the same pathway or may decide that a different pathway is shorter and relay the packet to the next router in that direction.This handing-off of responsibility allows each router to contain minimal logic,keeps the amount of control information that must be contained in the frame to a minimum and allows for route adjustment based on up-to-the-minute appraisals of each link. It aslo creates the potential for a packet's packet's getting stuck in a never ending loop or bounce in which a packet is passed around from router to router without ever actually reaching its destination.
Loops and bouncing can occur when a router updates its routing table then relays a packet based on new pathways before the receiving router has updated its own vector For example: A believes that the shortest route to C is through B, and relays a packet accordingly,Before B receives the packet, it learns taht its link to C has been disabled.B updates its vector and finds that the current shortest route from itself to C is through A.A has not yet received the information about the B-C link and still believes the best route to C to be through B.The packet is relayed back to B.B relays it back to A and so on.Problems of this sort are more likely on systems using distance vector algorithms than on those using link state algorithms( The former send update packages more frequently than the latter : see Routing algorithms below.)
The problem created by looping and bouncing is not primarily one of lost packets,the data link functions of the transmission's originator and receiver report lost frames and replace them with new copies.The problem is that processing eternally looping packets uses network resources and increases congestion.Looping packets must be identified and destroyed to free the links for legitimate traffic.
The solution is an added packet field called packet lifetime.As it is generated each packet is marked with a lifetime.Usually the number of hops that are allowed before a packet is considered lost and accordingly ,destroyed.Each router to encounter the packet subtracts 1 from the total before passing it on.When the lifetime total reaches 0 the packet is destroyed.
II.GATEWAYS
Gateways potentially operate in all seven layers of the OSI model. A gateway is a protocol converter.A router by itself transfer,accepts and relays packets only across networks using similar protocols.A gateway on the otehr hand, can accept a packet formateed for one protocol( e.g: TCP/IP) before forwarding it.
A gateway is generally software installed within a router.The gateway understands the protocols used by each network liked into the router and is therefore able to translate from on to another.In some cases,the only modifications necessary are the header and trailer of the packet.In other cases,the gateway must adjust the data rate,Size and format as well ,Please see the figure as below shows a gateway connecting an SNA network(IBM) to a NetWare network(Novell).
0 comments:
Post a Comment
If there is any comments,Please leave a comment at here.