脚踏实地
全部博文(230)
分类: 系统运维
2010-07-08 19:58:38
1. 查看状态 用netstat -antl
2. 默认情况下,IPV6是开启的,不用的话要:
vi /etc/modprobe.d/aliases
默认是有开启.那我们现在就要把它关闭了.还需要重启机器才会生效.
# alias net-pf-9 x25
# alias net-pf-10 ipv6
alias net-pf-10 off
alias ipv6 off
# alias net-pf-11 rose
# alias net-pf-12 decnet
3 支持 自动配置
给内网自动分配ipv6,需要安装radvd
aptitude安装radvd
cp /usr/share/doc/radvd/examples/simple-radvd.conf /etc/radvd.conf编辑
emacs -nw /etc/radvd.conf修改为如下内容
interface eth1 { AdvSendAdvert on; MinRtrAdvInterval 30; MaxRtrAdvInterval 100; prefix 2001:da8:d800:6800::/64 { AdvOnLink on; AdvAutonomous on; AdvRouterAddr on; }; };
重启radvd
还需要设置一些参数在文件/etc/sysctl.conf中:
net.ipv6.conf.default.autoconf = 1
net.ipv6.conf.default.accept_ra = 1
net.ipv6.conf.default.accept_ra_defrtr = 1
net.ipv6.conf.default.accept_ra_rtr_pref = 1
net.ipv6.conf.default.accept_ra_pinfo = 1
net.ipv6.conf.default.accept_source_route = 1
net.ipv6.conf.default.accept_redirects = 1
net.ipv6.conf.default.forwarding = 1
net.ipv6.conf.all.autoconf = 1
net.ipv6.conf.all.accept_ra = 1
net.ipv6.conf.all.accept_ra_defrtr = 1
net.ipv6.conf.all.accept_ra_rtr_pref = 1
net.ipv6.conf.all.accept_ra_pinfo = 1
net.ipv6.conf.all.accept_source_route = 1
net.ipv6.conf.all.accept_redirects = 1
net.ipv6.conf.all.forwarding = 1
然后sysctl -p 命令把这些设置加载进来
这时候在waireshark中发现了ICMP6的报文,如果需要DHCPv6,在Synaptic中搜索dhcpv6,的到了2种工具:
wide-dhcpv6-client dibbler-client
添加路由:ip -6 route add 2002:0102:0304:f101::/64 dev eth0 metric 1
参考文献:
-------------
Linux IPv6 HOWTO (en) | ||
---|---|---|
Chapter 22. Hints for IPv6-enabled daemons |
DHCPv6 can be used for stateful configurations. The daemon itself need not necessary run on the Linux default IPv6 gateway router.
You can specify more information than by using radvd. The are most similar to IPv4 DHCP server.
After a proper configuration, the daemon reacts on received ICMPv6 multicast packets sent by a client to address ff02::1:2
dhcp6s's config file is normally /etc/dhcp6s.conf. An simple example looks like following:
interface eth0 { |
dhcp6c's config file is normally /etc/dhcp6c.conf. An simple example looks like following:
interface eth0 { |
Start server, e.g.
# service dhcp6s start |
Start client in foreground, e.g.
# dhcp6c -f eth0 |
The server has one foreground and two debug toggles (both should be used for debugging), here is an example:
# dhcp6s -d -D -f eth0 |
As general debugging for test whether the IPv6 DHCP server is reable on the link use an IPv6 ping to the DHCP multicast address:
# ping6 -I eth0 ff02::1:2 |
The client has one foreground and two debug toggles, here is an example:
# dhcp6c -d -f eth0 |
Note that the netlink error messages have no impact.
Router Advertisement Daemon (radvd) | ISC Dynamic Host Configuration Server (dhcpd) |