no default gateway from dhcp on eth0

Questions about Wi-Fi and other network devices, file sharing, firewalls, connection sharing etc
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
User avatar
mintendian
Level 1
Level 1
Posts: 20
Joined: Thu Feb 25, 2016 10:03 am

no default gateway from dhcp on eth0

Post by mintendian »

so, it would seem i have an issue with my *wired* eth0 interface when using DHCP. this DOES NOT happen with the wlan0 interface, just the wired eth0 ...

i plug a physical cable in to the back of the laptop, eth0 receives an IP address from the DHCP server but doesn’t set a default gateway ... once i manually "sudo route add default gw x.x.x.x" then I have connectivity and all is well

this USED TO WORK for eth0 and DOES STILL work for wlan0, so maybe I've had an update of some kind that has broken this

so ... please someone help me with where to start hunting down the issue?

I've booted from a Live USB stick and all is good

LM 17.3 ; 4.4.0-109-generic

thanks
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
mintendian
Level 1
Level 1
Posts: 20
Joined: Thu Feb 25, 2016 10:03 am

Re: no default gateway from dhcp on eth0

Post by mintendian »

no takers for this one? :(

i've seen that it does seem to be picking up the gateway IP address correctly (as seen in log files) but it just doesn't add the route to the routing table. been trying to hunt down what script actually does the adding of the route once dhcpd client has received the IP...anyone??

if I do a manual 'dhclient -r && dhclient' then it adds the route to the routing table, so it seems to be, possibly? the automated mechanism that does this ... whatever that is. I've tried reinstalling isc-dhcp-client and isc-dhcp-common through SPM GUI but no change
kyle_v0

Re: no default gateway from dhcp on eth0

Post by kyle_v0 »

I'm having the same problem. Did you ever find a resolution to your problem?
User avatar
mintendian
Level 1
Level 1
Posts: 20
Joined: Thu Feb 25, 2016 10:03 am

Re: no default gateway from dhcp on eth0

Post by mintendian »

hey sorry i didn’t see your post
no i haven’t sorted it, don’t suppose you have?

i’m considering doing a reinstall of LM18+ as it’s not too bad if you know what the gw is but if you’re on a new network and you need to manually set, it can be a nightmare!
User avatar
Joe2Shoe
Level 5
Level 5
Posts: 846
Joined: Wed Oct 18, 2017 8:12 pm
Location: Ozone

Re: no default gateway from dhcp on eth0

Post by Joe2Shoe »

Try another LAN Network cable, CAT 5 or CAT 6, or plug into a different port on the router.
"Tolerance is the refuge of men without conviction."
"Common sense is not so common" - Voltaire
User avatar
mintendian
Level 1
Level 1
Posts: 20
Joined: Thu Feb 25, 2016 10:03 am

Re: no default gateway from dhcp on eth0

Post by mintendian »

yeah done all that. diff networks, cables, dhcp servers.

it’s defo a problem with LM somewhere
User avatar
tekknj
Level 1
Level 1
Posts: 43
Joined: Sat Dec 17, 2016 2:01 pm

Re: no default gateway from dhcp on eth0

Post by tekknj »

As a test, what happens if you manually set ip and gateway addresses to both network interfaces. Then switch back and forth to see if your connections work? Is the gateway device a router from your Internet provider or a dhcp server you maintain?
User avatar
mintendian
Level 1
Level 1
Posts: 20
Joined: Thu Feb 25, 2016 10:03 am

Re: no default gateway from dhcp on eth0

Post by mintendian »

sorted ... after much hunting down ...

click on network manager netwok connections. Edit the network connection (Ethernet wired in my case) -> IPv4 Settings tab -> Routes (towards the bottom) -> ensure "Use this connection only for resources on its network" is NOT ticked! mine was.
Locked

Return to “Networking”