Question

Networking not working after droplet resize

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!


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

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!

Thanks a lot for the solution! Got the same issue on 2 different droplets without any resizing (once in Dec.2019, once in Apr.2020). We were not doing anything to the servers or software, it just happened by itself. DigitalOcean support yet insists it happened due to our actions.

alexdo
Site Moderator
Site Moderator badge
August 28, 2019

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

Become a contributor for community

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and SMBs

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.

New accounts only. By submitting your email you agree to our Privacy Policy

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.