Routing
Routing is a process of transferring packets from one network to another network effectively by choosing the best path and the shortest path.
Router
Router is a device which performs the function of routing, that include
Inter-network communication
Best path selection
Packet switching
Packet forwarding
Boot Process

Assigning an IP address to a interface in a router
Types of Routing
Static routing
Default routing
Dynamic routing
Static Routing
Static routing is a process in which the routes are manually configured by the administrator.
The administrator should be knowing the destination network.
AD of the static route is 1
AD(Administrative Distance) is the reliability of the routing protocol.
lesser the reliability, higher the priority.
Advantages and Disadvantages

Default Routing
Default routing is a process of sending packets to unknown destination.
used to route traffic to internet.
last preferred routing
reduces the size of routing table
Syntax for the Default route
Dynamic Routing
It is a process of routing the packets dynamically through various routing protocols.
Discovering the neighbor, finding the best path.
Maintaining up to date routing information in routing table.
Choosing the best paths and second best path.
More scalable
Types of Routing Protocol:
RIP and RIPv2
EIGRP
OSPF
BGP
There are 3 types of categories in routing:
Distance Vector Protocol
Link State protocol
Hybrid Protocol
Distance Vector
Link State
Hybrid
Works on Bellman Ford Algorithm
Dijkstra algorithmm
Dual Algorithm
Full Routing tables are exchanges
Missing routes are exchanged
Missing routes are exchanged
classfull
classless
classless
updates are sent through broadcast
updates are sent through multicast
updates are sent through Multicast
Easy to configure
Difficult to configure
Easy to config
Eg: RIP
Eg: OSPF
Eg: EIGRP
RIP
Open standard protocol
Classfull routing protocol
updates are through broadcast (255.255.255.255).
Metric is HOP COUNT.
Hop Count is 15
Load balancing up to 4 equal parts
AD is 120
Timers in RIP:
Update Timer: Time between two consecutive updates. Exchanges entire routing table. RIP is 30 secs.
Invalid Timer: Time a router waits for an update from the neighbour. The route is marked unreachable if there is no update for this time period. INVALID TIMER IS 180 SECS
Hold-down Timer: stabilizes the routing table and avoids loops and chooses the next best route. it is for 180 secs.
Flush Timer: Time in which the invalid route is removed from routing table. Flush timer is 240 secs(4 mins)
Convergence time of rip is around 4 mins, which is a huge drawback.
Convergence : Time taken by the router link to go down and come back to online.
Syntax for RIP
Advertise all connected networks.
Verify the Routing table
EIGRP
Enhanced Interior Gateway Routing Protocol.
Open standard protocol (initially cisco proprietary)
Incremental Updates
Max Hop count is 255. (by default its 100)
Administrative Distance is 90.
Metric is Composite metric(BW+load+delay+mtu+reliability)
uses multicast(224.0.0.10) and unicast for neighbor formation.
It supports both equal and unequal load balancing.
Autonomous System Number is a unique number identifying the routing domain of routers (one organization). It is from 1 - 65,535.
How does the EIGRP forms neighbor relationship
lets consider router A and B in this example.
A sends hello packets as a multicast, and B receives and replies back in unicast messages.
Both form the neighbor table.
A sends its complete routing table to B via update packets, B acknowledges it via ACK packets to B.
B sends its complete routing table to A via update packets, A acknowledges it via ACK packets to B.
EIGRP Tables
Neighbor Table: Stores info about neighbor IP addresses.
Topology Table: Stores routing information learned from neighbor routing tables. This table stores every EIGRP route inside the autonomous system
Routing Table: stores best routes to reach a destination network.
EIGRP Syntax
Checking Tables syntax
Convergence time for EIGRP is 15 seconds. Hello packets are exchanged for every 5 secs.

