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.74
Server IPv6 address: 2001:470:1f04:571::1/64
Client IPv4 address: 202.115.19.145
Client IPv6 address: 2001:470:1f04:571::2/64
Routed /64: 2001:470:1f05:571::/64
2.Check /etc/sysconfig/network have the following line:
NETWORKING_IPV6=yes
3.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 sit1
4.Enable to IPv6 forwarding (routing)
echo 1 >/proc/sys/net/ipv6/conf/all/forwarding
5.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/64
6.Install "radvd" for IPv6 Stateless Address Autoconfiguration.
yum install radvd -y
7.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 -y
edit /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

 

评分:0

我来说两句

显示全部

:loveliness: :handshake :victory: :funk: :time: :kiss: :call: :hug: :lol :'( :Q :L ;P :$ :P :o :@ :D :( :)

日历

« 2009-01-10  
    123
45678910
11121314151617
18192021222324
25262728293031

数据统计

  • 访问量: 4162
  • 日志数: 38
  • 建立时间: 2006-11-05
  • 更新时间: 2008-09-29

RSS订阅

Open Toolbar