3

First of all, I am a newbie to Bird and BGP routing. My question is, how can a router route traffic towards a lower router and segment from a one /22 prefix to four /24 prefixes?

I tried to setup a network topology as below (addresses are just an example):

IXP 10.10.0.2/20
 | 
 |
 eth0:10.10.0.40/20
 | 
 R1 -- dummy0: 180.200.0.1/22
 |
 eth1:180.201.100.2/29
 |
 |
 eth0:180.201.100.3/29
 R2
 |__eth1.101:180.201.101.4/24
 |__eth1.102:180.202.102.1/24
 |__eth1.103:180.202.103.1/24
 |__eth1.104:180.202.104.1/24
12
  • I don't really understand your question. BGP can only advertise prefixes that actually exist in the router's routing table. The one exception is using an aggregate address, which by default advertises the aggregate and individual prefixes in the aggregate that exist in the routing table, but can be configured to advertise only the aggregate prefix. It creates a route to a blackhole for the aggregate, and it will continue to advertise the aggregate as long as there is even one prefix in the aggregate in the routing table.
    – Ron Maupin
    Oct 16, 2017 at 14:50
  • R1 advertises /22 but I need four segments on R2. R2 is a RR client from R1. R2 only advertises to R1. My question is, is this a correct way to route the /22 to R2?
    – richard
    Oct 16, 2017 at 14:54
  • If R2 has those four prefixes, then what is the problem? It can advertise them to R1 as individual, aggregate, or both.
    – Ron Maupin
    Oct 16, 2017 at 14:58
  • How should I route to R2 from R1. Do I need static routing on R1 to forward to R2? Like 180.201.100.0/22 via 180.201.100.3?
    – richard
    Oct 16, 2017 at 15:02
  • You configure BGP neighbors, and BGP takes care of it for you. If the BGP neighbors are in the same AS, then it is iBGP, but if they are in separate ASes, then it is eBGP. I still don't see the problem.
    – Ron Maupin
    Oct 16, 2017 at 15:04

1 Answer 1

1

It sounds like your question is really just simple routing. Your R2 can advertise any routes about which it knows to R1, either through an IGP, iBGP, or both. R1 can then use eBGP to advertise the aggregate prefix to your ISP, which advertises it to the Internet. Any traffic on the Internet that is destined for any address in that aggregate prefix will be routed to your ISP, which in turn routes it to your R1.

When R1 receives the traffic destined for the aggregate, it will look in its routing table to decide where to send the traffic inside your network. Any traffic destined for the aggregate, but having no individual network inside your network, will be blackholed.

Your router will send traffic to the interface in your routing table that has the longest match. The aggregate black hole will have the shortest match for any networks you do have in your network, so it will only get traffic for which there is not a longer prefix. Basically, if the traffic is destined for a network in the routing table, it gets delivered to that network, otherwise it gets dropped.

4
  • Sounds good, but how do I prevent that the full table on R1 is forward to R2? I only want so advertise the default route to R2.
    – richard
    Oct 17, 2017 at 9:46
  • Is this a correct config: protocol bgp R1_TO_R2 { local as myas; neighbor as 65001; source address 180.201.100.3; import none; import filter as_65001_import; }
    – richard
    Oct 17, 2017 at 9:53
  • The simplest thing to do is to have your ISP only advertise a default route to you. If you only have one ISP, the it really makes no sense to get anything other than that. Also, with a single ISP, you really do not need to run iBGP within your network. An IGP, e.g. OSPF makes more sense, and you can inject a default route into it, and it will not pick up any BGP learned routes unless you redistribute them from BGP into OSPF.
    – Ron Maupin
    Oct 17, 2017 at 13:49
  • There is no ISP, we get a full table from the IXP.
    – richard
    Oct 18, 2017 at 9:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.