Solved

BGP

Posted on 2000-03-15
8
843 Views
Last Modified: 2012-03-07
Here is a nice large question for routing experts out there (I specifically have jlevie in mind).

Basically, I neeed someone to explain, with examples and perhaps weblinks, the BGP routing protocol. Information that would be useful would be :

(0) What is BGP and how does it work
(1) Can Linux do BGP using gated
(2) If so, what would be the requirements (hardware + software)
(3) How does one get an ASN and your own IPs
(4) Can you have an ASN but still get IPs from your service providers
(5) What versions of CISCO IOS support BGP
(6) What are the requirements (hardware + software) to run BGP on a CISCO Router (RAM, IOS etc)
(7) How can I test BGP ona standalone network (i.e through a couple of Linux machines and mini-networks connected via PPP or SLIP links) to see that it actually works.

I'll probably leave the question open for some time, so please post your answers as comments
0
Comment
Question by:stefanx
  • 5
  • 3
8 Comments
 
LVL 40

Expert Comment

by:jlevie
Comment Utility
I can answer this, but it'll take a bit of time. I'll compose the answer off line and post it this evening.
0
 
LVL 8

Author Comment

by:stefanx
Comment Utility
Thanks jlevie. With your record after not even 2 months of being connected to experts-echange, I thought you'd be the sage to ask... ;).

I've found quite a few weblinks on this topic, but nowhere is a good complete reference. Also, I'm sure not many of us can aford to have a couple of idle CISCO routers to play with and see how it works, so I'm hoping that I can figure it out with a couple of Linux boxes running gated simulating a real environment out there.

If you think there is anything I need to know about RIP, EGRP, OSPF and so more, please include it. I haven't really had the opportunity to play with much more than static routes and subnetting which is hardly rocket science. However, I'm likely to have to be involved in multi-homing an ISP and establishing peering connections in the near future and therefore I really need to know how to go about this.

Thanks for your help in advance.
0
 
LVL 40

Accepted Solution

by:
jlevie earned 300 total points
Comment Utility
(0) What is BGP and how does it work

BGP is the Border Gateway Protocol and was developed by the IETF as a replacement for the Exterior Gateway Protocol (which had problems with scalability and reliability). It's main purpose is to provide the exteror routing services that are needed in cases where there are multiple high speed links from large network segments (although it's not strictly required just for multihomed routers). The specification of BGB is found in RFC 1771 (http://www.ietf.org/rfc/rfc1771.txt?number=1771).

BGP is a very complex routing protocol and is typically only used on very fast, very large routers with tons of memory. The last number I remember seeing was that there were some 50,000 entires in the full Internet routing table (& growing all the time). Substantial bandwidth is required just to receive the table and a lot of router cpu and memory resources are consumed in the process of using it. Because of the complexity of the protocol and the havoc a misconfigured BGP router can wreak, normally only senior network engineers are allowed to (or should be allowed to) work with exterior routers that run BGP. A botched configuration affects not only the local router but all routers that it exchanges routes with (and their neighbors an so on).

In short, BGP works by maintaining a router table that lists all possible paths to any given network. The BGP routers are constantly keeping themselves and their neighbors up to date by the exchange of incremental routing updates. The routing information specifies the "path attributes", which include the origin of the info, a sequence of autonomous-system path segments, and next-hop info. The BGP router determines the best path, in the case of multiple paths to the same destination, and also propogates that path to its neighbors. There are a number of factors that are a part of the decision as to what constitutes the best path (such as next-hop, admin weights, local prefs, the origin of the route, and path length, and other BGP config factors). A more complete treatment (and a good reference on BGP in general) is "Internet Routing Architectures" by Bassam Halabi, published by Cisco Press.


(1) Can Linux do BGP using gated

I have no idea, but I'd guess that it can't. BGP is of limited use and where it would be employed the networking requirements would dictate the need for a High End router, probably with lots of different interfaces at least some of which would have speed requirements that equal or exceed the possible bus bandwidth of an intel architecture system. And even if gated could participate in BGP, it wouldn't be useful as a learning tool because the configuration process and commands (that are critical to getting a router's config right) will be completely different. Unless you've worked fairly extensively with Cisco routers and the more sophisticated routing protocols (OSPF, BGP) in a complex network (multiple interior routers, and multiple WAN (interior and exterior) links, you probably don't yet appreciate the significance of that last statement... but you will...

(2) If so, what would be the requirements (hardware + software)

See (1)

(3) How does one get an ASN and your own IPs

ASN's and IP blocks are centrally assigned, by ARIN (www.arin.net) in the US. Unless you are a very big player you won't get either of those from ARIN directly. Typically ASN's and IP blocks are obtained from your Service Provider, who in turn got netblocks either from their upstream provider or directly from ARIN. An well connected ISP gets netblocks from a major carrier (MCI, Sprint, etc) and usually the major provider would arrainge for the ASN's to be assigned.

(5) What versions of CISCO IOS support BGP
(6) What are the requirements (hardware + software) to run BGP

It's not the version that's important, but the feature set and hardware platform. Realisticly you're probably talking about a 7000 or better. The router config will be largely driven by the enviorrnment it operates in (what kinds of exterior links there are, how many interfaces are needed, etc.). I think I've got something that lists the minimums, but I didn't bring any of that documentation home with me. I'll see what I've got tomorrow and add another comment.

7) How can I test BGP on a standalone network

I don't think you can, certainly not in a way that's applicable to the real world. Cisco has a document on the recommended set up for a BGP lab, but I didn't think to bring that home either... Guess I need to add that tomorrow also.
0
 
