5

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?

pradaa
  • 51
  • 1
  • 1
  • 2
  • 1
    show ip route ospf, show bgp, show ip bgp etc – dmourati Feb 08 '15 at 22:27
  • 1
    Are those commands for CISCO proprietary routers ? He was looking for a general answer. – pradaa Feb 08 '15 at 22:38
  • Cisco command lead the standard, the ccna test got no competition too. – yagmoth555 Feb 09 '15 at 00:53
  • 1
    89 is the protocol number for OSPF, not the port number. You got that one very wrong. – Ricardo Feb 09 '15 at 01:42
  • @Ricardo yes i figured that out after the interview. But anyways the interviewer wanted a clearly different/generic answer. – pradaa Feb 09 '15 at 05:21
  • 1
    "Given an actively running router, " - please give me the router, specify the brand or get me an interviewer smart enough to realize not all routers are made identical. The solution is different between Cisco, Extreme Networks, Mikrotik RouterOS. – TomTom Jun 09 '16 at 07:33

2 Answers2

2

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)

Castaglia
  • 3,239
  • 3
  • 19
  • 40
user346467
  • 21
  • 2
-2

Type show ip routeon the router, it will show the routing list on routers. And you can point out what kind of routing protocol the router is using by protocol numbers and names.

technoob
  • 132
  • 1
  • 14