On Thu, 15 Jan 2004, Gilad Arnold wrote:
> When I said rougher, I referred to the implication on source address
> selection: it seems that a single address is used to access all
> connected networks on a given interface.
No.. its whatever the route table determines for source address
selection, iirc its typically the primary address for that subnet, or at
least the ip util would lead one to believe so. And src selection can be
influenced by adding routes, eg:
# ip addr add 192.168.24.1/24 dev dummy0
# ip addr add 192.168.25.1/24 dev dummy0
# ip addr add 192.168.24.2/24 dev dummy0
# ip -4 ad sho dev dummy0
17: dummy0: <BROADCAST,NOARP,UP> mtu 1500 qdisc noqueue
link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff
inet 192.168.24.1/24 scope global dummy0
inet 192.168.25.1/24 scope global dummy0
inet 192.168.24.2/24 scope global secondary dummy0
# ip ro get 192.168.25.0/24
broadcast 192.168.25.0 dev dummy0 src 192.168.25.1
cache <local,brd> mtu 1500 advmss 1460
# ip ro get 192.168.24.0/24
broadcast 192.168.24.0 dev dummy0 src 192.168.24.1
cache <local,brd> mtu 1500 advmss 1460
# # add a route to specify a different source:
# ip ro add 192.168.25.100/32 dev dummy0 src 192.168.24.2
# ip ro get 192.168.25.100
192.168.25.100 dev dummy0 src 192.168.24.2
cache mtu 1500 advmss 1460
# ip ro ge 192.168.25.10
192.168.25.10 dev dummy0 src 192.168.25.1
cache mtu 1500 advmss 1460
> neighbor 10.0.1.5/24, although the natural choice, and the one taken
> in Linux kernels, would be 10.0.0.1/24.
sure? that'd mean the kernel doesnt do what ip would lead one to
believe. (which'd be annoying).
> Didn't ever check, however I believe it does (otherwise can't tell how
> source address ambiguity problem is resolved).
It doesnt appear to. It has the secondary flag, but it isnt set. Dont
know if that's intentional or whether its a buglet wrt IPv6
implementation.
There doesnt appear to be a way to influence src address selection
either. (then again this may be intentional. It was my vague
understanding IPv6 possibly does not allow multiple subnets/addresses
per link. But I cant remember why I have this vague understanding, nor
can i find any handy reference to answer the question.).
> Gilad
regards,
--paulj
> When I said rougher, I referred to the implication on source address
> selection: it seems that a single address is used to access all
> connected networks on a given interface.
No.. its whatever the route table determines for source address
selection, iirc its typically the primary address for that subnet, or at
least the ip util would lead one to believe so. And src selection can be
influenced by adding routes, eg:
# ip addr add 192.168.24.1/24 dev dummy0
# ip addr add 192.168.25.1/24 dev dummy0
# ip addr add 192.168.24.2/24 dev dummy0
# ip -4 ad sho dev dummy0
17: dummy0: <BROADCAST,NOARP,UP> mtu 1500 qdisc noqueue
link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff
inet 192.168.24.1/24 scope global dummy0
inet 192.168.25.1/24 scope global dummy0
inet 192.168.24.2/24 scope global secondary dummy0
# ip ro get 192.168.25.0/24
broadcast 192.168.25.0 dev dummy0 src 192.168.25.1
cache <local,brd> mtu 1500 advmss 1460
# ip ro get 192.168.24.0/24
broadcast 192.168.24.0 dev dummy0 src 192.168.24.1
cache <local,brd> mtu 1500 advmss 1460
# # add a route to specify a different source:
# ip ro add 192.168.25.100/32 dev dummy0 src 192.168.24.2
# ip ro get 192.168.25.100
192.168.25.100 dev dummy0 src 192.168.24.2
cache mtu 1500 advmss 1460
# ip ro ge 192.168.25.10
192.168.25.10 dev dummy0 src 192.168.25.1
cache mtu 1500 advmss 1460
> neighbor 10.0.1.5/24, although the natural choice, and the one taken
> in Linux kernels, would be 10.0.0.1/24.
sure? that'd mean the kernel doesnt do what ip would lead one to
believe. (which'd be annoying).
> Didn't ever check, however I believe it does (otherwise can't tell how
> source address ambiguity problem is resolved).
It doesnt appear to. It has the secondary flag, but it isnt set. Dont
know if that's intentional or whether its a buglet wrt IPv6
implementation.
There doesnt appear to be a way to influence src address selection
either. (then again this may be intentional. It was my vague
understanding IPv6 possibly does not allow multiple subnets/addresses
per link. But I cant remember why I have this vague understanding, nor
can i find any handy reference to answer the question.).
> Gilad
regards,
--paulj