[Xorp-users] wanted: OSPF metrics per neighbor. can vif help?
Nick Feamster
feamster@lcs.mit.edu
Wed, 9 Nov 2005 17:20:00 -0500
--sdtB3X0nJg68CQEu
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Hey guys,
The OSPF implementation is really great. Thanks!
I have a question/feature request. I have an interface that is on a /8
subnet, with multiple other hosts on that subnet. I'd like to set the
OSPF link metric *per neighbor* on that subnet, rather than per
interface. Currently, interface aliases are not an option; I am
wondering if XORP's "vif" functionality can come to the rescue.
Perhaps the above functionality is already possible, or perhaps it
requires modification to the code. Can you help me understand vifs and
how this might be possible?
Currently, the interface-cost can be set in the vif stanza, so I thought
it might be possible to give multiple vifs to an interface and then set
different interface costs per vif. However, I've run into a few
roadblocks when trying this.
1.) How do I assign different vif names to a single interface?
I have an interface called "tap0". Assigning a vif with the name
"tap0" is definitely possible. However, configuring another vif
with a different name inside interface "tap0" (e.g. interface named
"tap0", vif named "tap1") appears to be illegal.
What's the proper way to assign multiple vifs to an interface?
Is this even what I want to solve my OSPF problem?
2.) How do I get a separate interface-cost per vif/neighbor? Inside my
OSPF stanza, I have something that looks as follows:
area 0.0.0.0 {
interface tap0 {
link-type: "p2m"
vif tap0 {
address 10.13.79.1 {
interface-cost: 5
/* planetlab02.cs.washington.edu */
neighbour 10.0.35.1 {
router-id: 128.208.4.198
}
}
}
vif tap0 {
address 10.13.79.1 {
interface-cost: 1
/* planetlab2.arizona-gigapop.net */
neighbour 10.0.10.1 {
router-id: 206.207.248.35
}
}
}
}
Note that I am trying to set a different interface cost per neighbor.
Now, when I look at "show ospf4 database detail", it looks like both
of these LSAs are getting a metric of 1, indicating
that perhaps there is just a single data structure for the
interface-cost per interface. (I've attached this configuration file
for reference.)
It seems that there are two possible solutions:
- If the data structure is per-vif name (e.g. "vif tap0"), I
need to figure out the answer to Question #1 above.
- If the data structure is per-interface (e.g. "interface
tap0"), I guess some changes to the code are needed, yes? If
this is the case, can I put in a feature request? :) If you
like the idea but don't have time to implement, we can also
work on a patch, if you'd be willing to add it into the source
tree.
Thanks,
Nick
--sdtB3X0nJg68CQEu
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="planetlab2.info.ucl.ac.be.xorp"
/* XORP configuration automatically generated by build_ospf_configs.pl */
/* XORP configuration automatically generated by build_configs.pl */
interfaces {
interface lo {
description: "loopback interface";
disable: false
mac: 00:00:00:00:00:00
default-system-config
}
interface tap0 {
description: "virtual overlay interface";
disable: false
default-system-config
}
interface eth0 {
description: "ethernet adapter"
disable: false
default-system-config
}
}
fea {
unicast-forwarding4 {
disable: true
}
click {
disable: false
user-click {
disable: false
command-file: "/home/mit_rcp/demo/click"
command-extra-arguments: "-R"
command-execute-on-startup: true
control-address: 127.0.0.1
control-socket-port: 13654
startup-config-file: "/home/mit_rcp/demo/planetlab2.info.ucl.ac.be.click"
}
}
}
protocols {
ospf4 {
router-id: 130.104.72.201
area 0.0.0.0 {
interface tap0 {
link-type: "p2m"
vif tap0 {
address 10.13.79.1 {
interface-cost: 5
/* planetlab02.cs.washington.edu */
neighbour 10.0.35.1 {
router-id: 128.208.4.198
}
}
}
vif tap0 {
address 10.13.79.1 {
interface-cost: 1
/* planetlab2.arizona-gigapop.net */
neighbour 10.0.10.1 {
router-id: 206.207.248.35
}
}
}
}
interface eth0 {
vif eth0 {
address 130.104.72.201 {
}
}
}
}
traceoptions {
flag {
all {
disable: false
}
}
}
}
}
--sdtB3X0nJg68CQEu--