Re: [LARTC] have any of you got my iproute2 directory?

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



OK .. well .. I made the directory and added the files, I still have problems 
:)

What I have is a box with two connections onto the internet, one slowish, on 
fast .. the default route is eth0, and as it stands, connections coming in on 
eth1 get answered by eth0, legal, but not what I want and are blocked by some 
stateful firewalls.

so ... I read the faq and did this:
#!/bin/bash

IP_CMD="/sbin/ip"

IF1=eth0
IP1= x.x.x.x
P1_NET=x.x.x.0/24
P1_GATE= x.x.x.1

IF2=eth1
IP2= y.y.y.y
P2_NET=y.y.y.0/24
P2_GATE=y.y.y.1

echo "flushing"
$IP_CMD route flush table T1
$IP_CMD route flush table T2
$IP_CMD route flush scope link

echo "eth0 routes in table 1"
$IP_CMD route add $P1_NET dev $IF1 src $IP1 table T1
$IP_CMD route add default via $P1_GATE table T1

echo "eth1 routes in table 2"
$IP_CMD route add $P2_NET dev $IF2 src $IP2 table T2
$IP_CMD route add default via $P2_GATE table T2

echo "assign routes to IP"
# make sure it goes out where it came in.
$IP_CMD route add $P1_NET dev $IF1 src $IP1
$IP_CMD route add $P2_NET dev $IF2 src $IP2

# default route
$IP_CMD route add default via $P1_GATE
$IP_CMD route add 127.0.0.0/8 dev lo

echo "assign tables to IP"
$IP_CMD rule add from $IP1 table T1
$IP_CMD rule add from $IP2 table T2
echo "done"


..... but I get :
flushing
eth0 routes in table 1
RTNETLINK answers: Network is unreachable
eth1 routes in table 2
RTNETLINK answers: Network is unreachable
assign routes to IP
RTNETLINK answers: File exists
assign tables to IP
done


and the asymetric routinf is still happening, so I guess its not worked then 
...

suggestions ..?


-- 
Robin Szemeti

Redpoint Consulting Limited
Real Solutions For A Virtual World


[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux