RHCE:管理IPV6网络


IPV6地址=前缀+接口标识

网络+主机
前缀相当于IPV4地址中的网络ID
接口标识相关于IPV4地址中的主机ID


NAT,DHCP


8个段
每一段16位
FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF
1111=8+4+2+1=15 16进制: 15进1
10=a
11=b
12=c
13=d
14=f
15=f






地址前缀长度用/xx表示:
2001:da8:e800:14ca:a12c:1d92:sdf:00016
IPV4/32位
IPV6/128位


双冒号只能使用一次
开头的0可以省略:
2001:0db8:0000:0010:0000:0000:0000:1000/64
2001:0db8:0:10:0:0:0:1/64
2001:0db8:0:10::1/64






组播地址
任播地址
未指定:::/128
环回地址:::1/128
组播:FF00::/8-FFFF::/8


单播地址:
全局单播地址:公网IP
单播地址:
001    45        16   64
001+全局路由前缀+子网+接口ID
2001:da8:e800:14ca:4cd2:9cf9:fa94:12e2


链路本地地址:内部用
fe80::21a:a9ff:fe15:6949
fe80::/10


站点本本地:私有地址
Fec0::21a:a9ff:fe15:6950   1111111011+0+0000
Fec0::/10


唯一本地地址:私有地址
Fd00::21a:a9ff:fe15:6950        11111110 0|1   +(56位)   +64位
Fc00::/7     fd00::/8 




接口ID:
EUI-64规范:
使用MAC-EUI-64生成接口ID
MAC唯一,所以接口ID也唯一
MAC前24bit  和低24bit 插入FFFE


Ccccccc00
反转生成64bit的接口ID
Ccccccc10


生成链路本地地址:
网络前缀:FE80::/64
MAC地址:00:11:22:aa:bb:cc
FE80::211:22FF:FEaa:bb:cc/64




组播地址:
11111111 flags scope     groupID
8 4 4 112


11111111 0000   [000][0-8][E,F]   GROUP ID
0001


 所有节点的组播地址 FF02:0:0:0:0:0:0:1  相关于广播地址:255.255.255.255
所有路由器的组播地址:FF02:0:0:0:0:0:0:2
 
Ping IPV6 要加出接口名称:
Ping6 ff02::1%etho 






配置IPV6地址的方法:
方法一:通过图形界面来配置
IPV6地址联网配置:
Nm-connection-editor










方法二:通过手动方式添加


添加一个新连接:
[root@foundation0 ~]# nmcli connection add con-name eno8 type ethernet ifname eno83886648 
Connection 'eno8' (1d0874a4-804e-4a00-acd3-d93b37fc7f47) successfully added.
添加IPV6和IPV4地址:
[root@foundation0 ~]# nmcli connection add con-name eno6 type ethernet ifname eno67109424 \
> ip6 2001:db8:0:1::c00:207/64 gw6 2001:db8:0:1::1 ip4 192.168.2.70/16  
Connection 'eno6' (3b733517-19d6-4aec-8ab6-3261b84b3088) successfully added.
查看已添加的IPV6地址:
[root@foundation0 ~]# nmcli connection show eno6 | grep ipv6
ipv6.method:                            manual
ipv6.dns:                               
ipv6.dns-search:                        
ipv6.addresses:                         { ip = 2001:db8:0:1::c00:207/64, gw = 2001:db8:0:1::1 }
ipv6.routes:                            
ipv6.ignore-auto-routes:                no
ipv6.ignore-auto-dns:                   no
ipv6.never-default:                     no
ipv6.may-fail:                          yes
ipv6.ip6-privacy:                       -1 (unknown)
ipv6.dhcp-hostname:                     --


修改IPV6地址:
[root@foundation0 ~]# nmcli connection modify eno6 ipv6.addresses "2001:db8:0:1::a00:1/64 2001:db8:0:1::1"
[root@foundation0 ~]# nmcli connection show eno6 | grep ipv6
ipv6.method:                            manual
ipv6.dns:                               
ipv6.dns-search:                        
ipv6.addresses:                         { ip = 2001:db8:0:1::a00:1/64, gw = 2001:db8:0:1::1 }
ipv6.routes:                            
ipv6.ignore-auto-routes:                no
ipv6.ignore-auto-dns:                   no
ipv6.never-default:                     no
ipv6.may-fail:                          yes
ipv6.ip6-privacy:                       -1 (unknown)
ipv6.dhcp-hostname:                     --


