Config Linux as a gateway of 6to4 tunnel IPv6 network
上一篇 /
下一篇 2008-07-25 16:24:05
How to user 6to4 tunnel provided by
Hurricane Electric to build up IPv6 network with a Linux gateway (Centos 5).
Network TOP:
Steps:1.
Apply for a 6to4 tunnel, and we get the following information:
Server IPv4 address: 72.52.104.74Server IPv6 address: 2001:470:1f04:571::1/64Client IPv4 address: 202.115.19.145Client IPv6 address: 2001:470:1f04:571::2/64Routed /64: 2001:470:1f05:571::/642.Check /etc/sysconfig/network have the following line:
NETWORKING_IPV6=yes3.Enable IPv6 on the Linux route, using the following commands and make sure they have written into /etc/rc.local so that it can work after reboot.
/sbin/ifconfig sit0 up/sbin/ifconfig sit0 inet6 tunnel ::72.52.104.74/sbin/ifconfig sit1 up/sbin/ifconfig sit1 inet6 add 2001:470:1f04:571::2/64/sbin/ip route add 2000::/3 dev sit14.Enable to IPv6 forwarding (routing)
echo 1 >/proc/sys/net/ipv6/conf/all/forwarding5.Configure the local network using the following command and write it down into /etc/rc.local. ( eth0 is connected with other client on LAN),
/sbin/ifconfig eth0 inet6 add 2001:470:1f05:571::1/646.Install "radvd" for IPv6 Stateless Address Autoconfiguration.
yum install radvd -y7.Edit the /etc/radvd.conf like this:
interface eth0{AdvSendAdvert on;MinRtrAdvInterval 30;MaxRtrAdvInterval 100;prefix 2001:470:1f05:571::/64{AdvOnLink on;AdvAutonomous on;AdvRouterAddr off;};};8.The network is OK. visit
ipv6.google.com or
ipv6.org can check the new IPv6 network.
9.You could install the DHCPv6 if you want use the IPv6 Stateful Autoconfiguration.(
I still have the problem of LOSEING information of the default gateway when using DHCPv6,
NEED YOUR HELP)
yum install dhcpv6 -yedit /etc/dhcp6s.conf like this: (This config
DON'T work well, the client will
lack of the default gateway)
interface eth0 {server-preference 255;renew-time 60;rebind-time 90;prefer-life-time 130;valid-life-time 200;allow rapid-commit;option dns_servers 2001:470:1f05:571::1 domain.org;link AAA {pool{range 2001:470:1f05:571::2 to 2001:470:1f05:571::FFF1/64;2001:470:1f05:571::/64;};};};
导入论坛
引用链接
收藏
分享给好友
管理
举报
TAG:
Linux
tunnel
gateway
network
Config