Hi,
I am creating some routing policy and I am having a basic problem with ip.
I am starting with 2 hosts to test the configuration.
---------- ----------
| host A |------------| Host B |
---------- ----------
IP: 10.0.100.1 IP: 10.0.100.2
On hostA:
# ip address add 10.0.100.1/24 dev eth0 brd +
On hostB:
# ip address add 10.0.100.2/24 dev eth0 brd +
With this both sides can ping each other (as expected)
Now at host A I get the error:
# ip route add 10.0.100.1/24 dev eth0 table 200
RTNETLINK answers: Invalid argument
I have read the archieves (most of it), the howto and
the ip-cred documentation.
However I am still missing something. I don''t get what is wrong.
Here is my configurations:
Host A:
- addresses:
1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 brd 127.255.255.255 scope host lo
2: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 100
link/ether 00:01:02:98:40:00 brd ff:ff:ff:ff:ff:ff
inet XXX.x.x.x/24 brd XXX.x.XX.XX scope global eth0
inet 10.0.100.1/24 brd 10.0.100.255 scope global eth0
- table main:
10.0.100.0/24 dev eth0 proto kernel scope link src 10.0.100.1
XXX.x.XXX.0/24 dev eth0 proto kernel scope link src XXX.x.XXX.x
127.0.0.0/8 dev lo scope link
default via XXX.x.XXX.x dev eth0
-table local:
broadcast 127.255.255.255 dev lo proto kernel scope link src 127.0.0.1
broadcast 10.0.100.255 dev eth0 proto kernel scope link src 10.0.100.1
local x.x.x.1 dev eth0 proto kernel scope host src x.x.x.1
broadcast x.x.x.255 dev eth0 proto kernel scope link src x.x.x.1
broadcast 10.0.100.0 dev eth0 proto kernel scope link src 10.0.100.1
local 10.0.100.1 dev eth0 proto kernel scope host src 10.0.100.1
broadcast 127.0.0.0 dev lo proto kernel scope link src 127.0.0.1
broadcast x.x.x.0 dev eth0 proto kernel scope link src x.x.x.1
local 127.0.0.1 dev lo proto kernel scope host src 127.0.0.1
local 127.0.0.0/8 dev lo proto kernel scope host src 127.0.0.1
On Host B:
- addresses
1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 brd 127.255.255.255 scope host lo
2: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 100
link/ether 00:01:02:71:44:5d brd ff:ff:ff:ff:ff:ff
inet x.x.x.140/24 brd x.x.x.255 scope global eth0
inet 10.0.100.2/24 brd 10.0.100.255 scope global eth0
- table main
10.0.100.0/24 dev eth0 proto kernel scope link src 10.0.100.2
x.x.x.0/24 dev eth0 proto kernel scope link src x.x.x.140
127.0.0.0/8 dev lo scope link
default via x.x.x.131 dev eth0
- table local
broadcast 127.255.255.255 dev lo proto kernel scope link src 127.0.0.1
broadcast 10.0.100.255 dev eth0 proto kernel scope link src 10.0.100.2
local x.x.x.140 dev eth0 proto kernel scope host src x.x.x.140
broadcast x.x.x.255 dev eth0 proto kernel scope link src x.x.x.140
broadcast 10.0.100.0 dev eth0 proto kernel scope link src 10.0.100.2
broadcast 127.0.0.0 dev lo proto kernel scope link src 127.0.0.1
local 10.0.100.2 dev eth0 proto kernel scope host src 10.0.100.2
broadcast x.x.x.0 dev eth0 proto kernel scope link src x.x.x.140
local 127.0.0.1 dev lo proto kernel scope host src 127.0.0.1
local 127.0.0.0/8 dev lo proto kernel scope host src 127.0.0.1
On both hosts no special rule (yet):
0: from all lookup local
32766: from all lookup main
32767: from all lookup defaul
Regards,
Raul Dias