添加IPV6 DNS地址:
[root@foundation0 ~]# nmcli connection modify eno6 ipv6.dns 2001:4860:4860::8888
[root@foundation0 ~]# nmcli connection show eno6 | grep ipv6
ipv6.method:                            manual
ipv6.dns:                               2001:4860:4860::8888
ipv6.dns-search:                        
ipv6.addresses:                         { ip = 2001:db8:0:1::a00:1/64, gw = 2001:db8:0:1::1 }
ipv6.routes:                            
ipv6.ignore-auto-routes:                no
ipv6.ignore-auto-dns:                   no
ipv6.never-default:                     no
ipv6.may-fail:                          yes
ipv6.ip6-privacy:                       -1 (unknown)
ipv6.dhcp-hostname:                     --
[root@foundation0 ~]# nmcli connection modify eno6 +ipv6.dns 2001:4860:4860::8889
[root@foundation0 ~]# nmcli connection show eno6 | grep ipv6
ipv6.method:                            manual
ipv6.dns:                               2001:4860:4860::8888, 2001:4860:4860::8889
ipv6.dns-search:                        
ipv6.addresses:                         { ip = 2001:db8:0:1::a00:1/64, gw = 2001:db8:0:1::1 }
ipv6.routes:                            
ipv6.ignore-auto-routes:                no
ipv6.ignore-auto-dns:                   no
ipv6.never-default:                     no
ipv6.may-fail:                          yes
ipv6.ip6-privacy:                       -1 (unknown)
ipv6.dhcp-hostname:                     --




删除配置文件中指定的配置行:
[root@foundation0 ~]# nmcli connection show eno6 | grep ipv6
ipv6.method:                            manual
ipv6.dns:                               2001:4860:4860::8888, 2001:4860:4860::8889
ipv6.dns-search:                        
ipv6.addresses:                         { ip = 2001:db8:0:1::a00:1/64, gw = 2001:db8:0:1::1 }
ipv6.routes:                            
ipv6.ignore-auto-routes:                no
ipv6.ignore-auto-dns:                   no
ipv6.never-default:                     no
ipv6.may-fail:                          yes
ipv6.ip6-privacy:                       -1 (unknown)
ipv6.dhcp-hostname:                     --   
[root@foundation0 ~]# nmcli connection modify eno6 -ipv6.dns 2001:4860:4860::8889
[root@foundation0 ~]# nmcli connection show eno6 | grep ipv6
ipv6.method:                            manual
ipv6.dns:                               2001:4860:4860::8888
ipv6.dns-search:                        
ipv6.addresses:                         { ip = 2001:db8:0:1::a00:1/64, gw = 2001:db8:0:1::1 }
ipv6.routes:                            
ipv6.ignore-auto-routes:                no
ipv6.ignore-auto-dns:                   no
ipv6.never-default:                     no
ipv6.may-fail:                          yes
ipv6.ip6-privacy:                       -1 (unknown)
ipv6.dhcp-hostname:                     --


查看/etc/sysconfig/network-scripts/ifcfg-*
[root@foundation0 network-scripts]# ll ./ifcfg-*
-rw-r--r--. 1 root root 309 Dec  5  2014 ./ifcfg-br0
-rw-r--r--. 1 root root 137 Dec  5  2014 ./ifcfg-br0:253
-rw-r--r--. 1 root root 375 Dec 11 20:16 ./ifcfg-eno50332200
-rw-r--r--. 1 root root 337 Dec 12 11:35 ./ifcfg-eno6
-rw-r--r--. 1 root root 286 Dec 12 11:37 ./ifcfg-eno8
-rw-r--r--. 1 root root 151 Dec  5  2014 ./ifcfg-ens33
-rw-r--r--. 1 root root 151 Dec  5  2014 ./ifcfg-ens34
-rw-r--r--. 1 root root 321 Aug 13  2015 ./ifcfg-host-only-static
-rw-r--r--. 1 root root 254 Apr  2  2014 ./ifcfg-lo
-rw-r--r--. 1 root root 287 Aug 20 15:55 ./ifcfg-nat


