rehat linux设置ip,RedhatHat配置IPv6地址
RedhatHat配置IPv6地址:
修改網卡配置文件:
[root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth4
DEVICE="eth4"
BOOTPROTO="none"
HWADDR="00:50:56:AA:69:EF"
#NM_CONTROLLED="yes"
ONBOOT="yes"
TYPE="Ethernet"
#UUID="4e44fcc7-a050-4271-a07f-2d32d319be74"
#IPADDR=192.168.73.58
#NETMASK=255.255.255.0
#GATEWAY=192.168.73.1
IPV6INIT=yes
USERCTL=yes
IPV6ADDR=2001::5656
IPV6PREFIX=64
#IPV6_AUTOCONF=no
配置網關:
[root@localhost ~]# cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=localhost.localdomain
NETWORKING_IPV6=yes
IPV6_DEFAULTGW=2001::1212%eth4
手動配置IP:
ifconfig eth0 inet6 add 2001::5656/64
手動添加默認路由:
[root@localhost ~]# ip -6 addr add 2001::1212/64 dev eth4
查看路由:
[root@localhost ~]# route -A inet6
Kernel IPv6 routing table
Destination ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Next Hop ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?Flags Metric Ref ? ?Use Iface
getnameinfo failed
getnameinfo failed
[UNKNOWN]/128 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? [UNKNOWN] ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? UC ? ?0 ? ? ?1 ? ? ? ?1 eth4
getnameinfo failed
[UNKNOWN]/64 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?* ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? U ? ? 256 ? ?12 ? ? ? 0 eth4
getnameinfo failed
[UNKNOWN]/64 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?* ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? U ? ? 256 ? ?0 ? ? ? ?0 eth4
getnameinfo failed
*/0 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? [UNKNOWN] ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? UGDA ?1024 ? 26 ? ? ? 0 eth4
localhost/128 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? * ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? U ? ? 0 ? ? ?0 ? ? ? ?1 lo
getnameinfo failed
[UNKNOWN]/128 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? * ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? U ? ? 0 ? ? ?620 ? ? ? 1 lo
getnameinfo failed
[UNKNOWN]/128 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? * ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? U ? ? 0 ? ? ?24 ? ? ? 1 lo
getnameinfo failed
[UNKNOWN]/128 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? * ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? U ? ? 0 ? ? ?20 ? ? ? 1 lo
getnameinfo failed
[UNKNOWN]/8
總結
以上是生活随笔為你收集整理的rehat linux设置ip,RedhatHat配置IPv6地址的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: linux按函数数字大小排序,linux
- 下一篇: linux 其他常用命令