You are not logged in.

#1 2014-07-20 23:56:35

awx
Member
Registered: 2014-07-20
Posts: 3

[Solved] Networkd preferred link?

My server has two wired nics setup. The motherboard nic is properly configured for internet access through dhcp using networkd. The other nic is a usb ethernet adapter which is also configured through networkd but without internet access.

The problem is that all net traffic prefers to travel through the usb nic.

Motherboard nic config:

[Match]
Name=enp3s0

[Network]
DHCP=true
DNS=8.8.8.8

USB nic config:

[Match]
Name=enp0s29f7u*

[Network]
DNS=8.8.8.8
Address=192.168.80.1/24
Gateway=192.168.80.1

How can I get traffic to prefer to go through the motherboard nic?

I've tried renaming the /etc/systemd/network/ files but this hasn't made a difference.

Last edited by awx (2014-07-22 05:09:37)

Offline

#2 2014-07-21 04:27:14

eewallace
Member
Registered: 2013-06-26
Posts: 34

Re: [Solved] Networkd preferred link?

What, if anything, are you actually trying to use the usb device for? Is there any reason for it to have a route to the 192.168.80.1 gateway? Is the motherboard device also on the 192.168.80.1 subnet?

Offline

#3 2014-07-21 04:36:33

awx
Member
Registered: 2014-07-20
Posts: 3

Re: [Solved] Networkd preferred link?

No, they are completely separate networks at the moment. The usb nic serves as a ad hoc DHCP/PXE network for system loading. It must be separate because there is another DHCP/PXE server (windows) on the real network.

Right now my PXE server is running but clients hang at pxelinux so I'll have some followup questions about how to properly configure dnsmasq.

PS- the 192.168.80.1 network only exists on that nic and any attached clients. there is no router or anything else attached. It is actually working- clients pull a dhcp address and start booting. It's just that my server can't connect to the internet because it's trying to send all of its traffic through this dead-end network. Eventually, I'd like this ad hoc network to be able to connect to the internet.

Last edited by awx (2014-07-21 04:41:46)

Offline

#4 2014-07-21 06:24:09

eewallace
Member
Registered: 2013-06-26
Posts: 34

Re: [Solved] Networkd preferred link?

Ok, that makes sense. In that case, does it make sense to have a Gateway set for the usb device? I would think it would want an address on that network, but no outbound route.

What output do you get from 'ip addr' and 'ip route'?

Offline

#5 2014-07-21 20:50:40

awx
Member
Registered: 2014-07-20
Posts: 3

Re: [Solved] Networkd preferred link?

Hi, you're right. I removed the gateway and dns entries and now it works. Thanks for putting me on the right track.

I think I'll probably move away from networkd in the long run because it doesn't seem flexible enough. I'm going to try to find out more about networkd bridges and see if they are appropriate for my needs.

Offline

#6 2014-07-21 21:34:19

eewallace
Member
Registered: 2013-06-26
Posts: 34

Re: [Solved] Networkd preferred link?

Glad that helped. Please remember to mark the thread as solved.

Offline

Board footer

Powered by FluxBB