LVL 8

Author Comment

by:stefanx
Comment Utility
Whew, and there's me thinking maybe one needs to go BGP if you want to just multi-home with two lines. OK, seeing that BGP is such an animal, let me sketch the scenario a bit more accurately and then ask for your device.

Here in South Africa, we have about 5 first tier providers that have international connectivity (see http://www.ispmap.org.za). The ISP I work for connects to the 1st tier provider SAIX with a total of 512K (it is split over multiple lines, but let's assume it is just one line for simplicity's sake).

Our IP's are assigned by SAIX, but we are now considering taking another line to another first tier ISP, first for redundancy and secondly for additional bandwidth. South Africa also has two peering points named JINX and CINX and the ISP is also considering connecting to one of these (JINX).

Now the second ISP would normally give us additional IP's but this is not what I want. It also doesn't help for them to just put a static route to our existing IP's since this would not be propagated very far and thus doesn't help us much with redundancy further than a couple of routers up. I also don't want the second line to be used only for redundancy either (i.e define two static default gateways with different metrics), and the CISCO will automatically fall back on the second default route if the line connected to the first default route should drop. IN terms of the peering line to JINX, I would only be able to use this for peering purposes to ISP's connected there, so I would need to advertise only our IP's there as every other ISP does (I would guess this could be simple RIP, but I don't think that is what is used there).

What I thus need is a routing protocol that will advertise both our routes to the world out there as well as provide some rulesets on which line may be the best to use at any given time. The latter is complex because it may be dependent on the amount of hops to the destinaton, the availability of bandwidth at that time (i.e how much traffic is flowing in all three lines). It may for example sometime be better to use a direct feed from one of our ISPs than the peering link because the peering line is saturated). So I thought BGP was the only real option.

Another link that may be of interest to you is the BGP mapping map for South Africa, which you can find at  http://www.bgp.org.za. I don't understand fully how to interpret this map, but I would guess that any line between nodes indicates the existence of an advertised BGP route. The interesting thing is that many of the ISP's with their own ASN's are tiny little ISPs, and some are just commercial corporations and not even ISPs. So how did these organizations get ASN's and IP's from Arin ?
I also know for a fact that some of these are running on CISCO 3600's and I remember from the JINX specifications that even a 1600 or 2500 series will do?

Are we missing something? Perhaps there is something like partial BGP that limits the size of the internal routing table and hence has lower hardware requirements? Is there any other routing protocol that can do this?

Your recommendations appreciated.
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 40

Expert Comment

by:jlevie
Comment Utility
I may have unintentionally mislead you with regard to BGP and routers. The way your question was phrased it sort of sounded like, "I've heard about this neat thing called BGP and wanna do it on my local net." Had I known a bit more, as is detailed in your last comment, I think I would have phrased the response a bit differently.

In this particular case (oh, and by the way I can't seem to get to either of those pages for for some reason), I think that BGP is the right solution, primarily because you do need the intelligence in the routing protocol to compute the best current path. The other methods of multihoming and load balancing pre-supppose that the path cost stays pretty much constant. I don't think that's a valid assumption in this case.

Yes BGP will run, and quite well, on routers a lot smaller than a 7000+. As long as you've got the memory (my philosophy tends towards "how much memory & flash can I cram in") and an IOS feature set that supports BGP, you can use it. As a quick estimate, a 3600 seems reasonable for what you've described, but a 2600 would probably work. The link speeds aren't that high and you won't have that many of them. Whenever possible I try to use a bit bigger router than is absolutely necessary... Somehow or other it seems that the loads grow faster than the money to upgrade equipment. The comment about running BGP on 7000 series has more to do with high speed (multiple T3's or OCn's), which is usually where you find BGP more generally in use here in the US.

I'd recommend talking to your upstream providers about getting the ASN, they should be used to dealing with the issue and ought to know exactly how to accomplish it for you. It can be done directly, but that's a lot of work and you are already paying the upstream provider to provide those sorts of services to you. I always go first to the upstream provider, and only go direct to ARIN (in my case) when I can't get the provider to do it.

Some useful references, if you don't already know about or have them:

"Cisco Router Configuration; ISBN 1-57870-022-1
"Internet Routing Architectures; ISBN 1-56205-652-2
"Designing Network Security"; ISBN 1-57870-043-4
"Top-Down Network Design"; ISBN 1-57870-069-8

0
 
LVL 40

Expert Comment

by:jlevie
Comment Utility
I haven't heard anything from you in a while, are we done with this or is there more that I can do?
0
 
LVL 8

Author Comment

by:stefanx
Comment Utility
Thanks jlevie - got sidetracked on some heavy project stress. Your answer was most welcome although I was hoping for online references rather than having to buy any books. But thanks a lot anyway, any chance that you know something about "partial BGP" i.e not storing all the possible CIDR routes in the world on a router? Also, best I have available is a 2522 with 16MByte of RAM as well as a couple of 2501's. It doesn't sound as if this will be good enough :(

PS: Have been really impressed with your UNIX/Routing/Linux experience - good to get to know you ;)
0
 
LVL 40

Expert Comment

by:jlevie
Comment Utility
There are lots of on-line references on Cisco's site, but I don't know that you can get to much past the "PR" stuff without a Cisco contract and login. And there may be other on-line resources also. I've never bothered to search them out, as I have direct access to Cisco & the books. You ought to have the Cisco DOC cd if you purchased the router and it has a fair bit of info on it.

I'll go see what I can dig up about partial BGP.
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now