This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (本操作需要有基本使用vi的能力) | |
| 1. ssh登入Edgerouter後, sudo vi /etc/ppp/ip-down.d/remove_invalidv6.sh 貼上下列內容 | |
| #!/bin/sh | |
| /sbin/ifconfig switch0 | grep -ivE 'fe80' | grep 'inet6' | awk '{print $3}' | while read -r ipv6addr ; do | |
| echo "Removing $ipv6addr from switch0" >> /tmp/ipv6_remove.log | |
| /sbin/ip -6 addr del $ipv6addr dev switch0 | |
| done | |
| /etc/init.d/radvd restart |