Answer the question
In order to leave comments, you need to log in
How to reset network interfaces in Ubuntu?
Hello.
I register routes, and without reboot they are not installed.
Is there any way to reset all network interfaces at once?
Tried: /etc/init.d/networking restart , service networking restart , but it doesn't help. Have to restart the server. :(
I prescribe the routes in this way:
nano /etc/network/interfaces
Under the interface I add up route add xxxx netmask xxxx gw xxxx
Answer the question
In order to leave comments, you need to log in
Lower-raise all network interfaces:
in /etc/network/interfaces instead of
up route add xxxx netmask xxxx gw xxxxinsert:
auto eth0
iface eth0 inet static
address 192.168.0.2/24
gateway 192.168.0.1
dns-nameservers 192.168.0.1
post-up route add x.x.x.x netmask x.x.x.x gw 192.168.0.1
post-down route del x.x.x.x netmask x.x.x.x gw 192.168.0.1
auto eth0
iface eth0 inet static
address 192.168.0.2/24
gateway 192.168.0.1
dns-nameservers 192.168.0.1
post-up ip route add x.x.x.x/xx via 192.168.0.1
post-down ip route del x.x.x.x/xx via 192.168.0.1
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question