校园网DSL拨号无法使用IPV6

包含网卡/无线网的网络问题和ADSL/校园网/宽带拨号支持及代理/共享等网络使用问题
回复
wccubuntu
帖子: 2
注册时间: 2011-04-10 1:03

校园网DSL拨号无法使用IPV6

#1

帖子 wccubuntu » 2012-04-10 15:03

大家好。

我是使用校园网dsl拨号动态获取IP地址,但是DSL拨号页面没有IPV6选项。

如下图。
附件
IPV4旁边应该还有个IPV6设置吧。。。。
IPV4旁边应该还有个IPV6设置吧。。。。
头像
xw_y_am
帖子: 3333
注册时间: 2009-05-08 14:18
系统: Arch
来自: 河南新乡
联系:

Re: 校园网DSL拨号无法使用IPV6

#2

帖子 xw_y_am » 2012-04-10 15:06

dsl 好像本来就木有 ipv6 吧
Linux 相关链接大杂烩

代码: 全选

if(read) {
    if(practise) return g☘☘d;
    else return w☘☘d;
} else {
    return t☘☘d;
}
mashike0906
帖子: 29
注册时间: 2011-03-07 14:01

Re: 校园网DSL拨号无法使用IPV6

#3

帖子 mashike0906 » 2013-05-19 22:18

这个,首先,一般情况下eth0会自动获得IPv6地址,如果需要v4地址的DNS等信息,则在DSL拨号后,就可以了。
不过我这边的情况是30分钟自动断线。

如果想要ppp0获得IPv6地址,需要修改/etc/ppp/options文件,在文件的最末尾,添加

代码: 全选

ipv6 ,
或者

代码: 全选

+ipv6 ipv6cp-use-ipaddr
至此大部分情况下,已经可以获得IPv6地址了。

但是,

有些ISP,假定只有路由器可以连接IPv6,所以,需要将本机配置成路由器
具体为:
修改sysctl.conf文件

代码: 全选

vim /etc/sysctl.conf
# Uncomment the next line to enable packet forwarding for IPv6
#  Enabling this option disables Stateless Address Autoconfiguration
#  based on Router Advertisements for this host
net.ipv6.conf.all.forwarding=1
net.ipv6.conf.ppp0.accept_ra=2
重启电脑

安装wide-dhcpv6-client

代码: 全选

apt-get install wide-dhcpv6-client
配置dhcp6c.conf文件

代码: 全选

vim /etc/wide-dhcpv6/dhcp6c.conf
interface ppp0 {
    # Request Prefix Delegation on ppp0, and give the received prefix id 0
    send ia-pd 0;
};

# Use subnets from the prefix with id 0
id-assoc pd 0 {
    prefix-interface eth0 {
        # Assign subnet 1 to eth0
        sla-len 8; # <----- BELANGRIJK: 8 omdat ons klein net 64 en ons groot 56 is en dat het verschil is
        sla-id 1;
    };
};
重启服务

代码: 全选

/etc/init.d/wide-dhcpv6-client restart
安装radvd

代码: 全选

apt-get install radvd
配置radvd.conf文件

代码: 全选

vim /etc/radvd.conf
interface eth0
{
    AdvSendAdvert on;
    prefix ::/64
    {
        AdvOnLink on;
        AdvAutonomous on;
        AdvRouterAddr on;
    };
RDNSS 2001:4860:4860::8888  2001:4860:4860::8844
        {
                # AdvRDNSSLifetime 3600;
        };
};
重启服务

代码: 全选

/etc/init.d/radvd restart
可能我这边,系统依然使用eth0的IPv6网络,所以,还是30分钟就断,原因不明。

参考链接:http://gruffi.be/mediawiki/index.php/Ip ... buntu#Ipv6
http://askubuntu.com/questions/56890/ipv6-over-pppoe
回复