You are not logged in.

#1 2014-03-28 16:54:10

sant527
Member
Registered: 2009-06-21
Posts: 273

[Solved] ip route add to table not working

i have added two table names wifi and voda to /etc/iproute2/rt_tables.

255	local
254	main
253	default
0	unspec

1      wifi
2      voda

Now i am trying to add rule to the table voda it  giving error.


root# ip route add 10.178.202.42/14 dev wwan0 src 10.178.202.42 table voda
RTNETLINK answers: Invalid argument

can some one help.

did ip dont know that the table voda in listed in the rt_tables file

Last edited by sant527 (2014-03-29 10:42:48)

Offline

#2 2014-03-28 17:36:07

Gcool
Member
Registered: 2011-08-16
Posts: 1,456

Re: [Solved] ip route add to table not working

Try using the correct network prefix and see what that gives as a result. So that would be:

#ip route add 10.176.0.0/14 dev wwan0 src 10.178.202.42 table voda

Burninate!

Offline

#3 2014-03-29 04:28:34

sant527
Member
Registered: 2009-06-21
Posts: 273

Re: [Solved] ip route add to table not working

thank you. it worked. how to find which network prefix to use.

Offline

#4 2014-03-29 07:58:16

Gcool
Member
Registered: 2011-08-16
Posts: 1,456

Re: [Solved] ip route add to table not working

Most online subnet calculators should do. I personally use this one if I run in to a situation where I can't be bothered to calculate myself smile


Burninate!

Offline

Board footer

Powered by FluxBB