Hi,

I want to simulate tunneling encapsulation and decapsulation using two linux boxes.

Below is my configuration:

BOX - A BOX - B BOX - C
-------- -------- --------
eth 172.31.128.126 eth 172.31.128.125 172.31.128.199
tunl 172.31.128.197 tunl 172.31.128.198

gw ip: 172.31.128.97

All boxes are on the same subnet and connected to single router.
The point of interest is to send a packet from BOX-A to BOX-C using tunnel between BOX-A to BOX-B. I could see the unwrapped packets on tunl1 of BOX-B, but could not see its getting forwarded to BOX-C.

Also could you pls let me know how it gets forwarded (if at all it happens)?
I mean, once the packet reaches to tunl1 at BOX-B how actually it finds BOX-C and how it can route to BOX-C?

Command executed on BOX - A
------------------------------
1. insmod ipip
2. ip tunnel add tunl1 mode ipip remote 172.31.128.125 dev eth0
3. ifconfig tunl1 172.31.128.197
4. ip link set tunl1 up
5. ip route add 172.31.128.198 via 172.31.128.97 dev tunl1 onlink

Command executed on BOX - B
------------------------------
ip tunnel add tunl1 mode ipip remote 172.31.128.126
ifconfig tunl1 172.31.128.198
ip link set tunl1 up
ip route add 172.31.128.197 via 172.31.128.97 dev tunl1 onlink

When I ping 172.31.128.198 from BOX-A, I am getting ping reply. When I capture the packets using ethereal on BOX - B with tunl1 interface, I could see ping request and ping replies coming with decapsulated (unwrapped) packets.

Thanks in Advance.
Hiren.