Unit 53
Unit 53
COMMUNICATION
UNIT –V Contents
22.6
22-2 FORWARDING
22.8
Figure 22.2 Route method versus next-hop method
22.9
Figure 22.3 Host-specific versus network-specific method
22.10
Figure 22.4 Default method
22.11
Default method
19
• Advantages of static routing
–-It can backup multiple interfaces/networks on a
router
–-Easy to configure
–-No extra resources are needed
–-More secure
• Disadvantages of static routing
–-Network changes require manual reconfiguration
–-Does not scale well in large topologies
20
Dynamic Routing Table
• It is updated periodically by using one of the dynamic routing
protocols such as RIP, OSPF or BGP.
• Whenever there is a change in the internet, such as a
shutdown of a router or breaking of a link, the dynamic
routing protocols update all the tables in the routers
automatically.
• The routers in a big internet need to be updated dynamically
for efficient delivery of the IP packets.
21
Figure Common fields in a routing table
Flags
• U(up): U flag indicated the router is up and running.
• G(gateway): G flag means that the destination is in another network.
• H(host-specific): H flag indicates that the entry in the network address is a host specific
address.
• D(added by redirection)
• M(Modified by redirection)
Reference count
This field gives the number of users of this route at the moment.
Use
This field shows the number of packets transmitted through this router for the corresponding
destination.
Figure 22.12 Autonomous systems
22.23
Figure 22.13 Popular routing protocols
22.24
Distance vector routing
• Initialization
• Sharing
• Updating
25
Figure Distance vector routing tables
Figure Initialization of tables in distance vector routing
Sharing
In distance vector routing, each node shares its routing
table with its immediate neighbors periodically and when
there is a change.
Updating
1. The receiving node needs to add the cost between itself
and sending node to each value in the 2nd column.
2. The receiving node needs to add the name of the
sending node to each row as the 3rd column.
3. The receiving node needs to compare each row of its old
table with the corresponding row of the modified version
of the received table.
Figure Updating in distance vector routing
LINK STATE ROUTING
• Link state routing has a different philosophy from
that of distance vector routing.
• In link state routing, if each node in the domain
has the entire topology of the domain—the list of
nodes and links, how they are connected
including the
1. Type
2. Cost (metric)
3. The condition of the links (up or down)—the
node can use the Dijkstra algorithm to build a
routing table.
Concept of Link state routing
Link state knowledge
Dijkstra algorithm
Example of formation of shortest path tree
Routing table for node A
Building Routing Tables
• Creation of the states of the links by each node,
called the link state packets (LSP)
• Distribution of LSPs to every other routers,
called flooding (efficiently)
• Formation of a shortest path tree for each node
• Calculation of a routing table based on the
shortest path tree
PATH VECTOR ROUTING
• Distance vector and link state routing are both interior
routing protocols. They can be used inside an autonomous
system.
• Both of these routing protocols become intractable when the
domain of operation becomes large.
• Distance vector routing is subject to instability if there is
more than a few hops in the domain of operation.
• Link state routing needs a huge amount of resources to
calculate routing tables. It also creates heavy traffic because
of flooding.
• There is a need for a third routing protocol which we call
path vector routing.
• The principle of path vector routing is similar to that of
distance vector routing.
• In path vector, we assume that there is one node in each
AS that acts on behalf of the entire AS. This is called as
speaker node.
• The speaker node in an AS creates a routing table and
advertises it to speaker nodes in the neighboring ASs.
• A speaker node advertises the path, not the metric of the
nodes, in its AS or other ASs.
• The idea is the same as for DV routing except that only
speaker nodes in each AS can communicate with each
other
Initialization
• Each speaker node can know only the reachability of nodes inside
its AS.
• Node A1 is the speaker node for AS1, B1 for AS2, C1 for AS3 and
D1 for AS4.
• Node A1 creates an initial table that shows A1 to A5 are located in
AS1 and can be reached through it.
• Node B1 advertises that B1 to B4 are located in AS2 and can be
reached through B1. And so on.
Sharing
• A speaker in an AS shares its table with immediate neighbors.
• Node A1 shares its table with B1 and C1.
• Node C1 shares its table with B1 and D1.
• Node B1 shares its table with A1 and C1.
• Node D1 shares its table with C1.
Initial routing tables in path vector routing
Updating
• When a speaker node receives a two column table from a
neighbor, it updates its own table by adding the nodes that
are not in its routing table and adding its own AS and the
AS that sent the table.
• After a while each speaker has a table and knows how to
reach node in other Ass.
1. Loop prevention
• The instability of DV routing and the creation of loops can
be avoided in PV routing.
• When a router receives a message, it checks to see if its AS
is in the path list to the destination.
• If it is, looping is involved and the message is ignored.
Stabilized tables for three autonomous systems
2. Policy routing
• When a router receives a message, it can check the path.
• If one of the AS listed in the path is against its policy, it can ignore
that path and that destination.
• It does not update its routing table with this path, and it does not
send this message to its neighbors.
3. Optimum path
• It cannot include metrics in this route because each AS that is
included in the path may use a different criterion for the metric.
• One system may use, RIP which defines hop count as the metric.
Another may use OSPF with minimum delay defined as the metric.
• The optimum path is the path that fits the organization.(Eg: AS4 to
AS1)
• Other criteria, such as security, safety and reliability can also be
applied.
RIP
• The Routing Information Protocol (RIP) is an intra-domain
(interior) routing protocol used inside an autonomous system.
• It is a very simple protocol based on distance vector routing
which employ the hop count as a routing metric.
• RIP prevents routing loops by implementing a limit on the
number of hops allowed in a path from source to destination.
• The maximum number of hops allowed for RIP is 15, which limits
the size of networks that RIP can support.
• A hop count of 16 is considered an infinite distance and the
route is considered unreachable.
RIP version 1
• The original specification of RIP was published in 1988 and
uses classful routing.
• The periodic routing updates do not
carry subnet information, lacking support for variable
length subnet masks (VLSM).
• This limitation makes it impossible to have
different-sized subnets inside of the same network class.
• In other words, all subnets in a network class must have
the same size.
• There is also no support for router authentication, making
RIP vulnerable to various attacks.
RIPv1 Operation
• RIP defines two types of messages.
1. Request Message
2. Response Message
• When a RIP router comes online, it sends a broadcast
Request Message on all of its RIP enabled interfaces. All
the neighboring routers which receive the Request
message respond back with the Response Message
containing their Routing table.
• The Response Message is also unnecessarily sent when
the Update timer expires. On receiving the Routing table,
the router processes each entry of the routing table as per
the following rules
• If there are no route entries matching the one received then
the route entry is added to the routing table automatically,
along with the information about the router from which it
received the routing table.
Update Timer(Periodic)
• The update timer controls the interval between two
gratuitous Response Messages.
• By default the value is 30 seconds. The response message
is broadcast to all its RIP enabled interface.
Invalid Timer(Expiration)
• The invalid timer specifies how long a routing entry can be in
Flush Timer
• The flush timer controls the time between the route is invalidated
or marked as unreachable and removal of entry from the routing
table.
• By default the value is 240 seconds. This is 60 seconds longer
than Invalid timer.
• So for 60 seconds the router will be advertising about this
unreachable route to all its neighbors. This timer must be set to a
higher value than the invalid timer.
Hold-down Timer
• The hold-down timer is started per route entry, when the hop
RIP message format
Request messages
RIP message example
Limitations
• The hop count cannot exceed 15, or routes will be
dropped.
• Most RIP networks are flat. There is no concept of
areas or boundaries in RIP networks.
• Variable Length Subnet Masks are not supported by
RIP version 1 (which is obsolete).
• RIP has slow convergence and count to infinity
problems.
RIP Configuring and Commands
• ip routing : enables the router
• router rip : you can enter configuration commands to
define the RIP process for router
• network network_address : Telling the router which
networks it should advertise routes for
• write, write terminal : Saving configuration & view
currently running configuration
• ping address : To check and see if the packets are getting
routed
• show ip route : To view the routers current routing table
• show ip rip ? : Gives information about RIP
RIP version 2
• Due to the deficiencies of the original RIP specification, RIP
version 2 (RIPv2) was developed in 1993 and last standardized in
1998. It included the ability to carry subnet information, thus
supporting Classless Inter-Domain Routing (CIDR). To maintain
backward compatibility, the hop count limit of 15 remained.
• In an effort to avoid unnecessary load on hosts that do not
participate in routing, RIPv2 multicasts the entire routing table to
all adjacent routers at the address 224.0.0.9, as opposed to
RIPv1 which uses broadcast. Unicast addressing is still allowed
for special applications.
RIP version 2 format
Point-to-point link
It connects two routers without any other host or router
Transient link
It is a network with several routers attached to it.
OSPF uses the hello message to create neighborhood relationship and to test
the reachability of neighbors.
This is the first step in link state routing. Before a router can flood all of the
other routers with information about its neighbors, it must first greet it
neighbors.
Database description packet
When a router is connected to the system for the first time or after a failure, it
needs the complete link state database immediately. Therefore, it sends hello
packets to greet its neighbors. If this is the first time that the neighbors hear
from the router, they send a database description message.
Automatic redistribution between IGRP and EIGRP as long as “AS” numbers are the same.
Encapsulation
Frame IP packet EIGRP packet Type/ length/
header header header value data
If Ethernet, Opcode
destination MAC AS number
address multicast
01-00-5E-00-00-0A.
EIGRP Parameters,
Protocol field 88 IP Internal Routes,
destination address IP External Routes.
multicast 224.0.0.10.
EIGRP packet header
EIGRP packet
header
– k1 for bandwidth
– k2 for load
– k3 for delay
– k4 and k5 for Reliability
EIGRP
Router(config-router)# metric
bandwidth is in kbps weights tos k1 k2 k3 k4 k5
Features of EIGRP
• Classless Routing Protocol (VLSM, CIDR)
• Faster convergence times and improved scalability
• Rapid Convergence and Better handling of routing loops – (DUAL) (coming)
• Efficient Use of Bandwidth
– Partial, bounded updates: Incremental updates only to the routers that need them.
– Minimal bandwidth consumption: Uses Hello packets and EIGRP packets by default
use no more that 50% of link’s bandwidth EIGRP packets.
• PDM (Protocol Dependent Module)
– Keeps EIGRP is modular
– Different PDMs can be added to EIGRP as new routed protocols are enhanced or
developed: IPv4, IPv6, IPX, and AppleTalk
Hello packets
• Used by EIGRP to discover neighbours
• Used to form adjacencies with neighbours.
• Multicasts
• Unreliable delivery
Hello
Hello
Update packets
• Used to propagate routing information.
• No periodic updates.
• Sent only when necessary.
• Include only required information
• Sent only to those routers that require it.
• Reliable delivery.
• Multicast if to several routers, unicast if to one
router.
Update packets
• EIGRP updates are sent only when a route
changes.
• EIGRP updates are partial. They include only
information about the changed route.
• EIGRP updates are bounded. They go only to
routers that are affected by the change.
• This keeps updates small and saves
bandwidth.
Acknowledgement (ACK) packets
• Sent when reliable delivery is used by RTP.
• Sent in response to update packets.
• Unreliable delivery
• Unicast
Update (reliable)
ACK (unreliable)
Query packet
• Used when searching for a network
• E.g. a route goes down. Is there another
route?
• Uses reliable delivery so requires ACK
• Multicast or unicast
• All neighbours must reply
Query (reliable)
ACK (unreliable)
Reply packet
• Sent in response to a query from a neighbour.
• Sent reliably so requires ACK.
• Unicast
Query (reliable)
ACK (unreliable)
Reply (reliable)
ACK (unreliable)
Summary of message types
• Smooth Round Trip Timer (SRTT) The average time it takes to send
and receive packets from a neighbor.
• This timer is used to determine the retransmit interval (RTO)
RouterB#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate
default U - per-user static route
Gateway of last resort is not set
C 10.1.1.0 is directly connected, Serial0
D 172.16.0.0 [90/2681856] via 10.1.1.0, Serial0
D EX 192.168.1.0 [170/2681856] via 10.1.1.1, 00:00:04, Serial0
IP Routing Table
• The routing table contains the routes installed by DUAL as the best loop-free paths to
a given destination.
• EIGRP will maintain up to four routes per destination.
• These routes can be of equal, or unequal cost (if using the variance command). (later)
RouterB#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate
default U - per-user static route
Gateway of last resort is not set
C 10.1.1.0 is directly connected, Serial0
D 172.16.0.0 [90/2681856] via 10.1.1.0, Serial0
D EX 192.168.1.0 [170/2681856] via 10.1.1.1, 00:00:04, Serial0
EIGRP Technologies
Four key technologies set EIGRP apart from IGRP
Hello Intervals and Default Hold Times
What is FSM?
• An FSM is an abstract machine, not a mechanical device with moving
parts.
• FSMs define a set of possible states something can go through, what
events causes those states, and what events result from those states.
• Designers use FSMs to describe how a device, computer program, or
routing algorithm will react to a set of input events.
FSM Example
States such as
Passive and Active
trigger Certain
Events
•
DUAL FSM
DUAL selects alternate routes quickly by using the information in the EIGRP
tables.
• If a link goes down, DUAL looks for a feasible successor in its neighbor and
topology tables.
• A successor is a neighboring router that is currently being used for packet
forwarding, provides the least-cost route to the destination, and is not part of
a routing loop.
• Feasible successors provide the next lowest-cost path without introducing
routing loops.
– Feasible successor routes can be used in case the existing route fails;
packets to the destination network are immediately forwarded to the
feasible successor, which at that point, is promoted to the status of
successor.
• Selects a best loop-free path to a destination, the next hop being known as
the successor.
• All other routers to the same destination, that also meet the feasible
condition, meaning they are also loop-free (later), become feasible
successors, or back-up routes.
• debug eigrp fsm
What if the successor fails?
Feasible Successor exists:
• If current successor route fails, feasible successor becomes the
current successor, i.e. the current route.
• Routing of packets continue with little delay.
❑ Hold time. This 2-byte field defines the maximum number of seconds
that can elapse until one of the parties receives a keepalive or update
message from the other. If a router does not receive one of these
messages during the hold time period, it considers the other party dead.
BGP identifier. This 4-byte field defines the router that sends
the open message. The router usually uses one of its IP
addresses (because it is unique) for this purpose.
Notification message
A notification message is sent by a router whenever an error condition is detected or a
router wants to close the connection