Date post: | 02-Jan-2016 |
Category: |
Documents |
Upload: | ronan-hodges |
View: | 38 times |
Download: | 1 times |
IP Routing
Router
A Router is a physical device used to connect two different network (LAN), check their destination in Routing Table and transmit the message to the required LAN
– Work on logical address (IP)– Maintain routing table– Select best path– Layer 3 device– Connect different network– Backbone on internet– Packet filtering– Packet routing
It is denoted by symbol
X
Interface
E0 – Ethernet S0 – Serial Interface 0 S1 – Serial Interface 1
DCE – DATA COMMUNICATION EQUIPMENT(CLOCK RATE)DTE – DATA TERMINAL EQUIPMENT
HOW TO LOGIN IN ROUTER
Start Program Accessories Communication HyperTerminal
Router Modes
User exec mode :-> Router> Privilege exec mode :-> Router# Global Configuration Mode :-> Router(config)# Other Configuration Mode :-> Router(config-if)# Router(config-line)# Router(config-router)# Rx-boot Mode :-> It is used in password recovery. Initial Configuration Mode :-> Setup mode
USER EXEC MODE
IT is represented by router>. Minimal examination of the router. No change will take place.
router>enable
router#
PRIVILAGE EXEC MODE
It is represented by router #. Detail examination of the router &
troubleshooting.
router#config t {t=terminal}
router(config)#
GLOBAL CONFIGURATION MODE
It is represented by router(config)#. Configuration means router programming. Change the router name
router(config)#hostname GIT
GIT(config)#
OTHER CONFIGURATION MODE
It is represented by router(config-if)# router(config-line)# router(config-router)# router(config)#interface ethernet 0 router(config-if)# router(config)#line console 0 router(config-line)#
router(config)#router rip router(config-router)#
INDEX
Static Routing Default Routing Dynamic Routing
– RIP – IGRP– EIGRP– OSPF
IP ROUTING
Static Routing– Static Routing occurs when you manually add
routes in each routers routing table Default Routing
– We use default routing to send packets only one exit path out of the network
Dynamic routing– Dynamic routing is when protocols are used to
find networks.
Static Routing
GIT Family
STATIC ROUTE
A static route is a manually configured route on your router. Static routers are typically used in smaller network.
To configure a static route, use one of the two commands:
Router(config)# Ip route Distination_network Subnet_mask Ip_address_of_next_neighbor
OrRouter(config)# Ip route Distination_network Subnet_mask Interface_to_exit
X X
10.0.0.2
10.0.0.1
20.0.0.1 20.0.0.2
30.0.0.1
30.0.0.2
Router-1 Router-2
S0
E0
S1
E0
Router-1
EnableConfig tHostname Router1Int e0
ip address 10.0.0.1 255.0.0.0no shut
Int s0ip address 20.0.0.1 255.0.0.0no shut
clock rate 64000Exit
Ip route 30.0.0.0 255.0.0.0 20.0.0.2
Router-2
EnableConfig tHostname Router2Int e0
ip address 30.0.0.1 255.0.0.0no shut
Int s1ip address 20.0.0.2 255.0.0.0no shut
ExitIp route 10.0.0.0 255.0.0.0 20.0.0.1
ExitShow ip route
Configure Router 1
from PC1
Set IP Address to PC 1
EnableConfig tHostname rt1
Int e0Ip address 10.0.0.1 255.0.0.0No shut
int s0ip address 20.0.0.1 255.0.0.0no shut
ip route 30.0.0.0 255.0.0.0 20.0.0.1
int s0clock rate 64000
exitexitshow run
copy running-config startup-config (for saving configuration)
CONFIGURE ROUTER-2
AND PC2
SET PC2 IP ADDRESS
enableconfig thostname rt2
int e0ip address 30.0.0.1 255.0.0.0no shut
int s1ip address 20.0.0.2 255.0.0.0no shutdown
int s1ip address 20.0.0.2 255.0.0.0no shutdownexit
ip route 10.0.0.0 255.0.0.0 20.0.0.2exit
show running-config
To check the connectivity from router
ping 10.0.0.1ping 10.0.0.2ping 20.0.0.1ping 20.0.0.2ping 30.0.0.1
Default Routing
Default Routing
– We use default routing to send packets only one exit path out of the network like Router-1 and Router-3. In Router-2 there are two exit path.
IP ROUTE 0.0.0.0 0.0.0.0 20.0.0.1
X X
Router-1 Router-2
X
Router-3
Dynamic Routing
Routing Protocol
There are three types of routing protocol– Distance Vector– Link State– Hybrid
Routing Protocol
Distance vector Protocol – Complete routing table send for route update
Exp – RIP, IGRP
Link State Protocol– Only change (through hello packet) send for route update
Exp - OSPF
Hybrid Protocol– Both feature Distance Vector & Link State
Exp - EIGRP
RIP
ROUTING INFORMATION PROTOCOL
RIP
ROUTING INFORMATION PROTOCOL Distance Vector Routing Protocol Update Routing Table - Every 30 Sec. Max Hop count - 15 Class full
X X
10.0.0.2
10.0.0.1
20.0.0.1 20.0.0.2
30.0.0.1
30.0.0.2
Router-1 Router-2
S0
E0
S1
E0
Set IP Address to PC1
Winipcfg
IP Address – 10.0.0.2 Subnet – 255.0.0.0 Gateway – 10.0.0.1
Set IP Address to PC2
Winipcfg
IP Address – 30.0.0.2 Subnet – 255.0.0.0 Gateway – 30.0.0.1
Router-1
EnableConfig tHostname Router1Int e0
ip address 10.0.0.1 255.0.0.0no shut
Int s0ip address 20.0.0.1 255.0.0.0no shut
clock rate 64000ExitRouter rip
network 10.0.0.0network 20.0.0.0
Router-2
EnableConfig tHostname Router2Int e0
ip address 30.0.0.1 255.0.0.0no shut
Int s1ip address 20.0.0.2 255.0.0.0no shut
ExitRouter rip
network 20.0.0.0network 30.0.0.0
X X
10.0.0.2
10.0.0.1
20.0.0.1 20.0.0.2
30.0.0.1
30.0.0.2
Router-1 Router-2
S0
E0
S1
E0
X40.0.0.2
50.0.0.1
50.0.0.2
Router-3
S1
E0
S0
40.0.0.1
Set IP Address to PC1
Winipcfg
IP Address – 10.0.0.2 Subnet – 255.0.0.0 Gateway – 10.0.0.1
Set IP Address to PC2
Winipcfg
IP Address – 30.0.0.2 Subnet – 255.0.0.0 Gateway – 30.0.0.1
Set IP Address to PC3
Winipcfg
IP Address – 50.0.0.2 Subnet – 255.0.0.0 Gateway – 50.0.0.1
Router-1
EnableConfig tHostname Router1Int e0
ip address 10.0.0.1 255.0.0.0no shut
Int s0ip address 20.0.0.1 255.0.0.0no shut
clock rate 64000ExitRouter rip
network 10.0.0.0network 20.0.0.0
Router-2
EnableConfig tHostname Router2Int e0
ip address 30.0.0.1 255.0.0.0no shut
Int s1ip address 20.0.0.2 255.0.0.0no shut
Int s0ip address 40.0.0.1 255.0.0.0no shutclock rate 64000
ExitRouter rip
network 20.0.0.0network 30.0.0.0network 40.0.0.0
Router-3
EnableConfig tHostname Router3Int e0
ip address 50.0.0.1 255.0.0.0no shut
Int s1ip address 40.0.0.2 255.0.0.0no shut
ExitRouter rip
network 40.0.0.0network 50.0.0.0
Comparison
RIP V 1 Distance Vector Max Hop count 15 Class full No support for VLSM No support for
Discontinuous Network
RIP V 2 Distance Vector Max Hop count 15 Classless Support for VLSM Support for
Discontinuous Network
Router-3
EnableConfig tHostname Router3Int e0
ip address 50.0.0.1 255.0.0.0no shut
Int s1ip address 40.0.0.2 255.0.0.0no shut
ExitRouter rip
network 40.0.0.0network 50.0.0.0version 2
IGRP
Administrative Distance
The administrative distance (AD) is used to rate the trust worthiness of routing information received on a router from neighbor router.
Administrative distance is an integer from 0 to 255. If router receives two updates the first thing the
router check is the AD. Lower AD will be placed in the routing table.
If the both router same AD then routing protocol check Hop count or bandwidth of line.
Default Administrative Distance
Route Source Connected interface Static Route EIGRP IGRP OSPF RIP EXTERNAL EIGRP Unknown
Default AD. 0 1 90 100 110 120 170 255 (Route never used)
Autonomous System Number (AS)
All routers Share routing table information. in the same AS Number
Autonomous System Number10
Autonomous System Number20
IGRP (Interior Gateway Routing Protocol)
IGRP is Cisco-Proprietary Distance vector routing protocol means this protocol is work only on Cisco routers.
Use Autonomous System Number Maximum Hop Count – 255 (Default 100) Metric
– Bandwidth and Delay
Diffrences
IGRP Can be used in large
internetworks Uses an autonomous
system number for activation
Gives a full route table update every 90 seconds
Has an administrative distance of 100
Uses Bandwidth and delay of the line as metric
maximum hop count of 255
RIP Works best in smaller
networks Does not use autonomous
system number Gives full route table update
every 30 seconds Has an administrative
distance of 120 Uses only hop count to
determine the best path to a remote network
15 hops maximum.
X X
10.0.0.2
10.0.0.1
20.0.0.1 20.0.0.2
30.0.0.1
30.0.0.2
Router-1 Router-2
S0
E0
S1
E0
Router-1
EnableConfig t
Hostname Router1
Int e0Ip address 10.0.0.1 255.0.0.0No shut
Int s0I p address 20.0.0.1 255.0.0.0
No shut
Clock rate 64000
Router IGRP 10Network 10.0.0.0Network 20.0.0.0
Router-2
EnableConfig t
Hostname Router2
Int e0Ip address 30.0.0.1 255.0.0.0No shut
Int s1 Ip address 20.0.0.2 255.0.0.0
No shut
Router IGRP 10Network 20.0.0.0Network 30.0.0.0
Set IP Address to PC1
Winipcfg
IP Address – 10.0.0.2 Subnet – 255.0.0.0 Gateway – 10.0.0.1
Set IP Address to PC2
Winipcfg
IP Address – 30.0.0.2 Subnet – 255.0.0.0 Gateway – 30.0.0.1
Trace the route for 10.0.0.10Which is through router-2
In router-2 close the link s0using shut command
Router-2 close the link s0Request is not routing After few second Router-4 Search the new Route through Router-3
Enhance Interior Gateway Routing Protocol
EIGRP
EIGRP
It is HYBRIDE routing protocol.( D.V + L.S) Support for IP, IPX and AppleTalk via protocol
dependent modules. Support for VLSM/CIDR. Support for summaries and discontiguous networks. Efficient neighbor discovery Communication via Reliable Transport Protocol
(RTP) Best path selection via Diffusing Update Algorithm
(DUAL)
EIGRP
Protocol Dependent Modules– Maintain a separate series of tables means there
is IP/EIGRP tables, IPX/EIGRP tables and AppleTalk/EIGRP tables.
Neighbor Discovery Hello or Acknowledgement Received AS Number Match Identical Metric's
Discovering Routes
I am Router A, Who Is on the Link?
afadjfjorqpoeru39547439070713
Hello11
AA BB
Discovering Routes
Update
afadjfjorqpoeru39547439070713
Here Is My Routing Information (Unicast)
I am Router A, Who Is on the Link?
afadjfjorqpoeru39547439070713
Hello11
22
AA BB
Discovering Routes
Thanks for the Information!Ack
afadjfjorqpoeru39547439070713
Update
afadjfjorqpoeru39547439070713
Here Is My Routing Information (Unicast)
I am Router A, Who Is on the Link?
afadjfjorqpoeru39547439070713
Hello
33
22
11
AA BB
Topology Table
Topology Table
Discovering Routes
Thanks for the Information!Ack
afadjfjorqpoeru39547439070713
Update
afadjfjorqpoeru39547439070713
Here Is My Routing Information (Unicast)
I am Router A, Who Is on the Link?
afadjfjorqpoeru39547439070713
Hello
44 33
22
11
AA BB
Here Is My Route Information (Unicast)Update
afadjfjorqpoeru39547439070713
Thanks for the Information!Ack
afadjfjorqpoeru39547439070713
Update
afadjfjorqpoeru39547439070713
Here Is My Routing Information (Unicast)
I am Router A, Who Is on the Link?
afadjfjorqpoeru39547439070713
Discovering Routes
Hello
AA BB
Topology Table
Topology Table
44
55
33
11
22
Converged
Thanks for the Information! Ack
afadjfjorqpoeru39547439070713
Discovering Routes
66
Topology Table
Topology Table
44
Here Is My Route Information (Unicast)Update
afadjfjorqpoeru39547439070713
Thanks for the Information!Ack
afadjfjorqpoeru39547439070713
Update
afadjfjorqpoeru39547439070713
Here Is My Routing Information (Unicast)
I am Router A, Who Is on the Link?
afadjfjorqpoeru39547439070713
Hello
55
33
11
22
AA BB
Reliable Transport Protocol (RTP)
Reliability is the key concern, a mechanism that using multicast and unicast for track the neighbor (who have replied).
Class D address 224-240. Neighbor is declared dead if doesn't get reply
in 16 unicast attempts.
Diffusing Update Algorithm (DUAL)
DUAL is responsible for selecting and maintaining information about the best paths.
First, EIGRP routers maintain a copy of all of their neighbors routers in neighbors table, if the best path goes down, it is simple, examining the contents of the topology table to select the best replacement route.
Secondly, if there is not a good alternative in the local topology table, EIGRP routers very quickly ask their neighbors for help to find one best route.
The whole idea of the Hello protocol is to enable the rapid detection of new or dead neighbors.
D EIGRP Topology(a) Cost (2) (fd)
via B Cost (2/1) (Successor)via C Cost (5/3)
D EIGRP Topology(a) Cost (2) (fd)
via B Cost (2/1) (Successor)via C Cost (5/3)
E EIGRP Topology (a) Cost (3) (fd)
via D Cost (3/2) (Successor)via C Cost (4/3)
E EIGRP Topology (a) Cost (3) (fd)
via D Cost (3/2) (Successor)via C Cost (4/3)
C EIGRP Topology(a) Cost (3) (fd)
via B Cost (3/1) (Successor)via D Cost (4/2) (fs)via E Cost (4/3)
C EIGRP Topology(a) Cost (3) (fd)
via B Cost (3/1) (Successor)via D Cost (4/2) (fs)via E Cost (4/3)
(1)
DUAL Example
(1)
(1)
(1)
(2)(2)
A
D
EC
B
(a)
D EIGRP Topology(a) Cost (2) (fd)
via B Cost (2/1) (Successor)via C Cost (5/3)
D EIGRP Topology(a) Cost (2) (fd)
via B Cost (2/1) (Successor)via C Cost (5/3)
E EIGRP Topology (a) Cost (3) (fd)
via D Cost (3/2) (Successor)via C Cost (4/3)
E EIGRP Topology (a) Cost (3) (fd)
via D Cost (3/2) (Successor)via C Cost (4/3)
C EIGRP Topology(a) Cost (3) (fd)
via B Cost (3/1) (Successor)via D Cost (4/2) (fs)via E Cost (4/3)
C EIGRP Topology(a) Cost (3) (fd)
via B Cost (3/1) (Successor)via D Cost (4/2) (fs)via E Cost (4/3)
(1)
DUAL Example
XX
(1)
(1)
(1)
(2)(2)
A
D
EC
B
(a)
(1)
(1)
(1)
(2)(2)
A
D
EC
B
(a)DUAL Example
D EIGRP Topology(a) **ACTIVE** Cost (-1) (fd)
via E (q)via C Cost (5/3) (q)
D EIGRP Topology(a) **ACTIVE** Cost (-1) (fd)
via E (q)via C Cost (5/3) (q)
E EIGRP Topology (a) Cost (3) (fd)
via D Cost (3/2) (Successor)via C Cost (4/3)
E EIGRP Topology (a) Cost (3) (fd)
via D Cost (3/2) (Successor)via C Cost (4/3)
C EIGRP Topology(a) Cost (3) (fd)
via B Cost (3/1) (Successor)via Dvia E Cost (4/3)
C EIGRP Topology(a) Cost (3) (fd)
via B Cost (3/1) (Successor)via Dvia E Cost (4/3)
DUAL Example
RR
Q
(1)
(1)
(1)
(2)(2)
A
D
EC
B
(a)
D EIGRP Topology(a) **ACTIVE** Cost (-1) (fd)
via E (q)via C Cost (5/3)
D EIGRP Topology(a) **ACTIVE** Cost (-1) (fd)
via E (q)via C Cost (5/3)
E EIGRP Topology (a) **ACTIVE** Cost (-1) (fd)
via Dvia C Cost (4/3) (q)
E EIGRP Topology (a) **ACTIVE** Cost (-1) (fd)
via Dvia C Cost (4/3) (q)
C EIGRP Topology(a) Cost (3) (fd)
via B Cost (3/1) (Successor)via Dvia E
C EIGRP Topology(a) Cost (3) (fd)
via B Cost (3/1) (Successor)via Dvia E
DUAL Example
RR
(1)
(1)
(1)
(2)(2)
A
D
EC
B
(a)
D EIGRP Topology(a) **ACTIVE** Cost (-1) (fd)
via E (q)via C Cost (5/3)
D EIGRP Topology(a) **ACTIVE** Cost (-1) (fd)
via E (q)via C Cost (5/3)
E EIGRP Topology (a) Cost (4) (fd)
via C Cost (4/3) (Successor)via D
E EIGRP Topology (a) Cost (4) (fd)
via C Cost (4/3) (Successor)via D
C EIGRP Topology(a) Cost (3) (fd)
via B Cost (3/1) (Successor)via Dvia E
C EIGRP Topology(a) Cost (3) (fd)
via B Cost (3/1) (Successor)via Dvia E
DUAL Example
RR
(1)
(1)
(1)
(2)(2)
A
D
EC
B
(a)
D EIGRP Topology(a) Cost (5) (fd)
via C Cost (5/3) (Successor) via E Cost (5/4) (Successor)
D EIGRP Topology(a) Cost (5) (fd)
via C Cost (5/3) (Successor) via E Cost (5/4) (Successor)
E EIGRP Topology (a) Cost (4) (fd)
via C Cost (4/3) (Successor)via D
E EIGRP Topology (a) Cost (4) (fd)
via C Cost (4/3) (Successor)via D
C EIGRP Topology(a) Cost (3) (fd)
via B Cost (3/1) (Successor)via Dvia E
C EIGRP Topology(a) Cost (3) (fd)
via B Cost (3/1) (Successor)via Dvia E
DUAL Example
(1)
(1)
(1)
(2)(2)
A
D
EC
B
(a)
D EIGRP Topology(a) Cost (5) (fd)
via C Cost (5/3) (Successor) via E Cost (5/4) (Successor)
D EIGRP Topology(a) Cost (5) (fd)
via C Cost (5/3) (Successor) via E Cost (5/4) (Successor)
E EIGRP Topology (a) Cost (4) (fd)
via C Cost (4/3) (Successor)via D
E EIGRP Topology (a) Cost (4) (fd)
via C Cost (4/3) (Successor)via D
C EIGRP Topology(a) Cost (3) (fd)
via B Cost (3/1) (Successor)via Dvia E
C EIGRP Topology(a) Cost (3) (fd)
via B Cost (3/1) (Successor)via Dvia E
Support Large Networks
EIGRP includes a bunch of cool features that make it suitable for use in large networks
– Support for multiple ASes on a single router– Support for VLSM and summarization– Route discovery and maintenance
Multiple ASes
EIGRP uses Autonomous System Number to identify the collection of routers that share route information,
Well it is possible to divide the large network into multiple distinct EIGRP autonomous systems or ASes.
Route information can be shared among the Different ASes via redistribution.
VLSM Support and Summarization
One of the classless routing protocols support VLSM.
Use of discrete subnets, gives lot more flexibility.
What is discrete network? It is one that has two or more subnet works for a
classful network connected together by different classful networks.
– RIPV2 and EIGRP Support Discrete networking, but not by default. OSPF does support discrete networking by default.
Route Discovery and Maintenance
EIGRP Supports the concept of neighbors that are discovered via a Hello Process and uses the routing by rumor mechanism (a route is update when hear about route from another routers ).
Maintain three types of table Routing Table – Active Roots
Neighbor Table – Information about adjacent neighbors.
Topology Table – All the roots are stored in it.
Metrics
Select best possible path, use a combination of four– Bandwidth– Delay– Load– Reliability
X X
10.0.0.2
10.0.0.1
20.0.0.1 20.0.0.2
30.0.0.1
30.0.0.2
Router-1 Router-2
S0
E0
S1
E0
Router-1
EnableConfig t
Hostname Router1
Int e0Ip address 10.0.0.1 255.0.0.0No shut
Int s0Ip address 20.0.0.1 255.0.0.0No shut
Clock rate 64000
Router EIGRP 100Network 10.0.0.0Network 20.0.0.0
Router-2
EnableConfig t
Hostname Router2
Int e0Ip address 30.0.0.1 255.0.0.0No shut
Int s1Ip address 20.0.0.2 255.0.0.0No shut
Router EIGRP 100Network 20.0.0.0Network 30.0.0.0
OSPF
Open Shortest Path First
OSPF
OSPF is the first link state routing protocol OSPF provides the following feature
– Consists of area and autonomous system– Share routing information through link state advertisement
(LSA)– LSA contain small bit of information about route– Minimizes routing update traffic– Supports VLSM/CIDR– Has unlimited hop counts– Allow multi-vendor deployment (Open Standard)
X
X
X
X
X
Area 0
Area 1Area 2
Back Bone AreaBack Bone Area Router
Internal Router
Area Boarder Router
Back Bone Area – Area 0 is a backbone area
Back Bone Router – Router exist in back bone area.
Internal Router – all interface in one area
Area Boarder Router – one interface in one area other interface in other
area
Shortest Path First (SPF)
Within an area each router calculate the best shortest path . This calculation is based upon the information collected in the topology database and the algorithm called shortest path first (SPF).
(Each router in an area constructing a tree much like a family tree- where the router is the root, and all other network arranged along the branches and leaves.)
Enabling OSPF
Router(config)# router ospf ?
(1 - 65535) A value in the range 1 to 65535 identifies the OSPF Process ID
You can have more than one ospf process (running simultaneously) on the same router if you want. The second process will maintain an entirely separate copy of its topology table and manage its communication independently of the first process.
Configuring OSPF Areas
Router(Config)# router ospf 1Router(config-router)# network 10.0.0.0 0.255.255.255 area 1
A quick review of wildcard0 – indicates that corresponding value (10) in the network must match
exactly.255 – indicates (any) that you don't case what the corresponding value
is in the network.
Remember – OSPF routers will only become neighbor if their interfaces share a network that is configured to belong to the same area number.
X X
10.0.0.2
10.0.0.1
20.0.0.1 20.0.0.2
30.0.0.1
30.0.0.2
Router-1 Router-2
S0
E0
S1
E0
X40.0.0.2
50.0.0.1
50.0.0.2
Router-3
S1
E0
S0
40.0.0.1
Router-1
EnableConfig tHostname Router1Int e0
ip address 10.0.0.1 255.0.0.0no shut
Int s0ip address 20.0.0.1 255.0.0.0no shut
clock rate 64000Exit
Router ospf 5network 10.0.0.0 255.0.0.255 area 1
Router-2
EnableConfig tHostname Router2Int e0
ip address 30.0.0.1 255.0.0.0no shut
Int s1ip address 20.0.0.2 255.0.0.0no shut
Int s0ip address 40.0.0.1 255.0.0.0no shut
clock rate 64000Exit
Router ospf 5network 20.0.0.0 255.0.0.255 area 1
Router-3
EnableConfig tHostname Router3Int e0
ip address 50.0.0.1 255.0.0.0no shut
Int s1ip address 40.0.0.2 255.0.0.0no shut
ExitRouter ospf 5
network 40.0.0.0 255.0.0.255 area 1
Routing Loops
Solution for Routing loops– Maximum Hop Count
The routing loop problem just described is called counting to infinity, and it is caused by broadcasts wrong information throughout the internetwork.
– Split Horizon Routing protocol observe which interface a network route was
learned. It would not accept the route back to other interface.– Route Poisoning
Another way to avoid problems caused by inconsistent updates start and stop network.
– Hold downs A hold down prevents regular update messages from
reinstating a route that is going up and down (called flapping).
Note that RTE has recognized that 203.250.15.0 has two subnets while RTA thinks that it has only one subnet (the one configured on the interface). Information about subnet 203.250.15.0 255.255.255.252 is lost in the RIP domain. In order to reach that subnet, a static route needs to be configured on RTA:
OSPF versus RIP
The rapid growth and expansion of today's networks has pushed RIP to its limits. RIP has certain limitations that could cause problems in large networks:
RIP has a limit of 15 hops. A RIP network that spans more than 15 hops (15 routers) is considered unreachable.
RIP cannot handle Variable Length Subnet Masks (VLSM). Given the shortage of IP addresses and the flexibility VLSM gives in the efficient assignment of IP addresses, this is considered a major flaw.
Periodic broadcasts of the full routing table will consume a large amount of bandwidth. This is a major problem with large networks especially on slow links and WAN clouds.
RIP converges slower than OSPF. In large networks convergence gets to be in the order of minutes. RIP routers will go through a period of a hold-down and garbage collection and will slowly time-out information that has not been received recently. This is inappropriate in large environments and could cause routing inconsistencies.
RIP has no concept of network delays and link costs. Routing decisions are based on hop counts. The path with the lowest hop count to the destination is always preferred even if the longer path has a better aggregate link bandwidth and slower delays.
RIP networks are flat networks. There is no concept of areas or boundaries. With the introduction of classless routing and the intelligent use of aggregation and summarization, RIP networks seem to have fallen behind.
Some enhancements were introduced in a new version of RIP called RIP2. RIP2 addresses the issues of VLSM, authentication, and multicast routing updates. RIP2 is not a big improvement over RIP (now called RIP 1) because it still has the limitations of hop counts and slow convergence which are essential in todays large networks.
OSPF versus RIP
OSPF, on the other hand, addresses most of the issues presented above: With OSPF, there is no limitation on the hop count. The intelligent use of VLSM is very useful in IP address allocation. OSPF uses IP multicast to send link-state updates. This ensures less processing on routers that
are not listening to OSPF packets. Also, updates are only sent in case routing changes occur instead of periodically. This ensures a better use of bandwidth.
OSPF has better convergence than RIP. This is because routing changes are propagated instantaneously and not periodically.
OSPF allows for better load balancing. OSPF allows for a logical definition of networks where routers can be divided into areas. This will
limit the explosion of link state updates over the whole network. This also provides a mechanism for aggregating routes and cutting down on the unnecessary propagation of subnet information.
OSPF allows for routing authentication by using different methods of password authentication. OSPF allows for the transfer and tagging of external routes injected into an Autonomous System.
This keeps track of external routes injected by exterior protocols such as BGP. This of course would lead to more complexity in configuring and troubleshooting OSPF networks.
Administrators that are used to the simplicity of RIP will be challenged with the amount of new information they have to learn in order to keep up with OSPF networks. Also, this will introduce more overhead in memory allocation and CPU utilization. Some of the routers running RIP might have to be upgraded in order to handle the overhead caused by OSPF.
OSPF
What Do We Mean by Link-States? OSPF is a link-state protocol. We could think of a link as being an interface on the router. The state of the link is
a description of that interface and of its relationship to its neighboring routers. A description of the interface would include, for example, the IP address of the interface, the mask, the type of network it is connected to, the routers connected to that network and so on. The collection of all these link-states would form a link-state database.
Link-State Algorithm OSPF uses a link-state algorithm in order to build and calculate the shortest path to all known destinations. The
algorithm by itself is quite complicated. The following is a very high level, simplified way of looking at the various steps of the algorithm:
Upon initialization or due to any change in routing information, a router will generate a link-state advertisement. This advertisement will represent the collection of all link-states on that router.
All routers will exchange link-states by means of flooding. Each router that receives a link-state update should store a copy in its link-state database and then propagate the update to other routers.
After the database of each router is completed, the router will calculate a Shortest Path Tree to all destinations. The router uses the Dijkstra algorithm to calculate the shortest path tree. The destinations, the associated cost and the next hop to reach those destinations will form the IP routing table.
In case no changes in the OSPF network occur, such as cost of a link or a network being added or deleted, OSPF should be very quiet. Any changes that occur are communicated via link-state packets, and the Dijkstra algorithm is recalculated to find the shortest path.
Shortest Path Algorithm The shortest path is calculated using the Dijkstra algorithm. The algorithm places each router at the root of a
tree and calculates the shortest path to each destination based on the cumulative cost required to reach that destination. Each router will have its own view of the topology even though all the routers will build a shortest path tree using the same link-state database. The following sections indicate what is involved in building a shortest path tree.
Neighbors
Routers that share a common segment become neighbors on that segment. Neighbors are elected via the Hello protocol. Hello packets are sent periodically out of each interface using IP multicast (Appendix B). Routers become neighbors as soon as they see themselves listed in the neighbor's Hello packet. This way, a two way communication is guaranteed. Neighbor negotiation applies to the primary address only. Secondary addresses can be configured on an interface with a restriction that they have to belong to the same area as the primary address.
Two routers will not become neighbors unless they agree on the following: Area-id: Two routers having a common segment; their interfaces have to belong to the same area on that
segment. Of course, the interfaces should belong to the same subnet and have a similar mask. Authentication: OSPF allows for the configuration of a password for a specific area. Routers that want to
become neighbors have to exchange the same password on a particular segment. Hello and Dead Intervals: OSPF exchanges Hello packets on each segment. This is a form of keepalive
used by routers in order to acknowledge their existence on a segment and in order to elect a designated router (DR) on multiaccess segments.The Hello interval specifies the length of time, in seconds, between the hello packets that a router sends on an OSPF interface. The dead interval is the number of seconds that a router's Hello packets have not been seen before its neighbors declare the OSPF router down.
OSPF requires these intervals to be exactly the same between two neighbors. If any of these intervals are different, these routers will not become neighbors on a particular segment. The router interface commands used to set these timers are: ip ospf hello-interval seconds and ip ospf dead-interval seconds .
Stub area flag: Two routers have to also agree on the stub area flag in the Hello packets in order to become neighbors. Stub areas will be discussed in a later section. Keep in mind for now that defining stub areas will affect the neighbor election process.
VLSM
Another issue to consider is VLSM (Variable Length Subnet Guide)(Appendix C). OSPF can carry multiple subnet information for the same major net, but other protocols such as RIP and IGRP (EIGRP is OK with VLSM) cannot. If the same major net crosses the boundaries of an OSPF and RIP domain, VLSM information redistributed into RIP or IGRP will be lost and static routes will have to be configured in the RIP or IGRP domains. The following example illustrates this problem:
In the above diagram, RTE is running OSPF and RTA is running RIP. RTC is doing the redistribution between the two protocols.
The problem is that the class C network 203.250.15.0 is variably subnetted, it has two different masks 255.255.255.252 and 255.255.255.192. Let us look at the configuration and the routing tables of RTE and RTA:
RTA# interface Ethernet0 ip address 203.250.15.68 255.255.255.192 router rip network 203.250.15.0 RTC# interface Ethernet0 ip address 203.250.15.67 255.255.255.192 interface Serial1 ip address 203.250.15.1 255.255.255.252 router ospf 10 redistribute rip metric 10 subnets network 203.250.15.0 0.0.0.255 area 0 router rip redistribute ospf 10 metric 2 network 203.250.15.0 RTE#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 Gateway of last resort is not set 203.250.15.0 is variably subnetted, 2 subnets, 2 masks C 203.250.15.0 255.255.255.252 is directly connected, Serial0 O 203.250.15.64 255.255.255.192 [110/74] via 203.250.15.1, 00:15:55, Serial0 RTA#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 Gateway of last resort is not set 203.250.15.0 255.255.255.192 is subnetted, 1 subnets C 203.250.15.64 is directly connected, Ethernet0
Note that RTE has recognized that 203.250.15.0 has two subnets while RTA thinks that it has only one subnet (the one configured on the interface). Information about subnet 203.250.15.0 255.255.255.252 is lost in the RIP domain. In order to reach that subnet, a static route needs to be configured on RTA:
RTA# interface Ethernet0 ip address 203.250.15.68 255.255.255.192 router rip network 203.250.15.0 ip route 203.250.15.0 255.255.255.0 203.250.15.67
This way RTA will be able to reach the other subnets.
Converged
Thanks for the Information! Ack
afadjfjorqpoeru39547439070713
Discovering Routes
66
Topology Table
Topology Table
44
Here Is My Route Information (Unicast)Update
afadjfjorqpoeru39547439070713
Thanks for the Information!Ack
afadjfjorqpoeru39547439070713
Update
afadjfjorqpoeru39547439070713
Here Is My Routing Information (Unicast)
I am Router A, Who Is on the Link?
afadjfjorqpoeru39547439070713
Hello
55
33
11
22
AA BB
D EIGRP Topology(a) Cost (2) (fd)
via B Cost (2/1) (Successor)via C Cost (5/3)
D EIGRP Topology(a) Cost (2) (fd)
via B Cost (2/1) (Successor)via C Cost (5/3)
E EIGRP Topology (a) Cost (3) (fd)
via D Cost (3/2) (Successor)via C Cost (4/3)
E EIGRP Topology (a) Cost (3) (fd)
via D Cost (3/2) (Successor)via C Cost (4/3)
C EIGRP Topology(a) Cost (3) (fd)
via B Cost (3/1) (Successor)via D Cost (4/2) (fs)via E Cost (4/3)
C EIGRP Topology(a) Cost (3) (fd)
via B Cost (3/1) (Successor)via D Cost (4/2) (fs)via E Cost (4/3)
(1)
DUAL Example
(1)
(1)
(1)
(2)(2)
A
D
EC
B
(a)
D EIGRP Topology(a) Cost (2) (fd)
via B Cost (2/1) (Successor)via C Cost (5/3)
D EIGRP Topology(a) Cost (2) (fd)
via B Cost (2/1) (Successor)via C Cost (5/3)
E EIGRP Topology (a) Cost (3) (fd)
via D Cost (3/2) (Successor)via C Cost (4/3)
E EIGRP Topology (a) Cost (3) (fd)
via D Cost (3/2) (Successor)via C Cost (4/3)
C EIGRP Topology(a) Cost (3) (fd)
via B Cost (3/1) (Successor)via D Cost (4/2) (fs)via E Cost (4/3)
C EIGRP Topology(a) Cost (3) (fd)
via B Cost (3/1) (Successor)via D Cost (4/2) (fs)via E Cost (4/3)
(1)
DUAL Example
XX
(1)
(1)
(1)
(2)(2)
A
D
EC
B
(a)
(1)
(1)
(1)
(2)(2)
A
D
EC
B
(a)DUAL Example
D EIGRP Topology(a) **ACTIVE** Cost (-1) (fd)
via E (q)via C Cost (5/3) (q)
D EIGRP Topology(a) **ACTIVE** Cost (-1) (fd)
via E (q)via C Cost (5/3) (q)
E EIGRP Topology (a) Cost (3) (fd)
via D Cost (3/2) (Successor)via C Cost (4/3)
E EIGRP Topology (a) Cost (3) (fd)
via D Cost (3/2) (Successor)via C Cost (4/3)
C EIGRP Topology(a) Cost (3) (fd)
via B Cost (3/1) (Successor)via Dvia E Cost (4/3)
C EIGRP Topology(a) Cost (3) (fd)
via B Cost (3/1) (Successor)via Dvia E Cost (4/3)
DUAL Example
RR
Q
(1)
(1)
(1)
(2)(2)
A
D
EC
B
(a)
D EIGRP Topology(a) **ACTIVE** Cost (-1) (fd)
via E (q)via C Cost (5/3)
D EIGRP Topology(a) **ACTIVE** Cost (-1) (fd)
via E (q)via C Cost (5/3)
E EIGRP Topology (a) **ACTIVE** Cost (-1) (fd)
via Dvia C Cost (4/3) (q)
E EIGRP Topology (a) **ACTIVE** Cost (-1) (fd)
via Dvia C Cost (4/3) (q)
C EIGRP Topology(a) Cost (3) (fd)
via B Cost (3/1) (Successor)via Dvia E
C EIGRP Topology(a) Cost (3) (fd)
via B Cost (3/1) (Successor)via Dvia E
DUAL Example
RR
(1)
(1)
(1)
(2)(2)
A
D
EC
B
(a)
D EIGRP Topology(a) **ACTIVE** Cost (-1) (fd)
via E (q)via C Cost (5/3)
D EIGRP Topology(a) **ACTIVE** Cost (-1) (fd)
via E (q)via C Cost (5/3)
E EIGRP Topology (a) Cost (4) (fd)
via C Cost (4/3) (Successor)via D
E EIGRP Topology (a) Cost (4) (fd)
via C Cost (4/3) (Successor)via D
C EIGRP Topology(a) Cost (3) (fd)
via B Cost (3/1) (Successor)via Dvia E
C EIGRP Topology(a) Cost (3) (fd)
via B Cost (3/1) (Successor)via Dvia E
DUAL Example
RR
(1)
(1)
(1)
(2)(2)
A
D
EC
B
(a)
D EIGRP Topology(a) Cost (5) (fd)
via C Cost (5/3) (Successor) via E Cost (5/4) (Successor)
D EIGRP Topology(a) Cost (5) (fd)
via C Cost (5/3) (Successor) via E Cost (5/4) (Successor)
E EIGRP Topology (a) Cost (4) (fd)
via C Cost (4/3) (Successor)via D
E EIGRP Topology (a) Cost (4) (fd)
via C Cost (4/3) (Successor)via D
C EIGRP Topology(a) Cost (3) (fd)
via B Cost (3/1) (Successor)via Dvia E
C EIGRP Topology(a) Cost (3) (fd)
via B Cost (3/1) (Successor)via Dvia E
DUAL Example
(1)
(1)
(1)
(2)(2)
A
D
EC
B
(a)
D EIGRP Topology(a) Cost (5) (fd)
via C Cost (5/3) (Successor) via E Cost (5/4) (Successor)
D EIGRP Topology(a) Cost (5) (fd)
via C Cost (5/3) (Successor) via E Cost (5/4) (Successor)
E EIGRP Topology (a) Cost (4) (fd)
via C Cost (4/3) (Successor)via D
E EIGRP Topology (a) Cost (4) (fd)
via C Cost (4/3) (Successor)via D
C EIGRP Topology(a) Cost (3) (fd)
via B Cost (3/1) (Successor)via Dvia E
C EIGRP Topology(a) Cost (3) (fd)
via B Cost (3/1) (Successor)via Dvia E
EIGRP Reliable Transport Protocol
EIGRP reliable packets are packets that requires explicit acknowledgement:– Update– Query– Reply
EIGRP unreliable packets are packets that do not require explicit acknowledgement:– Hello– Ack
EIGRP Reliable Transport Protocol
The router keeps a neighbor list and a retransmission list for every neighbor
Each reliable packet (Update, Query, Reply) will be retransmitted when packet is not acked
EIGRP transport has window size of one (stop and wait mechanism)– Every single reliable packet needs to be
acknowledged before the next sequenced packet can be sent