EG-DesignStudio Forum » Server Applications

Setting up Network Alias on CentOS 5.3

(1 post)
  • Started 2 years ago by xeroxss
  1. xeroxss
    The Jedi


    Login to Send PM

    Setting up Network Alias on CentOS 5.3

    Setting up a network alias is basically using multiple ip´s on one NIC interface or Lan Card.
    This is useful if you are hosting multiple websites that uses certificate residing on only one server.
    Note the ip? should be on the same subnet for it to work.

    lets sat eth0 is configured with IP number 10.10.10.2

    to configure eth0:0 alias

    sudo as root # /sbin/ifconfig eth0:0 10.10.10.3 up

    to verify that it is running # /sbin/ifconfig -a

    or ping 10.10.10.3 this is not permanent so if you reboot your changes will be gone.

    to make it permanent you need to go to # cd /etc/sysconfig/network-scripts/

    you need to copy ifcfg-eth0 and create ifcfg-eth0:0

    to do that # cp /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth0:0

    then # nano /etc/sysconfig/network-scripts/eth0:0 change the assigned IP and set ONBOOT=YES

    so if your eth0 is:

    # Intel Corporation 82566DM-2 Gigabit Network Connection
    DEVICE=eth0
    BOOTPROTO=none
    HWADDR=00:1c:c0:ad:86:e5
    ONBOOT=yes
    NETMASK=255.255.255.0
    IPADDR=10.10.10.2
    GATEWAY=10.10.10.1
    TYPE=Ethernet

    then eth0:0 will be:

    # Intel Corporation 82566DM-2 Gigabit Network Connection
    DEVICE=eth0
    BOOTPROTO=none
    HWADDR=00:1c:c0:ad:86:e5
    ONBOOT=yes
    NETMASK=255.255.255.0
    IPADDR=10.10.10.3
    GATEWAY=10.10.10.1
    TYPE=Ethernet

    "Tempos Fugit - Call me the Jedi"
    Posted 2 years ago #

RSS feed for this topic

Reply

You must log in to post.