Route


Agregar

route add default gw 192.168.0.1 eth0

Borrar

luzar@ubuntu:~$ route
Kernel IP routing table
Destination    Gateway    Genmask    Flags Metric Ref  Use Iface
192.168.44.0    *      255.255.255.0   U     0     0    0  eth0
10.21.35.0      *      255.255.255.0   U     0     0    0  eth0
default    192.168.44.2    0.0.0.0    UG    100    0    0  eth0
luzar@ubuntu:~$
route del default gw 192.168.0.1 wlp2s0
Next, let's delete the network route in blue. Below is an example of Ubuntu route del command used to remove a route from network:

luzar@ubuntu:~$ sudo route del -net 10.21.35.0 netmask 255.255.255.0
 dev eth0 
luzar@ubuntu:~$ route 
Kernel IP routing table
Destination  Gateway       Genmask     Flags Metric Ref  Use Iface
localnet      *          255.255.255.0  U     0      0    0  eth0
default   mygateway1.ar7  0.0.0.0      UG    100     0    0  eth0luzar@ubuntu:~$

No hay comentarios:

Publicar un comentario