[OLSR-users] multiple ip address on the olsrd iface

Roar Bjørgum Rotvik (spam-protected)
Thu Dec 8 12:42:45 CET 2005


Andreas Tønnesen wrote:
> 
> olsrd cannot be used with virtual eth0:x interfaces due to the use
> of the BINDTODEVICE setsockopt.
> But I think he is using IPv6 where you can assign multiple IPv6
> addresses to the same interface.

I just want to inform you that you also can have multiple IPv4 addresses
assigned to the same interface without using aliases (eth0:x).

The command ifconfig is regarded somewhat obsoleted on linux and it is
preferred to use the command "ip".

Add many IPv4 addresses to eth0 (also works with IPv6 adresses):
ip addr add 192.168.0.1/24 dev eth0
ip addr add 192.168.0.2/24 dev eth0
ip addr add 192.168.0.3/24 dev eth0
... And so on

Delete IP addresses with "ip addr del 192.168.0.2/24 dev eth0" and so on.

"ip addr" will list addresses assigned to all interfaces.

"ip" can also be used to configure links, tunnels, routes and so on.
Check out http://www.lartc.org/howto/ for more info.

-- 
Roar B. Rotvik




More information about the Olsr-users mailing list