[root@foundation0 network-scripts]# cat ifcfg-eno8
TYPE=Ethernet
BOOTPROTO=none
IPADDR0=192.168.2.71
PREFIX0=16
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
NAME=eno8 #这个名字与配置文件相同
UUID=720640e5-9451-48cb-83d7-5d536a9e7b8e
DEVICE=eno83886648
ONBOOT=yes


查看接口的IP地址:
[root@foundation0 network-scripts]# ip addr show eno67109424 
5: eno67109424: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:0c:29:06:a4:44 brd ff:ff:ff:ff:ff:ff
    inet 192.168.2.70/16 brd 192.168.255.255 scope global eno67109424
       valid_lft forever preferred_lft forever
    inet6 2001:db8:0:1::c00:207/64 scope global 
       valid_lft forever preferred_lft forever
    inet6 fe80::20c:29ff:fe06:a444/64 scope link 
       valid_lft forever preferred_lft forever








查看本机上的IPV6路由表:
[root@foundation0 network-scripts]# ip -6 route show
unreachable ::/96 dev lo  metric 1024  error -101
unreachable ::ffff:0.0.0.0/96 dev lo  metric 1024  error -101
2001:db8::1 dev eno50332200  proto static  metric 1024 
2001:db8:0:1::/64 dev eno67109424  proto kernel  metric 256 
2001:db8:0:c00::/64 dev eno50332200  proto kernel  metric 256 
unreachable 2002:a00::/24 dev lo  metric 1024  error -101
unreachable 2002:7f00::/24 dev lo  metric 1024  error -101
unreachable 2002:a9fe::/32 dev lo  metric 1024  error -101
unreachable 2002:ac10::/28 dev lo  metric 1024  error -101
unreachable 2002:c0a8::/32 dev lo  metric 1024  error -101
unreachable 2002:e000::/19 dev lo  metric 1024  error -101
unreachable 3ffe:ffff::/32 dev lo  metric 1024  error -101
fe80::/64 dev eno33554960  proto kernel  metric 256 
fe80::/64 dev eno50332200  proto kernel  metric 256 
fe80::/64 dev vnet0  proto kernel  metric 256 
fe80::/64 dev br0  proto kernel  metric 256 
fe80::/64 dev macvtap0  proto kernel  metric 256 
fe80::/64 dev eno67109424  proto kernel  metric 256 
fe80::/64 dev eno83886648  proto kernel  metric 256 
default via 2001:db8::1 dev eno50332200  proto static  metric 1024 






IPV6故障排除工具:
检查全局地址是否配置成功:
[root@foundation0 network-scripts]# ping6 2001:db8:0:1::c00:207
PING 2001:db8:0:1::c00:207(2001:db8:0:1::c00:207) 56 data bytes
64 bytes from 2001:db8:0:1::c00:207: icmp_seq=1 ttl=64 time=0.084 ms
64 bytes from 2001:db8:0:1::c00:207: icmp_seq=2 ttl=64 time=0.099 ms
检查本地链接地址是否配置成功:
[root@foundation0 network-scripts]# ping6 fe80::20c:29ff:fe06:a444%eno67109424
PING fe80::20c:29ff:fe06:a444%eno67109424(fe80::20c:29ff:fe06:a444) 56 data bytes
64 bytes from fe80::20c:29ff:fe06:a444: icmp_seq=1 ttl=64 time=0.058 ms
64 bytes from fe80::20c:29ff:fe06:a444: icmp_seq=2 ttl=64 time=0.080 ms
64 bytes from fe80::20c:29ff:fe06:a444: icmp_seq=3 ttl=64 time=0.066 ms


