We are in the process of migrating this forum. A new space will be available soon. We are sorry for the inconvenience.

Need Help for adding additional IP


pedroquinton
27-11-2016, 18:36
thanks,i had also the same doubt

chong83
26-11-2016, 18:33
guy i need help for my additional IP , i am try almost 1 month still cannot fix it

this is my ifconfig

Code:
eth0      Link encap:Ethernet  HWaddr fa:16:3e:e4:02:e5
          inet addr:144.217.XXX.28  Bcast:144.217.XXX.28  Mask:255.255.255.255
          inet6 addr: fe80::f816:3eff:fee4:2e5/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:16013 errors:0 dropped:0 overruns:0 frame:0
          TX packets:9874 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:21673164 (20.6 MiB)  TX bytes:735678 (718.4 KiB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:9 errors:0 dropped:0 overruns:0 frame:0
          TX packets:9 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:1008 (1008.0 B)  TX bytes:1008 (1008.0 B)
netstat -rn

Code:
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
0.0.0.0         144.217.XXX.1    0.0.0.0         UG        0 0          0 eth0
144.217.XXX.1    0.0.0.0         255.255.255.255 UH        0 0          0 eth0
this is my default /etc/network/interfaces

Code:
# The loopback network interface
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
        address 144.217.XXX.28
        netmask 255.255.255.255
        post-up /sbin/ip route add 144.217.XXX.1 dev eth0
        post-up /sbin/ip route add default via 144.217.XXX.1
        pre-down /sbin/ip route del default via 144.217.XXX.1
        pre-down /sbin/ip route del 144.217.XXX.1 dev eth0
        dns-nameserver 213.186.33.99
        dns-search vps.ovh.ca
i wanna add this 2 IP into my VPS, so i try terminal enter
Code:
# up ip addr add 198.100.XXX.61/32 dev eth0
# up ip addr add 198.100.XXX.62/32 dev eth0
ip address show eth0

Code:
2: eth0:  mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether fa:16:3e:9c:00:90 brd ff:ff:ff:ff:ff:ff
    inet 144.217.XXX.28/32 brd 144.217.84.28 scope global eth0
       valid_lft forever preferred_lft forever
    inet 198.100.XXX.61/32 scope global eth0
       valid_lft forever preferred_lft forever
    inet 198.100.XXX.62/32 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::f816:3eff:fe9c:90/64 scope link
       valid_lft forever preferred_lft forever
i only can ping in local host cannot ping outside, please help