[prev in list] [next in list] [prev in thread] [next in thread]
List: bird-users
Subject: Re: BGP Default route
From: dspazman () epicup ! com
Date: 2013-03-29 22:45:29
Message-ID: 1364597129.992616728 () apps ! rackspace ! com
[Download RAW message or body]
Yeah, I've tried similar to that. I'm using multiple kernel tables and pipes though, \
so it is a little more complicated then that.
Let me give you my config for that bgp session.
define myas = 54XXX;
define linkc = 16XXX;
define gatewayc = X.X.X.X;
.
.
.
protocol static static_default_route {
route 0.0.0.0/0 reject;
}
function net_linkc() {
## ip blocks they can export
return net ~ [ X.X.X.X/22+ ];
}
dunction rt_import_linkc() {
if net_linkc() then return true;
return false;
}
function rt_export_linkc() {
if proto = "static_default_route" then return true;
if source != RTS_BGP then return false;
if net_martian() then return false;
if bgp_path.len > 64 then return false;
return bgp_path.first ~ [ myas, linkc ];
}
protocol kernal k_c {
table ispc;
export all;
kernal table 5;
scan time 15;
}
filter bgp_in_uplink_c {
if ! rt_import_linkc() then reject;
accept;
}
filter bgp_out_uplink_c {
if ! rt_export_linkc() then reject;
accept;
}
protocol pipe p_c {
table master
peer table ispc;
import filter bgp_in_uplink_c;
export filter bgp_out_uplink_c;
}
protocol bgp bgp_c {
table ispc;
import all;
export all;
local as myas;
neighbor gatewayc as linkc;
}
-----Original Message-----
From: "Wojciech Dec" <wojtek@systemx.com.pl>
Sent: Friday, March 29, 2013 3:25pm
To: bird-users@atrey.karlin.mff.cuni.cz
Subject: Re: BGP Default route
W dniu 2013-03-29 23:15, dspazman@epicup.com pisze:
> I'm having a problem with sending a default route.
>
> I have two providers I provide a full routing table to through BGP. I'm trying to \
> set up a 3rd BGP session on another interface to a downstream client, so I can take \
> his announced prefixes and announce them to my upstream ISPs. The main issue is \
> they only want me to export the default route (0.0.0.0/0) to them, not the full \
> table.
> Does anyone have a simple example of this, exporting just the default route to a \
> downstream client, but accepting his prefix (X.X.X.X/24).
Hi,
Maybe this is not the best solution but it works :)
Make a new protocol
protocol static default_originate {
route 0.0.0.0/0 reject;
}
add to a export filter
if proto = "default_originate" then {
accept;
}
regards
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic