You are not logged in.
dpc@empire:~$ sudo ip route ls table main | grep 8.8.8.8
dpc@empire:~$ sudo ip route ls table 10
dpc@empire:~$ sudo ip route add 8.8.8.8/31 via 10.8.19.3 table 10
dpc@empire:~$ sudo ip route ls table 10
dpc@empire:~$ sudo ip route ls table main | grep 8.8.8.8
8.8.8.8/31 via 10.8.19.3 dev tun3
It seems ip route does not use table parameter at add.
dpc@empire:~$ uname -a
Linux empire 2.6.19-beyond #1 SMP PREEMPT Fri Dec 15 17:41:19 EST 2006 i686 Intel(R) Celeron(R) CPU 2.60GHz GenuineIntel GNU/Linux
dpc@empire:~$ pacman -Q iproute
iproute 061002-2
Offline
I'm not sure what you are trying to say here but I'm guessing you are having a hard time adding a default gateway?
The command is:
route add default gw 10.8.19.1 eth0
Note: I'm just using a bogus IP address and assume that the NiC interface is eth0, you may adjust that to your specific needs.
To test that it works issue "route"
Hope this helps.
R
Offline
LOL
I'm talking that on Arch "ip route add" command does not use "table X" parameter and throws everything to main routing table. This is some bug. I gues headers/compilation problem or something like this.
Hope this clarify my post.
Offline
ummm... a /31 gives you two hosts.
Did you try any other netmasks?
It might be that a /31 isn't "happy", because that mask is not often used (as it specifies only two hosts).
That is not a possible mask for a network, since it would only specify a network id, and a broadcast, if use on an interface.
Try a full /32 mask and see if that works.
"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍
Offline
No, it does not. It does not make difference how many hosts netmask has.
I wish someone reproduce this and we can think where the problem is.
Offline
table TABLEID
the table to add this route to. TABLEID may be a number or a string from the file /etc/iproute2/rt_tables. If this parameter is omitted, ip assumes the main table, with the exception of local , broadcast and nat routes, which are put into the local table by default.
I tried adding an entry to the rt_tables file, but like you, I was unable to put a route into a custom table.
Did this work for you in the past kernel versions? I haven't dealt with ip route very often, as I don't do much policy based routing. I have done some source routing with it, but I have never used custom tables and routing rules.
"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍
Offline
The problem is using routing tables is quite uncommon. I've done that before on some router machines, but not on my workstation (where Arch resides) - till now. So I have now clue when was that working last time in Arch.
Offline
If you use the Arch "default" kernel I think you need to recompile it, after adding the options CONFIG_IP_ADVANCED_ROUTER and CONFIG_IP_MULTIPLE_TABLES to the config.
To use the iptables MARK target to mark packets and select a specific routing table based on this, you also need CONFIG_IP_ROUTE_FWMARK set.
Offline
Thx. I'd expect error of any kind - not such behaviour. But you are probably right. I'd do that.
Offline