After about 20 days hard work, it's been tested today. the peak speed at 225k bytes/s :) but TCO not cheap...... Beside all ,it's worked for me.. paste shell script here:---------- Compile kernel first -----------------
#with below options
[*] Socket Filtering <*> Unix domain sockets [*] TCP/IP networking [*] IP: multicasting [*] IP: advanced router [*] IP: policy routing [*] IP: use netfilter MARK value as routing key [*] IP: fast network address translation [*] IP: equal cost multipath [*] IP: use TOS value as routing key [*] IP: verbose route monitoring [*] IP: large routing tables
--------------------- Shell script BEGIN --------------------
echo 1 > /proc/sys/net/ipv4/ip_forward
dhclient eth0 dhclient eth1 # get ip address from ISP's CM-DHCPD
ifconfig eth2 172.19.0.1 netmask 255.255.0.0
ext_ip0=`ifconfig eth0 | grep inet | cut -f 2 -d : | cut -f 1 -d \ ` ext_ip1=`ifconfig eth1 | grep inet | cut -f 2 -d : | cut -f 1 -d \ `
insmod /lib/modules/2.4.20-xfs/kernel/net/sched/sch_teql.o
iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to-source $ext_ip0 iptables -t nat -A POSTROUTING -o eth1 -j SNAT --to-source $ext_ip1
dhcpd eth2 # set default route in dhcpd.conf as 172.19.0.1
gw0=`ip route list | grep eth0 | grep default | cut -f 3 -d \ ` gw1=`ip route list | grep eth1 | grep default | cut -f 3 -d \ `
route delete default gw $gw0 route delete default gw $gw1
ip route replace default nexthop via $gw0 dev eth0 weight 1 nexthop via $gw1 dev eth1 weight 1
ip route flush cache