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 :
- 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.
- 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?