I have Ubuntu linux Os with two eth cards. I can easily delete def gatewayg. But I can't add new one..
When I run route-n:
alperen@alperen-System-Product-Name:~$ route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.2.0 0.0.0.0 255.255.255.0 U 1 0 0 eth1
10.20.0.0 0.0.0.0 255.255.0.0 U 1 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 eth1
0.0.0.0 10.20.0.1 0.0.0.0 UG 0 0 0 eth0
I delete the default gw using
alperen@alperen-System-Product-Name:~$ sudo route del default gw 10.20.0.1
alperen@alperen-System-Product-Name:~$ route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.2.0 0.0.0.0 255.255.255.0 U 1 0 0 eth1
10.20.0.0 0.0.0.0 255.255.0.0 U 1 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 eth1
Now I try to add static gateway using:
alperen@alperen-System-Product-Name:~$ sudo route add default gw 169.10.10.100
SIOCADDRT: No such process
alperen@alperen-System-Product-Name:~$ sudo route add default gw 169.10.10.100
SIOCADDRT: No such process
I also tried ip route commands..