Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

bring down network interface and up again

Featured Replies

What's the best way to restart the network interface from the command line?

 

I have an issue where every few days my unRIAD server loses it's LAN connection (probably related to the drivers for my 2x10GB BCM57810 NIC), if I unplug the network cable and plug it back in again all is well again for a few more days.

 

I figured I could create a simple workaround with a scheduled userscript to detect the lack of network access and bring the interface down then up again e.g.

 

if ping -c 1 192.168.1.1 &> /dev/null
then
  echo "succces - NOP"
else
  echo "fail - restart NIC"
  [nic restart command here]
fi

 

Edited by ThatDude
typo

I too would be interested in this. The requirement to have Docker and VMs shut down to even consider touching networks in the GUI is inane, and turns what should be 5 seconds into a 10+ minute reboot process.

 

Hypothetically, something like

ifconfig br0 down && ifconfig br0 up

should do. Maybe would need to use your eth0/etc itself depending on what's actually getting hung up.

But in my experience, that has done nothing for the problem I've had at hand despite all indications that it should work.

So your mileage may vary.

  • Author
7 hours ago, Blooest said:

I too would be interested in this. The requirement to have Docker and VMs shut down to even consider touching networks in the GUI is inane, and turns what should be 5 seconds into a 10+ minute reboot process.

 

Hypothetically, something like

ifconfig br0 down && ifconfig br0 up

should do. Maybe would need to use your eth0/etc itself depending on what's actually getting hung up.

But in my experience, that has done nothing for the problem I've had at hand despite all indications that it should work.

So your mileage may vary.

 

That's what I was hoping for. A gracefully way to stop all necessary processes for br0 and restart them as necessary.

 

I guess the nuclear option is to stop the array, this triggers a global shutdown of services, but I was hoping for a better option. Perhaps stopping all the dockers, pausing VMs and restarting the interface is enough. Maybe someone with more experience can jump in.

 

  • 1 year later...
On 5/21/2022 at 6:24 PM, Blooest said:

I too would be interested in this. The requirement to have Docker and VMs shut down to even consider touching networks in the GUI is inane, and turns what should be 5 seconds into a 10+ minute reboot process.

 

Hypothetically, something like

ifconfig br0 down && ifconfig br0 up

should do. Maybe would need to use your eth0/etc itself depending on what's actually getting hung up.

But in my experience, that has done nothing for the problem I've had at hand despite all indications that it should work.

So your mileage may vary.

 

Ever since updating to 6.12, for months now, I've had an issue every 5-50 days at random intervals where Unraid itself will lose all network access, but all the dockers are fine. This is the first solution that worked for me other than fully restarting the server, thank you.

  • 4 weeks later...

FYI

 

I've been running into this ever switching to the built in Aquantia 10GB nic.

 

/etc/rc.d/rc.inet1  stop

/etc/rc.d/rc.inet1  start

/etc/rc.d/rc.inet1  restart

 

Found the answer here:

 

  • 2 weeks later...
On 4/18/2024 at 1:56 PM, jbartlett said:

FYI

 

I've been running into this ever switching to the built in Aquantia 10GB nic.

 

/etc/rc.d/rc.inet1  stop

/etc/rc.d/rc.inet1  start

/etc/rc.d/rc.inet1  restart

 

Found the answer here:

 

Thank you!!!   The whole stop everything on your server to make network changes was such a bizarre requirement.

Imagine if all distro's worked that way.  The Internet would come to a halt.

  • 1 year later...

I'm having a similar issue, but my server is maintaining its connection to the LAN and losing access to the outside internet. Would the same script work if I substituted "google.com" instead of the default gateway?

Thanks!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.