PING本地连接地址可以是本地的任何接口,
[root@foundation0 network-scripts]# ping6 fe80::20c:29ff:fe06:a44e%eno83886648
PING fe80::20c:29ff:fe06:a44e%eno83886648(fe80::20c:29ff:fe06:a44e) 56 data bytes
64 bytes from fe80::20c:29ff:fe06:a44e: icmp_seq=1 ttl=64 time=0.059 ms
--- fe80::20c:29ff:fe06:a44e%eno83886648 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.059/0.059/0.059/0.000 ms
[root@foundation0 network-scripts]# ping6 fe80::20c:29ff:fe06:a44e%eno67109424
PING fe80::20c:29ff:fe06:a44e%eno67109424(fe80::20c:29ff:fe06:a44e) 56 data bytes
64 bytes from fe80::20c:29ff:fe06:a44e: icmp_seq=1 ttl=64 time=3.03 ms
64 bytes from fe80::20c:29ff:fe06:a44e: icmp_seq=2 ttl=64 time=1.93 ms
64 bytes from fe80::20c:29ff:fe06:a44e: icmp_seq=3 ttl=64 time=0.142 ms


IPV6的本地链接地址可以由同一链接上的其他主机使用:
[root@foundation0 network-scripts]# ssh fe80::20c:29ff:fe06:a44e%eno67109424
Warning: Permanently added 'fe80::20c:29ff:fe06:a44e%eno67109424' (ECDSA) to the list of known hosts.
kiosk@fe80::20c:29ff:fe06:a44e%eno67109424's password: 


Traceroute6
[root@foundation0 ~]# traceroute6 2001:db8:0:1::c00:207
traceroute to 2001:db8:0:1::c00:207 (2001:db8:0:1::c00:207), 30 hops max, 80 byte packets
 1  2001:db8:0:1::c00:207 (2001:db8:0:1::c00:207)  0.042 ms  0.018 ms  0.009 ms


查看本地已建立的连接:
[root@foundation0 ~]# ss -A inet -n
Netid  State      Recv-Q Send-Q                        Local Address:Port                          Peer Address:Port 
tcp    ESTAB      0      0                              192.168.2.99:22                            192.168.1.17:59904 
tcp    ESTAB      0      0                              172.25.0.250:34306                          172.25.0.11:22    
tcp    ESTAB      0      0                              192.168.2.99:22                            192.168.1.17:59881 
tcp    ESTAB      0      0                            172.25.254.250:2049                        172.25.254.254:882   
[root@foundation0 ~]# netstat -46n
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State      
tcp        0     52 192.168.2.99:22         192.168.1.17:59904      ESTABLISHED
tcp        0      0 172.25.0.250:34306      172.25.0.11:22          ESTABLISHED
tcp        0      0 192.168.2.99:22         192.168.1.17:59881      ESTABLISHED
tcp        0      0 172.25.254.250:2049     172.25.254.254:882      ESTABLISHED




实验:
配置IPV6联网:
显示系统识别的所有网络接口:
[root@server ~]# ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT qlen 1000
    link/ether 52:54:00:00:00:0b brd ff:ff:ff:ff:ff:ff


给指定接口添加配置文件:
[root@foundation0 ~]# nmcli connection add con-name eno6 type ethernet ifname eno67109424 
Connection 'eno6' (4a7aa816-5ec9-46c2-a0ea-e4850ec6182c) successfully added.
[root@foundation0 ~]# nmcli connection show
NAME              UUID                                  TYPE            DEVICE              
eno6              4a7aa816-5ec9-46c2-a0ea-e4850ec6182c  802-3-ethernet  eno67109424 


查看默认的IPV6配置:
[root@foundation0 ~]# nmcli connection show eno6 | grep ipv6
ipv6.method:                            auto
ipv6.dns:                               
ipv6.dns-search:                        
ipv6.addresses:                         
ipv6.routes:                            
ipv6.ignore-auto-routes:                no
ipv6.ignore-auto-dns:                   no
ipv6.never-default:                     no
ipv6.may-fail:                          yes
ipv6.ip6-privacy:                       -1 (unknown)
ipv6.dhcp-hostname:                     --


通过修改配置文件来新添加IPV6地址:
[root@foundation0 ~]# nmcli connection modify eno6 ipv6.addresses '2001:db8:0:1:c0::207/64 2001:db8:0:1:c0::1'
[root@foundation0 ~]# nmcli connection modify eno6 ipv6.method manual


