THREE BASIC CONCEPTS OF COMPUTER NETWORK 1)Delivery
2)Forwarding 3)Routing 1) DELIVERY
Delivery refers to the way a packet is handled by the underlying networks. Two different methods of delivery:
direct and indirect.
Direct Delivery
Occurs when the source and destination of the packet are located on the same physical network Occurs when the delivery is between the last router and the destination host.
Indirect Delivery
If the destination host is not on the same network as the deliverer, the packet is delivered indirectly.
Here, the packet goes from router to router until it reaches the one connected to the same physical network as its final destination.
2.FORWARDING
• Forwarding means to place the packet in its route to its destination.
• Forwarding requires a host or a router to have a routing table.
• When a packet arrives, forwarding involves looking up the outgoing line to use for it.
There are ways of forwarding:
a)Route method versus next-hop method
b) Host –specific versus network-specific method
c) Default method
3.Routing
Routing refers to the way routing tables are created (filling and updating) to help in forwarding.
The routing table specifies the optimum path for the packet: static or dynamic – A static table is one with manual entries.
– A dynamic table is one that is updated automatically when there is a change somewhere in the internet.
Internet needs dynamic routing tables.
Routing is the part of network layer software responsible for deciding which output line an incoming packet should be transmitted on.
Intra- and Interdomain Routing
An autonomous system (AS) is a group of networks and routers under the authority of a single administration.
Routing inside an autonomous system is referred to as intradomain routing.
Routing between autonomous systems is referred to as interdomain routing.
Properties in a routing algorithm are:
i) Correctness ii) Simplicity iii) Robustness iv) Stability v) Fairness vi) Optimality
Types of Routing algorithms : Non adaptive algorithms Adaptive algorithms Non-adaptive routing:
o Fixed routing, static routing.
o Do not base their routing decisions on current state of the network (e.g., traffic, topology).
o Routes are computed in advance, off-line, and downloaded to routers when network is booted.e.g. shortest path, flooding, and flow-based
Adaptive routing:
o Routes change dynamically as function of current state of network.
o Also cald dynamic routinh
o Routes changes to reflect change in topology and traffic as well.
o Get information locally from adjacent routers.
o Algorithms vary on how they get routing information (locally, from adjacent routers, from all routers)), metrics used for optimization, and when they change routes. e.g. distance vector, link state, hierarchical, broadcast, multicast
Optimality Principle
o General statement about optimal routes
o If router J is on optimal path between I and K, then the optimal path from J to K also falls along the same route.
Sink tree
o Set of optimal routes from all sources to destination form a tree rooted at destination called sink tree.
o Goal of routing algorithm is to find sink trees that are there and use the sink trees for all routers.
Static Algorithms(Non Adaptive) 1. Shortest-path routing.
2. Flooding.
3. Flow Based Routing 1. Shortest-path routing
Build a graph of the subnet, with each node of the graph representing a router and each arc representing a communication line (link).
To choose a route between a given pair of routers, the algorithm just finds the shortest path between them on the graph.
Various routing metrics can be used to find shortest path.
Example: number of hops (static), geographic distance (static), transmission delay, bandwidth (raw versus available), combination of a subset of these.
There are several algorithms for computing shortest path between two nodes of a graph.
One of them is Dijkstra algorithm, other one is Bellman ford’s algorithm.
Dijkstra’s Shortest-Path Algorithm
• Initially, links are assigned costs.
•
•
2. Flooding
Basic idea: router forwards an incoming packet to all outgoing links except the one that it came in
Problem: number of packets in circulation just for a single source packet quickly grows without bound, and some measure must be taken to prevent this from happening, called damming flood
Measures:
1)Hop count: each time a router passes a packet, it decrements the hop count in the packet by one. When the hop count reaches zero, the packet is discarded.
2)Remember identity: each router remembers the identity of those packets it has already sent out. When duplicate copies of the packet arrive back, they are discarded.
This is achieved by source router putting a sequence number in the packet. Each router needs a list per source router telling which sequence numbers originating at that source have been seen
3)Selective Flooding : routers only send an incoming packet out on those lines that make sense.
For this to work, routers must have some ideas of network configuration.
Flooding are impractical for most applications but has two r remarkable properties
a) Robustness: all possible routes between source and destination are tri ed. A packet will always get through as long as at least one path between source and destination exists
b )Optimality: because all routes are tried, at least one copy of the packet to arrive at destination will have used a minimum-hop route
APPLICATIONS:
Military,Distributed Database
Dynamic Routing Algorithms (Adaptive Routing) 1. Distance vector routing.
2. Link state routing.
Both these algorithms are best suited for packet switched networks.
1. Distance Vector Routing
Also called as distributed Bellman-Ford routing algorithm (1957) and Ford-Fulkerson algorithm (1962).
Routing Information Protocol (RIP) is an implementation of this approach The least cost between any two nodes is the route with minimum distance.
Initialization of tables in distance vector routing:
• Each node( router) maintains a set of triples (table): Destination, Cost and Next Hop
• At the beginning, each node can know only the distance between itself and its immediate neighbors
• Infinite ∞ (unreachable).
Sharing: Updating in distance vector routing
• In distance vector routing, each node shares its routing table with its immediate neighbors:
– periodically (on the order of several seconds -30s-) – whenever table changes (called triggered update)
• Each update is a list of pairs: (Destination, Cost)
• When a node receives a two-column table from a neighbor, it need to update its routing table
• Updating rule:
– If the next node entry is different, choose the smaller cost. If the same, keep the old one.
– If the next-node entry is the same, the receiving node chooses the new row.
When to Share
• Periodic update: A node sends its routing table, normally every 30 s
• Triggered update: A node sends its two-column routing table to its neighbors anytime there is a change in its routing table. The change can result from the following:
– A node receives a table from a neighbour, resulting in changes in its own table after updating.
– A node detects some failure in the neighbouring links which results in a distance change to infinity.
(count to infinity problem) Two-node instability
– A problem with distance vector routing is instability, which means that a network using this protocol can become unstable.
– Here in fig. let link between A and X fails, node A changes its table.
– If A can send its table to B immediately, everything is fine.
– However, the system becomes unstable if B sends its routing table to A before receiving A’s routing table.
– Node A receives the update and, assuming that B has found a way to reach X, immediately updates its routing table.
– Based on the triggered update strategy, A sends its new update to B.
– Now B thinks that something has been changed around A and updates its routing table. The cost of reaching X increases gradually until it reaches infinity.
– At this moment, both A and B know that X cannot be reached. However, during this time the system is not stable.
– Node A thinks that the route to X is via B; node B thinks that the route to X is via A. If A receives a packet destined for X, it goes to B and then comes back to A.
– Similarly, if B receives a packet destined for X, it goes to A and comes back to B.
– Packets bounce between A and B, creating a two-node loop problem.
– Invalid updates will continue to loop until some process stops the looping.
– This condition is called count to infinity.
– Packets loop continuously around the network in spite of the fundamental fact that the destination network is down.
– These packets loop through the network because of wrong information in the routing tables.
Mitigation Strategies: Two-Node Instability
• Defining infinity: To redefine infinity as a specific maximum number. With this approach, the routing protocol permits the routing loop to continue until the metric exceeds its maximum allowed value.
• Split horizon: If a routing update about a network arrives from a router, the router that receives the update cannot send information about that network back to the router that originally sent the update.
• Split-horizon thus reduces incorrect routing information and reduces routing overhead.
Routing Information Protocol
• RIP: an intradomain routing protocol used inside an AS.
• Simple protocol based distance vector routing
• Metric is simple, a hop count. The distance is defined as the number of links (networks) to reach the destination.
2. Link State Routing
Each node in the domain has the entire topology of the domain the list of nodes and links, how they are connected including type, cost(metric), and condition of the links(up or down)
Node can use Dijkstra’s algorithm to build a routing table.
Link State Knowledge
• Each node has partial knowledge: it knows the state (type, condition, and cost) of its links. The whole topology can be compiled from the partial knowledge of each node
Building Routing Table
1. Creation of the states of the links by each node, called the link state packet (LSP). LSP is a tabular representation of the topology of the internet.
2. Dissemination of LSPs to every other router, called flooding, in an efficient and reliable way 3. Formation of a shortest path tree for each node.
4. Calculation of a routing table based on the shortest path tree.
• Creation of LSP
– LSP contains node identity, the list of links (to make the topology), sequence number (to facilitate flooding and distinguish new LSPs from old ones
– LSPs are generated (1) when there is a change in the topology of the domain, (2) on a periodic basis, normally 60 min or 2 h
• Flooding of LSPs
– The creating node sends a copy of the LSP out of each interface
– A node compares it with the copy it may already have. If the newly arrived LSP is older than the one it has, it discards the LSP. If it is newer, it discards the old LSP and keeps the new one – It sends a copy of it out of each interface except the one from which the packet arrived.
• Formation of shortest path tree: Dijkstra Algorithm
– After receiving all LSPs, each node will have a copy of the whole topology. Need to find the shortest path to every other node.
– The Dijkstra algorithm creates a shortest path tree from a graph.
Routing table for node A
• Each node uses the shortest path tree protocol to construct its routing table
• The routing table shows the cost of reaching each node from the root.
Open Shortest Path First (OSPF)
• OSPF Is a intradomain routing protocol based on link state routing
• To handle routing efficiently and in a timely manner, OSPF divides an autonomous system into area
• Area is a collection of network, hosts, and routers all contained within an AS
• AS can also be divided into many different areas
• Area border gateway, backbone router, virtual link
•