Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Forum Archive > Main Support Categories > Networking & Wireless
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Hello, Unregistered You are browsing a READ only archive of the main support categories pre 4/21/2008. You will not be able to post or reply any threads in this section.

Networking & Wireless
Having problems getting connected to the internet or getting your wireless card to work? Ask here.

 
Thread Tools Display Modes
Old March 18th, 2007   #1
swainstm
First Cup of Ubuntu
 
Join Date: Mar 2007
Beans: 8
How do you put IP addresses on Multiple NICs.

I am using Feisty Desktop 64bit with Multiple NICs, however Feisty only seems to allow 1 NIC to have an active IP address. All the interfaces seem to be in ifconfig and I can configured IP addresses on the the interfaces in :-

System\Administration\Network Settings

tool, and activated with a tick next to each interface, however ifconfig shows all the interfaces, but an IP address on only 1 of the interfaces as follows :-

swainstm@perc-syd-fw1:~$ ifconfig
eth0 Link encap:Ethernet HWaddr 00:19:B9:26:7E:5E
inet addr:192.168.10.8 Bcast:192.168.10.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:943 errors:0 dropped:0 overruns:0 frame:0
TX packets:820 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:79229 (77.3 KiB) TX bytes:69269 (67.6 KiB)
Interrupt:16

eth1 Link encap:Ethernet HWaddr 00:50:8B:6F:B8:FC
UP BROADCAST RUNNING 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)

eth2 Link encap:Ethernet HWaddr 00:50:8B:6F:B8:FD
UP BROADCAST RUNNING 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)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:4 errors:0 dropped:0 overruns:0 frame:0
TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:200 (200.0 b) TX bytes:200 (200.0 b)

I can change the interface that has the IP address, by selecting a different interface in the "Wired Network Connection" icon in the top right hand end of the taskbar. However, while this puts the configured IP address on the interface, it takes the IP address of the other interface.

Does anyone have any ideas on how to fix this? Thanks in advance.
swainstm is offline   Reply With Quote
Old March 18th, 2007   #2
lloyd_b
Dark Roasted Ubuntu
 
lloyd_b's Avatar
 
Join Date: Oct 2006
Location: Tucson, AZ
Beans: 1,085
Xubuntu 9.10 Karmic Koala
Re: How do you put IP addresses on Multiple NICs.

Just for clarification: Are all three NIC attached to the same network? If so, then you're not actually going to be able to use more than one at a time (although I do recall something called "bonding" that I believe will allow multiple NIC's to act as a single interface).

Could you post the contents of the file "/etc/networking/interfaces"? This is the file that actually controls most of your network configuration (the GUI tools are just front-ends that modify it and run the necessary commands to activate the changes).

Lloyd B.
__________________
Don't tell me to get a life.
I had one once.
It sucked.
lloyd_b is offline   Reply With Quote
Old March 18th, 2007   #3
swainstm
First Cup of Ubuntu
 
Join Date: Mar 2007
Beans: 8
Re: How do you put IP addresses on Multiple NICs.

Yes, all NICs are on a different physical layer 2 network, with each interface with different network address, from different networks.

See bellow for the file created automatically with the "Network" config tool.

Finally, is this something I should raise somehow in "Launchpad" or keep working on here. I have no idea how to raise in Launchpad, but if it is the most appropriate option, let me know.

Thanks heaps.

root@perc-syd-fw1:~# cat /etc/network/interfaces
auto lo
iface lo inet loopback


iface eth0 inet static
address 192.168.10.8
netmask 255.255.255.0
gateway 192.168.10.1


iface eth1 inet static
address 192.168.107.2
netmask 255.255.255.252


iface eth2 inet static
address 192.168.107.5
netmask 255.255.255.252

auto ath0
iface ath0 inet dhcp

auto wlan0
iface wlan0 inet dhcp

auto eth0

auto eth2

auto eth1
swainstm is offline   Reply With Quote
Old March 18th, 2007   #4
Mr. C.
Iced Blended Vanilla Crème Ubuntu
 
Join Date: Feb 2007
Beans: 2,717
Re: How do you put IP addresses on Multiple NICs.

Try adding the auto interface keyword before each interface in /etc/network/interfaces file, as in :

auto eth0
iface eth0 inet static
...

or

auto eth0 eth2 eth1
iface eth0 inet static
...

No data on this one - just playing a weak hunch.

I wonder if the configuration script is having trouble with your subnetted 92.168.107.x/30 space.

MrC

Last edited by Mr. C.; March 18th, 2007 at 09:05 PM..
Mr. C. is offline   Reply With Quote
Old March 19th, 2007   #5
swainstm
First Cup of Ubuntu
 
Join Date: Mar 2007
Beans: 8
Re: How do you put IP addresses on Multiple NICs.

I tried moving the "auto eth?" but this made no different. I also tried using using completely different class C networks, but this also made no difference.

I built a brand new box on VMWare and confirmed exactly the same problem. It was interesting to note, when I first installed from CD (Feisty Herd5 64 bit Desktop) with no updates installed, initially it was looking like showing the same problem. However, when I configured the 3rd interface, the Network icon in the task bar showed disabled, but ifconfig showed all interfaces configured and indead they appeared to be working. I rebooted and confirm the same result. I then installed all the waiting updates, after which the Networking Icon in the taskbar once again enabled itself, and coupled with this, only 1 interface in ifconfig had an IP address.

It even looks like it might be meant to work like this as the "Network" icon in the task bar appears to have a radio type button which suggest you can only select 1 interface. I can also use this to select the interface that is to have the IP address. The question comes as to how I disable this as in my case I need multiple interfaces?????

Do you think this Is this something I need to log as a bug?