配置完成后先关闭接口,再将接口重启:
[root@foundation0 ~]# nmcli connection down eno6
eno67109424: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether 00:0c:29:06:a4:44  txqueuelen 1000  (Ethernet)
        RX packets 2651449  bytes 159824471 (152.4 MiB)
        RX errors 0  dropped 5242  overruns 0  frame 0
        TX packets 52  bytes 7861 (7.6 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
[root@foundation0 ~]# nmcli connection up eno6
Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/8)
[root@foundation0 ~]# ifconfig eno67109424
eno67109424: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.11.46  netmask 255.255.0.0  broadcast 192.168.255.255
        inet6 fe80::20c:29ff:fe06:a444  prefixlen 64  scopeid 0x20<link>
        inet6 2001:db8:0:1:c0::207  prefixlen 64  scopeid 0x0<global>
        ether 00:0c:29:06:a4:44  txqueuelen 1000  (Ethernet)
        RX packets 2768916  bytes 166901681 (159.1 MiB)
        RX errors 0  dropped 5535  overruns 0  frame 0
        TX packets 77  bytes 12282 (11.9 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
查看配置是否生效:
[root@foundation0 ~]# ip addr show eno67109424 
5: eno67109424: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:0c:29:06:a4:44 brd ff:ff:ff:ff:ff:ff
    inet 192.168.11.46/16 brd 192.168.255.255 scope global dynamic eno67109424
       valid_lft 3470sec preferred_lft 3470sec
    inet6 2001:db8:0:1:c0::207/64 scope global 
       valid_lft forever preferred_lft forever
    inet6 fe80::20c:29ff:fe06:a444/64 scope link 
       valid_lft forever preferred_lft forever


查看配置情况:
[root@desktop ~]# nmcli connection show "System eth0" | grep ipv6
ipv6.method:                            manual
ipv6.dns:                               
ipv6.dns-search:                        
ipv6.addresses:                         { ip = 2001:db8:0:1:c0::206/64, gw = 2001:db8::1 }
ipv6.routes:                            
ipv6.ignore-auto-routes:                no
ipv6.ignore-auto-dns:                   no
ipv6.never-default:                     no
ipv6.may-fail:                          yes
ipv6.ip6-privacy:                       -1 (unknown)
ipv6.dhcp-hostname:                     --


[root@desktop ~]# nmcli connection show "System eth0" | grep connection.auto #重启后自动连接
connection.autoconnect:                 yes
[root@server ~]# nmcli connection show "System eth0" | grep connection.auto
connection.autoconnect:                 yes




测试刚才配置的IPV6地址是否生效:
[root@foundation0 ~]# ping6 2001:db8:0:1:c0::207
PING 2001:db8:0:1:c0::207(2001:db8:0:1:c0::207) 56 data bytes
64 bytes from 2001:db8:0:1:c0::207: icmp_seq=1 ttl=64 time=0.110 ms
64 bytes from 2001:db8:0:1:c0::207: icmp_seq=2 ttl=64 time=6.29 ms
64 bytes from 2001:db8:0:1:c0::207: icmp_seq=3 ttl=64 time=0.041 ms


查看IPV6的路由表
[root@foundation0 ~]# ip -6 route


发现网络上的其他本地IPV6节点:通过组播(ff02::1)发出PING命令以查看其他主机的响应:
[root@foundation0 ~]# ping6 ff02::1%eno67109424
PING ff02::1%eno67109424(ff02::1) 56 data bytes
64 bytes from fe80::20c:29ff:fe06:a444: icmp_seq=1 ttl=64 time=0.061 ms
64 bytes from fe80::9eb6:54ff:feb2:5650: icmp_seq=1 ttl=64 time=2.60 ms (DUP!)
64 bytes from fe80::9eb6:54ff:feb2:76cc: icmp_seq=1 ttl=64 time=2.67 ms (DUP!)
64 bytes from fe80::20c:29ff:fe06:a43a: icmp_seq=1 ttl=64 time=3.41 ms (DUP!)
64 bytes from fe80::9eb6:54ff:feb3:78f8: icmp_seq=1 ttl=64 time=3.42 ms (DUP!)
64 bytes from fe80::9eb6:54ff:feb2:7640: icmp_seq=1 ttl=64 time=3.43 ms (DUP!)


查看网络配置文件:
[root@foundation0 network-scripts]# cat ifcfg-eno6
TYPE=Ethernet
BOOTPROTO=none
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=no
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
NAME=eno6
UUID=4a7aa816-5ec9-46c2-a0ea-e4850ec6182c
DEVICE=eno67109424
ONBOOT=yes
IPV6ADDR=2001:db8:0:1:c0::207/64
IPV6_DEFAULTGW=2001:db8:0:1:c0::1
IPADDR0=192.168.2.70
PREFIX0=16


在没有为接口配置IP地址的情况下,不能将接口配置为手动获取IP,因为还没有配置静态IP地址:
[root@foundation0 ~]# nmcli connection modify eno6 ipv4.method manual
Error: Failed to modify connection 'eno6': (32) ipv4.addresses: this property cannot be empty for 'method=manual'


[root@foundation0 ~]# nmcli connection modify eno6 ipv4.addresses "192.168.2.70/16"
[root@foundation0 ~]# nmcli connection modify eno6 ipv4.method manual
[root@foundation0 ~]# nmcli connection down eno6
[root@foundation0 ~]# nmcli connection up eno6
Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/10)
[root@foundation0 ~]# ip addr show eno
eno16777736  eno33554960  eno50332200  eno67109424  eno83886648  
[root@foundation0 ~]# ip addr show eno67109424 
5: eno67109424: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:0c:29:06:a4:44 brd ff:ff:ff:ff:ff:ff
    inet 192.168.2.70/16 brd 192.168.255.255 scope global eno67109424
       valid_lft forever preferred_lft forever
    inet6 2001:db8:0:1:c0::207/64 scope global 
       valid_lft forever preferred_lft forever
    inet6 fe80::20c:29ff:fe06:a444/64 scope link 
       valid_lft forever preferred_lft forever




