[Xorp-users] Routes redistribution between OSPF and BGP

Atanu Ghosh atanu at ICSI.Berkeley.EDU
Mon Mar 31 19:15:16 PDT 2008


Hi,

When redistributing routes from OSPF to BGP only the routes that OSPF
has learned from its neighbours will be redistributed. The connected
routes will not be redistributed, so you are correct you also need to
redistribute connected.

       Atanu.

>>>>> "Yue" == Yue Li <yueli.m at gmail.com> writes:

    Yue> Hi, Atanu
    Yue> I have a topology like below. I run OSPF on all routers and BGP on R2,
    Yue> R5, which forms a eBGP peering.

    Yue> The problem is when I redistribute OSPF into BGP, I can only see the
    Yue> routes to "net13" and "net34" on R5.
    Yue> I wonder whether I should export "connected" to BGP, so I may see
    Yue> "net12" and "net24" on R5.

    Yue> net12
    Yue> (R1)---------(R2)------------(R5)----------(R6)
    Yue> net13  |              |                  |                |
    Yue> |    AS1    | net24         |     AS2    |
    Yue> (R3)---------(R4)             (R7)-----------(R8)
    Yue> net34

    Yue> The config of R2 is:
    Yue> interfaces {
    Yue> interface tun0 {
    Yue> disable: false
    Yue> vif tun0 {
    Yue> disable: false
    Yue> address 10.0.0.1 {
    Yue> prefix-length: 30
    Yue> disable: false
    Yue> }
    Yue> }
    Yue> }
    Yue> interface tun1 {
    Yue> disable: false
    Yue> vif tun1 {
    Yue> disable: false
    Yue> address 10.0.0.17 {
    Yue> prefix-length: 30
    Yue> disable: false
    Yue> }
    Yue> }
    Yue> }
    Yue> interface tun2 {
    Yue> disable: false
    Yue> vif tun2 {
    Yue> disable: false
    Yue> address 10.0.0.65 {
    Yue> prefix-length: 30
    Yue> disable: false
    Yue> }
    Yue> }
    Yue> }
    Yue> }
    Yue> policy {
    Yue> policy-statement connected {
    Yue> term export {
    Yue> from {
    Yue> protocol: "connected"
    Yue> }
    Yue> }
    Yue> }
    Yue> policy-statement ospf-to-bgp {
    Yue> term ospf2bgp {
    Yue> from {
    Yue> protocol: "ospf4"
    Yue> }
    Yue> }
    Yue> }
    Yue> }
    Yue> protocols {
    Yue> ospf4 {
    Yue> router-id: 10.0.0.1
    Yue> export: "connected"
    Yue> area 0.0.0.0 {
    Yue> interface tun0 {
    Yue> link-type: "p2p"
    Yue> vif tun0 {
    Yue> address 10.0.0.1 {
    Yue> hello-interval: 10
    Yue> interface-cost: 100
    Yue> neighbor 10.0.0.2 {
    Yue> router-id: 10.0.0.2
    Yue> }
    Yue> }
    Yue> }
    Yue> }
    Yue> interface tun1 {
    Yue> link-type: "p2p"
    Yue> vif tun1 {
    Yue> address 10.0.0.17 {
    Yue> hello-interval: 10
    Yue> interface-cost: 100
    Yue> neighbor 10.0.0.18 {
    Yue> router-id: 10.0.0.14
    Yue> }
    Yue> }
    Yue> }
    Yue> }
    Yue> }
    Yue> }
    Yue> bgp {
    Yue> bgp-id: 10.0.0.1
    Yue> export: "ospf-to-bgp"
    Yue> local-as: 65010
    Yue> peer 10.0.0.66 {
    Yue> local-ip: 10.0.0.65
    Yue> as: 65011
    Yue> next-hop: 10.0.0.65
    Yue> ipv4-multicast: false
    Yue> ipv6-unicast: false
    Yue> ipv6-multicast: false
    Yue> }
    Yue> }
    Yue> }



    Yue> On Mon, Mar 24, 2008 at 12:20 PM, Atanu Ghosh <atanu at icsi.berkeley.edu> wrote:
    >> Hi,
    >> 
    >> All the networks that you wish to advertise to an external AS need to be
    >> redistributed into BGP. You therefore need to redistribute OSPF into
    >> BGP.
    >> 
    >> Atanu.
    >> 
    >> >>>>> "Yue" == Yue Li <yueli.m at gmail.com> writes:
    >> 
    Yue> Hi, All I have several XORP routers which form 2 Autonomous
    Yue> Systems.  OSPFv2 is used for intra-AS protocol and BGP is
    Yue> running on the AS border routers.
    >> 
    Yue> I found no BGP routes when monitoring BGP behaviors, while
    Yue> their peering relations are correct.  And routers in different
    Yue> AS can't ping each other.
    >> 
    Yue> So I guess I need to add routes redistribution to the
    Yue> configuration of the AS border routers, right?  Do I need to
    Yue> add ospf-to-bgp policy, or bgp-to-ospf policy, or both of them?
    >> 
    Yue> Any help would be greatly appreciated.
    >> 
    Yue> _______________________________________________ Xorp-users
    Yue> mailing list Xorp-users at xorp.org
    Yue> http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-users
    >> 



More information about the Xorp-users mailing list