UC-7400-LX Plus User’s Manual
Managing Communications
4-27
Use the following commands to configure these settings:
61.56.74.14
root@Moxa:~# ifconfig eth0 61.56.74.14 netmask 255.255.255.248
root@Moxa:~# route add default gw 61.56.74.9
Step 3: Configure WAN_LOCAL as eth0 in /etc/rc.d/init.d/tun6to4.sh.
61.56.74.14
#!/bin/bash
TUN_INTF=tun6to4 # The name of the 6to4 tunnel link
WAN_LOCAL=eth0
WAN_IP=$(ifconfig $WAN_LOCAL |grep 'inet addr'|awk '{print $2}'|cut -d':' -f 2)
WAN_IPV6_IP=$(printf "2002:%02x%02x:%02x%02x::1/16" $(echo "${WAN_IP}"| tr '.' ' '))
TUN_RELAY=192.88.99.1 # 6to4 relay address
mname=
module_up()
{
oIFS=$IFS
IFS='
'
FOUND="no"
for LINE in `lsmod`
do
TOK=`echo $LINE | cut -d' ' -f1`
if [ "$TOK" = "$mname" ]; then
FOUND="yes";
break;
fi
done
IFS=$oIFS
if [ "$FOUND" = "no" ]; then
modprobe $mname
fi
}
case "$1" in
start)
…
*)
echo "Usage: /etc/init.d/tun6to4 {start|stop}"
exit 1
;;
esac