Results 1 to 1 of 1
Collision/Error in ipip Tunnel
Scenario
I have 2 Linux machines A and B acting as routers
Machine A has 2 Network cards cardA.1 at 10.0.40.1(eth1) and cardA.2 at 10.0.1.94(eth0)
Machine ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 03-20-2008 #1Just Joined!
- Join Date
- Mar 2008
- Posts
- 2
Collision/Error in ipip Tunnel???
Collision/Error in ipip Tunnel
Scenario
I have 2 Linux machines A and B acting as routers
Machine A has 2 Network cards cardA.1 at 10.0.40.1(eth1) and cardA.2 at 10.0.1.94(eth0)
Machine B has 2 Network cards cardB.1 at 10.0.44.1(eth1) and cardB.2 at 10.0.1.66(eth0)
S.t. card B.2 & A.2 are connected to 10.0.0.0/29 network,
cardA.1 is connected to 10.0.40.0/24 network, and
cardB.1 is connected to 10.0.44.0/8 network.
A machine C 10.0.40.2 has moved from network 10.0.40.0 to 10.0.44.0 Network
Now I need to ping to Machine C by using tunl0 from 10.0.40.1 machine.
Now I have created a tunnel as
ip tunnel add tunl0 mode ipip local 10.0.40.1 remote 10.0.44.1
ifconfig tunl0 10.0.40.1 pointopoint 10.0.44.1
Routing table at Machine A is -
destination Gateway Genmask Flags Metric Ref Use Iface
10.0.40.2 0.0.0.0 255.255.255.255 UH 0 0 0 tunl0
10.0.44.1 10.0.1.66 255.255.255.255 UGH 0 0 0 eth0
10.0.44.0 10.0.1.66 255.255.255.248 UG 0 0 0 eth0
10.0.40.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
10.0.0.0 0.0.0.0 255.255.252.0 U 0 0 0 eth0
0.0.0.0 10.0.0.2 0.0.0.0 UG 0 0 0 eth0
Routing table at Machine B is -
Destination Gateway Genmask Flags Metric Ref Use Iface
255.255.255.255 0.0.0.0 255.255.255.255 UH 0 0 0 eth1
10.0.40.2 0.0.0.0 255.255.255.255 UH 0 0 0 eth1
10.0.40.1 10.0.1.94 255.255.255.255 UGH 0 0 0 eth0
10.0.44.0 0.0.0.0 255.255.255.248 U 0 0 0 eth1
10.0.0.0 0.0.0.0 255.255.252.0 U 0 0 0 eth0
10.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 tunl0
0.0.0.0 10.0.0.2 0.0.0.0 UG 0 0 0 eth0
I am able to ping to 10.0.40.2 by 10.0.44.1 and vice versa with the help of following routes at Machine C:
Routing table at Machine C is -
Now when I ping to Machine C by using tunl0 from 10.0.40.1 machine. My packets are dropped due to collisions in ipip tunnel driver code. I'm giving the code snippet below:
(2.6.20 Ref:- file: ipip.c, line no:560-570)
tdev = rt->u.dst.dev;
if (tdev == dev) {
ip_rt_put(rt); /*THIS IS THE LOCATION OF PACKET DISCARDED*/
tunnel->stat.collisions++;
goto tx_error;
}
After encapsulation when dst is searched for tunnel ip header(src:10.0.40.1, dst:10.0.44.1), it returns tunl0 rather than eth0 and hence a collision occurs.
Please Look after The query and let me know after looking through the presented scenario and let me know anything new ?
Please check Routing entries....too
and let me know how I will be able to do atleast ping to Machine C 10.0.40.2 in above scenario.
Thanx
Ashish


Reply With Quote
