Hello all, I want to setup BIRD to anounce BGP routes for my AS. We have two backbone providers so I'll need to make two BGP connections. I only need to anounce routes and don't want to import them. I also want on the second BGP conection to prepend our AS several times, so this route should be less prefered. I have worked out a draft bird configuratioan, but some things are unclear to me. ## bird.conf ## protocol bgp one { local as 65333; # our AS (let say it is) neighbor peer.one.ip as [theiras]; # peer one and their AS multihop 20 via my.next.hop.ip; # not directly connected import none; export ; # this part is not clear to me # I want to export my whole a.b.c.d/19 # network. What do I put here. source address x.y.z.w; # The IP address of my router } protocol bgp one { local as 65333; # our AS (let say it is) neighbor peer.two.ip as [theiras]; # peer two and their AS multihop 20 via my.next.hop.ip; # not directly connected import none; export ; # Same thing as above, but prepend our AS # several times, so this route is less # prefered source address x.y.z.w; # The IP address of my router } -- Damjan Georgievski | Дамјан Георгиевски Skopje, Macedonia | Скопје, Македонија
Damjan <gdamjan@mail.net.mk> writes:
Hello all, I want to setup BIRD to anounce BGP routes for my AS. We have two backbone providers so I'll need to make two BGP connections. I only need to anounce routes and don't want to import them. I also want on the second BGP conection to prepend our AS several times, so this route should be less prefered.
I have worked out a draft bird configuratioan, but some things are unclear to me.
## bird.conf ##
protocol bgp one { local as 65333; # our AS (let say it is) neighbor peer.two.ip as [theiras]; # peer two and their AS multihop 20 via my.next.hop.ip; # not directly connected import none; export ; # Same thing as above, but prepend our AS # several times, so this route is less # prefered
source address x.y.z.w; # The IP address of my router }
protocol bgp one { local as 65333; # our AS (let say it is) neighbor peer.two.ip as [theiras]; # peer two and their AS multihop 20 via my.next.hop.ip; # not directly connected import none; export ; # Same thing as above, but prepend our AS # several times, so this route is less # prefered
source address x.y.z.w; # The IP address of my router }
Are you sure you want to run two BGP processes? Not just one process with two peers? protocol bgp one { local as 65333; # our AS (let say it is) neighbor peer.one.ip as [theiras]; # peer one and their AS multihop 20 via my.next.hop.ip; # not directly connected neighbor peer.two.ip as [theiras2]; mutlihop 20 via my.next.hop.ip; import none; export filter { if bgp_next_hop = peer.two.ip then { bgp_path.prepend(65333); bgp_path.prepend(65333); bgp_path.prepend(65333); } accept; }; source address x.y.z.w; # The IP address of my router } Without any warranty :-) I have never configured BGP. -- ------------------------------------------------------------------------- David Rohleder davro@ics.muni.cz Institute of Computer Science, Masaryk University Brno, Czech Republic -------------------------------------------------------------------------
Are you sure you want to run two BGP processes? Not just one process with two peers?
protocol bgp one { local as 65333; # our AS (let say it is) neighbor peer.one.ip as [theiras]; # peer one and their AS multihop 20 via my.next.hop.ip; # not directly connected neighbor peer.two.ip as [theiras2];
... This can work in BIRD? I thougt you do NEED a separate "process" (or protocol instance) for each BGP peer. Anyway I'll be doing some tests these days, and I'll inform you of the results.. BTW - I've noticed that without a "protocol device {..." BIRD doesn't populate its route-ing table. Is this normal? My situation was: two static protocols, and one BGP protocol. In the CLI "show route" didn't return anything, then I added the "protocol device {..." stuff, the routes showed, and BIRD started to make connections with it's BGP peer. -- Damjan Georgievski | Дамјан Георгиевски Skopje, Macedonia | Скопје, Македонија
Hello!
Are you sure you want to run two BGP processes? Not just one process with two peers?
Bird doesn't recognize routing processes and their peers -- just instances of the protocol, each having a single neighbor. Have a nice fortnight -- Martin `MJ' Mares <mj@ucw.cz> http://atrey.karlin.mff.cuni.cz/~mj/ Faculty of Math and Physics, Charles University, Prague, Czech Rep., Earth What color is a chameleon on a mirror?
Hello!
I want to setup BIRD to anounce BGP routes for my AS. We have two backbone providers so I'll need to make two BGP connections. I only need to anounce routes and don't want to import them. I also want on the second BGP conection to prepend our AS several times, so this route should be less prefered.
I have worked out a draft bird configuratioan, but some things are unclear to me.
## bird.conf ## protocol bgp one { local as 65333; # our AS (let say it is) neighbor peer.one.ip as [theiras]; # peer one and their AS multihop 20 via my.next.hop.ip; # not directly connected import none; export ; # this part is not clear to me # I want to export my whole a.b.c.d/19 # network. What do I put here. source address x.y.z.w; # The IP address of my router }
First of all, you need to have the route in your routing table to have it exported. Usually, it's a good idea to define a sink route for your whole address block, so that packets to non-existent destinations in your block are not sent back and forth between your router and your provider's router. Hence: protocol static { route 1.2.0.0/19 reject; } Then you can tell the bgp's to export just this route: protocol bgp one { ... export where net = 1.2.0.0/19; }
protocol bgp one { local as 65333; # our AS (let say it is) neighbor peer.two.ip as [theiras]; # peer two and their AS multihop 20 via my.next.hop.ip; # not directly connected import none; export ; # Same thing as above, but prepend our AS # several times, so this route is less # prefered
Here you can use the following filter: export { if net != 1.2.0.0 then reject; bgp_path.prepend(1234); bgp_path.prepend(1234); bgp_path.prepend(1234); accept; }; Have a nice fortnight -- Martin `MJ' Mares <mj@ucw.cz> http://atrey.karlin.mff.cuni.cz/~mj/ Faculty of Math and Physics, Charles University, Prague, Czech Rep., Earth Diplomacy is an art of saying "nice doggy" until you can find a rock.
participants (3)
-
Damjan -
David Rohleder -
Martin Mares