LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 06-09-2009, 07:43 PM   #1
cpbl
LQ Newbie
 
Registered: May 2004
Location: vancouver, canada
Distribution: latest ubuntu
Posts: 28

Rep: Reputation: 15
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.

Thanks,
Chris

Last edited by cpbl; 06-10-2009 at 01:13 AM.
 
Old 06-09-2009, 08:58 PM   #2
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
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: Reputation: 65
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.

Brian
 
Old 06-09-2009, 09:19 PM   #3
cpbl
LQ Newbie
 
Registered: May 2004
Location: vancouver, canada
Distribution: latest ubuntu
Posts: 28

Original Poster
Rep: Reputation: 15
Yes, thanks, here are those files.

Code:
 cat ifcfg-eth0

# Intel Corporation 80003ES2LAN Gigabit Ethernet Controller (Copper)
DEVICE=eth0
BOOTPROTO=none
HWADDR=00:15:17:82:dc:f0
ONBOOT=yes
SEARCH="econ.ubc.ca"
NETMASK=255.255.255.0
IPADDR=137.82.185.170
GATEWAY=137.82.0.1
TYPE=Ethernet
USERCTL=no
PEERDNS=yes
IPV6INIT=no
NM_CONTROLLED=yes
DNS1=137.82.1.1
DNS2=142.103.1.1
DOMAIN='econ.ubc.ca ubc.ca'

# cat ifcfg-eth0:1 
# Please read /usr/share/doc/initscripts-*/sysconfig.txt
# for the documentation of these parameters.
GATEWAY=137.82.0.1
TYPE=Ethernet
DEVICE=eth0:1
BOOTPROTO=none
NETMASK=255.255.255.0
IPADDR=137.82.185.168
USERCTL=no
PEERDNS=yes
IPV6INIT=no
ONPARENT=yes
NM_CONTROLLED=yes
 
Old 06-09-2009, 09:21 PM   #4
cpbl
LQ Newbie
 
Registered: May 2004
Location: vancouver, canada
Distribution: latest ubuntu
Posts: 28

Original Poster
Rep: Reputation: 15
And some other things I mentioned:


# service network status
Code:
Configured devices:
lo eth0
Currently active devices:
lo eth0 eth1
ifconfig
Code:
eth0      Link encap:Ethernet  HWaddr 00:15:17:82:DC:F0  
          inet addr:137.82.185.168  Bcast:137.82.185.255  Mask:255.255.255.0
          inet6 addr: fe80::215:17ff:fe82:dcf0/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:109491698 errors:0 dropped:0 overruns:0 frame:0
          TX packets:81621999 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:61452247144 (57.2 GiB)  TX bytes:46863646627 (43.6 GiB)
          Memory:ba820000-ba840000 

eth1      Link encap:Ethernet  HWaddr 00:15:17:82:DC:F1  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
          Memory:ba800000-ba820000 

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:4753120 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4753120 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:4784130418 (4.4 GiB)  TX bytes:4784130418 (4.4 GiB)
 
Old 06-10-2009, 12:52 AM   #5
Shaik nayaz
LQ Newbie
 
Registered: Jun 2009
Posts: 1

Rep: Reputation: 0
Smile Shaiq

Quote:
Originally Posted by cpbl View Post
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
 
Old 06-10-2009, 03:35 PM   #6
cpbl
LQ Newbie
 
Registered: May 2004
Location: vancouver, canada
Distribution: latest ubuntu
Posts: 28

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Shaik nayaz View Post
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.

Thanks,
Chris
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
on url "http://localhost/" error ""The requested URL could not be retrieved " renuaseri Linux - Newbie 1 04-07-2009 12:23 AM
Internet "gateway" with multiple IP addresses? J_Szucs Linux - Networking 1 06-26-2007 10:02 AM
"ERROR: UDP_OpenSocket: bind: Cannot assign requested address" error trebor0926 Red Hat 1 09-26-2006 10:21 AM
ifup eth0 causing error messages - SIOCGIFADDR: Cannot assign requested address pxumsgdxpcvjm Linux - Networking 7 01-20-2006 06:22 PM
ping6 error "conect: cannot assign requested addres lamsteven Linux - Networking 0 06-30-2005 07:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:34 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration