Skip to contentSkip to conversation

Assign linklocal addresses to isatap from link dev

PATCH In review Sascha Hlusiak 2 participants 4 messages Mar 1, 2009 – Mar 13, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Assign linklocal addresses to isatap from link dev

Hello,

To use isatap on a client, I use the following command:

# ip tunnel add isatap0 mode isatap remote $REMOTE_V4 dev eth0

(without the attached iproute2-patch that command would fail because of the remote option; patch is sent to maintainer).

Old implemention would then add a linklocal address based on the unset 'local' option, which is obviously wrong: fe80::5efe:0:0/64

With my patch applied and the tunnel created like above, if a link is attached to the tunnel, all it's ipv4 addresses are added as isatap compatible linklocal addresses to the tunnel device. The wrong isatap ll-address above will not be added anymore, if the 'local' option is unset.

# ip addr
2: eth0: UNKNOWN qlen 1000
   [...]
    inet 192.168.6.5/24 brd 192.168.6.255 scope global eth0
    inet 192.168.6.9/32 scope global eth0
   [...]
7: is0@eth0: <POINTOPOINT,NOARP,UP,LOWER_UP>
    link/sit 0.0.0.0 peer x.x.x.x
    inet6 fe80::5efe:c0a8:609/64 scope link
       valid_lft forever preferred_lft forever
    inet6 fe80::5efe:c0a8:605/64 scope link
       valid_lft forever preferred_lft forever

That way stateless autoconf works with isatap tunnels and without knowledge of the local v4 address.

Thanks,
Sascha Hlusiak

commit d08b227e749b57d18222692e284615f38fe7dc24

Author: Sascha Hlusiak <[email protected]>
Date:   Sat Feb 28 23:14:23 2009 +0100

Fix isatap tunnels with remote host

A remote host is needed for client systems to work so allow creation of those tunnels.

ip/iptunnel.c +0 -4
index 0d9a17f..f80019c 100644
@@ -253,10 +253,6 @@ static int parse_args(int argc, char **argv, int cmd, struct ip_tunnel_parm *p)
 		return -1;
 	}
 	if (isatap) {
-		if (p->iph.daddr) {
-			fprintf(stderr, "no remote with isatap.\n");
-			return -1;
-		}
 		p->i_flags |= SIT_ISATAP;
 	}
 
ipv6/addrconf.c renamed from ipv6/addrconf.c.orig +35 -11

79 lines not on this page · raw message

maintainer
#1 lore raw

From: Sascha Hlusiak <[email protected]>
Date: Sun, 1 Mar 2009 01:34:48 +0100

Quoted 2 lines

That way stateless autoconf works with isatap tunnels and without knowledge of the local v4 address.

This is not my understanding of how ISATAP works on hosts.

Real autoconf is not performed, but rather you must configure your system with a PRL (potential routers list) and these routers are probed periodically in order to keep track of which of them are still functioning and also to perform a sort-of unicast-only autoconf.

I am pretty sure that the person who added the ISATAP code created the current behavior intentionally.

#2 lore raw
Quoted 7 lines
Quoted 2 lines

That way stateless autoconf works with isatap tunnels and without knowledge of the local v4 address.

Real autoconf is not performed, but rather you must configure your system with a PRL (potential routers list) and these routers are probed periodically in order to keep track of which of them are still functioning and also to perform a sort-of unicast-only autoconf.

Well, since ISATAP is just a SIT, it still needs a link local address for autoconf and it needs to have it's v4 Address embedded in the lowest 32 bit of the linklocal address. It will then do normal autoconf with the potential router by sending a proper router solicitation messages, either directed or multicast.

I see that the current implementation disables sending of RS when on ISATAP, which is not correct because RS are needed to do the autoconf.

At least that's the way the implementation in MS Windows works.

Quoted 2 lines

I am pretty sure that the person who added the ISATAP code created the current behavior intentionally.

Well, the current implementation does not cover clients at all, because the ip command refuses to create tunnels without the remote parameter, which is neccessary because it's the potential router.

It then does not derive the linklocal address correctly, making it impossible to do autoconf with the server. Using SIT does work as such as you still need to add the correct ISATAP linklocal address to the interface.

I think ISATAP Client support in Linux could be more automated.

- Sascha

maintainer
#3 lore raw

From: Sascha Hlusiak <[email protected]>
Date: Wed, 4 Mar 2009 18:49:41 +0100

Quoted 24 lines
Quoted 7 lines
Quoted 2 lines

That way stateless autoconf works with isatap tunnels and without knowledge of the local v4 address.

Real autoconf is not performed, but rather you must configure your system with a PRL (potential routers list) and these routers are probed periodically in order to keep track of which of them are still functioning and also to perform a sort-of unicast-only autoconf.

Well, since ISATAP is just a SIT, it still needs a link local address for autoconf and it needs to have it's v4 Address embedded in the lowest 32 bit of the linklocal address. It will then do normal autoconf with the potential router by sending a proper router solicitation messages, either directed or multicast.

I see that the current implementation disables sending of RS when on ISATAP, which is not correct because RS are needed to do the autoconf.

At least that's the way the implementation in MS Windows works.

Quoted 2 lines

I am pretty sure that the person who added the ISATAP code created the current behavior intentionally.

Well, the current implementation does not cover clients at all, because the ip command refuses to create tunnels without the remote parameter, which is neccessary because it's the potential router.

Quoted 5 lines

It then does not derive the linklocal address correctly, making it impossible to do autoconf with the server. Using SIT does work as such as you still need to add the correct ISATAP linklocal address to the interface.

I think ISATAP Client support in Linux could be more automated.

Let's ask the ISATAP author the intent of the situation. CC:'d

Fred?