Showing posts with label How to setup More Than One IP address on single NIC in Linux. Show all posts
Showing posts with label How to setup More Than One IP address on single NIC in Linux. Show all posts

Wednesday, July 18

How to setup More Than One IP address on single NIC in Linux

Setting up two IP address on single NIC
There are some times we require two IP address to set up so that we can make a Linux box as a router. It can be possible without even having two NIC cards. We can configure more than two different IP address on single Network Card as shown below:
This example is on Ethernet.
STEP 1: Setting up first IP address. Edit /etc/sysconfig/network-scripts/ifcfg-eth0 on Red-hat Linux box and give the following entries as shown.
vi /etc/sysconfig/network-scripts/ifcfg-eth0
  • DEVICE=eth0
  • BOOTPROTO=static
  • IPADDR=192.168.1.10
  • NETMASK=255.255.255.0
  • NETWORK=192.168.1.0
  • ONBOOT=yes