On 6/20/07, Pascal Hambourg <pascal.mail@xxxxxxxxxxxxxxx> wrote:
Hello, You should consider posting your questions in the netfilter user list rather than the netfilter developper list because they are user related rather than developper related. pankaj jain a écrit : > > As I was using arptables for responding arp-requests, I did not plumb > the interfaces on my machine. "Plumb" ? What do you mean ? > Now I want to add a gateway from the same subnet, for example: > I am sending arp responses for 203.200.192.24 (sorry if some one has > this IP) using arp tables so I have not plumbed this IP on my > interface Again, what do you mean by "plumb" ? > Now I want to add a gateway e.g. 203.200.192.1 in the route table > "ip route add default via 203.200.192.1 dev eth0 table 10" > but when I try this it says > RTNETLINK answers: Network is unreachable You got this error from the route command because a gateway must be directly reachable on an interface but there is no direct route to the 203.200.192.1 via eth0 in the routing table. However I do not understand why you want to use an address that does not exist as a gateway. Could you explain your goal ? (You may reply by posting a message on the netfilter user list)
Hi Plumbing means I did not assign the IP 203.200.192.24 to any of my interfaces, instead I was using arptables to respond the arp requests for this IP. The gateway exists on the same subnet but because I did not assign the IP to any of my interfaces, ip route rejects the gateway add command. but now I understood that first I had to add the network route for that gateway. I added the network route to the table 10 but it did not work I had to add the same route to the main table also to make it work :). why do I have to add the network route in the main table also ? The command used are: TRY - 1 ip route add default via 203.200.192.1 dev eth0 table 10 (did not work) RESULT -> RTNETLINK answers: Network is unreachable TRY - 2 ip route add 203.200.192.0/24 dev eth0 table 10 ip route add default via 203.200.192.1 dev eth0 table 10 RESULT -> RTNETLINK answers: Network is unreachable TRY - 3 ip route add 203.200.192.0/24 dev eth0 ip route add default via 203.200.192.1 dev eth0 table 10 RESULT -> success does network route of individual tables does not have any effect ?? -- Thanks Pankaj Jain