How to find which routing protocol a router is using. And if found how to test it

bgpnetworkingospfrouting

I was recently asked a networking question in an interview which I did answer but the interviewer was not pleased.
The question was :
"Given an actively running router, how would you know what routing protocol is the router using, specifically how would you know if it is running OSPF or BGP? After you have found out what it is running, give any test cases you would use to test the protocol if it is running fine or not"

I gave the answer assuming he was asking the differences between OSPF and BGP.
My answers were based on the following topics that I had learned :

  1. If the router is running OSPF, it means it is using port number 89. So if we were to use a packet sniffer, we can see which port number is being used and decide if its ospf or bgp. Plus, BGP packets contain the AS number in the data field which ospf doesnt.
  2. Now how do we test the ospf? Well, we can see if the router is sending out LSA s , and what the routing table looks like. BGPs routing table would be different than OSPF.

At this point he asked me if there are any better methods to find out if BGP or OSPF. Also if I knew how to test if OSPF has just started running, if it is already running , or if it has failed. No matter how much I tried to answer, he kept on saying "give me a better way"

So, are there any other ways to differentiate which protocol is running on a router and to test any protocol in general?

Best Answer

show ip route--command will give you the output of running protocol and routes on cisco routers, you can identify the which routing protocol is running on routers by its codes.

Codes:

  • C - connected,
  • S - static
  • I - IGRP
  • R - RIP
  • M - mobile
  • B - BGP
  • D - EIGRP
  • EX - EIGRP external
  • O - OSPF
  • IA - OSPF inter area
  • N1 - OSPF NSSA external type 1
  • N2 - OSPF NSSA external type 2
  • 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
  • ia - IS-IS inter area
  • * - candidate default
  • U - per-user static route
  • o - ODR
  • P - periodic downloaded static route

_E.g.:

 o - 192.168.1.0/24 via 10.10.1.2 00:00:3 serial 2/0

(O - indicates ospf running on router)

Related Topic