Open the /etc/network/interfaces and add a virtual interface eth0:1.
# Loopback device:
auto lo
iface lo inet loopback
# The primary network interfaces
auto eth0
# device: eth0
iface eth0 inet static
address 192.168.0.10
broadcast 192.168.0.255
netmask 255.255.255.0
gateway 192.168.0.1
# virtual device: eth0:1
iface eth0:1 inet static
address 192.168.0.11
netmask 255.255.255.0
# default route to access subnet
up route add -net 192.168.0.0 netmask 255.255.255.0 gw 192.168.0.1 eth0
Bring up the virtual interface eth0:1
root:~# ifup eth0:1
Resolve the IP Address
tux@earth:~$ host 192.168.0.11
11.0.168.192.in-addr.arpa domain name pointer earth.fritz.box.
Ping the IP Address
tux@earth:~$ ping 192.168.0.11
PING 192.168.0.11 (192.168.0.11) 56(84) bytes of data.
64 bytes from 192.168.0.11: icmp_req=1 ttl=64 time=0.030 ms
64 bytes from 192.168.0.11: icmp_req=2 ttl=64 time=0.027 ms
64 bytes from 192.168.0.11: icmp_req=3 ttl=64 time=0.020 ms
--- 192.168.0.11 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1998ms
rtt min/avg/max/mdev = 0.020/0.025/0.030/0.007 ms