Koozali.org: home of the SME Server

How do I add an additional IP number to my NIC

Offline albatroz

  • *****
  • 159
  • +0/-0
How do I add an additional IP number to my NIC
« on: July 20, 2005, 11:45:34 PM »
I have an SME Box in server mode.
However I need to add another IP number to the NIC.
The IP is from the same LAN.
What should I do?

Offline briank

  • ****
  • 146
  • +0/-0
How do I add an additional IP number to my NIC
« Reply #1 on: July 21, 2005, 01:37:44 AM »
I have done this in linux but not specifically sme.
At a command line type  /sbin/ifconfig eth0:0 192.168.0.150 (your-ipaddress-here) netmask 255.255.255.0 up to test it works and assuming eth0 is your internal n/w card. This wont survive a reboot. Some people just put this command in the the boot script rc.local but better to add it to /etc/sysconfig/network-scripts.
Copy your existing ifcfg-eth0  to ifcfg-eth0:0 and edit to change the Device to Device=eth0:0 and your new ip address.
./ifup eth0:0 to get it up.
This takes no account of the sme templating system and probably the new script should be copied to /etc/e-smith/templates/custom/etc/sysconfig/networkscripts but others may need to advise you of this.
Good luck
Brian