[Xorp-hackers] BGP and policy problem

Stefan Gula steweg at ynet.sk
Tue Feb 26 04:31:55 PST 2008


Hi

I am currently trying to establish eBGP sessions with another XORP
eBGP and iBGP routers like this:

Network A,B,C,D are connected to Router R1 and R2 in AS1. They are
distributed through OSPF, which works fine. Now there is Network E and
F on Router R3 which is in AS2. What I try to achive is that traffic
from AS1 going to network E goes through R2 a to network F goes
through R1. I achieved this by applying import policy on R1 and R2 by
the way of localpref. What I am unable to achive is applying also
export policy on R1 and R2 with MED attribute to make sure that R3
will choose the same way that traffic comes in as it goes out.

Here is my configuration
root at R1# show policy
    policy-statement "bel_out" {
        term a {
            from {
                protocol: "connected"
                network4-list: "my_routes"
            }
            to {
                neighbor: 10.1.2.18..10.1.2.18
            }
            then {
                med: 100
                accept {
                }
            }
        }
        term b {
            from {
                protocol: "ospf4"
            }
            to {
                neighbor: 10.1.2.18..10.1.2.18
            }
            then {
                med: 100
                accept {
                }
            }
        }
    }
    policy-statement "bel_in" {
        term a {
            from {
                neighbor: 10.1.2.18..10.1.2.18
                network4-list: "management"
            }
            then {
                localpref: 100
                accept {
                }
            }
        }
    }
    network4-list "my_routes" {
        network 192.168.2.0/26
        network 192.168.2.128/26
        network 10.1.2.16/30
    }
    network4-list "management" {
        network 10.1.4.0/24
    }

root at R1# show protocols bgp
    bgp-id: 192.168.2.1
    local-as: 65535
    peer "10.1.2.18" {
        local-ip: "10.1.2.17"
        as: 65534
        next-hop: 10.1.2.17
    }
    peer "192.168.2.2" {
        local-ip: "192.168.2.1"
        as: 65535
        next-hop: 192.168.2.1
    }
    traceoptions {
        flag {
            all {
                disable: true
            }
        }
    }
    export: "bel_out"
    import: "bel_in"


in logs it shows something like this:
[ 2008/02/26 13:06:18 WARNING xorp_rib RIB ] Unable to complete XRL:
del_route4 for bgp route: Dst: 10.1.2.18/32 Vif: vlan4 NextHop:
NH:192.168.2.1 Metric: 2 Protocol: ospf PolicyTags: 5
[ 2008/02/26 13:06:14 INFO xorp_rib RIB ] Received death event for
protocol bgp shutting down -------
OriginTable: ebgp
next table = Merged:(ebgp)+(ibgp)
[ 2008/02/26 13:06:14 INFO xorp_rib RIB ] Received death event for
protocol bgp shutting down -------
OriginTable: ebgp
next table = Merged:(ebgp)+(ibgp)
[ 2008/02/26 13:06:14 INFO xorp_rib RIB ] Received death event for
protocol bgp shutting down -------
OriginTable: ebgp
next table = Merged:(ebgp)+(ibgp)
[ 2008/02/26 13:06:14 INFO xorp_rib RIB ] Received death event for
protocol bgp shutting down -------
OriginTable: ebgp
next table = Merged:(ebgp)+(ibgp)


similar configuration is on R2 and also the same problem. Unable to
apply import and export policy together. On R3 there is everything Ok.
So please can somebody point me to the right direction where is the
problem?

Thanks for any ideas

-- 
Stefan Gula, CCNP



More information about the Xorp-hackers mailing list