Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

So here's a quick overview of my setup:

I purchased a new Mac Mini server and I am hosting it with a Mac Mini co-lo facility. At first I had them keep OSX installed and I was using VirtualBox to place CentOS 6.4 (minimal) in a VM. I have 5 public IP's assigned to my Mac Mini (one physical NIC). All are on the same subnet and IP block thus have the same gateway. I ran into an issue with running the VM in VirtualBox where only one of the IP addresses setup in CentOS would work from the outside (public) BUT all of them would work if accessed from the host system (using the public IP). I figured OSX was doing something weird so I had the host install ESXi 5.5 on the Mac Mini (had contemplated doing that anyway).

So now I have ESXi 5.5 installed and a single VM (CentOS 6.4 minimal) running on it. I proceeded to setup my IP addresses for CentOS and now I'm running into the same exact issue. I can ping (and obviously access) the main ESXi IP, and I can ping and access the IP for eth0 in CentOS, but any additional IP's aren't accessible.

Here are pertinent files and their current setup:

/etc/sysconfig/network:

NETWORKING=yes
HOSTNAME=my.hostname.com
GATEWAY=208.x.x.1

/etc/sysconfig/network-scripts/ifcfg-eth0:

DEVICE=eth0
HWADDR=00:0C:29:78:42:C4
TYPE=Ethernet
UUID=1eeafa3a-87b1-4080-9de0-8e4dd9420ba3
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=static
IPADDR=208.x.x.12
NETMASK=255.255.255.0

/etc/sysconfig/network-scripts/ifcfg-eth0:

DEVICE=eth1
HWADDR=00:0C:29:78:42:CE
TYPE=Ethernet
UUID=be671894-6044-4870-b1e1-2a9c1758c551
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=static
IPADDR=208.x.x.13
NETMASK=255.255.255.0

ip addr:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
    link/ether 00:0c:29:78:42:c4 brd ff:ff:ff:ff:ff:ff
    inet 208.x.x.12/24 brd 208.x.x.255 scope global eth0
    inet6 fe80::20c:29ff:fe78:42c4/64 scope link 
       valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
    link/ether 00:0c:29:78:42:ce brd ff:ff:ff:ff:ff:ff
    inet 208.x.x.13/24 brd 208.x.x.255 scope global eth1
    inet6 fe80::20c:29ff:fe78:42ce/64 scope link 
       valid_lft forever preferred_lft forever
4: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
    link/ether 00:0c:29:78:42:d8 brd ff:ff:ff:ff:ff:ff
    inet 208.x.x.14/24 brd 208.x.x.255 scope global eth2
    inet6 fe80::20c:29ff:fe78:42d8/64 scope link 
       valid_lft forever preferred_lft forever
5: eth3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
    link/ether 00:0c:29:78:42:e2 brd ff:ff:ff:ff:ff:ff
    inet 208.x.x.15/24 brd 208.x.x.255 scope global eth3
    inet6 fe80::20c:29ff:fe78:42e2/64 scope link 
       valid_lft forever preferred_lft forever

ip route:

208.x.x.0/24 dev eth0  proto kernel  scope link  src 208.x.x.12 
208.x.x.0/24 dev eth1  proto kernel  scope link  src 208.x.x.13 
208.x.x.0/24 dev eth2  proto kernel  scope link  src 208.x.x.14 
208.x.x.0/24 dev eth3  proto kernel  scope link  src 208.x.x.15 
169.254.0.0/16 dev eth0  scope link  metric 1002 
169.254.0.0/16 dev eth1  scope link  metric 1003 
169.254.0.0/16 dev eth2  scope link  metric 1004 
169.254.0.0/16 dev eth3  scope link  metric 1005 
default via 208.x.x.1 dev eth0 

ifconfig -a:

eth0      Link encap:Ethernet  HWaddr 00:0C:29:78:42:C4  
          inet addr:208.x.x.12  Bcast:208.x.x.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:fe78:42c4/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3549 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1188 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:256360 (250.3 KiB)  TX bytes:120840 (118.0 KiB)

eth1      Link encap:Ethernet  HWaddr 00:0C:29:78:42:CE  
          inet addr:208.x.x.13  Bcast:208.x.x.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:fe78:42ce/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3160 errors:0 dropped:0 overruns:0 frame:0
          TX packets:17 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:223374 (218.1 KiB)  TX bytes:1238 (1.2 KiB)

eth2      Link encap:Ethernet  HWaddr 00:0C:29:78:42:D8  
          inet addr:208.x.x.14  Bcast:208.x.x.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:fe78:42d8/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2266 errors:0 dropped:0 overruns:0 frame:0
          TX packets:17 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:136142 (132.9 KiB)  TX bytes:1238 (1.2 KiB)

eth3      Link encap:Ethernet  HWaddr 00:0C:29:78:42:E2  
          inet addr:208.x.x.15  Bcast:208.x.x.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:fe78:42e2/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2260 errors:0 dropped:0 overruns:0 frame:0
          TX packets:17 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:135782 (132.5 KiB)  TX bytes:1238 (1.2 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:16436  Metric:1
          RX packets:937 errors:0 dropped:0 overruns:0 frame:0
          TX packets:937 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:123340 (120.4 KiB)  TX bytes:123340 (120.4 KiB)

I'm only including the setup for eth0 and eth1 since eth2/3 are setup the same way. Again, I can only access one at a time. What am I missing?

share|improve this question

1 Answer 1

I have NO idea why it worked sporadically with the above setup, but I did end up resolving this by using just one ifcfg-eth0 config file with just placing the additional IP's as IPADDR2/3/4 and NETMASK2/3/4.

I didn't even bother trying that initially since I had it working with the above config on more than one occasion...it just wasn't stable.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.