Good day,
I've searched through the mailman lists and no one
seems to have had my problem yet. Here goes:
I've wrote a script that goes through and creates
the split access steps. However I have changed somethings.
I've declared all my variables at the top of the
shell script.
I only have one physical external ip address. So i
created a virtual addess at eth0:0
My first problem is when I run the line: ip route
add $P1_NET dev $IF1 src $IP1 table T1
I get the error: Error: argument "T1" is wrong:
"table" value is invalid
For reference sake here is my script:
IF1=eth0
IF2=eth0:0 IP1=10.123.124.52 IP2=10.123.124.53 P1=10.123.124.253 P2=10.123.124.251 P1_NET=10.123.124.0/24 P2_NET=10.123.124.0/24 # Now lets add routes to two separate tables (T1,
T2). This just tidy's things up a bit.
ip route add $P1_NET dev $IF1 src $IP1 table
T1
ip route add default via $P1 table T1 ip route add $P2_NET dev $IF2 src $IP2 table T2 ip route add default via $P2 table T2 # Now we setup our main routing
table.
ip route add $P1_NET dev $IF1 src $IP1
ip route add $P2_NET dev $IF2 src $IP2 # Now we prefrence our default route
ip route add default via $P1
# Next, setup the routing rules. These choose what
routing table to route with. Make sure you
# route out a given interface if you already have the corresponding address. ip rule add from $IP1 table T1
ip rule add from $IP2 table T2 exit 0
|