PDA

View Full Version : Only one of multiple wired interfaces (eth0, eth1, etc) can be active at a time



Rambozo
2016-02-09, 23:05
I have multiple wired interfaces - two in the most simple configuration - eth0 and eth1. Both are dynamic DHCP.
The problem is that only one of them can be active (i.e. have IP address) at a time.
It doesn't matter how I bring them up - using UI (Gnome Network Manager) or command line (ifconfig up/down). If I bring up one in GUI, the other one goes down. In command line, if I take both down using "ifconfig eth0 down; ifconfig eth1 down", then whichever is brought up first gets IP address, and the second one doesn't. On reboot, only eth0 is active.

Wireless interfaces are not affected - they all seem to work fine all at the same time.

I've never seen such behavior on any other Linux system. This is Kali 2006.1, based on pre-built VM image, running inside VMWare. I didn't mess with any factory network settings.

ascf3acsasc
2016-02-10, 21:38
I've experienced the exact same behavior running in VMWare Workstation. I opened my older 2.0.0 image (from December I think), and added a second Network Adapter to the VM. I then powered it on. It was able to connect both eth0 and eth1.

With the newer 2016 image it will toggle so that only one interface is active at a time. I tested with 2 and 3 Network Adapters attached to the VM and it would only allow one interface to be active at a time - the other(s) would be disconnected.

I'll stick with the older 2.0.0 image for now as that breaks required functionality for me.

Sig
2016-03-30, 00:02
I found a solution, if you're using the pre-built VM (thanks offensive security).
I was stumped by the same issue of only one wired interface active at a time. I needed eth0 to be on a public routed network and eth1 to be on a private network so I can run a transparent proxy between them.

Solution I used is to open the gnome settings in upper right of GUI, choose the wrench icon and you should see eth0, eth1, network proxy listed.
1) Now go to eth1 and instead of configuring the "wired connection" settings, click the Add Profile button
2) In that profile configure what you need under IPv4 (IP, netmask)
3) At the bottom of the profile IPv4 settings tick the checkbox to "Use this connection only for resources on its network"
4) Apply that new profile 1 to eth1 and the interface should come active.

I'm using a mix of dhcp/static, but dhcp/dhcp should work too if you click the checkbox in 3). Only one interface can have the default route.

cpereira
2016-11-24, 13:52
The solution I found was to delete the file "/etc/NetworkManager/system-connections/Wired connection 1". Now everything works.

macagoule
2017-07-06, 09:47
Hi guys,

I had the same issue as yours, I mean when trying to use multiple adapters, always the same profile was bound the the active ethernet adapter. This was very boring because I wasn't able to use the 2 adapters simultaneously and when passing fro eth0 to eth1, I needed to reconfigure each time.

So I tested lot of configs and found the tip that allow to bind 1 Profile per Network Adapter (and of course use your adapters as you want).

This is my example and configuration steps for a VM with eth0 and eth1 adapters :

1/ First of all, open your Network Manager and remove all the profiles. By default you should have Wired Connection 1. Remove it.
"/etc/NetworkManager/system-connnections" folder should be empty !

2/ Be sure you have no remaining configuration in your adapters. Open eth0, eth1 and choose to "forget" the configurations.

3/ Click on eth0 and then Add Profile. Then choose a name (can be anything) "eth0" in the profile identity.

4/ IMPORTANT STEP : choose the eth0 adapter Mac address in the @mac list. This step is important because this is the link between the profile and the adapter

5/ Configure your networks settings and then click Add to finish the Profile Configuration

6/ Follow step 3/4/5 again for eth1 and of course choose eth1 @mac when needed.

That's it ! You now have your 2 adapters with a Profile for each adapter with specific configurations and you can use them simultaneously :)

Hope this helped !

Cheers,
Macagoule

Shadowborn
2017-08-14, 12:51
Hello all,
I have the same issue.... but unfortunately nothing helped. I deleted the setting and even have setup everything new. I can only use one NIC at the same time.
If I change it in the Network setting I can even change it on the fly 2660

Very strange behaviour - any idea how I can fix this?

Thank you in advance!

bhups
2017-10-12, 23:30
I found a solution, if you're using the pre-built VM (thanks offensive security).
I was stumped by the same issue of only one wired interface active at a time. I needed eth0 to be on a public routed network and eth1 to be on a private network so I can run a transparent proxy between them.

Solution I used is to open the gnome settings in upper right of GUI, choose the wrench icon and you should see eth0, eth1, network proxy listed.
1) Now go to eth1 and instead of configuring the "wired connection" settings, click the Add Profile button
2) In that profile configure what you need under IPv4 (IP, netmask)
3) At the bottom of the profile IPv4 settings tick the checkbox to "Use this connection only for resources on its network"
4) Apply that new profile 1 to eth1 and the interface should come active.

I'm using a mix of dhcp/static, but dhcp/dhcp should work too if you click the checkbox in 3). Only one interface can have the default route.

This worked perfectly!
Thanks!

theunf
2018-03-13, 12:37
How about not setting default gateway to the second interface ? It does not allow you to save the profile if you did not fill this field.

We should be able to set a multi homed profile.

creosote
2018-05-06, 20:54
Configuring the interfaces on the Kali guest ended up working for me.( Kali 2018.2 -- 4.15.0-kali3-amd64 )

vim /etc/network/interfaces

Add....

#-----------------------
auto eth0
iface eth0 inet dhcp


auto eth1
iface eth1 inet dhcp
#-----------------------

Then restart networking....

systemctl stop networking
systemctl start networking

Check for any errors...
systemctl status networking

If you want static add something like this instead...

auto eth0
iface eth0 inet static
address 192.168.27.7
netmask 255.255.255.0
network 192.168.27.0
broadcast 192.168.27.255