lost and found ( for me ? )

Linux Mint 12 : configure IP aliases


Configure IP alias temporarily

ifconfig eth1:0 1.1.1.10 netmask 255.255.255.0 up

# LANG=C ifconfig eth1:0 | grep "inet addr"
         inet addr:1.1.1.10  Bcast:1.1.1.255  Mask:255.255.255.0

cerase IP alias
# ifconfig eth1:0 down


Configure IP alias permanently

edit /etc/network/interfaces file
auto eth1
iface eth1 inet static
       address 192.168.200.150
       netmask 255.255.255.0
       up ifconfig eth1 add 1.1.1.10 netmask 255.255.255.0

# /etc/init.d/networking restart

# LANG=C ifconfig eth1:0 | grep "inet addr"
         inet addr:1.1.1.10  Bcast:133.199.130.0  Mask:255.255.255.0


In my environment , I can’t assign IP aliases when editing interfaces file as below
auto eth1
iface eth1 inet static
       address 192.168.200.150
       netmask 255.255.255.0

auto eth1:0
iface eth1:0 inet static
       address 1.0.0.10
       netmask 255.255.255.0

# /etc/init.d/networking restart


can’t assign the IP alias…
# LANG=C ifconfig eth1:0 | grep "inet addr"


I don’t know why :(

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.