[Xorp-hackers] BGP routes distribution

Maher Kaddoura mkaddoura at atcorp.com
Wed Sep 30 13:01:08 PDT 2009


Hi,

Below is the configuration that I have used. This configuration cause RIP to
export connected and static routes, while BGP does not export connected and
static routes. 

I did few testing using different variations of the configuration below.
Based on my observations, in XORP connected and static routes can only be
exported by either RIP or BGP but not by both at the same time. And RIP
always has the priority over BGP.

Maher

/* $XORP: xorp/rtrmgr/config/interfaces.boot,v 1.1 2007/08/30 06:32:17
pavlin Exp $ */

interfaces {
    
    interface eth2 {
	
	default-system-config
    }
}
interfaces {
    
    interface eth3 {
	/* Use the default setup as configured in the system */
	default-system-config
    }
}


fea {
    unicast-forwarding4 {
	disable: false
    }
}


protocols {
  static {
  route 192.168.22.0/24 {
   next-hop: 192.168.20.1
   metric: 1
}
route 192.168.21.0/24 {
   next-hop: 192.168.20.1
   metric: 1
}
route 192.168.20.0/24 {
   next-hop: 192.168.20.1
   metric: 1
}

}}



policy {
    policy-statement export-connected {
term 200 {
	    from {
		protocol: "connected"
	    }
	}

    }
}


policy {
    policy-statement export-bgp {
	
       

term 600 {
	    from {
		protocol: "connected"
	    }
	then {

		accept{}
        }
  
	}
 


    term 800 {
	    from {
		protocol: "rip"
	    }
then {

		accept{}
        }
	}

term 700 {
	    from {
		protocol: "static"
	    }
then {

		accept{}
        }
	}

    }
}


protocols {
    rip {
	export: "export-connected"

	interface eth3{
	    vif eth3 {
		address 192.168.20.1   {
		    disable: false
		}
	    }
	}


  interface eth2{
	    vif eth2 {
		address 192.168.21.1   {
		    disable: false
		}
	    }
	}
	
    }
}

protocols {
    bgp {
	bgp-id: 192.168.20.1
       
	local-as: 200
	export: "export-bgp"



	peer 192.168.1.1 {
	    local-ip: 192.168.20.1
	    as: 200
	    next-hop: 192.168.20.1
	}

	peer 192.168.2.1 {
	    local-ip: 192.168.20.1
	    as: 200
	    next-hop: 192.168.20.1
	}


    }
}



-----Original Message-----
From: Bruce Simpson [mailto:bms at icir.org] 
Sent: Wednesday, September 30, 2009 11:11 AM
To: Maher Kaddoura
Cc: xorp-hackers at icir.org
Subject: Re: [Xorp-hackers] BGP routes distribution

Hi,

Could you please provide your full configuration, so that someone can 
try to help you better?

Section 8.3.1 of the user manual has an example of how to configure RIP 
to export connected routes. Are you using separate policies to do this 
for both BGP and RIP?

Maher Kaddoura wrote:
> Can someone please let know what configuration should I used so BGP and
RIP
> distribute both routes into domain 192.168.20.0.
>   

Redistribution in BGP and RIP using export policies should be 
functionally separate; one should not affect the other. Off the top of 
my head, I can't think of situations where this would happen -- however 
I'm busy on another task, and swapping how policy behaves back in is 
difficult. :-)

thanks,
BMS




More information about the Xorp-hackers mailing list