[Xorp-hackers] OSPF Problem with Running Multiple Instances of XORP
Pavlin Radoslavov
pavlin at ICSI.Berkeley.EDU
Sat Dec 6 14:28:08 PST 2008
In Linux interface name like "eth0.2" is not real interface, but
an IP alias address on interface eth0.
Hence, in your XORP config the interface/vif name should be eth0,
and have the corresponding IP aliases within the vif block.
Pavlin
Jiaqing Du <jiaqing.du at gmail.com> wrote:
> Hi, List
>
> I'm trying to run multiple instances of XORP(v1.5) inside one Linux OS.
>
> I have set up several virtual network interfaces using VLAN. Multiple
> instances of XORP run on top of these virtual interfaces.
>
> The problem is OSPF processes can't communicate with each other because OSPF
> Hello multicast messages are not able to reach other virtual interfaces.
>
> I just started to read code related to FEA. Could anyone give me a hint
> about
> this problem?
>
> What I have done is listed below.
>
> (1) add virtual interfaces to the system (Debian with kernel 2.6.19)
>
> #vconfig add eth0 2
> #vconfig add eth0 3
>
> Network configuration is like this:
>
> #ifconfig
> eth0 Link encap:Ethernet HWaddr 00:0C:29:A6:16:EC
> inet addr:193.168.0.3 Bcast:193.168.0.255 Mask:255.255.255.0
> inet6 addr: fe80::20c:29ff:fea6:16ec/64 Scope:Link
> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
> RX packets:116443 errors:0 dropped:0 overruns:0 frame:0
> TX packets:87493 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:1000
> RX bytes:61967657 (59.0 MiB) TX bytes:53828956 (51.3 MiB)
> Interrupt:16 Base address:0x2000
>
> eth0.2 Link encap:Ethernet HWaddr 00:0C:29:A6:16:EC
> inet addr:10.0.0.3 Bcast:10.0.0.255 Mask:255.255.255.0
> inet6 addr: fe80::20c:29ff:fea6:16ec/64 Scope:Link
> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
> RX packets:0 errors:0 dropped:0 overruns:0 frame:0
> TX packets:3 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:0
> RX bytes:0 (0.0 b) TX bytes:250 (250.0 b)
>
> eth0.3 Link encap:Ethernet HWaddr 00:0C:29:A6:16:EC
> inet addr:10.0.1.3 Bcast:10.0.1.255 Mask:255.255.255.0
> inet6 addr: fe80::20c:29ff:fea6:16ec/64 Scope:Link
> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
> RX packets:0 errors:0 dropped:0 overruns:0 frame:0
> TX packets:3 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:0
> RX bytes:0 (0.0 b) TX bytes:250 (250.0 b)
>
> lo Link encap:Local Loopback
> inet addr:127.0.0.1 Mask:255.0.0.0
> inet6 addr: ::1/128 Scope:Host
> UP LOOPBACK RUNNING MTU:16436 Metric:1
> RX packets:432974 errors:0 dropped:0 overruns:0 frame:0
> TX packets:432974 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:0
> RX bytes:83683923 (79.8 MiB) TX bytes:83683923 (79.8 MiB)
>
>
> (2) configuration files for two different XORP instances.
>
> [configuration 1]
> interfaces {
> interface eth0.2 {
> vif eth0.2 {
> address 10.0.0.3 {
> prefix-length: 24
> }
> }
> }
> interface eth0.3 {
> vif eth0.3 {
> address 10.0.1.3 {
> prefix-length: 24
> }
> }
> }
> interface eth0 {
> vif eth0 {
> address 193.168.0.3 {
> prefix-length: 24
> }
> }
> }
> }
>
> fea {
> unicast-forwarding4 {
> disable: false
> }
> }
>
> protocols {
> ospf4 {
> router-id: 10.0.0.3
> area 0.0.0.0 {
> interface eth0.2 {
> link-type: "p2p"
> vif eth0.2 {
> address 10.0.0.3 {
> hello-interval: 5
> router-dead-interval: 10
> interface-cost: 2
> neighbor 10.0.1.3 {
> router-id: 10.0.1.3
> }
> }
> }
> }
> }
> }
> }
>
> [configuration 2]
> interfaces {
> interface eth0.3 {
> vif eth0.3 {
> address 10.0.1.3 {
> prefix-length: 24
> }
> }
> }
> interface eth0.2 {
> vif eth0.2 {
> address 10.0.0.3 {
> prefix-length: 24
> }
> }
> }
> interface eth0 {
> vif eth0 {
> address 193.168.0.3 {
> prefix-length: 24
> }
> }
> }
> }
>
> fea {
> unicast-forwarding4 {
> disable: false
> }
> }
>
> protocols {
> ospf4 {
> router-id: 10.0.1.3
> area 0.0.0.0 {
> interface eth0.3 {
> link-type: "p2p"
> vif eth0.3 {
> address 10.0.1.3 {
> hello-interval: 5
> router-dead-interval: 10
> interface-cost: 2
> neighbor 10.0.0.3 {
> router-id: 10.0.0.3
> }
> }
> }
> }
>
> }
> }
> }
>
> (3) output of XORP instances
> At line 1765 of $xorp/fea/data_plane/io/io_ip_socket.cc, inside functioin
> "IoIpSocket::proto_socket_read()", I add following code to print out packet
> recv information.
>
> +----------+
> XLOG_WARNING("packet received");
> XLOG_WARNING("ifname = %s, vifname = %s", (ifp->ifname()).c_str(),
> (vifp->vifname()).c_str());
> XLOG_WARNING("src_addr = %s, dst_addr = %s",
> (src_address.str()).c_str(), (dst_address.str()).c_str());
> XLOG_WARNING("---------------------------------------");
> +---------+
>
> After running two XORP instances simultaneously, I got the following output.
>
> [instance 1 on eth0.2(10.0.0.3)]
> [ 2008/12/06 10:19:18 WARNING xorp_fea FEA ] packet received
> [ 2008/12/06 10:19:18 WARNING xorp_fea FEA ] ifname = eth0.2, vifname =
> eth0.2
> [ 2008/12/06 10:19:18 WARNING xorp_fea FEA ] src_addr = 10.0.0.3, dst_addr =
> 224.0.0.5
> [ 2008/12/06 10:19:18 WARNING xorp_fea FEA ]
> ---------------------------------------
> [ 2008/12/06 10:19:22 WARNING xorp_fea FEA ] packet received
> [ 2008/12/06 10:19:22 WARNING xorp_fea FEA ] ifname = eth0.2, vifname =
> eth0.2
> [ 2008/12/06 10:19:22 WARNING xorp_fea FEA ] src_addr = 10.0.0.3, dst_addr =
> 224.0.0.5
> [ 2008/12/06 10:19:22 WARNING xorp_fea FEA ]
> ---------------------------------------
> [ 2008/12/06 10:19:23 WARNING xorp_fea FEA ] packet received
> [ 2008/12/06 10:19:23 WARNING xorp_fea FEA ] ifname = eth0.3, vifname =
> eth0.3
> [ 2008/12/06 10:19:23 WARNING xorp_fea FEA ] src_addr = 10.0.1.3, dst_addr =
> 224.0.0.5
> [ 2008/12/06 10:19:23 WARNING xorp_fea FEA ]
> ---------------------------------------
> [ 2008/12/06 10:19:27 WARNING xorp_fea FEA ] packet received
> [ 2008/12/06 10:19:27 WARNING xorp_fea FEA ] ifname = eth0.2, vifname =
> eth0.2
> [ 2008/12/06 10:19:27 WARNING xorp_fea FEA ] src_addr = 10.0.0.3, dst_addr =
> 224.0.0.5
> [ 2008/12/06 10:19:27 WARNING xorp_fea FEA ]
> ---------------------------------------
> [ 2008/12/06 10:19:28 WARNING xorp_fea FEA ] packet received
> [ 2008/12/06 10:19:28 WARNING xorp_fea FEA ] ifname = eth0.3, vifname =
> eth0.3
> [ 2008/12/06 10:19:28 WARNING xorp_fea FEA ] src_addr = 10.0.1.3, dst_addr =
> 224.0.0.5
> [ 2008/12/06 10:19:28 WARNING xorp_fea FEA ]
> ---------------------------------------
>
> [instance 2 on eth0.3(10.0.1.3)]
> [ 2008/12/06 10:19:23 WARNING xorp_fea FEA ] packet received
> [ 2008/12/06 10:19:23 WARNING xorp_fea FEA ] ifname = eth0.3, vifname =
> eth0.3
> [ 2008/12/06 10:19:23 WARNING xorp_fea FEA ] src_addr = 10.0.1.3, dst_addr =
> 224.0.0.5
> [ 2008/12/06 10:19:23 WARNING xorp_fea FEA ]
> ---------------------------------------
> [ 2008/12/06 10:19:27 WARNING xorp_fea FEA ] packet received
> [ 2008/12/06 10:19:27 WARNING xorp_fea FEA ] ifname = eth0.2, vifname =
> eth0.2
> [ 2008/12/06 10:19:27 WARNING xorp_fea FEA ] src_addr = 10.0.0.3, dst_addr =
> 224.0.0.5
> [ 2008/12/06 10:19:27 WARNING xorp_fea FEA ]
> ---------------------------------------
> [ 2008/12/06 10:19:28 WARNING xorp_fea FEA ] packet received
> [ 2008/12/06 10:19:28 WARNING xorp_fea FEA ] ifname = eth0.3, vifname =
> eth0.3
> [ 2008/12/06 10:19:28 WARNING xorp_fea FEA ] src_addr = 10.0.1.3, dst_addr =
> 224.0.0.5
> [ 2008/12/06 10:19:28 WARNING xorp_fea FEA ]
> ---------------------------------------
> [ 2008/12/06 10:19:32 WARNING xorp_fea FEA ] packet received
> [ 2008/12/06 10:19:32 WARNING xorp_fea FEA ] ifname = eth0.2, vifname =
> eth0.2
> [ 2008/12/06 10:19:32 WARNING xorp_fea FEA ] src_addr = 10.0.0.3, dst_addr =
> 224.0.0.5
> [ 2008/12/06 10:19:32 WARNING xorp_fea FEA ]
> ---------------------------------------
> [ 2008/12/06 10:19:33 WARNING xorp_fea FEA ] packet received
> [ 2008/12/06 10:19:33 WARNING xorp_fea FEA ] ifname = eth0.3, vifname =
> eth0.3
> [ 2008/12/06 10:19:33 WARNING xorp_fea FEA ] src_addr = 10.0.1.3, dst_addr =
> 224.0.0.5
> [ 2008/12/06 10:19:33 WARNING xorp_fea FEA ]
> ---------------------------------------
>
>
> The status of ospf neighbor is:
>
> [instance 1 on eth0.2]
> admin at debian> show ospf4 neighbor
> Address Interface State ID Pri Dead
> 10.0.1.3 eth0.2/eth0.2 Init 10.0.1.3 0 0
>
> [instance 2 on eth0.3]
> admin at debian> show ospf4 neighbor
> Address Interface State ID Pri Dead
> 10.0.0.3 eth0.3/eth0.3 Init 10.0.0.3 0 0
>
> Based on the above output, it seems that OSPF Hello multicast message never
> reaches the corresponding receiver sides. They are just sent back to where
> they
> come from.
>
>
> Regards,
> Jiaqing
> _______________________________________________
> Xorp-hackers mailing list
> Xorp-hackers at icir.org
> http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-hackers
More information about the Xorp-hackers
mailing list