Zharfpouyan interview question

differences between bgp and ospf and where we use them