脚本如下
#!/bin/sh
LocalIPv4=$(ifconfig eth0 | sed -n '2p' | awk '{print $2}' | awk -F: '{print $2 }')
IsatapIPv4=202.116.64.254
IsatapIPv6Prefix=2001:250:3002:7000:0:5efe
IsatapIPv6Router=2001:250:3002:7000::1
Device=sit1
ip tunnel add $Device mode sit remote $IsatapIPv4 local $LocalIPv4
ifconfig $Device up
ifconfig $Device add $IsatapIPv6Prefix:$LocalIPv4/64
ip route add ::/0 via $IsatapIPv6Router metric 1
没有评论:
发表评论