[Xorp-users] Wrong IP address used for GRE interface
Andriy Senkovych
andriysenkovych at gmail.com
Wed Dec 28 05:22:34 PST 2011
Hello, xorp-users!
I'm using Xorp 1.8.3 package on Debian for PIM-SM over GRE/IPSec. I
used slightly modified default config. I use such tunnels to access
both worker machines and data provider:
The config file has the following interfaces section:
interfaces {
restore-original-config-on-shutdown: false
interface cme-gw {
description: "Tunnel interface to data provider"
disable: false
default-system-config
}
interface cme-dev {
description: "Tunnel interface to worker machine"
disable: false
default-system-config
}
}
As a result I get the following interfaces configuration:
> show interfaces
cme-dev/cme-dev: Flags:<ENABLED,MULTICAST,POINTTOPOINT> mtu 1476 speed unknown
inet 10.145.0.129 subnet 10.145.0.129/32 --> 10.145.129.63
inet 10.145.2.122 subnet 10.145.2.120/30 --> 10.145.2.122
physical index 5
cme-gw/cme-gw: Flags:<ENABLED,MULTICAST,POINTTOPOINT> mtu 1476 speed unknown
inet 10.145.0.129 subnet 10.145.0.129/32 --> 10.145.254.1
inet 10.145.2.222 subnet 10.145.2.220/30 --> 10.145.2.222
physical index 4
My actual configuration for these interfaces is:
$ ip a l
4: cme-gw: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1476 qdisc
noqueue state UNKNOWN
link/gre 10.145.0.129 peer 10.145.254.1
inet 10.145.2.222/30 scope global cme-gw
5: cme-dev: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1476 qdisc
noqueue state UNKNOWN
link/gre 10.145.0.129 peer 10.145.129.63
inet 10.145.2.122/30 scope global cme-dev
Using config above I get the following pim interfaces configuration:
> show pim interface
Interface State Mode V PIMstate Priority DRaddr Neighbors
cme-dev UP Sparse 2 DR 1 10.145.0.129 0
cme-gw UP Sparse 2 DR 1 10.145.0.129 0
And PIM_HELLO packets are sent with wrong parameters:
[ 2011/12/28 13:07:18.8664 TRACE xorp_pimsm4 PIM ] pim_send: TX
PIM_HELLO from 10.145.0.129 to 224.0.0.13 on vif cme-gw
[ 2011/12/28 13:07:20.817323 TRACE xorp_pimsm4 PIM ] pim_send: TX
PIM_HELLO from 10.145.0.129 to 224.0.0.13 on vif cme-dev
Here you can see that xorp has chosen wrong IP address to send the
packets (10.145.0.129 instead of 10.145.2.222 for cme-gw and
10.145.2.122 for cme-dev)
I have similar(but working) environment to get data from another data
provider. Its interfaces settings are:
$ ip a l
4: tun247102: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1476 qdisc
noqueue state UNKNOWN
link/gre 192.168.247.29 peer 192.168.0.84
inet 10.100.247.102/30 scope global tun247102
5: rts-dev: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1476 qdisc
noqueue state UNKNOWN
link/gre 192.168.247.29 peer 192.168.133.10
inet 10.100.133.14/30 scope global rts-dev
> show interfaces
rts-dev/rts-dev: Flags:<ENABLED,MULTICAST,POINTTOPOINT> mtu 1476 speed unknown
inet 10.100.133.14 subnet 10.100.133.12/30 --> 10.100.133.14
inet 192.168.247.29 subnet 192.168.247.29/32 --> 192.168.133.10
physical index 5
tun247102/tun247102: Flags:<ENABLED,MULTICAST,POINTTOPOINT> mtu 1476
speed unknown
inet 10.100.247.102 subnet 10.100.247.100/30 --> 10.100.247.102
inet 192.168.247.29 subnet 192.168.247.29/32 --> 192.168.0.84
physical index 4
> show pim interfaces
Interface State Mode V PIMstate Priority DRaddr Neighbors
rts-dev UP Sparse 2 DR 1 10.100.133.14 0
tun247102 UP Sparse 2 DR 1 10.100.247.102 1
>From this I make the conclusion that xorp takes the first available
configuration and uses is as a default. However as you can see this
will work only when IP address of GRE tunnel is smaller than local IP
address used to setup this GRE tunnel.
I tried both using default-system-config and manual interfaces
configuration but this didn't help.
Is there any solution for this problem?
--
WBR, Andriy Senkovych
More information about the Xorp-users
mailing list