Upload
jaiganesh-sekar
View
94
Download
0
Embed Size (px)
Citation preview
RMK College of Engineering and Technology
CS 6551
Computer Networks
Department of
Electronics and Communication Engineering
Unit 3
Routing
Prepared by
Jai Ganesh S
Asst.Professor - ECE
Syllabus
• Routing
• RIP
• OSPF
• Metrics
• Switch basics
• Global internet
• Areas
• BGP
• IPV6
• Multicast Addresses
• Multicast Routing
• DVMRP
• PIM
Routing
Introduction
• Routing is the most important task in the networks to forward packets from source to
destination
• The devices like switches and routers take the responsibility of delivering the packets to right
destination
• This is accomplished by referring to their forwarding table and routing table respectively
• The fundamental problem is “how routers acquire the information about the network in their
routing table?”
Understanding – Routing in Real time
Understanding – Routing in Networks
Representing Network as a graph
• The routing process is well understood by representing
a network as a graph.
• Each node on the network may represent any host or
switch or router.
• Each link on the network is associated with a cost.
• The ultimate work of the router is to find the path with the
lowest cost between any nodes.
• These are performed by routing algorithm or routing
protocols.
Types of routing protocols
Distance Vector Algorithm
• The idea behind the DVR is that it maintains a table
with distance to every node
Assumptions:
• Each node contains the cost of link to the other node. These cost are configured by the administrator.
• The link that is down is assign with infinite cost.
Stages in DVR
• There are 3 stages in DVR
Initialization
Sharing
Updating
1. Initialization
Consider the given example networkEach node creates an initialization table with the cost to reach all other nodes. Since they do not know about all the
nodes, they create only for the neighboring node.
2. Sharing
From the given network Node A do not know about Node E but Node C knows about Node E.
Similarly Node C do not know about Node D
but Node A knows about Node D
Thus by sharing Node A’s Table to Node C ,
Node C learns about Node D.
By sharing Node C’s Table to Node A ,
Node A learns about Node E
3. UpdatingEach and every node in the network updates its own table from the table received from the neighbor nodes.Updating process happens in 3 steps
1. Receiving node need to add the cost between itself (A) and sending node(C). (Cost of A C is 2)2. Receiving node have to add the name of the sending node to each row as third column. This acts as the next node
information when the table is updated
3. The receiving node compares each row of its old table with the modified table.
If the next node entry is different, then the receiving node chooses the lowest value.
If the there is a tie, then old value is maintained
After several sharing and updates process all nodes in the network becomes stable and knows about the path to
reach any node on the network.
When to update??
• 2 methods
• Periodic update
• Triggered update
Instability problem
• 2 node instability
• 3 node instability
2 node instability
Remedies for 2 node instability
• Defining infinity
• Split horizon
• Split horizon with poison reverse
3 node instability
Routing Information Protocol
• Considerations
• Only networks have routing table not networks
• Metric used in Hop Count
• Infinity is 16
• Next node column defines the address of the router to reach the destination
Example scenario
Link State Routing Alg
Steps in Link state alg
• Reliable dissemination of LSP
• Creation of LSP
• Flooding of LSP
• Calculation of Routes from all received LSP
• Formation of Shortest path tree for each node
• Calculation of Routing Table
Creation of LSP
• LSP are created with 4 main information
• Node identity
• The list of links
• Sequence numbers
• Age (TTL)
Flooding
• Steps in flooding
• Creating node floods the LSP
• Receiving node compares the LSP with old LSP
• If received is old – discarded
• If received is new – old is discarded and new LSP is Flooded
• Old and new are differentiated by sequence numbers
• TTL helps in removing the old packets from the network.
Formation of shortest path
• It is created by using “Dijkstra Algorithm”
Calculation of Routing Table
OSPF Protocol
• One of the widely used link state routing is OSPF.
• OSPF offers many features
• Authentication of routing messages
Routing messages are sent to all the nodes. Thus they should be authenticated.
• Additional hierarchy
This is the tool to make the system more scalable. It allows many networks to be grouped as “Areas”
• Load balancing
OSPF allows multiple routes with the same cost. Thus the traffic gets distributed all over the network.
Example Network
OSPF Header Format
Describes the version of the OSPF Describes the total length of the mesasageUsed to identify the sender of the message
Used to identify in which area the node is locatedEntire packet except the data field is protected by check sum
Defines the type of authentication0 - No Authentication
1 – simple password2 – cryptographic authentication
Data
LSP Advertising Packet
• The basic building block of OSPF is creating the link state packet and
advertising them. There are 2 types of advertisements.
• Router should advertise the LSP packets to the directly connected networks
• Router should advertise information about the loss of link throughout the
network.
LSP Advertisement Packet Format
They are equal to the TTL. Defines the router that created the advertisementThey are used to detect the old or duplicate LSA’sThey are used to protect the entire advertisement packet.It defines the length of the complete LSA in bytesLink ID and Link DataThey are used to identify the link along with the router IDThey are used to define the cost of the link
It defines the type of the link. There are 4 types of links1. Point to point link2. Transient link3. Stub link4. Virtual link
It is used for defining the type of service. It is possible to assign different cost for the same route based on the type of service
Metrics
• The metrics that we have discussed so far were assumed that they are a known
factor for executing the algorithm.
• Drawbacks in simply assuming the metric
• They do not distinguish links on latency basis
• They do no distinguish links in capacity basis
• They do no distinguish links based on their current load.
Solution
• There are several methods evolved to calculate the metrics.
• But all we need is to test the various methods on a common flat form.
• One such flat form is known as ARPANET
• Further details about the ARPANET can be studied in the given link.
https://en.wikipedia.org/wiki/ARPANET
3 stages of ARPANET
• Original ARPANET
• New Routing Mechanism
• Revised ARPANET Routing Metric
• Each version uses different logics to compute the metric.
Original ARPANET
• In this method the metric is computed based on the “ Number of packets
queued for transmission on each link”
• Link with 10 packets queued for the transmission is assigned larger cost than
the link which has 5 packets queued for transmission.
New Routing Mechanism
• In this mechanism both latency and bandwidth is considered for calculation of metrics.
• The arrival time and depart time are captured from the time stamp added to the packet.
• Delay is computed as
• Delay = (depart time – arrival time) + Transmission time + latency.
• Based on this delay the cost will be assigned.
Revised ARPANET Routing Metric
• The major changes done in this versions are
• Compress the dynamic range of metric considerably
• Smoothen the variation of the metric with time
• Compression is achieved by taking the function of measured utilization , link type and link
speed.
• Smoothing can be achieved in 2 ways
• Averaging the delay instead of taking the trials
• Setting up a hard limit on how much the metric could change from one cycle to another cycle.
Switch Basics
• The conceptual structure of the switch is shown in the figure.
1. Control processor
• This block is responsible for moving the data from interface to memory
without the intervention of the CPU
2. Ports
• The ports communicates with the outside worlds
• It contains fiber optic receivers, buffers for holding the packets that are to be
transmitted.
• In case of virtual circuit, the port contains the virtual circuit identifier
• In case of ethernet, the port contains the forwarding table .
3. Fabrics• They are very Basic and important function of a switch.
• They are responsible for forwarding the packets from input port to output port with minimal delay and max throughput.
• Types of Fabrics:
• Shared Bus:
• They are found in conventional processors. The bus is shared because in the conventional system the bus bandwidth determines the throughput.
• Shared Memory:
• They are found in the modern switches. They have common memory for both input and output port. Here the memory decides the throughput.
• Cross Bar:
• They are the matrix of pathways that can be configured to connect any input port to any output port.
• Self Routing:
• Self routing fabrics relay on some information in a pack header to direct each packet to its correct destination.
Global Internet
Some Techniques to address the Problems
• Areas
• Border gateway Protocol
• IP Version 6
Areas
Back bone Area or Area 0
• Inter domain Routing
• Intra domain Routing
BGP
Inter domain routing
Types of autonomous systems
• There are 3 types
• Stub autonomous system
• This type of as carries only local traffic. Ex. Small corporation
• Multi homed autonomous system
• They carries traffic for more than 2 AS. Ex. Large Corporation
• Transit autonomous system
• They carry traffic for more than 1 AS. This carries both transit traffic and local traffic.. Ex. Back bone
Providers
Challenges in Intra domain routing
• It should focus on finding the non looping path
• Backbone router should be able to route the packet anywhere in the network
• Varying nature of the AS should be addressed
• Multiple ISP’s may create a problem of reliability coz, different ISP have Different
Policies.
Path Vector Routing
• 3 stages
• Initialization
• Sharing
• Updating
1.Initialization
2. Sharing
• A1 shares with B1 and C1
• B1 shares with A1 and C1
• C1 shares with A1, B1, and C1
• D1 shares with C1
3.Updating
Looping problem
Multicast Addresses
Multicast Protocols
DVMRP
• Distance Vector Multicast Routing Protocol.
• Sharing of routing tables with the neighboring routers are not possible here.
• Each router have to create routing table from the scratch. Based on the information of the uni cast
routing.
• This can be achieved in 4 methods:
• Flooding
• Reverse Path Forwarding (RPF)
• Reverse Path Broadcasting (RPB)
• Reverse Path Multicasting (RPM)
1. Flooding
• default flooding concept.
• Router floods the all the received packets to all the ports, except the incoming
port.
• Drawbacks:
• By this method only broad casting is achieved not the multicasting.
• A router may receive multiple packets.
Reverse path Forwarding (RPF)
• In this method the packets are sent only to the
shortest path.
• This shortest path information is obtained from the
unicast routing tables.
• The router will not forward the table if the source
address and destination address are same. (in case of
receiving multiple copies)
Multicast Addresses
Ipv6 header
Endof
Unit - 3