Subject: [mobile-ip] Mobile IP setup (fwd)

From: Gurunandan Pai <[email-masked]>
Date: Mon, 4 Mar 2002 22:22:41 -0600 (CST)

Sir,
I am trying to implement the draft "NAT traversal using UDP tunneling
draft". I have the setup (described at the end of the email) running but I
am confused about something. It would be great if you can help me out with this.

I am either doing something terribly
wrong if I am thinking that I should configure the NAT
on the gateway (Testbed9) or I am confused. Lets
assume the the NAT is on the gateway(testbed9) and see
what happens. The MN on testbed23 which is behind the
NAT GW on testbed9 will send a registration request to
HA(Testbed31). Ok, so the NAT translates the IP source
address in the IP header of that packet while it is
flowing out of the gateway testbed9. HA gets that
packet. But even though the source IP address in the
IP header has been changed from 10.50.50.50 to
something else it still reads in the Registration
Request message that the care of address is
10.50.50.50. It looks at that and creates a mobility
binding in its kernel which associates the 10.50.50.50
care of address and its original home IP address. Next
time it gets a packet destined for mobile node's
original home IP address, it can do the IP-IP
encapsulation (lower IP header has destn address as
original IP address of the MN and upper IP has destn
address as care-of-address). The packet can now reach
the MN if testbed31 has a route to 10.50.50.50. Right
now, it does,through the GW although ideally the
10.50.50.50 should be hidden behind the NAT and no
host outside the NAT should have a route to it through
the NAT. But since the MN revealed its care-of-address
which was private, to HA, HA can reach the MN. Now
lets assume that in the ideal case HA has a route till
only the gateway and not to 10.50.50.50. The packet HA
created/encapsulated shows an outer IP destn Address
as 10.50.50.50. The HA woulndt know what to do with it
and puts it out on the default router. How would the
UDP header help in this case? Even if the UDP header
is inserted between the two IP headers, the outer IP
destn address is still 10.50.50.50 and not a public
address the NAT translated the 10.50.50.50 to. Even if
the gateway with NAT on it picks it up (if I make that
as a default router) it does not need extra info about
the UDP port cause the packet exclusively says that it
is addressed to 10.50.50.50. Now, what if the NAT is
on the MN itself? Will the care of address field in
the registration reuqest also be translated? I dont
think so. The draft too says that there is a expected
dicrpeancy between the IP source address in the IP
header that is translated and the care-of-address
field in the regitration request which is not. If HA
was looking at the IP source address of the
registration to gain info about the care-of-address
then everything fits in place. But the HA, atleast in
the Mosquito Net implementation, looks directly at the
care-of-address field of the reg req message which is
left untranslated.
Your thoughts on this????

---------------------SETUP----------------------------------
We got the Mosquito Net mobilei implementation running with the
home agent on the ITTC (home) network and the mobile node with a
co-located care of address in a foreign network.

		|-----------------------| eth0  |-------|
		|ITTC n/w (Home n/w)	|-------|TB31 HA|
		|-----------------------|       |-------|
			|                129.237.126.206(also vif's addy)
		   eth0	|129.237.125.144
                  |---------|
                  |TB9 GW   |
                  |---------|
		   eth1	|10.50.50.51
                        |
                        |
                  |---------|
                  |  Switch |
                  |---------|
			|
	 	   eth1	|10.50.50.50
                  |---------|
                  |TB23 MN  |
                  |---------|

Testbed23:
Mobile Node.
linux 2.2.14 with MIP patch provided by Mosquito
Mobile IP support,IP:advanced router,IP:policy
routing, IP:tunneling, Kernel/User netlink socket and routing messages
enabled
Kernel IP routing table
Destination    Gateway        Genmask        Flags Metric Ref  Use Iface
129.237.120.0  10.50.50.51    255.255.248.0  UG    0      0     0 eth1
10.0.0.0       0.0.0.0        255.0.0.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        10.50.50.51    0.0.0.0        UG    0      0     0 eth1

Testbed 31
Home agent.
linux 2.2.14 with MIP patch provided by Mosquito
Mobile IP support,IP:advanced router,IP:policy
routing, IP:tunneling, Kernel/User netlink socket and routing messages
enabled
Kernel IP routing table
Destination    Gateway         Genmask         Flags Metric Ref  Use Iface
129.237.120.0  0.0.0.0         255.255.248.0   U     0      0      0 eth0
129.237.120.0  0.0.0.0         255.255.248.0   U     0      0      0 vif
10.0.0.0       129.237.125.144 255.0.0.0       UG    0      0      0 eth0
127.0.0.0      0.0.0.0         255.0.0.0       U     0      0      0 lo
0.0.0.0        129.237.127.254 0.0.0.0         UG    0      0      0 eth0

Testbed 9
Gateway to foreign n/w
linux 2.3.99
ip_forwarding enabled
Kernel IP routing table
Destination    Gateway         Genmask        Flags Metric Ref  Use Iface
129.237.120.0  0.0.0.0         255.255.248.0   U     0     0    0 eth0
10.0.0.0       0.0.0.0         255.0.0.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        129.237.127.254 0.0.0.0         UG    0     0    0 eth0

Contents of mhd.conf file:
HOME_ADDR = 129.237.125.244
HOME_NETMASK = 255.255.248.0
HOMEAGENT_ADDR = 129.237.126.206
HOME_INTERFACE = eth0

DEFAULT_LIFETIME = 1800
SECURITY_ASSOCIATION =
1000 1234567890abcdef

Contents of had.conf file:
HA_IPADDR = 129.237.126.206
HOME_NETMASK = 255.255.248.0
HOME_INTERFACE = eth0

# This should be the last part of the configuration file.
# Make sure the specified number of moble hosts match the number of lines
# for mobile host configuration.
MOBILE_HOSTS = 1
129.237.125.244 1000 1234567890abcdef

Sincerely,
Gurunandan.Pai