by Void Main » Wed Sep 01, 2004 9:58 am
You can't assign more than one MAC address to an interface but you can easily assign multiple IP addresses to an interface:
To create a subinterface on your eth0 with IP address iii.iii.iii.iii and netmask of mmm.mmm.mmm.mmm you would:
# ifconfig eth0:0 iii.iii.iii.iii netmask mmm.mmm.mmm.mmm
To view it you would:
# ifconfig eth0:0
Then of course you could add a route with the "route" command if needed.
You can add more (eth0:1, eth0:2, etc). Before you do any of that you should notice that these subinterfaces already exist, just are not assigned IP addresses. Before setting an IP address with ifconfig just do this:
# ifconfig eth0:0
# ifconfig eth0:1
etc.
Depending on your distro would depend on how you would declare it in configuration files and graphical utilities but that is the way they all would do it on the command line.