How to "restart" particular network interface on RHEL?

You can use:

ifdown eth1 && ifup eth1

As a single command. The && just runs one command, then the other if the first command succeeds. If you are required to use sudo make sure you use it before each command:

sudo ifdown eth1 && sudo ifup eth1

As long as your interface is configured to have the neccessary IP and route to match the current configuration, your ssh connection won't drop.

If you're worried about using it on a production server that you don't have another method of access to, that's understandable. Though the command does exactly what you want, it's very easy to have a configuration error that is only noticed after running this command. If you don't have an alternate method of access (for example, out-of-band console, or SSHD running on another interface), it's safest not to do this.

I use this technique often to perform a 'restart' of the interface, but I generally have a backup method of access available just in case when I do it.


You can 'restart' one interface by issuing following commands:

# ifdown eth1
# ifup eth1

After that, you can verify that your new configuration is active

# ip a