1

I have two different Public IP addresses of two different subnets : 1) 206.190.147.100 2) 198.105.208.3

I am using CentOS 6.5 and my configs are as follows :

root> cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=static
ONBOOT=yes
IPADDR=206.190.147.100
NETMASK=255.255.255.240
GATEWAY=206.190.147.98

root> cat /etc/sysconfig/network-scripts/ifcfg-eth0\:0
DEVICE=eth0:0
BOOTPROTO=static
ONBOOT=yes
IPADDR=198.105.208.3
NETMASK=255.255.255.240
GATEWAY=198.105.208.1

Now as you can see the primary IP is 206.190.147.100 but when I run curl to check my IP address :

root> curl http://some.api.com/ip.php
Your IP is : 198.105.208.3

Why is my primary IP address being listed as 198.105.208.3 ?

user1066991
  • 471
  • 2
  • 5
  • 6

1 Answers1

0

Have you tried to restart the server/network? The configs aren't updated automatically right away. You have to restart the service/server manually.

sudo service networking restart
user1622951
  • 147
  • 6