VectorLinux
September 18, 2014, 01:13:43 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Visit our home page for VL info. To search the old message board go to http://vectorlinux.com/forum1. The first VL forum is temporarily offline until we can find a host for it. Thanks for your patience.
 
Now powered by KnowledgeDex.
   Home   Help Search Login Register  
Please support VectorLinux!
Pages: [1]
  Print  
Author Topic: Multiple network cards  (Read 7512 times)
sysman
Member
*
Posts: 19


« on: April 18, 2012, 09:14:09 am »

Hi,

I have installed VL7 and want to do some experiments with virtualbox. I want to connect virtual machines to different networks, so i installed 4 pci network cards. I have tried to get them all working but dont seem to be able to. Does anyone have time to help. I do have thee following info.
Thanks

root:# dmesg | grep eth
[    8.837860] 8139too 0000:01:07.0: eth0: RealTek RTL8139 at 0xc000, 00:0b:2b:09:57:04, IRQ 19
[    8.838878] 8139too 0000:01:08.0: eth1: RealTek RTL8139 at 0xc400, 4c:00:10:74:9f:5b, IRQ 16
[    8.839766] 8139too 0000:01:09.0: eth2: RealTek RTL8139 at 0xc800, 00:50:fc:f6:0c:b3, IRQ 17
[    8.840701] 8139too 0000:01:0a.0: eth3: RealTek RTL8139 at 0xcc00, 00:ee:b1:04:57:d8, IRQ 18
[    8.860261] udev[1501]: renamed network interface eth0 to eth0-eth3
[    8.952661] udev[1504]: renamed network interface eth2 to eth0
[    8.953451] udev[1503]: renamed network interface eth3 to eth2
[    8.960570] udev[1501]: renamed network interface eth0-eth3 to eth3
[   21.544588] 8139too 0000:01:09.0: eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
[ 9019.734777] device eth0 entered promiscuous mode
[ 9019.768849] device eth0 left promiscuous mode
[ 9019.774361] device eth0 entered promiscuous mode
[ 9021.163101] device eth0 left promiscuous mode
[ 9028.702841] device eth0 entered promiscuous mode
[10020.125730] device eth0 left promiscuous mode
[10095.976598] device eth0 entered promiscuous mode
[10242.820281] device eth0 left promiscuous mode
[10278.312686] device eth1 entered promiscuous mode
[10397.998791] 8139too 0000:01:09.0: eth0: link down
[10400.206063] 8139too 0000:01:09.0: eth0: link down
[10400.297551] 8139too 0000:01:09.0: eth0: link down
[10490.297560] device eth1 left promiscuous mode
[10549.765118] device eth1 entered promiscuous mode
[10661.344129] device eth1 left promiscuous mode
[10661.355999] device eth2 entered promiscuous mode
[10682.253847] device eth2 left promiscuous mode
[10682.259556] device eth3 entered promiscuous mode
[10714.536050] device eth3 left promiscuous mode
[13737.610134] 8139too 0000:01:09.0: eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
[13886.082266] 8139too 0000:01:09.0: eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
[13886.117483] 8139too 0000:01:09.0: eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
[13923.038495] 8139too 0000:01:09.0: eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
[33217.350685] 8139too 0000:01:09.0: eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
[33248.024227] 8139too 0000:01:09.0: eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
[33261.806842] 8139too 0000:01:09.0: eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
[33273.017360] 8139too 0000:01:09.0: eth0: link up, 100Mbps, full-duplex, lpa 0x45E1

Logged
bigpaws
Vectorian
****
Posts: 1850


« Reply #1 on: April 18, 2012, 09:37:08 am »

All four cards. All of them the same make and model.

Did you assign ip addresses?

Have you looked at ifconfig to see that the devices (cards) are
up?

Since you want different networks. Does this mean seperate subnets
or just each device assigned its own ip from your dhcp server?

Bigpaws
Logged
sysman
Member
*
Posts: 19


« Reply #2 on: April 18, 2012, 09:59:00 pm »

Hi,

Thanks for the reply

1) cards aren't same make and model, but close. they all have rtl chips etc
2) only assigned ip to eth0 as i am not sure where to assign ip's to other cards
3) ifconfig -a shows all the cards [see below]
4) "different networks" means different ip, different subnets, different ip ranges & different gateways

thanks
sysman

root:# ifconfig -a
eth0      Link encap:Ethernet  HWaddr 00:50:FC:F6:0C:B3 
          inet addr:192.168.0.224  Bcast:192.168.7.255  Mask:255.255.248.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:37506 errors:0 dropped:8510 overruns:0 frame:0
          TX packets:2049 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:2927509 (2.7 Mb)  TX bytes:1973850 (1.8 Mb)
          Interrupt:17 Base address:0xc800

eth1      Link encap:Ethernet  HWaddr 4C:00:10:74:9F:5B 
          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)
          Interrupt:16 Base address:0xc400

eth2      Link encap:Ethernet  HWaddr 00:EE:B1:04:57:D8 
          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)
          Interrupt:18 Base address:0xcc00

eth3      Link encap:Ethernet  HWaddr 00:0B:2B:09:57:04 
          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)
          Interrupt:19 Base address:0xc000

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:2 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:100 (100.0 b)  TX bytes:100 (100.0 b)
Logged
bigpaws
Vectorian
****
Posts: 1850


« Reply #3 on: April 19, 2012, 06:19:48 am »

Then you need a way to get the cards assigned.

In virtualbox you should be able to assign the proper
card to the proper VM. After that it should all work.

Remember that you will also need to use network as bridged
adapter for pass through.

HTH

Bigpaws
Logged
sysman
Member
*
Posts: 19


