Multiple IP addresses on one NIC: "Cannot assign requested address" error
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Multiple IP addresses on one NIC: "Cannot assign requested address" error
I used system-config-network to add a second IP address to my eth0, running on a server with the latest Fedora.
The "activate" and "deactivate" buttons in this GUI are greyed out. Also, the new IP address is listed as "inactive".
So I restart the network. I get:
> service network restart
Shutting down interface eth0: [ OK ]
Shutting down loopback interface: [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface eth0: SIOCGIFADDR: Cannot assign requested address
SIOCSIFBROADCAST: Cannot assign requested address
SIOCSIFBRDADDR: Cannot assign requested address
SIOCSIFFLAGS: Cannot assign requested address
[ OK ]
[root@csrv log]# system-config-network
It seems that things are working (both IP addresses reach the server) although ifconfig reports just one entry for eth0, and it has the second (child?) address as it's IP address. Instead, I was expecting to see a listing for eth0:0 and eth0:1 or something.
Anyone know what I'm doing wrong? Those errors are quite unnerving.
Distribution: Distribution: RHEL 5 with Pieces of this and that.
Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700
Rep:
You will always have eth0. Then you name the next as you wish eth0:0.
I not a gui guy when it comes to network config. Call me old school.
Look at the /etc/sysconfig/network-scripts and see the ifcfg-**** files. They are text files so post them for eth0 and eth0:0.
I used system-config-network to add a second IP address to my eth0.
The "activate" and "deactivate" buttons in this GUI are greyed out. Also, the new IP address is listed as "inactive".
So I restart the network. I get:
> service network restart
Shutting down interface eth0: [ OK ]
Shutting down loopback interface: [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface eth0: SIOCGIFADDR: Cannot assign requested address
SIOCSIFBROADCAST: Cannot assign requested address
SIOCSIFBRDADDR: Cannot assign requested address
SIOCSIFFLAGS: Cannot assign requested address
[ OK ]
[root@csrv log]# system-config-network
It seems that things are working (both IP addresses reach the server) although ifconfig reports just one entry for eth0, and it has the second (child?) address as it's IP address. Instead, I was expecting to see a listing for eth0:0 and eth0:1 or something.
Anyone know what I'm doing wrong? Those errors are quite unnerving.
Thanks,
Chris
you may configure multiple ip's in
# /etc/sysconfig/network-scripts
were you have to copy your existing eth0
#cp ifcfg-eth0 ifcfg-tho:1
then you can edit the ifcfg-eth0:1 (giving proper aliasing name specified), then change the ip's as per you require
finally save it restart the network services
you may configure multiple ip's in
# /etc/sysconfig/network-scripts
were you have to copy your existing eth0
#cp ifcfg-eth0 ifcfg-tho:1
then you can edit the ifcfg-eth0:1 (giving proper aliasing name specified), then change the ip's as per you require
finally save it restart the network services
Yes, I think I've accomplished exactly that (though using the GUI). But I get the error, as described above.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.