Subject: [mpls] problem configurating tunnel using mplsadm2 and iproute2

From: "Srinivas Reddy" <[email-masked]>
Date: Mon, 5 Jun 2006 13:47:51 -0700

Hi,

  I am using linux-2.4.19 kernel. I am not able to configure tunnel between
two linux machines.Please fins the details given below.
eth0                                         eth1
   LSR1(eth1)<-------->(eth0)LSR2

tunnel starts at LSR1 and ends at LSR2.

LSR1 configuration:

[root@impls utils]#ifconfig
eth0      Link encap:Ethernet  HWaddr 00:03:47:E2:D8:83
          inet addr:10.1.5.139  Bcast:10.1.5.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2543202 errors:0 dropped:0 overruns:2 frame:0
          TX packets:5065 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:197998558 (188.8 Mb)  TX bytes:224558 (219.2 Kb)
          Interrupt:22 Base address:0x9000

eth1      Link encap:Ethernet  HWaddr 00:03:47:E1:A3:D7
          inet addr:10.1.6.139  Bcast:10.1.6.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:25 errors:0 dropped:0 overruns:0 frame:0
          TX packets:486 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:1926 (1.8 Kb)  TX bytes:48158 (47.0 Kb)
          Interrupt:17 Base address:0xb000

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:63 errors:0 dropped:0 overruns:0 frame:0
          TX packets:63 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:6443 (6.2 Kb)  TX bytes:6443 (6.2 Kb)

mpls0     Link encap:UNSPEC  HWaddr
00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          inet addr:192.168.0.2  P-t-P:192.168.0.2  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP  MTU:1492  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:541 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:45444 (44.3 Kb)

Commands used to configure LSR1:

[root@impls utils]# ./mplsadm2 -L eth1:1
Label Space: Success

[root@impls utils]# ./mplsadm2 -A -O 1 -o
push:gen:1024:set:eth1:ipv4:192.168.0.1
Key: 0x00000002
Out Segment add: Success
Out Instr: Illegal seek

[root@impls utils]# ./mplsadm2 -D -O 1 -o
push:gen:1024:set:eth1:ipv4:192.168.0.1
Out Segment del: No such process
Out Instr: No such process
[root@impls utils]# cat /proc/net/mpls_out
0x00000002 0/0/0 1 PUSH(gen 1024) SET(eth1,192.168.0.1)
[root@impls utils]# ./mplsadm2 -D -O 0x00000002
Out Segment del: Success
[root@impls utils]#

[root@impls utils]# ./mplsadm2 -A -O 0 -o
push:gen:1024:set:eth1:ipv4:192.168.0.1
Key: 0x00000003
Out Segment add: Success
Out Instr: Illegal seek
[root@impls utils]# ./mplsadm2 -D -O 0x00000003
Out Segment del: Success
[root@impls utils]#

[root@impls utils]# ./mplsadm2 -A -O 0
Key: 0x00000004
Out Segment add: Success
[root@impls utils]# ./mplsadm2 -D -O 0x00000004
Out Segment del: Success

[root@impls utils]# ./mplsadm2 -O 0x00000005 -o
push:gen:1024:set:eth1:ipv4:192.168.0.1
Out Instr: Success
[root@impls utils]# ./mplsadm2 -A -T mpls0
[root@impls utils]# route add default dev mpls0

[root@impls utils]# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use
Iface
10.1.5.0        0.0.0.0         255.255.255.0   U     0      0        0 eth0
10.1.6.0        0.0.0.0         255.255.255.0   U     0      0        0 eth1
127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo
0.0.0.0         0.0.0.0         0.0.0.0         U     0      0        0
mpls0
0.0.0.0         10.1.6.140      0.0.0.0         UG    0      0        0 eth1

[root@impls utils]#
[root@impls utils]# ./mplsadm2 -A -O 1
Key: 0x00000006
Out Segment add: Success
[root@impls utils]# ./mplsadm2 -B -O 0x00000006 -T mpls0
Bind Tunnel2Out add: Success

[root@impls mpls]# cd iproute2/ip
[root@impls ip]# ./ip route add 172.16.1.0/24 dev mpls0

proc entries :

[root@impls utils]# cat /proc/net/mpls_out
0x00000005 457/38388/0 2 PUSH(gen 1024) SET(eth1,192.168.0.1)
0x00000006 84/7056/0 2 PUSH(gen 2048) SET(mpls0,0.0.0.0)

[root@impls utils]# cat /proc/net/mpls_tunnel
mpls0   0x00000006

on pinging the tunnel end point 192.168.0.1 packet does not come out of the
interface at all.

Even if i ping 172.16.1.1 as given in the above command.

Please let me if i am doing something wrong in configuring the tunnel.

If i want to introduce one more LSR between LSR1 and LSR2, what kind of
configuration changes do i need to do?.   something like

LSR1<----->LSR2<------>LSR3
 |          simple LSP          |
 |                                     |
 |<--------------------------------->|
              TUNNEL

  As for as the virtual interface is concerned there must be a route to
reach the destination 192.168.0.2, and the out going interface would be eth1
as given in the above configuration, please correct if i am worng. So when
packet received at LSR2 what kind of processing would be performed on the
packet.I would like to know how to configure at LSR1 and LSR2 to process the
incoming label properly, It will be great if somebody can provide me the
command sequence.

Please find the debug out put( for ping 192.168.0.2) given bellow for the
problem i mentioned earlier while creating mpls tunnel between 2 linux
machines :

mpls_output2: enter
mpls_output2: opcode PUSH
mpls_push: enter
mpls_push: using tailroom
mpls_push: done using tailroom
mpls_push: exit
mpls_output2: opcode SET
mpls_send: output device = mpls0
mpls_finish: enter
mpls_finish: exit
mpls_send: GEN
mpls_send: using neighbour (cefdec80)
mpls_skb_dump: from mpls0 with len 88 (284) headroom=16 tailroom=24
3c373e4a756e2020332031363a30303a{|0080*01ff450000540000400040016771#c0a800020a01088d0800bef1530405007a148244f3ad060008090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363700}
mpls_send: mpls_send result 0
mpls_output2: exit
./mplsadm2 -d
Debug: Success

Thanks in advance for your help,
LSReddy.
_______________________________________________
mpls mailing list
[email-masked]
https://www1.ietf.org/mailman/listinfo/mpls