next up previous contents
Next: IPv6 網路 Up: Link Aggregation 網路聚合 Previous: 建立網路聚合   Contents


測試網路聚合

  1. 先查看 team0 兩張成員埠都正常運作。
    [root@kvm5 ~]# teamdctl team0 state
    setup:
      runner: activebackup
    ports:
      eth1
        link watches:
          link summary: up
          instance[link_watch_0]:
            name: ethtool
            link: up
      eth2
        link watches:
          link summary: up
          instance[link_watch_0]:
            name: ethtool
            link: up
    runner:
      active port: eth1
    
  2. 經由 team0 成功 ping 192.168.122.1, team0 啟動可能會 delay,等一下再 ping 看看。
    [root@kvm5 ~]# ping -c4 -I team0 192.168.122.1
    PING 192.168.122.1 (192.168.122.1) from 192.168.122.15 team0: 56(84) bytes of data.
    
    --- 192.168.122.1 ping statistics ---
    4 packets transmitted, 0 received, 100% packet loss, time 3060ms
    
    [root@kvm5 ~]# ping -c4 -I team0 192.168.122.1
    PING 192.168.122.1 (192.168.122.1) from 192.168.122.15 team0: 56(84) bytes of data.
    64 bytes from 192.168.122.1: icmp_seq=1 ttl=64 time=0.584 ms
    64 bytes from 192.168.122.1: icmp_seq=2 ttl=64 time=0.340 ms
    64 bytes from 192.168.122.1: icmp_seq=3 ttl=64 time=0.308 ms
    64 bytes from 192.168.122.1: icmp_seq=4 ttl=64 time=0.278 ms
    
    --- 192.168.122.1 ping statistics ---
    4 packets transmitted, 4 received, 0% packet loss, time 3013ms
    rtt min/avg/max/mdev = 0.278/0.377/0.584/0.122 ms
    
  3. 關閉 team0 的成員埠 team0-port1。
    [root@kvm5 ~]# nmcli connection down team0-port1
    Connection 'team0-port1' successfully deactivated (D-Bus active 
    path: /org/freedesktop/NetworkManager/ActiveConnection/128)
    
  4. 查看 team0 只有成員埠 eth2,也就是 team0-port2 正常運作。
    [root@kvm5 ~]# teamdctl team0 state
    setup:
      runner: activebackup
    ports:
      eth2
        link watches:
          link summary: up
          instance[link_watch_0]:
            name: ethtool
            link: up
    runner:
      active port: eth2
    
  5. 只有成員埠 team0-port2 正常運作,還是可以經由 team0 (192.168.122.15) 成功 ping 192.168.122.1。
    [root@kvm5 ~]# ping -I team0 192.168.122.1
    PING 192.168.122.1 (192.168.122.1) from 192.168.122.15 team0: 56(84) bytes of data.
    64 bytes from 192.168.122.1: icmp_seq=15 ttl=64 time=0.619 ms
    64 bytes from 192.168.122.1: icmp_seq=16 ttl=64 time=0.265 ms
    64 bytes from 192.168.122.1: icmp_seq=17 ttl=64 time=0.324 ms
    ^C
    --- 192.168.122.1 ping statistics ---
    17 packets transmitted, 3 received, 82% packet loss, time 16416ms
    rtt min/avg/max/mdev = 0.265/0.402/0.619/0.156 ms
    
  6. 再啟動 team0 的成員埠 team0-port1。
    [root@kvm5 ~]# nmcli connection up team0-port1
    Connection successfully activated (D-Bus active path: 
    /org/freedesktop/NetworkManager/ActiveConnection/130)
    
  7. 查看 team0 兩張成員埠都正常運作。
    [root@kvm5 ~]# teamdctl team0 state
    setup:
      runner: activebackup
    ports:
      eth1
        link watches:
          link summary: up
          instance[link_watch_0]:
            name: ethtool
            link: up
      eth2
        link watches:
          link summary: up
          instance[link_watch_0]:
            name: ethtool
            link: up
    runner:
      active port: eth2
    


De-Yu Wang 2018-09-07