Skip to content

Border Gateway Protocol

  • Labs

This post will be about BGP. I find BGP quite fascinating because it is the only Exterior Gateway Protocol we use today. BGP in networking is based on TCP/IP. It operates on the OSI Transport Layer to control the Network Layer as specified on Techtarget but there are some discussions on the internet it sits on Application layer because it has its own assigned port number 179 which is typical for Application layer protocols.

Autonomous system

AS is a large network such as Internet Service Provider, enterprise like Cloudflare or datacenters. They are all assigned AS number by Internet Assigned Numbers Authority (IANA) to regional internet registries. They run Internal Gateway Protocols such as OSPF, EIGRP and IS-IS. At their edge runs BGP protocol configured to propagate chosen networks within Autonomous Systems.


I made a simple configuration in GN3 and demonstration on Cisco 7200 routers about BGP, OSPF and EIGRP. There is a fictional AS 1111 and AS 2222 which are connected over BGP.

These commands into Cisco ISO router configuration mode. Then we decide what networks inside the AS we want to advertise.

# BGP 1
router bgp 1111
  neighbor remote-as 2222

# BGP 2
router bgp 2222
  neighbor remote-as 1111

Besides that, you need to configure EIGRP and OSPF but we can also use another dynamic routing protocol within AS.

Image above is the routing table on OSPF router that learned the route distributed from the BGP1 routers. Route leads to AS 2222 network. We don’t see here the network between BG2 and EIGRP router because we don’t advertise it as BGP route in BGP2 router.

As you can see the route is displayed similarly but as EIGRP external route received. It points exactly to clients network in the AS 1111.

And the connection works.