User Tools

Site Tools


wiki:ifup_and_ifdown

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
wiki:ifup_and_ifdown [2020/04/29 15:16] – created walkeradminwiki:ifup_and_ifdown [2023/08/17 17:37] (current) walkeradmin
Line 11: Line 11:
 \\  \\ 
 \\  \\ 
 +
 +----
 +
 +==== Simple Syntax ====
 +\\ 
 +So, to take down an interface, I would use the following:
 +\\ 
 +\\ 
 +<color #ed1c24>ifdown eth1</color>
 +\\ 
 +Device 'eth1' successfully disconnected.
 +\\ 
 +\\ 
 +\\ 
 +Simple, and to bring that interface back up:
 +\\ 
 +\\ 
 +<color #ed1c24>ifup eth1</color>
 +\\ 
 +Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/3)
 +\\ 
 +\\ 
 +Wow, too easy. I use this normally when I have changed and IP Address and want to invoke that change quickly (without using the systemctl command or a reboot).
 +\\ 
 +\\ 
 +
 +----
 +
 +**What Went Wrong?**
 +\\ 
 +\\ 
 +Now, this is not going to affect everyone, but in our systems we sometimes have to prove redundancy by taking down an interface, letting a device detect this and watching the system automatically switch. Sounds simple enough, but it seems that using a simple <color #ed1c24>ifdown</color> or <color #ed1c24>ifup</color> does not cause a redundancy switch, you need to do a bit more.
 +\\ 
 +\\ 
 +To properly take the interface down, so that it is recognised as being down from a 'link'perspective, you must use the following syntax:
 +\\ 
 +\\ 
 +<color #ed1c24>ip link set eth1 down</color> (obviously use your interface name, not mine)
 +\\ 
 +\\ 
 +And inversly:
 +\\ 
 +\\ 
 +<color #ed1c24>ip link set eth1 up</color>
 +\\ 
 +\\ 
 +This will ensure that the interface goes fully down, and that other devices can recognize that the interface is down.
 +\\ 
 +\\ 
 +I sincerely hope this saves you some pain :)
 +\\ 
 +\\ 
 +\\ 
 +
 +
  
wiki/ifup_and_ifdown.1588169804.txt.gz · Last modified: 2023/03/09 22:35 (external edit)