Add an IP alias to ethernet interface

Sebastian Faulborn sfaulborn at web.de
Sat Jun 9 09:23:16 PDT 2007


>/ On Jun 8, 2007, at 6:50 PM, /*Andrew Beverley*/ wrote:
>
/>A lot of the information on the web that I came across is quite old and
>referred to either creating a whole new interface directory (eth0:0 -
>which of course didn't work), or using ifconfig.

Why does that not work? It has been working for the last 2 years on my
server!

/etc/sysconfig/network-devices$ ll
drwxr-xr-x 2 root root   72 2006-06-04 01:38 ifconfig.eth0
drwxr-xr-x 2 root root   72 2006-06-12 13:57 ifconfig.eth0:0
drwxr-xr-x 2 root root   72 2006-11-28 01:15 ifconfig.eth0:1
drwxr-xr-x 2 root root   72 2006-11-28 01:11 ifconfig.eth0:2
-rwxr-xr-- 1 root root 2.6K 2006-06-03 22:38 ifdown
-rwxr-xr-- 1 root root 2.5K 2006-06-03 22:38 ifup
drwxr-xr-x 2 root root  120 2006-06-03 22:38 services

cat ifconfig.eth0/ipv4
ONBOOT=yes
SERVICE=ipv4-static
IP=62.141.58.93
GATEWAY=62.141.58.65
PREFIX=26
BROADCAST=62.141.58.127

cat ifconfig.eth0\:0/ipv4 
ONBOOT=yes
SERVICE=ipv4-static
IP=62.141.59.93
#GATEWAY=62.141.58.65
PREFIX=26
BROADCAST=62.141.59.127

etc.

As far as I can see, there is no need to change anything in the scripts. Its enough
to mention this possibility in the book. A change in the scripts is only
necessary if you insist on wanting to use names which don't conform to "ethX:Y" -
ie. aliases. The question is why bother since you don't have any added functionality
by using aliases other than nice names?

Sebastian Faulborn
Homepage: http://www.secure-slinux.org








More information about the lfs-dev mailing list