1

I've got two hosts running the same release of RHEL (6.4). I've been given eight IP addresses to put onto one NIC in each host.

On host A, I manually created ifcfg-eth0, ifcfg-etho:1, ifcfg-etho:2, ifcfg-etho:3, ifcfg-etho:4, ifcfg-etho:5, ifcfg-etho:6, ifcfg-etho:7 ifcfg-eth0 looks like this:

HWADDR=xx:xx:xx:xx:xx:xx
TYPE=Ethernet
DEVICE=eth0
BOOTPROTO=none
IPADDR=xx.xx.xx.xx
PREFIX=24
GATEWAY=xx.xx.xx.xx
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME=VLAN20
ONBOOT=yes

In the secondary interface files, I put this:

DEVICE=eth0:x
IPADDR=xx.xx.xx.xx
PREFIX=24
GATEWAY=xx.xx.xx.xx
ONBOOT=yes
TYPE=Ethernet
BOOTPROTO=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no

When I viewed the NetworkManager GUI it showed one entry called VLAN20 with all of the IPs under the IPv4 Settings tab. Now, on Host B, I've created the same files, with the same fields. However the NetworkManager GUI doesn't show VLAN20, it shows seven items with the name "System eth0:x" (and no mention of just eth0). If I use the NetworkManager GUI on host B to mimic the settings on host A, it creates a single ifcfg-VLAN20 file with all of the addresses in, and the secondary interfaces don't show up in ifconfig...

What's happening?

4
  • What does ifconfig -a show you? I personally don't trust the NetworkManager GUI...
    – John
    May 1, 2014 at 13:04
  • 1
    Why do they all have gateways?
    – Chopper3
    May 1, 2014 at 13:05
  • 1
    Are all these IP addresses on the same subnet? If not, you're probably need to be using VLANs. May 1, 2014 at 13:49
  • @John On host A ifconfig -a shows all the interfaces, including alias ones. Host B only shows the physical interface. @Chopper3 They all have gateways as that is how I was told to congure them. @ChristopherKarel The interfaces are on the same subnet, on the same VLAN. Per host, the eight IP addresses are contiguous.
    – forquare
    May 1, 2014 at 16:18

1 Answer 1

2

First of all, I think you have too many information (and wrong information) in the ifcfg-eth?:? files:

1) I don't think you need/should specify the GATEWAY in all of them, at least to avoid confusions.

2) BOOTPROTO should probably not exist and even if it should, it has an incorrect value (it can be "none", "bootp" or "dhcp").

3) ONBOOT should never be used for alias interfaces and I've seen a lot of trouble caused by this before. It should always be ONPARENT.

4) I think you should always specify the default gateway in /etc/sysconfig/network rather than interface definitions. But that may probably be a personal opinion without a real proof that it is better, just that it sounds more logical to me.

5) The VLAN20 thing that you see in NetworkManager is there from the NAME option, so specify it in your config files as it may be missing I think.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .