basic ip problem
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
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/2.4Routing/
Quoted 14 lines · Raul Dias
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.2On hostA:
# ip address add 10.0.100.1/24 dev eth0 brd +
Quoted 8 lines
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
Did you first create this table?
ip rule add <selector> table 200
Regards,
bert
Signature · 8 lines
http://www.PowerDNS.com Versatile DNS Software & Services Trilab The Technology People Netherlabs BV / Rent-a-Nerd.nl - Nerd Available - 'SYN! .. SYN|ACK! .. ACK!' - the mating call of the internet _______________________________________________ LARTC mailing list / [email protected] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/2.4Routing/
Quoted 8 lines
Quoted 4 lines
Now at host A I get the error:
# ip route add 10.0.100.1/24 dev eth0 table 200 RTNETLINK answers: Invalid argumentDid you first create this table?
ip rule add <selector> table 200
Are you sure that the table has to be created first with 'ip rule' ?
Changing the line to '# ip route add 10.0.100.0/24 dev eth0 table 200' worked.
Regards,
Raul Dias
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/2.4Routing/