With one problem down I still have another remaining. Since the installation of our primairy webserver we have had a problem with the network aliasses.
Our server has 8 IP adresses so we used the tool provided in the GUI to specify (and name - for our own convinience) eth0 aliasses with the other 7 adresses. After setting them up, applying them, activating them and restarting 'networking' (I dare say this is a lot of button pushing just to enable one NIC) all is well and every program can use its preferred IP.
However, after a reboot, all aliasses are disabled: they are present in the configuration but they are not activated. I feared I did something wrong so I removed all addresses, tried to find more clues in the docs and now I'm back where I started.
How can I figure out what is wrong? I might add that I am not afraid of using a console (actually prefer it on linux servers) but I am new to CentOS so I tried to do everything by using the GUI - which in this case keeps failing...
Regards, Berend Dekens
Berend Dekens wrote:
However, after a reboot, all aliasses are disabled: they are present in the configuration but they are not activated. I feared I did something wrong so I removed all addresses, tried to find more clues in the docs and now I'm back where I started.
Go into /etc/sysconfig/network-scripts and edit the corresponding files in there.
If they have "ONBOOT=YES" change that to "ONPARENT=YES". If they have neither, add ONPARENT=YES.
Cheers,
Ralph
Ralph Angenendt wrote on Thu, 13 Nov 2008 12:16:22 +0100:
If they have "ONBOOT=YES" change that to "ONPARENT=YES". If they have neither, add ONPARENT=YES.
FYI: I've been creating NIC aliases with ONBOOT=yes for quite some time without a problem as I wasn't aware of the ONPARENT directive. I usually just copy the file and change it accordingly. The trap I usually run into is that I forget to change DEVICE.
Kai
None of the files have ONBOOT but they do have ONPARENT...
I'll add the ONBOOT param and reboot the server tonight to see if it worked.
Cheers, Berend
Ralph Angenendt wrote:
Berend Dekens wrote:
However, after a reboot, all aliasses are disabled: they are present in the configuration but they are not activated. I feared I did something wrong so I removed all addresses, tried to find more clues in the docs and now I'm back where I started.
Go into /etc/sysconfig/network-scripts and edit the corresponding files in there.
If they have "ONBOOT=YES" change that to "ONPARENT=YES". If they have neither, add ONPARENT=YES.
Cheers,
Ralph
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Update: Didn't help - but this time I was connected to a console so I could see the bootup and I get this: "SIOCSIFFLAGS: Cannot assign requested address"
Strange thing is that I have multiple aliasses and only 3 errors...
I tried Google with this error and I see lots of people with Ubuntu running into that one but CentOS hasn't got the same scripts so their solution won't help me.
Cheers, Berend
Berend Dekens wrote:
None of the files have ONBOOT but they do have ONPARENT...
I'll add the ONBOOT param and reboot the server tonight to see if it worked.
Cheers, Berend ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
In article 491C3DFA.2070400@cyberwizzard.nl, Berend Dekens berend@cyberwizzard.ath.cx wrote:
Update: Didn't help - but this time I was connected to a console so I could see the bootup and I get this: "SIOCSIFFLAGS: Cannot assign requested address"
Strange thing is that I have multiple aliasses and only 3 errors...
I tried Google with this error and I see lots of people with Ubuntu running into that one but CentOS hasn't got the same scripts so their solution won't help me.
Could you post the output of: head -20 /etc/sysconfig/network-scripts/ifcfg-eth0*
Cheers Tony
Tony Mountifield wrote:
Could you post the output of: head -20 /etc/sysconfig/network-scripts/ifcfg-eth0*
Cheers Tony
[root@hagrid network-scripts]# head -20 /etc/sysconfig/network-scripts/ifcfg-eth0* # Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE] DEVICE=eth0 BOOTPROTO=none BROADCAST=87.233.3.255 HWADDR=00:0C:29:26:D9:E6 IPADDR=87.233.3.247 NETMASK=255.255.255.240 NETWORK=87.233.3.240 ONBOOT=yes GATEWAY=87.233.3.241 TYPE=Ethernet USERCTL=no IPV6INIT=no PEERDNS=yes
And for good measure the dump of our 2nd aliased NIC: # Please read /usr/share/doc/initscripts-*/sysconfig.txt # for the documentation of these parameters. GATEWAY=87.233.68.193 TYPE=Ethernet DEVICE=eth0:2 BOOTPROTO=none NETMASK=255.255.255.224 IPADDR=87.233.68.195 USERCTL=no IPV6INIT=no PEERDNS=yes ONPARENT=yes
Note that I removed the previously added ONBOOT param as I stated before because according to the docs it was not allowed (and it didn't made any difference).
Cheers, Berend
In article 491C43D5.8010002@cyberwizzard.nl, Berend Dekens berend@cyberwizzard.ath.cx wrote:
Tony Mountifield wrote:
Could you post the output of: head -20 /etc/sysconfig/network-scripts/ifcfg-eth0*
Cheers Tony
[root@hagrid network-scripts]# head -20 /etc/sysconfig/network-scripts/ifcfg-eth0* # Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE] DEVICE=eth0 BOOTPROTO=none BROADCAST=87.233.3.255 HWADDR=00:0C:29:26:D9:E6 IPADDR=87.233.3.247 NETMASK=255.255.255.240 NETWORK=87.233.3.240 ONBOOT=yes GATEWAY=87.233.3.241 TYPE=Ethernet USERCTL=no IPV6INIT=no PEERDNS=yes
And for good measure the dump of our 2nd aliased NIC: # Please read /usr/share/doc/initscripts-*/sysconfig.txt # for the documentation of these parameters. GATEWAY=87.233.68.193 TYPE=Ethernet DEVICE=eth0:2 BOOTPROTO=none NETMASK=255.255.255.224 IPADDR=87.233.68.195 USERCTL=no IPV6INIT=no PEERDNS=yes ONPARENT=yes
Note that I removed the previously added ONBOOT param as I stated before because according to the docs it was not allowed (and it didn't made any difference).
Hmmm, in a previous post you said you had multiple aliases and three errors. But above, you have only posted one main device and one alias. Are they ones that succeed of fail?
The reason I said to use "head -20" and "ifcfg-eth0*" was that if you used that command literally, it would (a) output ALL eth0 aliases, and (b) prepend each one automatically with a filename header, assuming there is more than one file.
It's difficult to suggest what the problem might be unless you list EVERY interface and alias, showing at least the IP and netmask information for each one. Otherwise we are just guessing.
When you get a moment, please read right through the following page: http://www.catb.org/~esr/faqs/smart-questions.html
Cheers Tony
Tony Mountifield wrote:
Hmmm, in a previous post you said you had multiple aliases and three errors. But above, you have only posted one main device and one alias. Are they ones that succeed of fail?
Every one of them fails except eth0 itself (which is good or I would have locked myself out).
The reason I said to use "head -20" and "ifcfg-eth0*" was that if you used that command literally, it would (a) output ALL eth0 aliases, and (b) prepend each one automatically with a filename header, assuming there is more than one file.
I used the GUI to create the interfaces: the files are not called 'ifcfg-eth0:1' etc but they are named. But I get your point so heres the full listing:
[root@hagrid ~]# cat /etc/sysconfig/network-scripts/ifcfg-* # Please read /usr/share/doc/initscripts-*/sysconfig.txt # for the documentation of these parameters. TYPE=Ethernet DEVICE=eth0:1 BOOTPROTO=none NETMASK=255.255.255.0 IPADDR=10.1.1.128 USERCTL=no IPV6INIT=no PEERDNS=yes ONPARENT=yes
# Please read /usr/share/doc/initscripts-*/sysconfig.txt # for the documentation of these parameters. GATEWAY=87.233.68.193 TYPE=Ethernet DEVICE=eth0:2 BOOTPROTO=none NETMASK=255.255.255.224 IPADDR=87.233.68.195 USERCTL=no IPV6INIT=no PEERDNS=yes ONPARENT=yes
# Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE] DEVICE=eth0:3 BOOTPROTO=none IPADDR=87.233.68.194 BROADCAST=87.233.68.223 NETMASK=255.255.255.224 NETWORK=87.233.68.192 GATEWAY=87.233.68.193 TYPE=Ethernet USERCTL=no IPV6INIT=no PEERDNS=yes ONPARENT=yes ONBOOT=yes
# Please read /usr/share/doc/initscripts-*/sysconfig.txt # for the documentation of these parameters. GATEWAY=87.233.68.193 TYPE=Ethernet DEVICE=eth0:4 BOOTPROTO=none NETMASK=255.255.255.224 IPADDR=87.233.68.196 USERCTL=no IPV6INIT=no PEERDNS=yes ONPARENT=yes ONBOOT=yes
# Please read /usr/share/doc/initscripts-*/sysconfig.txt # for the documentation of these parameters. GATEWAY=87.233.68.193 TYPE=Ethernet DEVICE=eth0:5 BOOTPROTO=none NETMASK=255.255.255.224 IPADDR=87.233.68.197 USERCTL=no IPV6INIT=no PEERDNS=yes ONPARENT=yes ONBOOT=yes
# Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE] DEVICE=eth0 BOOTPROTO=none BROADCAST=87.233.3.255 HWADDR=00:0C:29:26:D9:E6 IPADDR=87.233.3.247 NETMASK=255.255.255.240 NETWORK=87.233.3.240 ONBOOT=yes GATEWAY=87.233.3.241 TYPE=Ethernet USERCTL=no IPV6INIT=no PEERDNS=yes DEVICE=lo IPADDR=127.0.0.1 NETMASK=255.0.0.0 NETWORK=127.0.0.0
# If you're having problems with gated making 127.0.0.0/8 a martian, # you can change this to something else (255.255.255.255, for example) BROADCAST=127.255.255.255 ONBOOT=yes NAME=loopback
I went over the configs a couple of times and the last attempt to restart one interface using ifup and ifdown did not show that error (and the interfaces come up) - a full networking restart gives those errors and once again the aliasses don't come up. Even though the networking script says [OK] for each interface... I'm confused...
Berend
Hi Berend,
On Thu, Nov 13, 2008 at 10:12, Berend Dekens berend@cyberwizzard.nl wrote:
Tony Mountifield wrote:
Could you post the output of: head -20 /etc/sysconfig/network-scripts/ifcfg-eth0*
[root@hagrid network-scripts]# head -20 /etc/sysconfig/network-scripts/ifcfg-eth0*
[not the real output of the command since filenames are omitted]
On Thu, Nov 13, 2008 at 11:17, Tony Mountifield tony@softins.clara.co.uk wrote:
The reason I said to use "head -20" and "ifcfg-eth0*" was that if you used that command literally, it would (a) output ALL eth0 aliases, and (b) prepend each one automatically with a filename header, assuming there is more than one file.
On Thu, Nov 13, 2008 at 12:42, Berend Dekens berend@cyberwizzard.nl wrote:
[root@hagrid ~]# cat /etc/sysconfig/network-scripts/ifcfg-*
Did you still not understand that we need to know what the file names are???
Please improve your comprehension skills.
HTH, Filipe
Filipe Brandenburger schreef:
Did you still not understand that we need to know what the file names are???
The command provided shows the content of the files and yes, perhaps it would show the filenames as well. This was however not specifically asked.
Furthermore the files are named differently so the only file shown in that command is the master NIC - as I posted in another mail. Also, the other configs were posted upon request as well.
Please improve your comprehension skills.
As I stated I did what I thought was asked - but the original poster only asked to run that command: not what was supposed to come out and what was relevant in there. Perhaps it is you who should "improve your comprehension skills", as I provided the information.
Now as much as your help is 'appriciated', it is no longer needed as the problem is sorted - one way or another.
Berend
or, at the same time while you are waiting for more replies, you could try starting up with only the first alias and if that succeeds try the next one and so on ... If you get less errors than you have aliases it's likely that some of the files have simply wrong values.
Kai
Kai Schaetzl schreef:
or, at the same time while you are waiting for more replies, you could try starting up with only the first alias and if that succeeds try the next one and so on ...
I was doing exactly that. And I was trying to figure out how the networking scripts work and what they do - or don't in my case.
And after 3 hours I remember why I hate automated GUI's: its working...
I removed, renamed, manually modified and did all kinds of things to the network configuration using both the GUI and the console and after recreating (for the millionth time) the configuration for each interface... it worked. On one hand I'm glad it is working on the other hand I am dissatisfied because I have no clue what caused it and how I fixed it (usually I run into problems more than once so stuff like this is a bad omen).
On a side note, the network configuration tool keeps forgetting the alias number I gave to the NIC - each time I edit a configuration I need to set the alias number again as its back on 0.
Well at least I've got everything up and running again - thanks everyone for your help!
Cheers, Berend
I found under CentOS 4 a few years ago that the OS would only bring up virtual interfaces starting with 0:0 and increasing sequentially -- if there was a gap, it would stop at that gap point.
I.e.: Good: eth0, eth0:0, eth0:1, eth0:2... Bad: eth0, eth0:0, eth0:2 (system would only start 0 and 0:0) Bad: eth0, eth0:1, eth0:2 (system would only start 0)
This last case looks like yours --in your config, after eth0, you started with eth0:1.
-Jeff