Feasible Distance: total cost between local router to destination router.
Advertised Distance: total cost between next hop router to destination router.
Router-id: id that is used to identify the router in EIGRP.
FD = cost between A TO F.
AD = cost between B to F.
Link Local Distance = cost between A TO B
Feasibility condition
Advertised distance should be less than Feasible Distance.
Best route is called successor.
2nd best route is called feasible successor.
OSPF
Open Shortest Path First is a link state protocol
Open standard
Classless protocol(carries subnet mask info and supports vlsm).
unlimited hop count.
Metric is cost(10^8/B.W).
Administrative distance is 110.
Supports only equal load balancing.
Convergence rate is 40 seconds.
Router-ID
It is a id which helps in uniquely identifying the the router.
1st preference is given for router-id command.
By default it is the highest ip address of active physical interfaces in the router.
If there is a logical address configured then highest of the logical loop back address is taken as router-id.
Seven stages of OSPF
Down
Init
2 way
Ex-start
Exchange
Loading
Full
Down: It is a stage in which both the routers doesnt know about their own status.
Init: Hello messages are sent to other routers over multicast address (224.0.0.5) router-id is sent in hello messages. Then the reply from the router-B is sent to the router A with the unicast messages.
2 way: The routers establish the neighbor relationship and builds the neighbor table.
Exstart: DBD (database decision) packets: this is an kind of packets of update, here the decision is made like whom to sent the routing table information based on the router-id, higher the router id, first it will exchange.
Exchange: The exchange of summary of lsdb takes place between the two routers. (based on the priority the exchange of routing information takes place)
Loading: Router A is going to check its own database, with the database received from the neighbor router. Both the neighbors will ensure that both of them have same synchronized database.
If there is any extra information in the neighbor database then router A requests for the complete entry through LSR packets(link state requests). LSR gets a reply from router B through LSU (link state update). Then router A sends acknowledgement through LSAck.
FULL: Both the routers have same synchronized database, based on that best route is calculated.
best route = 10^8/bandwidth
then the best route is written in the routing table.
Area of the OSPF:
Area is a logical grouping of the routers in a single domain.
All the routers maintain same database with in same area.
Any change will impact all the routers in the area.
Advantages of OSPF
It is done to prevent over head on the router running ospf.
Minimizes the size of data.
Restricts the changes to the area by not affecting other areas.
OSPF Area Design rules:
Area 0 must be setup as a backbone area.
All the non area 0 should be connected to area 0
Atleast one Area border router should be there (connecting two areas).
Interface on the two routers should be in one area/same area.
Syntax for OSPF
Verification Commands
LSA TYPES

Click here for LSA Types Video
LSA -1 : Router LSA: is a type of lsa where the lsa advertisement is only sent inside its area. Floods within the area.
LSA-2 : Network LSA: generated by internal router, except here we have DR and BDR elections and it is also inside the area. DR sending advertisement to other.
In multi access segment, routers are connected to each other using a centralized switch, there will be more network congestion and flooding, as any link update will cause change in lsa state and spf algorithms run and forward to other routers by updateing sequence numbers, so there will be congestion in the network.

DR, BDR AND DROther
DR: Designated Router: its is the one with highest priority or highest router id.
BDR: Backup Designated Router: its is the one with second highest priority or second highest router id.
DROther: Designated Router Other: all the routers apart from DR and BDR.
DR AND BDR election process
we do it in order to reduce the full adjacency and reduce the flooding scope.:
it will take up in 2-way state,
1.highest priority: range 0-255 and by default it is 1. if all the priority is same then it will go to next step. 2.highest Router id: higest router id then it will become DR and other second highest one will become BDR.
DR will become neighbor with BDR till Full state. (Full Adjacent: will exchange Database)
DROther will become neighbor with DR/BDR till Full state. (Full Adjacent: will exchange Database)
DROther will become neighbor with DROther till 2-way state.(without Adjacency: will not exchange Database)

lsa-3 : Summary LSA: Generated by ABR, it is sent from one area to another area.
lsa-4 :summary ASBR LSA: are used to advertise the ASBR information to all other areas in a autonomous system.
Generated by ABR of originating area and is regenrated by all the ABR to flood through out the autonomous system. It contains the router id of ASBR.
LSA-5 :EXTERNAL LSA: It is generated by ASBR, routes coming from other routing protocols and is redistributed into the ospf.
LSA-6 is not used,it is only when multicast routing beyond the scope. cisco doesnt support.
lsa-7 stub, totally stub and nssa
OSPF STUBS are those which helps us in minimizing the routing table and minimise the advertisements, thus preventing the overhead.
OSPF STUBBY AREA
When stub is configured then all the E1/E2 routes will be replaced by single default route. Instead the ABR will maintain specific routes. stops external lsa(lsa -5)

TOTALLY STUB: it is better than stub, in case of normal stubs it prevents external stubs lsa-5, but in case of totaly stub it will prevent lsa 3 and lsa 5 ie., E1/E2 and OIA(ospf inter area) into a single default route
ABR will maintain the specific route. routers in the area as a whole should be made as a stub.

STUB RULE:
AREA 0 CANNOT BE A STUB,
AREA WITH ASBR CANNOT BE THE STUB
AREA WITH VIRTUAL LINK CANNOT BE A STUB
NOT SO STUBBY AREA
NSSA: its a stub with ASBR.
consider when a stubby area is configured and there then are the e1/e2 routes originating from other areas then the lsa-5 will be stopped in the stubby area ABR and is distributed as default route.(normal stubby area behavior)
now lets suppose if in future, if there is a new requirement, that new E1/E2 routes needs to be sent from stubby area, then e1/e2 will not be advertised anywhere in the ospf network, Hence to overcome this, NSSA can be configured.
NSSA when configured, the lsa would be of LSA-7 in stubby area, after crossing the ABR router the lSA-7 (ON1/ON2)is converted into LSA-5 advertisements(E1/E2 routes)

Last updated
Was this helpful?