for better or worse I have a machine running Redhat 7.1 .. which has iproute-2.2.4-7 installed ... but to me surprise does not appear to have a /etc/iproute2 directory .. (so adding a table to rt_tables is a bit tricky) ... a quick search doesnt locate that directory anywhere .. or the rt_tables file. so .. what to do about that? can I just grab the files of another install or what? -- Robin Szemeti Redpoint Consulting Limited Real Solutions For A Virtual World _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Robin, : for better or worse I have a machine running Redhat 7.1 .. which has : iproute-2.2.4-7 installed ... but to me surprise does not appear to : have a /etc/iproute2 directory .. (so adding a table to rt_tables is a : bit tricky) ... a quick search doesnt locate that directory anywhere : .. or the rt_tables file. : : so .. what to do about that? can I just grab the files of another : install or what? Yes--it''s no problem to "borrow" a directory from another machine. If you had made any customizations to the /etc/iproute2/* files, then these are lost, but if you did such a thing, you probably know what you need to change. I just checked a RedHat 7.1 box, and found no directory /etc/iproute2 $ ls -l /etc/iproute2/ total 20 -rw-r--r-- 1 root root 299 Aug 8 2001 rt_dsfield -rw-r--r-- 1 root root 296 Aug 8 2001 rt_protos -rw-r--r-- 1 root root 114 Aug 8 2001 rt_realms -rw-r--r-- 1 root root 98 Aug 8 2001 rt_scopes -rw-r--r-- 1 root root 92 Sep 10 2002 rt_tables Here''s roughly what it should look like though. Best of luck, -Martin -- Martin A. Brown --- SecurePipe, Inc. --- mabrown@securepipe.com _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
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 _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/