Thanks once again.
swainstm is offline   Reply With Quote
Old March 19th, 2007   #6
netztier
Has an Ubuntu Drip
 
netztier's Avatar
 
Join Date: Jun 2005
Location: Switzerland
Beans: 771
Ubuntu 8.10 Intrepid Ibex
Re: How do you put IP addresses on Multiple NICs.

Quote:
Originally Posted by swainstm View Post
Code:
root@perc-syd-fw1:~# cat /etc/network/interfaces 
auto lo
iface lo inet loopback


iface eth0 inet static
address 192.168.10.8
netmask 255.255.255.0
gateway 192.168.10.1


iface eth1 inet static
address 192.168.107.2
netmask 255.255.255.252


iface eth2 inet static
address 192.168.107.5
netmask 255.255.255.252
This is looking good & reasonable.

What does the routing table on your system look like (netstat -rn or route)? Is there some instance of iptables and/or firestarter active on the box? If yes, deactivate them (temporarily) to see if it makes any difference.

best regards

Marc
__________________
The story so far: In the beginning the Universe was created.This has made a lot of people very angry and has been widely regarded as a bad move. Douglas Adams, The Restaurant at the End of the Universe
netztier is offline   Reply With Quote
Old March 19th, 2007   #7
swainstm
First Cup of Ubuntu
 
Join Date: Mar 2007
Beans: 8
Re: How do you put IP addresses on Multiple NICs.

With the exemption of the 169.254.0.0 (which I have no idea who that is there, but assume it is not much to worry about as it is a local, zero config address), netstat -nr looks pretty normal as if I only have 1 interface and IP address configured :-

swainstm@perc-syd-fw1:~$ netstat -nr
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.10.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
0.0.0.0 192.168.10.1 0.0.0.0 UG 0 0 0 eth0
swainstm@perc-syd-fw1:~$

However, I have 3 configured interfaces and there is no sign of there.

No I don't have any iptables configured beyond the default allow everything. I have also build a box from scratch, with just the default Feisty Desktop build, and nothing else configured besides the 3 interfaces and I have the same problem.

It is probably worth asking, if there is anyone out there who is running a Feisty build with more than 1 interface active and with an IP address at 1 time??

Thanks heaps.
swainstm is offline   Reply With Quote
Old March 19th, 2007   #8
netztier
Has an Ubuntu Drip
 
netztier's Avatar
 
Join Date: Jun 2005
Location: Switzerland
Beans: 771
Ubuntu 8.10 Intrepid Ibex
Re: How do you put IP addresses on Multiple NICs.

Quote:
Originally Posted by swainstm View Post
With the exemption of the 169.254.0.0 (which I have no idea who that is there, but assume it is not much to worry about as it is a local, zero config address), netstat -nr looks pretty normal as if I only have 1 interface and IP address configured :-
You should be able to get rid of it by disabling or uninstalling zeroconf. Not sure what other implications this might have on your system.

Quote:
Originally Posted by swainstm View Post
Code:
swainstm@perc-syd-fw1:~$ netstat -nr
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
192.168.10.0    0.0.0.0         255.255.255.0   U         0 0          0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 eth0
0.0.0.0         192.168.10.1    0.0.0.0         UG        0 0          0 eth0
swainstm@perc-syd-fw1:~$
Hm. This looks "normal" as one could expect with a single interface.

Quote:
Originally Posted by swainstm View Post
However, I have 3 configured interfaces and there is no sign of there.
You're right. Is there any news about eth1 and eth2 in dmesg or /var/log/syslog, after a (re)boot or after a manual sudo ifup eth1 or sudo ifdown eth1?

Best regards

Marc
__________________
The story so far: In the beginning the Universe was created.This has made a lot of people very angry and has been widely regarded as a bad move. Douglas Adams, The Restaurant at the End of the Universe
netztier is offline   Reply With Quote
Old March 19th, 2007   #9
Mr. C.
Iced Blended Vanilla Crème Ubuntu
 
Join Date: Feb 2007
Beans: 2,717
Re: How do you put IP addresses on Multiple NICs.

I didn't think my weak hunch would pay off.

But something you said now intrigues me. I know that others with multiple NICs were getting into situations where they enabled both NICs, and this screwed up their default route.

Was there an update that corrected this problem, by simply changing Network to use Radio buttons?

In my opinion, the Network applet is too simplistic as it is today to handle multiple NIC situations correctly.

But still, your manual configuration should be ok. Try also the --force option to ifup to ensure the state file is updated to match your configuration.

MrC
Mr. C. is offline   Reply With Quote
Old March 19th, 2007   #10
swainstm
First Cup of Ubuntu
 
Join Date: Mar 2007
Beans: 8
Re: How do you put IP addresses on Multiple NICs.

Thanks for the suggestions. I did some of this and a bit more and connected the following information that might give some more clues :-

* Nothing particularly unusual in dmesg file.
* I did not think of ifdown/ifup because if config suggested it was up, but when I tried this, ifdown was as expected, but ifup gave the error bellow :-

swainstm@perc-syd-fw1:~$ sudo ifup eth1
RTNETLINK answers: File exists
run-parts: /etc/network/if-up.d/avahi-autoipd exited with return code 2
swainstm@perc-syd-fw1:~$

After this the interface was up, and there was an ip address on the interface. But after a reboot, the IP addresses are lost and we are back to square 1. I can't seem to see any difference to the above when I run with a --force. I am wondering if the error above is something to do with my problem.??

It was interesting to not that if I config the IP address manually with ifconfig, it all seems to be good and working ok, but I assume I really need /etc/networks/interface to do its thing in terms of handling linkup/linkdown etc.

Does this give any more clues.
swainstm is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:50 PM.


vBulletin ©2000 - 2009, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. bilberry