« Reply #4 on: April 19, 2012, 10:48:41 am »

hi,
without doing anything to the vl machine, i tried each of the other adapters (eth1-3) from the vbox machine and got an error "BridgedInterfaceDown".
further more, the vbox machine gives adapter type as PC-net FAST III and an unknown mac address

sysman
Logged
bigpaws
Vectorian
****
Posts: 1850


« Reply #5 on: April 19, 2012, 05:28:14 pm »

It's called virtual hardware.

Assign an ip to the cards for the network
you need to setup.

Bigpaws
Logged
sysman
Member
*
Posts: 19


« Reply #6 on: April 19, 2012, 11:32:15 pm »

Hi,

I am getting a bit confused here
.
I have 4 physical cards in 4 pci slots.
One card is used by the underlying VectorLinux OS & works fine. That is eth0 as seen from my post on 18/4.
There are 3 other 'unused' cards. I understand from Bigpaws' comment, that I don't have to assign them Ip's or anything.

Now I turn to The VirtualBox.

I am running 1 virtual machine (it's slackware 13.37).
The VirtualBox Network settings, give me 4 adapters. Which adapter do I use?
Further more, as well as the 'attached to' option (use "Bridged Adapter"), there is 'attach to', which gives 4 options - eth0-eth3.
Which one do I use?
Quite often, I get the following when I have changed the nic parameters & rebooted the vm: "Bridged interface ethX is down. Guest will not be able to use this interface".
How do I find the correlation between the physical nic & the adapters in the virtual machine?

Thanks for the help
Logged
nightflier
Administrator
Vectorian
*****
Posts: 4023



« Reply #7 on: April 20, 2012, 04:51:21 am »

I'd suggest a little detective work. You should identify each card and verify that it is operating correctly.
Bring network down, unplug all but one card.
Now start bringing the interfaces back up, one at the time and test for network connectivity.
When you get a working connection, take a note of which physical card corresponds to "eth0", "eth1"...
(I use a permanent marker and write it on the mounting bracket next to the port).
Bring network back down and move the network cable to another port.
Repeat procedure until you have done all four cards.
This can be done quickly and easily from the command line. Are you familiar with the commands?

If above goes well, the problem would be Virtualbox configuration. Supply more information:
How are the network cards connected (all to the same hub/switch, directly to routers or other computers etc..)?
What version of Virtualbox are you running?
Logged
sysman
Member
*
Posts: 19


« Reply #8 on: April 22, 2012, 12:11:44 am »

Hi,

I have spent several hours this morning checking out these cards. They all work.
I have the following (computer is standing up, so I will refer to pci slots from top to bottom):
Top slot eth0
Next slot eth1
Next slot eth4
bottom slot eth3

in order to check each card, I had to configure it with cli commands:
ifconfig ethX 192.168.4.10X netmask 255.255.248.0 up
route add -net 192.168.0.0 gw 192.168.1.250 netmask 255.255.248.0 dev ethX

When I configured one card, the others seemed to 'forgot' their configuration and so I couldn't check 2 cards simultaneously. It turns out that I could using ping -I ethX ip.
At the moment I have all 4 cards pinging away - on 2 different networks (one is 102.160.20.0/22 & the other is 192.168.0.0/21)
I thought this should be done with /etc/rc.d/rc.inet1.conf, but changes there don't seem to have any effect.

One annoying thing is that one card comes up as eth4. How do I make it eth3? I tried replacing it with unused card, but then I got eth5.

So what's next? [i would love to get that card to be eth2 rather than eth4]

sysman

Logged
nightflier
Administrator
Vectorian
*****
Posts: 4023



« Reply #9 on: April 22, 2012, 04:17:03 am »

Assuming VL7:
Look in "/etc/udev/rules.d/70-persistent-net.rules". This is how the system "remembers" the network cards.
I believe that if you delete the lines for eth2 and eth4, then reboot, it should re-configure itself. Or, try manual edits.

You can configure your cards using "vasm > super > network > inet", or by adding commands to "/etc/rc.d/rc.local". This is for the host OS. Additional steps required within Virtualbox.

Logged
sysman
Member
*
Posts: 19


« Reply #10 on: April 22, 2012, 07:42:36 am »

Hi,

I edited 70-persistent-net.rules & cleaned out lots of junk - eth11??? - and also eth4. Didn't help. for some reason, vl doesn't like eth2!!!!!

In any case, i have 4 working cards - eth0, eth1, eth3 & eth4.

Tomorrow, I will have a look at a VM.

sysman
Logged
sysman
Member
*
Posts: 19


« Reply #11 on: April 27, 2012, 05:51:36 am »

H,

I thought i may as well finish off this & report what has happened.

I tried one of my vm machines - I defined it as having adapter-1 mapped to eth3 on the underlying machine (VL) using bridged mode. Didn't work !!!

I tried all sorts of other combinations & still couldn't get it working. Basically I was back to the beginning again.

I tried all sorts of search strings in google .... eventually i found a reference  to bringing the card up - ifconfig eth3 up & that worked!!!!! I have to run it each time I reboot, but that is no problem - easy enough to write a script.

I would like to thank the people to showed an interest in my problem & especially those who answered & tried to helped me. Even though it seems as though one small line would have been enough at the begining, I did learn a bit about networking on VL & Slackware that i didn't know about before.

thanks again.

sysman
« Last Edit: April 28, 2012, 09:15:25 am by sysman » Logged
nightflier
Administrator
Vectorian
*****
Posts: 4023



« Reply #12 on: April 27, 2012, 12:27:07 pm »

Kudos for your perseverance and ingenuity.  Grin  And thanks for sharing the solution with us.
Finishing touch would be to edit title of original post, adding [solved] to it.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!