linux device driver for pure ipv6 device

China☆狼群 提交于 2019-12-13 04:11:36

问题


I am currently designing a linux driver for a pure IPv6 driver. Is there any way to make the kernel module only support IPv6 and can only be assigned IPv6 address? What is the commands in linux to set the address?

Thanks


回答1:


Adding IP:

Using ip command:

$sudo /sbin/ip -6 addr add 2001:0db8:0:f101::1/64 dev eth0 

Using ifconfig command:

$sudo /sbin/ifconfig eth0 inet6 add 2001:0db8:0:f101::1/64 

Deleting IP:

Using ip

$sudo /sbin/ip -6 addr del 2001:0db8:0:f101::1/64 dev eth0 

Using ifconfig

$sudo /sbin/ifconfig eth0 inet6 del 2001:0db8:0:f101::1/64


来源:https://stackoverflow.com/questions/14760301/linux-device-driver-for-pure-ipv6-device

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!