Skip to contentSkip to conversation

"src" attribute ignored for IPv6 (preferred source address selection)

DISCUSSION Xavier Roche 3 participants 3 messages Sep 4, 2010 – Oct 29, 2010

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

Hi folks,

In an attempt to change the source address in various conditions (network prefix, outgoing protocol, user owner id, ..), it appeared that the src attribute of an IPv6 route command (ip -6 route add .. src ..) was simply ignored.

The outgoing interface can be selected, but not the preferred source address (see (1)), which remains always the same within an interface.

If this a bug ? Or a known limitation of the kernel ?

(1) IPROUTE2 Utility Suite Howto
"src ADDRESS --- the source address to prefer using when sending to the destinations covered by route prefix. This address must be defined on a local machine interface. This will come into play when routes and rules are combined with the masquerade rules of the ipchains firewall we discuss later."

#1 lore raw
Quoted 9 lines · Xavier Roche

In an attempt to change the source address in various conditions (network prefix, outgoing protocol, user owner id, ..), it appeared that the src attribute of an IPv6 route command (ip -6 route add .. src ..) was simply ignored.

The outgoing interface can be selected, but not the preferred source address (see (1)), which remains always the same within an interface.

If this a bug ? Or a known limitation of the kernel ?

Well, at least it was a known limitation six years ago, when I discovered the same:

http://lkml.indiana.edu/hypermail/linux/kernel/0409.0/1768.html

Unfortunately I don't have the time (and most probably not the necessary kernel knowhow) to hack this up myself, but I'm still interested. :-)

Best regards,
Daniel

Signature · 1 line
CLUE-RIPE -- Jabber: [email protected] -- dr@IRCnet -- PGP: 0xA85C8AA0
maintainer
#2 lore raw

From: Daniel Roesen <[email protected]>
Date: Sun, 17 Oct 2010 03:12:08 +0200

Quoted 4 lines

http://lkml.indiana.edu/hypermail/linux/kernel/0409.0/1768.html

Unfortunately I don't have the time (and most probably not the necessary kernel knowhow) to hack this up myself, but I'm still interested. :-)

The routing table in ipv6 can very much handle routing by source address now, if the ip commands mention do not work it's some bug in the tool or the routing table rule adding code in the kernel.

It's not a fundamental limitation any more.