The default gateway in routing table recovers after been deleted for a while

1

1

After I deleted the default gateway entry of routing table in my Ubuntu host, browser can not reach the ip address of Yahoo. And I run a script to keep printing the entries of routing table with loop. After a while, the default gateway deleted before comes back and browser refresh out the Yahoo Search page. It seems the Default Gateway sends some info to the host and I have no idea why this happened? Any help would be appreciated. enter image description here

forAllBright

Posted 2018-07-14T10:52:07.320

Reputation: 67

Answers

1

What is most likely happening g is that you are getting the IP address from your router via a DHCP lease. There is a process running to periodically renew your DHCP connection - and when this runs it replaces your default route.

The easiest way to fix this is to change your computer to use a static IP address instead.

davidgo

Posted 2018-07-14T10:52:07.320

Reputation: 49 152