1821639 Members
2919 Online
109633 Solutions
New Discussion юеВ

gateway: bad value

 
SOLVED
Go to solution
Carme Torca
Super Advisor

gateway: bad value

Hi,

I want to add one route to the system, but its returns me: "gateway: bad value"
Could anyone help me??

#route add 193.145.89.241 gateway 10.32.9.1
gateway: bad value

and if I put the other gateway, it returns me the same message:

#route add 193.145.89.241 gateway 192.168.233.1
gateway: bad value

I have this routes definites:


#netstat -rn
Routing tables
Destination Gateway Flags Refs Interface Pmtu
127.0.0.1 127.0.0.1 UH 0 lo0 4136
15.0.0.8 15.0.0.8 UH 0 lan9 4136
10.32.9.169 10.32.9.169 UH 0 lan6:1 4136
192.168.233.208 192.168.233.208 UH 0 lan10 4136
192.168.233.169 192.168.233.169 UH 0 lan10:1 4136
172.17.187.70 172.17.187.70 UH 0 lan11 4136
10.32.9.208 10.32.9.208 UH 0 lan6 4136
10.32.9.169 192.168.233.169 UGH 0 lan10 0
172.17.187.0 172.17.187.70 U 2 lan11 1500
10.32.9.0 10.32.9.208 U 3 lan6 1500
10.32.9.0 10.32.9.169 U 3 lan6:1 1500
192.168.233.0 192.168.233.208 U 3 lan10 1500
192.168.233.0 192.168.233.169 U 3 lan10:1 1500
15.0.0.0 15.0.0.8 U 2 lan9 1500
192.168.233.0 192.168.233.1 UG 0 lan10 0
127.0.0.0 127.0.0.1 U 0 lo0 0
default 10.32.9.1 UG 0 lan6 0

Thanks!!!
Carmen.
Users are not too bad ;-)
3 REPLIES 3
Stefan Farrelly
Honored Contributor
Solution

Re: gateway: bad value

you have to add on a hop count when adding a route using a gateway and if its a network or host you are adding, eg;

route add host|net] gateway 1


eg.

route add host 193.145.89.241 gateway 10.32.9.1 1
Im from Palmerston North, New Zealand, but somehow ended up in London...
Carme Torca
Super Advisor

Re: gateway: bad value

Hi,

I have add the route, but nou if I do a traceroute... its says me:


#traceroute 193.145.89.241
traceroute: Warning: Multiple interfaces found; using 172.17.187.70 @ lan11
traceroute to 193.145.89.241 (193.145.89.241), 30 hops max, 40 byte packets

but I have in the netstat -rn
#netstat -rn

Routing tables
Destination Gateway Flags Refs Interface Pmtu
127.0.0.1 127.0.0.1 UH 0 lo0 4136
15.0.0.8 15.0.0.8 UH 0 lan9 4136
10.32.9.169 10.32.9.169 UH 0 lan6:1 4136
192.168.233.208 192.168.233.208 UH 0 lan10 4136
192.168.233.169 192.168.233.169 UH 0 lan10:1 4136
172.17.187.70 172.17.187.70 UH 0 lan11 4136
10.32.9.208 10.32.9.208 UH 0 lan6 4136
193.145.89.241 10.32.9.1 UGH 0 lan6 0
10.32.9.169 192.168.233.169 UGH 0 lan10 0
172.17.187.0 172.17.187.70 U 2 lan11 1500
10.32.9.0 10.32.9.208 U 3 lan6 1500
10.32.9.0 10.32.9.169 U 3 lan6:1 1500
192.168.233.0 192.168.233.208 U 3 lan10 1500
192.168.233.0 192.168.233.169 U 3 lan10:1 1500
15.0.0.0 15.0.0.8 U 2 lan9 1500
192.168.233.0 192.168.233.1 UG 0 lan10 0
127.0.0.0 127.0.0.1 U 0 lo0 0
default 10.32.9.1 UG 0 lan6 0

Why shows me this message??

Thanks!!
Carmen.
Users are not too bad ;-)
Colin Topliss
Esteemed Contributor

Re: gateway: bad value

traceroute isn't too clever - it picks an interface to try and trace your traffic, but doesn't always get it right (well, actually when there are multiple interfaces it *rarely* gets it right). In your case, it is trying to traceroute out of lan11, not the LAN you want (lan6).

try

traceroute -i lan6 193.145.89.241

Regards

Col.