BGP (border gateway protocol) is something which is used on the internet to advertise a network to another network. This is necessary to make the internet work. Without this, the internet would probably be less flexible as it is in these days. In my work as a network administrator, I often work with BGP and I learned a lot of it. I want to share my knowledge so I will try to explain to you the following:
If you don't understand, feel free to mail me, the address is below. I assume that you will have basic network knowledge, TCP/IP knowledge and it would be nice if you have experience configuring a router. AND you may not be named Chantalle. First thing you need is a router which speaks BGP. Most vendors which sell routingequipment have BGP routers, Cisco and Juniper are two examples. If you don't have a real router, you can use *ix box running Zebra. Personally I use Zebra on a linux box with a p100 and 16megs of RAM. I have got it working on a FreeBSD box as well. If you want to use Zebra for professional purposes I'd recommend using some form of BSD (ie FreeBSD, NetBSD or OpenBSD) with at least a P200 and 128megs of RAM. Second thing you need is at least one other router that speaks BGP. This can be your ISP or simply a tunnel to a friend. Again, this router may as well be simple PC-hardware running Zebra. Suppose you are a network administrator. Your network has about 400 hosts so it is possible that your ISP has assigned you a /23 (which is 512 IP addresses). If this ISP fsckes up, you have a problem. The ISP does the routing for you and you can not just go to another ISP because that would force you to renumber. If this new ISP turns out to have even more downtime, you would have to renumber again. So what you want is to be able to switch ISP's whenever you want, and even better: you want it automatically. That is all possible. First of all you arrange your own IP space. This is called PI (Provider Independent) assigned. Now we have a problem. How does my ISP know which IP space I have? This is the part where BGP kicks in. Let's say we have 192.168.128.0/23. Our first provider has 10.0.0.0/16 and our second provider has 172.16.0.0/19: ![]() What we want is to tell ISP1 and ISP2 about our 192.168.128.0/23 and hear about their 10.0.0.0/16 and 172.16.0.0/19. In order to do so, the first thing is to have unique identifiers so we would know who is who. In BGP we use so-called Autonomous System Numbers (ASN's). A network is referred to as Autonomous System (AS). To make it more clear, we are an AS, ISP1 is an AS and ISP2 is an AS. So let's say we are ASN65003, ISP1 is ASN 65001 and ISP2 is 65002. You can request your own real ASN the same way you requested your PI IP space at RIPE, ARIN, APNIC or your specific RIR. Telling another AS what network numbers we have is called announcing. Basically we announce our own network to other network, and they announce themselves to us. This is called peering. It is also possible to have them announce us to their other peers. So if ISP2 would be connected to ISP3, with whom we don't have a direct connection, this is called transit. Our traffic flows through the network of ISP2. Since we want 2 uplinks (multihomed) we have ISP1 and ISP2 as our transit providers. We tell them who we are and they give us all the information they have about other networks. These examples are based on Zebra's configuration. Cisco's syntax is similar to Zebra's. First we need to configure our ASN: ! router bgp 65003 ! Next our router ID. This is usually the IP of the outgoing interface. !   bgp router-id 192.168.0.1 ! Tell which network we are advertising: !   network 192.168.0.0/23 ! And who our ISP's (neighbors) are: !   neighbor 10.0.0.1 remote-as 65001   neighbor 172.16.0.1 remote-as 65002 ! We now have the following configuration: ! router bgp 65003   bgp router-id 192.168.0.1   network 192.168.0.0/23   neighbor 10.0.0.1 remote-as 65001   neighbor 172.16.0.1 remote-as 65002 ! NOTE: This is very basic. Do NOT use this on a live network. BGP4 offers you a set of very cool options, including but not limited to:
|
(c) 2001 Sabri Berisha (sabri@cluecentral.net)
Permission hereby granted to copy and mirror this anywhere as long as you refer
to me as the author with a link to my emailaddress. And keep it up to date.