自從openwrt與lede分支合併後,openwrt最新版18.06本支援了ipv6,韌體鏈結,這裡使用widora出品的neo路由器開發板測試
修改配置檔案
/etc/config/network
,其實這個配置就是widora官方韌體的預設配置
config inte***ce 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config globals 'globals'
config inte***ce 'lan'
option type 'bridge'
option ifname 'eth0.1'
option force_link '1'
option macaddr '0c:ef:af:d0:46:d3'
option proto 'static'
option ipaddr '192.168.8.1'
option netmask '255.255.255.0'
option ip6assign '60'
config inte***ce 'wan'
option ifname 'eth0.2'
option force_link '1'
option macaddr '0c:ef:ad:d0:46:dd'
option proto 'static'
option ipaddr 'x.x.x.x'
option netmask '255.255.255.0'
option gateway 'x.x.x.x'
option dns 'x.x.x.x'
config inte***ce 'wan6'
option ifname 'eth0.2'
option proto 'dhcpv6'
config switch
option name 'switch0'
option reset '1'
option enable_vlan '1'
config switch_vlan
option device 'switch0'
option vlan '1'
option ports '1 2 3 4 6t'
config switch_vlan
option device 'switch0'
option vlan '2'
option ports '0 6t'
/etc/config/dhcp
配置,這裡使用relay模式
config dnsmasq
option domainneeded '1'
option boguspriv '1'
option filterwin2k '0'
option localise_queries '1'
option rebind_protection '1'
option rebind_localhost '1'
option local '/lan/'
option domain 'lan'
option expandhosts '1'
option nonegcache '0'
option authoritative '1'
option readethers '1'
option leasefile '/tmp/dhcp.leases'
option resolvfile '/tmp/resolv.conf.auto'
option nonwildcard '1'
option localservice '1'
config dhcp 'lan'
option inte***ce 'lan'
option start '100'
option limit '150'
option leasetime '12h'
option dhcpv6 'relay'
option ra 'relay'
option ndp 'relay'
option ra_management '1'
config dhcp 'wan'
option inte***ce 'wan'
option ignore '1'
config dhcp 'wan6'
option inte***ce 'wan'
option ra 'relay'
option ndp 'relay'
option dhcpv6 'relay'
option master '1'
config odhcpd 'odhcpd'
option maindhcp '0'
option leasefile '/tmp/hosts/odhcpd'
option leasetrigger '/usr/sbin/odhcpd-update'
option loglevel '4'
/etc/config/wireless
配置
config wifi-device 'radio0'
option type 'mac80211'
option channel '11'
option hwmode '11g'
option path 'platform/10300000.wmac'
option htmode 'ht20'
option disabled '0'
config wifi-iface 'default_radio0'
option device 'radio0'
option network 'lan'
option mode 'ap'
option ssid '***'
option encryption 'psk'
option key '***x'
reboot重啟,ifconfig檢視wan6是否獲取到ipv6位址
eth0.2 link encap:ethernet hwaddr 0c:ef:ad:d0:46:dd
inet addr:x.x.x.x bcast:x.x.x.x mask:255.255.255.0
inet6 addr: 2001:da8:214:1093:eef:adff:fed0:46dd/64 scope:global
inet6 addr: fe80::eef:adff:fed0:46dd/64 scope:link
up broadcast running multicast mtu:1500 metric:1
rx packets:27519 errors:0 dropped:37 overruns:0 frame:0
tx packets:16387 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
rx bytes:39824008 (37.9 mib) tx bytes:1664117 (1.5 mib)
以2001開頭即表示獲取到了ipv6位址ok,最後就可以使用無線終端連上ipv6,遊走各大高校bt站了!科學上網也是可以的!如果沒有獲取到ipv6位址,檢視是否刪除了ipv6字首!
備註實際測試了lede17.04版本韌體,也能使用ipv6,但是該韌體應該存在bug,軟體reboot時會卡死,必須硬體重啟
參考鏈結
openwrt/lede 內網** ipv6
openwrt校園網ipv6設定
校園網IPv6加速
對於廣大學生來說,上網是一件很糾結的事情,校園網要麼按時間計費,要麼按流量計費,要麼是校園寬頻。按時間計費速度慢,按流量計費費用高,校園寬頻還不能共享,只能電腦開熱點給手機上網。有沒有既能提高網速又經濟實惠的解決方案呢?為了響應國家的號召,大多數高校都參與了國家第二代網際網路建設。也就是說,大多數高...
Ubuntu 撥號上網及校園網開啟IPV6
ubuntu 18.04下有兩種方法實現撥號上網,第一種是通過圖形介面新增,需要開啟自動連線,並且要關閉乙太網的自動連線。不推薦這種連線方式 這裡介紹第二種,通過pppoeconf命令進行撥號。在使用pppoeconf命令撥號前,我們可以直接禁用掉以太網路,這樣就不會每次都彈 有線網路1 無法連線網...
Openwrt筆記 1 校園網連線
在校園裡使用路由器,開發高階功能,首先遇到的問題就是校園網的連線問題 經過一段摸索基本上找到了一些方法,暫記於此 未完待續 0.名詞解釋 h3c 華三通 華三 新華三 公司,系 華為 與 3com 公司合辦的通訊裝置公司,在國內較為普及,尤其是在教育網中應用比較廣 全套裝置 影響巨大。後因一些原因沒...