Networking not working after droplet resize

August 28, 2019 155 views
Networking Ubuntu 18.04

Hello Everyone,
I resized my droplet yesterday and the process went through without any errors or warnings.
When I powered on, I discovered that my networking had stopped working.
I’m able to access it through the web console but not able to ping my IP from outside and ping from within the droplet doesn’t work.
It shows: “Network is unreachable”
I’m not even able to ping the gateway.

I checked my routing table and it looks empty.
When I try to add a routing rule it says “Error: Nexthop has invalid gateway”

Here’s my /etc/network/interfaces : https://prnt.sc/oygq1e

Anybody tell me what I’m missing or doing wrong?

Thanks!

2 Answers
sachinmehta August 30, 2019
Accepted Answer

So I managed to fix the issue.
Turns out my both interfaces eth0 and eth1 are going down after a reboot.
I have to run the following after that:

ip link set eth0 up
ip link set eth1 up
ip addr flush dev eth0
ip addr add X.X.X.X/20 dev eth0
route add default gw Y.Y.Y.Y eth0

X.X.X.X is your droplet’s IP and
Y.Y.Y.Y is your gateway

These settings vanish after a reboot.
Anyone who know why?

@alexgeorgiev Thank you so much for your help :)

Thanks!

Hello,

Can you please check if the network service is running? Run the following command:

systemctl status network-manager

Let me know how it goes.

Alex

Have another answer? Share your knowledge.