Multiple aliases, but only one works

Issues related to configuring your network
Post Reply
gavin
Posts: 10
Joined: 2005/03/10 18:34:29

Multiple aliases, but only one works

Post by gavin » 2005/10/07 15:13:59

I've got a CentOS 4.1 machine (completely up to date) with a single NIC, which I need to have 2 addresses. I've statically configured its main address in [b]/etc/sysconfig/network-scripts/ifcfg-eth0[/b] which works fine (I can ping, SSH, serve FlexLM licenses, etc), and I've statically configured its alias in [b]/etc/sysconfig/network-scripts/ifcfg-eth0:1[/b]. However, although this alias shows as [b]UP[/b] and [b]RUNNING[/b] in [b]ifconfig[/b], it won't respond to any traffic. I can't ping it, SSH, or anything. I've tried disabling the firewall and it made no difference. Both the addresses are on the same subnet, so I don't think I should have any problems with routing.

I can't get the exact contents of the ifcfg* files, as I'm waiting for someone to reboot the machine for me (it's in a remote location and I've managed to block myself out of it), but can provide them later if required.

Cheers

teleport
Posts: 114
Joined: 2005/09/09 05:30:18
Contact:

Re: Multiple aliases, but only one works

Post by teleport » 2005/10/10 17:07:50

Something wrong with Your config files. My setup, 2 nics, one of them with 4 ip addresses:

[root@a2 root]# cd /etc/sysconfig/network-scripts/
[root@a2 network-scripts]# ls -l ifcfg*
-rw-r--r-- 1 root root 141 Jul 8 20:42 ifcfg-eth0
-rw-r--r-- 1 root root 120 Jul 8 21:39 ifcfg-eth1
-rw-r--r-- 1 root root 122 Jul 8 21:39 ifcfg-eth1:1
-rw-r--r-- 1 root root 122 Aug 24 21:07 ifcfg-eth1:2
-rw-r--r-- 1 root root 122 Aug 24 21:07 ifcfg-eth1:3
-rw-r--r-- 1 root root 51 Jul 7 17:32 ifcfg-eth2
-rw-r--r-- 1 root root 254 Jun 21 2001 ifcfg-lo

[root@a2 network-scripts]# cat ifcfg-eth1
DEVICE=eth1
BOOTPROTO=static
BROADCAST=11.22.42.255
IPADDR=11.22.42.1
NETMASK=255.255.255.0
TYPE=Ethernet
ONBOOT=yes

[root@a2 network-scripts]# cat ifcfg-eth1:1
DEVICE=eth1:1
BOOTPROTO=static
BROADCAST=11.22.43.255
IPADDR=11.22.43.1
NETMASK=255.255.255.0
TYPE=Ethernet
ONBOOT=yes

Default gw is set in /etc/sysconfig/network. Hope this helps.

Post Reply

Return to “CentOS 4 - Networking Support”