We're now going to look at how we insert prefixes into BGP. In these examples we will use Cisco IOS for the configuration example. Your vendor, your own implementation, may use very similar syntax or at least the similar concepts in the syntax. In IOS there are two ways to insert prefixes into BGP. These are commonly used in Internet industry today by network operators and we'll take a quick look at the two of them. The first one up is something called "redistribute static". What redistribute static does, it will take all the static routes configured on the router and introduce them into BGP. Now if you remember back to the earlier presentation, each routing protocol has different RIBs. So for example, BGP will have its own RIB, ISIS has its own RIB, OSPF has its own RIB. And of course static routes are entered directly into the global RIB as well. So what the redistribute static basically says, lift the static routes out of the global RIB and introduce them into BGP's RIB. When I said earlier "all", be very careful with "all", because the redistribute static command will take every single static route and put it into BGP. So you need to be really careful with doing this, because it really will move every single static route into BGP, whether you want the route or not. Generally when I'm helping folks get up and running with BGP, I recommend to be careful with the redistribute static, and look at the more simpler alternative before we move into using the redistribute static which, I consider, many operators, consider a more advanced feature for network operators. So the redistribute static will redistribute everything into the other routing protocol, in this case BGP. It won't scale if it's uncontrolled. And certainly for newcomers to implementing BGP on the networks, it's best avoided until you have a proper understanding of how BGP functions, especially how the policy language is implemented. So we'll look at the "network" statement as the alternative. The network statement is actually quite simple and quite direct. What it does under the BGP process, it simply says, if you see this entry in the global RIB, put it into the BGP RIB. And the simplest way of putting an entry into the global RIB is set up a static route. So the static route can point to a customer, or some other interface, whatever you need to use it for. So once that entries in the global RIB, BGP will simply put it into the BGP RIB and it gets shared around between other BGP neighbors according to the policy you have implemented. Note that in both cases we have a static route. With the network statement with the static route pointing to a physical point-to-point interface. With the redistribute static configuration, we had the same static route. So static route has the same function, putting an entry into the global RIB, so that you can then use it with BGP. And as you get more experience with using the BGP network statement, as you start implementing more complicated policy, you may consider moving from using the network statement to using the static route redistributed as we will see much later on in this presentation series.

© Produced by Philip Smith and the Network Startup Resource Center, through the University of Oregon.

Attribution-NonCommercial 4.0 International (CC BY-NC 4.0)
This is a human-readable summary of (and not a substitute for) the license. Disclaimer. You are free to: Share — copy and redistribute the material in any medium or format Adapt — remix, transform, and build upon the material The licensor cannot revoke these freedoms as long as you follow the license terms. Under the following terms: Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use. NonCommercial — You may not use the material for commercial purposes. No additional restrictions — You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits.