[quagga-users 14051] Re: Redistributing a kernel default into BGP

Michael Moffatt michael at moffatt.org.nz
Thu Jul 16 22:49:22 BST 2015


Hi Ajinkya,

To originate the default route into the BGP table you should use the
network statement in your RD1 config:

#router bgp 64998
# network 0.0.0.0/0

HOSTNAME[1]#sh ip bgp
BGP table version is 1, local router ID is 1.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i -
internal, l - labeled
              S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 0.0.0.0/0        0.0.0.0                       100  32768 i
*> 172.30.1.1/32  0.0.0.0                            32768 ?

This I believe is also the case for Cisco routers. Introducing a default
route in BGP is sometimes not cool, which I think is why there is a
special case for it.

Regards,
Michael Moffatt.

> Hi Michael,
>
> Thank you for the prompt reply.
> You guessed it right, I also have RD1, apart from the default RD0.
> I do have BGP enabled in both RDs and all the above outputs are from RD1
> (imish -r 1, router[1]#).
>
> net route-domain 0 {
>     id 0
>     routing-protocol {
>         OSPFv2
>         BGP
>     }
> }
>
> net route-domain rd1 {
>     id 1
>     parent 0
>     routing-protocol {
>         OSPFv2
>         BGP
>     }
> }
>
>
> If I advertise a non-default virtual server (172.24.0.0/16) from RD1 (the
> way you did above),
> that kernel route can be seen in BGP. But that is not the case for a
> default virtual server (0.0.0.0/0).
> If you can test at your end by advertising a default virtual server, that
> would be really helpful.
>
> router[1]#show ip route
> Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP
>        O - OSPF, IA - OSPF inter area
>        N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
>        E1 - OSPF external type 1, E2 - OSPF external type 2
>        i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter
> area
>        * - candidate default
>
> Gateway of last resort is 0.0.0.0 to network 0.0.0.0
>
> K*      0.0.0.0/0 is directly connected, tmm0
> C       127.0.0.1/32 is directly connected, lo
> C       127.1.1.0/24 is directly connected, tmm0
> K       172.24.0.0/16 is directly connected, tmm0
> C       172.14.0.4/30 is directly connected, VLAN_701
>
>
> router[1]#show ip bgp
> BGP table version is 6, local router ID is 1.1.1.1
> Status codes: s suppressed, d damped, h history, * valid, > best, i -
> internal, l - labeled
>               S Stale
> Origin codes: i - IGP, e - EGP, ? - incomplete
>
>    Network          Next Hop            Metric     LocPrf     Weight Path
> *> 172.24.0.0       0.0.0.0                                    32768 ?
>
> Total number of prefixes 1
>
>
> Thank you.
> Ajinkya
>
> On Thu, Jul 16, 2015 at 4:36 PM, Michael Moffatt <michael at moffatt.org.nz>
> wrote:
>
>> Hi Ajinkya,
>>
>> If your network is actually part of another route-domain, say RD1, then
>> make sure to issue the command in that route-domain, so for example from
>> the BIG-IP bash prompt:
>>
>> ---
>> [root at HOSTNAME:Active:Standalone] # imish -r 1
>> HOSTNAME[1]>ena
>> HOSTNAME[1]#sh ip route k
>> K       172.30.1.1/32 is directly connected, tmm0
>>
>> Gateway of last resort is not set
>> HOSTNAME[1]#show ip bgp
>> BGP table version is 1, local router ID is 1.1.1.1
>> Status codes: s suppressed, d damped, h history, * valid, > best, i -
>> internal, l - labeled
>>               S Stale
>> Origin codes: i - IGP, e - EGP, ? - incomplete
>>
>>    Network          Next Hop            Metric LocPrf Weight Path
>> *> 172.30.1.1/32  0.0.0.0                            32768 ?
>>
>> Total number of prefixes 1
>> ---
>>
>> Notice that I also used the command "show ip bgp" to see that the route
>> was in BGP.
>>
>> If you do not specify the route-domain then imish will assume RD0. If
>> there is no BGP enabled in tmsh and/or configured in imish for that
>> route
>> domain, then the result will be no output.
>>
>> [root at HOSTNAME:Active:Standalone] # tmsh list net route-domain
>> /Common/MY_RD_NAME routing-protocol
>> net route-domain MY_RD_NAME {
>>     routing-protocol {
>>         OSPFv2
>>         BGP
>>     }
>> }
>>
>> You can execute the commands without entering interactive mode by using
>> the -e. E.G: to execute commands in RD1, use:
>>
>> # imish -r 1 -e 'show ip route'
>>
>> Hope this helps,
>> Michael Moffatt.
>>
>> > Hello list,
>> >
>> > We have a couple of devices (f5) in our network and they are shipped
>> with
>> > zebos for anything routing.
>> > I realize that the f5 community might be the right place to ask this
>> > question, and I have, but I also wanted
>> > to consult this list since apart from vendor docs, I've also referred
>> > http://www.nongnu.org/quagga/docs/docs-info.html
>> > if I run into any issues.
>> >
>> > The vendor has this concept of virtual servers that are essentially
>> kernel
>> > routes.
>> > All I'm trying to do is to redistribute a kernel route into BGP, and
>> > although that's a straight forward task ("redistribute kernel"
>> > in the BGP config), I cannot see the route in "show ip bgp". The
>> kernel
>> > route in question here is a default route that I'd like
>> > to export to the upstream router.
>> >
>> > BGP Config:
>> > router[1]#show run router bgp
>> > !
>> > router bgp 64998
>> >  bgp router-id 1.1.1.1
>> >  bgp log-neighbor-changes
>> >  bgp graceful-restart restart-time 120
>> >  redistribute kernel
>> >  neighbor 172.14.0.4 remote-as 1111
>> >  neighbor 172.14.0.4 capability graceful-restart
>> > !
>> >
>> > router[1]#show ip route
>> > Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP
>> >        O - OSPF, IA - OSPF inter area
>> >        N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
>> >        E1 - OSPF external type 1, E2 - OSPF external type 2
>> >        i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS
>> inter
>> > area
>> >        * - candidate default
>> >
>> > Gateway of last resort is 0.0.0.0 to network 0.0.0.0
>> >
>> > K*      0.0.0.0/0 is directly connected, tmm0 ==> kernel route shows
>> up
>> > here
>> > C       127.0.0.1/32 is directly connected, lo
>> > C       127.1.1.0/24 is directly connected, tmm0
>> > C       172.14.0.4/30 is directly connected, VLAN_701
>> >
>> > router[1]#show ip bgp ==> cannot see the kernel route being advertised
>> >
>> > router[1]#
>> >
>> > router[1]#show ip bgp neighbors 172.14.0.4 advertised-routes ==> nor
>> here
>> > router[1]#
>> >
>> > Just want to clarify that the neighbor relationships are in a
>> > "Established"
>> > state,
>> > and if I export a route from the peer, I can see it in the
>> received-routes
>> > show cmd.
>> >
>> > Would really appreciate if anyone here could point me in the right
>> > direction.
>> >
>> > TIA!
>> > _______________________________________________
>> > Quagga-users mailing list
>> > Quagga-users at lists.quagga.net
>> > https://lists.quagga.net/mailman/listinfo/quagga-users
>> >
>>
>>
>>
> _______________________________________________
> Quagga-users mailing list
> Quagga-users at lists.quagga.net
> https://lists.quagga.net/mailman/listinfo/quagga-users
>





More information about the Quagga-users mailing list