[Xorp-users] policy on static route
Andy Yuen
andyyuen at research.telcordia.com
Tue Aug 18 15:38:11 PDT 2009
Hi
Suppose there is a node 10.2.2.2. I want to set up a policy such that
the next-hop to destination 10.1.1.0/24 is 10.2.5.5 when some metric or
tag value is 1 and the next-hop is 10.2.4.4 when the corresponding
metric or value is 2. Is it possible to define policy statement for
static routes?
Normally, I want to use 10.2.5.5, but occasionally I want to use
10.2.4.4 based on the current value of metric as defined in the policy
statement. The reason behind doing this is making it possible to modify
the static route by modifying a metric value only, instead of uploading
the whole router configuration with new static route. This try to
emulate multi-topology routing, where the metric value corresponds to
the DSCP value.
I use the following but get an error when this is loaded to the
configuration.
Thanks
Andy
PS On the user manual, it says it is possible to define export policy
for static routes. Wonder how that is done.
static {
* export: "myroutes"*
route 10.1.1.0/24 {
next-hop: 10.2.5.5
}
disable: false
interface-route 0.0.0.0/0 {
next-hop-interface: "my_discard"
next-hop-vif: "my_discard"
next-hop-router: 0.0.0.0
metric: 1
}
}
policy{
policy-statement "myroutes" {
term a{
from{
protocol: "static"
}
to {
}
then {
metric: 2
}
}
term b{
from{
protocol: "static"
metric : 1
network4: 10.1.1.0/24
}
to {
}
then {
nexthop4: 10.2.5.5
}
}
term c{
from{
protocol: "static"
metric : 2
network4: 10.1.1.0/24
}
to {
}
then {
nexthop4: 10.2.4.4
}
}
}
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ICSI.Berkeley.EDU/pipermail/xorp-users/attachments/20090818/3abb5546/attachment.html
More information about the Xorp-users
mailing list