[Xorp-users] importing BGP routes
Andriy Beregovenko
jet at gala.net
Wed Feb 11 10:21:48 PST 2009
I install xorp on my linux router, and i got some issue with
exporting routes from bgp to kernel.
I have cisco router as bgp peer, and annonce only one route (for test).
On CISCO router:
--------------------------------------------------------------------------
cisco-rtr>sh ip bgp nei 172.20.11.2 adv
BGP table version is 681, local router ID is 10.114.250.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 10.114.250.0/24 0.0.0.0 0 32768 i
Total number of prefixes 1
cisco-rtr>
--------------------------------------------------------------------------
And on xorp i recive this route:
--------------------------------------------------------------------------
jet at linux-rtr# run show bgp routes
Status Codes: * valid route, > best route
Origin Codes: i IGP, e EGP, ? incomplete
Prefix Nexthop Peer AS Path
------ ------- ---- -------
* 10.114.250.0/24 172.20.11.1 10.114.250.1 65101 i
jet at linux-rtr#
--------------------------------------------------------------------------
But as you can see, this route is no best, and it do not inject into RIB.
While reading documentation, i understand that i must declare some
policy for exporting route from BGP to RIB, so i write policy and
apply it to peer:
--------------------------------------------------------------------------
jet at linux-rtr# show policy policy-statement bgp_to_rib
term 1 {
from {
protocol: "bgp"
}
then {
accept {
}
}
}
jet at linux-rtr# show protocols bgp peer 172.20.11.1
local-ip: "172.20.11.2"
as: "65101"
next-hop: 172.20.11.2
> import: "bgp_to_rib"
[edit]
jet at linux-rtr#
--------------------------------------------------------------------------
But then i trying to commit i recive error(in log):
[ 2009/02/11 19:44:51 WARNING xorp_policy:8037 XrlPolicyTarget +543
policy_base.cc handle_policy_0_1_import ] Handling method for
policy/0.1/import failed:XrlCmdError 102 Command failed Import of bgp
failed: sem_error from line 278 of visitor_semantic.cc: May not define
protocol for import policy at line 1
[ 2009/02/11 19:44:51 ERROR xorp_rtrmgr:8013 RTRMGR +691
master_conf_tree.cc commit_pass2_done ] Commit failed: 102 Command
failed Import of bgp failed: sem_error from line 278 of
visitor_semantic.cc: May not define protocol for import policy at line
1
Please help with this issue, because i can not find more info about
xorp configuration.
More information about the Xorp-users
mailing list