通过连接配置文件添加IPV6:
[root@server network-scripts]# cat ifcfg-eth0
DEVICE=eth0
BOOTPROTO=dhcp
ONBOOT=yes
TYPE=Ethernet
USERCTL=yes
IPV6INIT=yes
PERSISTENT_DHCLIENT=1
IPADDR0=172.25.0.11
PREFIX0=24
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
NAME="System eth0"
UUID=5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03
GATEWAY0=172.25.0.254
PEERDNS=yes
PEERROUTES=yes
IPV6_AUTOCONF=no
IPV6ADDR=2001:db8:0:1:c0::207/64
IPV6_DEFAULTGW=2001:db8::1
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no




Nmcli con show static=eth0| grep ipv6
Nmcli dev status
Nmcli con show
Ip addr show
 Ip -6 route show #查看IPV6的路由表 


[root@server network-scripts]# ip -6 route show
unreachable ::/96 dev lo  metric 1024  error -101
unreachable ::ffff:0.0.0.0/96 dev lo  metric 1024  error -101
2001:db8::1 dev eth0  proto static  metric 1024 
2001:db8:0:1::/64 dev eth0  proto kernel  metric 256 
unreachable 2002:a00::/24 dev lo  metric 1024  error -101
unreachable 2002:7f00::/24 dev lo  metric 1024  error -101
unreachable 2002:a9fe::/32 dev lo  metric 1024  error -101
unreachable 2002:ac10::/28 dev lo  metric 1024  error -101
unreachable 2002:c0a8::/32 dev lo  metric 1024  error -101
unreachable 2002:e000::/19 dev lo  metric 1024  error -101
unreachable 3ffe:ffff::/32 dev lo  metric 1024  error -101
fe80::/64 dev eth0  proto kernel  metric 256 
default via 2001:db8::1 dev eth0  proto static  metric 1024 




[root@server network-scripts]# netstat -6ntlp #只查看IPV6的
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp6       0      0 ::1:25                  :::*                    LISTEN      1354/master         
tcp6       0      0 :::445                  :::*                    LISTEN      3325/smbd           
tcp6       0      0 :::2049                 :::*                    LISTEN      -          


[root@server network-scripts]# netstat -4ntlp #只查看IPV4的
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      1354/master         
tcp        0      0 0.0.0.0:445             0.0.0.0:*               LISTEN      3325/smbd           
tcp        0      0 0.0.0.0:2049            0.0.0.0:*               LISTEN      -         


[root@server network-scripts]# netstat -ntlp #查看IPV4和IPV6的地址





分割线
感谢打赏
江西数库信息技术有限公司
YWSOS.COM 平台代运维解决方案
 评论
 发表评论
姓   名:

Powered by AKCMS