2007年7月4日 星期三

設定IPv6

設定IPv6位址
# ip addr add 2001:100:100:100::2/64 dev eth0

移除IPv6位址
# ip addr del 2001:100:100:100::2/64 dev eth0

設定預設閘道
# ip route add default via 2001:100:100:100::1 dev eth0

以上方法只是暫時用指令設定位址,若要永久設定可以把指令寫在rc.local裡,或是寫入網路的設定檔。下面以Debian設定來介紹說明:
設定檔位於/etc/network/interfaces,內容如下:

iface eth0 inet6 static
address 2001:100:100:100::2
netmask 64
gateway 2001:100:100:100::1

0 意見: