1.BPDU是网桥协议数据单元(Bridge Protocol Data Unit)的英文首字母缩写。
2.网桥协议数据单元(bpdu)是一种生成树协议问候数据包,
3.它以可配置的间隔发出,用来在网络的网桥间进行信息交换
4.以太网链路聚合是指将多条以太网物理链路捆绑在一起成为一条逻辑链路,从而实现增加链路带宽的目的。链路聚合分为手工模式和LACP模式
5.LACP模式需要有链路聚合控制协议LACP的参与。当需要在两个直连设备间提供一个较大的链路带宽而设备支持lacp协议是,建议使用lacp模式。lacp模式不仅可以实现增加带宽、提高可靠性、负载分担的目的,而且可以提高eth-trunk的容错性、提供备份功能
6.lacp模式下,部分链路是活动链路,所有活动链路均参与数据转发。如果某条活动链路故障,链路聚合组自动在非活动链路中选择一条链路做为活动链路,参与数据转发的链路数目不变
路由器ping交换机的vlanif地址,需要给交换机配置对应的网关,即给交换机配置一条默认路由就可以
即,iproute-static 0.0.0.0 0 网关
linux网卡设置bond:
[root@localhost ~]# nmcli connection '查看网卡'
名称 UUID 类型 设备
ens33 8d222179-116b-41b5-8b47-0076ca1aeddb 802-3-ethernet ens33
virbr0 d46cd585-6a24-4bd2-8be0-a458c7068242 bridge virbr0
有线连接 1 6bd6ee85-e590-36c9-83a7-1840018388d4 802-3-ethernet ens36
[root@localhost ~]# cd /etc/sysconfig/
[root@localhost sysconfig]# cd network-scripts/ '到网卡配置文件目录中'
[root@localhost network-scripts]# ls
ifcfg-ens33 ifdown-isdn ifup ifup-plip ifup-tunnel
ifcfg-lo ifdown-post ifup-aliases ifup-plusb ifup-wireless
ifdown ifdown-ppp ifup-bnep ifup-post init.ipv6-global
ifdown-bnep ifdown-routes ifup-eth ifup-ppp network-functions
ifdown-eth ifdown-sit ifup-ib ifup-routes network-functions-ipv6
ifdown-ib ifdown-Team ifup-ippp ifup-sit
ifdown-ippp ifdown-TeamPort ifup-ipv6 ifup-Team
ifdown-ipv6 ifdown-tunnel ifup-isdn ifup-TeamPort
[root@localhost network-scripts]# cp ifcfg-ens33 ifcfg-ens36
[root@localhost network-scripts]# vim ifcfg-ens33
[root@localhost network-scripts]# vim ifcfg-ens36
[root@localhost network-scripts]# vim ifcfg-ens36
[root@localhost network-scripts]# vim ifcfg-bond0
[root@localhost network-scripts]# ping 192.168.10.1
PING 192.168.10.1 (192.168.10.1) 56(84) bytes of data.
From 192.168.139.133 icmp_seq=1 Destination Host Unreachable
From 192.168.139.133 icmp_seq=2 Destination Host Unreachable
From 192.168.139.133 icmp_seq=3 Destination Host Unreachable
From 192.168.139.133 icmp_seq=4 Destination Host Unreachable
^C
--- 192.168.10.1 ping statistics ---
4 packets transmitted, 0 received, +4 errors, 100% packet loss, time 3003ms
pipe 4
[root@localhost network-scripts]# systemctl restart network
[root@localhost network-scripts]# ping 192.168.10.1
PING 192.168.10.1 (192.168.10.1) 56(84) bytes of data.
64 bytes from 192.168.10.1: icmp_seq=2 ttl=255 time=68.2 ms
64 bytes from 192.168.10.1: icmp_seq=4 ttl=255 time=54.6 ms
64 bytes from 192.168.10.1: icmp_seq=7 ttl=255 time=67.4 ms
64 bytes from 192.168.10.1: icmp_seq=9 ttl=255 time=60.5 ms
64 bytes from 192.168.10.1: icmp_seq=11 ttl=255 time=64.5 ms
64 bytes from 192.168.10.1: icmp_seq=13 ttl=255 time=67.9 ms
64 bytes from 192.168.10.1: icmp_seq=15 ttl=255 time=52.3 ms
64 bytes from 192.168.10.1: icmp_seq=17 ttl=255 time=80.1 ms
64 bytes from 192.168.10.1: icmp_seq=19 ttl=255 time=87.8 ms
^C
--- 192.168.10.1 ping statistics ---
57 packets transmitted, 28 received, 50% packet loss, time 56117ms
rtt min/avg/max/mdev = 44.881/62.964/96.918/11.443 ms
[root@localhost network-scripts]# vim ifcfg-bond0
[root@localhost network-scripts]# vim ifcfg-ens36
[root@localhost network-scripts]# ping 2.2.2.2
PING 2.2.2.2 (2.2.2.2) 56(84) bytes of data.
64 bytes from 2.2.2.2: icmp_seq=2 ttl=254 time=91.5 ms
64 bytes from 2.2.2.2: icmp_seq=4 ttl=254 time=100 ms
64 bytes from 2.2.2.2: icmp_seq=7 ttl=254 time=102 ms
64 bytes from 2.2.2.2: icmp_seq=9 ttl=254 time=87.6 ms
64 bytes from 2.2.2.2: icmp_seq=11 ttl=254 time=91.1 ms
64 bytes from 2.2.2.2: icmp_seq=13 ttl=254 time=141 ms
^C
--- 2.2.2.2 ping statistics ---
14 packets transmitted, 6 received, 57% packet loss, time 13029ms
rtt min/avg/max/mdev = 87.696/102.526/141.625/18.270 ms
ens33配置文件:
TYPE="Ethernet"
PROXY_METHOD="none"
BROWSER_ONLY="no"
BOOTPROTO=none
DEFROUTE="yes"
IPV4_FAILURE_FATAL="no"
IPV6INIT="yes"
IPV6_AUTOCONF="yes"
IPV6_DEFROUTE="yes"
IPV6_FAILURE_FATAL="no"
IPV6_ADDR_GEN_MODE="stable-privacy"
NAME="ens33"
UUID="8d222179-116b-41b5-8b47-0076ca1aeddb"
DEVICE="ens33"
ONBOOT="yes"
NETBOOT=YES
USERCTL=no
MASTER=bond0
SLAVE=yes
~
~
~
ens36配置文件:
TYPE="Ethernet"
PROXY_METHOD="none"
BROWSER_ONLY="no"
BOOTPROTO=none
DEFROUTE="yes"
IPV4_FAILURE_FATAL="no"
IPV6INIT="yes"
IPV6_AUTOCONF="yes"
IPV6_DEFROUTE="yes"
IPV6_FAILURE_FATAL="no"
IPV6_ADDR_GEN_MODE="stable-privacy"
NAME="ens36"
UUID="6bd6ee85-e590-36c9-83a7-1840018388d4"
DEVICE="ens36"
ONBOOT="yes"
NETBOOT=YES
USERCTL=no
MASTER=bond0
SLAVE=yes
~
~
ens-bond0配置文件:
DEVICE=bond0
TYPE=Bond
NAME=bond0
BONDING_MASTER=yes
BOOTPROTO=static
USERCTL=no
ONBOOT=yes
IPADDR=192.168.10.3
NETMASK=255.255.255.0
GATEWAY=192.168.10.1
BONDING_OPTS=”mode=4 miimon=100”
~
~
R1配置:
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]un in en '关闭信息中心'
Info: Information center is disabled.
[Huawei]sysn R1 '改名为R1'
[R1]int Eth-Trunk 1 '进入e-trunk1'
[R1-Eth-Trunk1]trunkport g 0/0/2 to 0/0/3 '把接口并入'
[R1-Eth-Trunk1]ip add 12.0.0.1 30 '配置IP'
[R1-Eth-Trunk1]dis this '查看'
#
interface Eth-Trunk1
ip address 12.0.0.1 255.255.255.252
#
return
[R1-Eth-Trunk1]q '返回上一层'
[R1]int Eth-Trunk 2 '进入e-trunk 2'
[R1-Eth-Trunk2]trunkport g 0/0/0 to 0/0/1 '把接口并入'
[R1-Eth-Trunk2]ip add 192.168.10.1 24 '配置IP'
[R1-Eth-Trunk2]dis this '查看'
#
interface Eth-Trunk2
ip address 192.168.10.1 255.255.255.0
#
return
[R1-Eth-Trunk2]q
[R1]dis eth-t '查看e-trunk信息'
Eth-Trunk1's state information is:
WorkingMode: NORMAL Hash arithmetic: According to flow
Least Active-linknumber: 1 Max Bandwidth-affected-linknumber: 16
Operate status: up Number Of Up Port In Trunk: 2
--------------------------------------------------------------------------------
PortName Status Weight
GigabitEthernet0/0/2 Up 1
GigabitEthernet0/0/3 Up 1
Eth-Trunk2's state information is:
WorkingMode: NORMAL Hash arithmetic: According to flow
Least Active-linknumber: 1 Max Bandwidth-affected-linknumber: 16
Operate status: up Number Of Up Port In Trunk: 2
--------------------------------------------------------------------------------
PortName Status Weight
GigabitEthernet0/0/0 Up 1
GigabitEthernet0/0/1 Up 1
[R2]ip route-static 192.168.20.0 24 12.0.0.2 '配置静态路由'
R2配置
<Huawei>sys '进入系统'
Enter system view, return user view with Ctrl+Z.
[Huawei]un in en '关闭信息中心'
Info: Information center is disabled.
[Huawei]sysn R2 '改名'
[R2]int Eth-Trunk 1 '进入e-trunk1'
[R2-Eth-Trunk1]trunkport g 0/0/2 to 0/0/3 '把接口并入'
[R2-Eth-Trunk1]ip add 12.0.0.2 30 '配置ip'
[R2-Eth-Trunk1]dis this
#
interface Eth-Trunk1
ip address 12.0.0.2 255.255.255.252
#
return
[R2-Eth-Trunk1]q '返回上一层'
[R2]int Eth-Trunk 2 '进入e-trunk'
[R2-Eth-Trunk2]trunkport g 0/0/0 to 0/0/1 '把接口并入'
[R2-Eth-Trunk2]ip add 192.168.20.1 24 '配置ip'
[R2-Eth-Trunk2]dis this
#
interface Eth-Trunk2
ip address 192.168.20.1 255.255.255.0
#
return
[R2-Eth-Trunk2]q
[R2]dis eth-t '查看e-trunk'
Eth-Trunk1's state information is:
WorkingMode: NORMAL Hash arithmetic: According to flow
Least Active-linknumber: 1 Max Bandwidth-affected-linknumber: 16
Operate status: up Number Of Up Port In Trunk: 2
--------------------------------------------------------------------------------
PortName Status Weight
GigabitEthernet0/0/2 Up 1
GigabitEthernet0/0/3 Up 1
Eth-Trunk2's state information is:
WorkingMode: NORMAL Hash arithmetic: According to flow
Least Active-linknumber: 1 Max Bandwidth-affected-linknumber: 16
Operate status: up Number Of Up Port In Trunk: 2
--------------------------------------------------------------------------------
PortName Status Weight
GigabitEthernet0/0/0 Up 1
GigabitEthernet0/0/1 Up 1
[R2]ip route-static 192.168.10.0 24 12.0.0.1 '配置静态路由'
[R2]dis ip routing-table '查看路由表'
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 7 Routes : 7
Destination/Mask Proto Pre Cost Flags NextHop Interface
12.0.0.0/30 Direct 0 0 D 12.0.0.2 Eth-Trunk1
12.0.0.2/32 Direct 0 0 D 127.0.0.1 Eth-Trunk1
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
192.168.10.0/24 Static 60 0 RD 12.0.0.1 Eth-Trunk1
192.168.20.0/24 Direct 0 0 D 192.168.20.1 Eth-Trunk2
192.168.20.1/32 Direct 0 0 D 127.0.0.1 Eth-Trunk2
[R2] User interface con0 is available
LSW1配置
<Huawei>sys '进入系统视图'
Enter system view, return user view with Ctrl+Z.
[Huawei]un in en '关闭信息中心'
Info: Information center is disabled.
[Huawei]sysn sw 1 '改名'
[sw 1]vlan b 10 20 '创建vlan'
Info: This operation may take a few seconds. Please wait for a moment...done.
[sw 1]int e 0/0/1 '进入e0/0/1接口'
[sw 1-Ethernet0/0/1]p l a '链路类型设为access'
[sw 1-Ethernet0/0/1]p d v 20 '链路vlan设为v20'
[sw 1-Ethernet0/0/1]un sh
Info: Interface Ethernet0/0/1 is not shutdown.
[sw 1-Ethernet0/0/1]int e 0/0/2 '进入e0/0/2接口'
[sw 1-Ethernet0/0/2]p l a
[sw 1-Ethernet0/0/2]p d v 20
[sw 1-Ethernet0/0/2]dis this
#
interface Ethernet0/0/2
port link-type access
port default vlan 20
#
return
[sw 1-Ethernet0/0/2]un sh
Info: Interface Ethernet0/0/2 is not shutdown.
[sw 1-Ethernet0/0/2]q
[sw 1]lacp priority 1000 'lacp优先级设为1000'
[sw 1]int Eth-Trunk 2 '进入e-tunk2'
[sw 1-Eth-Trunk2]trunkport g 0/0/1 to 0/0/2 '将接口加入'
Info: This operation may take a few seconds. Please wait for a moment...done.
[sw 1-Eth-Trunk2]p l a
[sw 1-Eth-Trunk2]p d v 10
[sw 1-Eth-Trunk2]un sh
Info: Interface Eth-Trunk2 is not shutdown.
[sw 1-Eth-Trunk2]q
[sw 1]dis vlan '查看vlan'
The total number of vlans is : 3
--------------------------------------------------------------------------------
U: Up; D: Down; TG: Tagged; UT: Untagged;
MP: Vlan-mapping; ST: Vlan-stacking;
#: ProtocolTransparent-vlan; *: Management-vlan;
--------------------------------------------------------------------------------
VID Type Ports
--------------------------------------------------------------------------------
1 common UT:Eth0/0/3(D) Eth0/0/4(D) Eth0/0/5(D) Eth0/0/6(D)
Eth0/0/7(D) Eth0/0/8(D) Eth0/0/9(D) Eth0/0/10(D)
Eth0/0/11(D) Eth0/0/12(D) Eth0/0/13(D) Eth0/0/14(D)
Eth0/0/15(D) Eth0/0/16(D) Eth0/0/17(D) Eth0/0/18(D)
Eth0/0/19(D) Eth0/0/20(U) Eth0/0/21(U) Eth0/0/22(U)
10 common UT:Eth-Trunk2(U)
20 common UT:Eth0/0/1(U) Eth0/0/2(U)
VID Status Property MAC-LRN Statistics Description
--------------------------------------------------------------------------------
1 enable default enable disable VLAN 0001
10 enable default enable disable VLAN 0010
20 enable default enable disable VLAN 0020
[sw 1]int e 0/0/1
[sw 1-Ethernet0/0/1]p d v 10
[sw 1-Ethernet0/0/1]dis this
#
interface Ethernet0/0/1
port link-type access
port default vlan 10
#
return
[sw 1-Ethernet0/0/1]q
[sw 1]dis eth-t 2 '查看e-trunk信息'
Eth-Trunk2's state information is:
WorkingMode: NORMAL Hash arithmetic: According to SIP-XOR-DIP
Least Active-linknumber: 1 Max Bandwidth-affected-linknumber: 8
Operate status: up Number Of Up Port In Trunk: 2
--------------------------------------------------------------------------------
PortName Status Weight
GigabitEthernet0/0/1 Up 1
GigabitEthernet0/0/2 Up 1
[sw 1]int Eth-Trunk 1 '进入e-trunk1'
[sw 1-Eth-Trunk1]bpdu enable '启用bpdu'
[sw 1-Eth-Trunk1]mode lacp-static '配置lacp链路聚合控制协议模式为静态'
[sw 1-Eth-Trunk1]trunkport e 0/0/20 to 0/0/22 '接口加入到e-trunk1'
Info: This operation may take a few seconds. Please wait for a moment...done.
[sw 1-Eth-Trunk1]dis this
#
interface Eth-Trunk1
mode lacp-static
#
return
[sw 1-Eth-Trunk1]dis eth-t 1
Eth-Trunk1's state information is:
Local:
LAG ID: 1 WorkingMode: STATIC
Preempt Delay: Disabled Hash arithmetic: According to SIP-XOR-DIP
System Priority: 1000 System ID: 4c1f-cc25-0f29
Least Active-linknumber: 1 Max Active-linknumber: 8
Operate status: down Number Of Up Port In Trunk: 0
--------------------------------------------------------------------------------
ActorPortName Status PortType PortPri PortNo PortKey PortState Weight
Ethernet0/0/20 Unselect 100M 32768 21 289 10100010 1
Ethernet0/0/21 Unselect 100M 32768 22 289 10100010 1
Ethernet0/0/22 Unselect 100M 32768 23 289 10100010 1
Partner:
--------------------------------------------------------------------------------
ActorPortName SysPri SystemID PortPri PortNo PortKey PortState
Ethernet0/0/20 0 0000-0000-0000 0 0 0 10100011
Ethernet0/0/21 0 0000-0000-0000 0 0 0 10100011
Ethernet0/0/22 0 0000-0000-0000 0 0 0 10100011
[sw 1-Eth-Trunk1]max active-linknumber 2 '最大使用链路为2'
[sw 1-Eth-Trunk1]dis eth-t 1 '查看e-trunk1的信息'
Eth-Trunk1's state information is:
Local:
LAG ID: 1 WorkingMode: STATIC
Preempt Delay: Disabled Hash arithmetic: According to SIP-XOR-DIP
System Priority: 1000 System ID: 4c1f-cc25-0f29
Least Active-linknumber: 1 Max Active-linknumber: 2
Operate status: down Number Of Up Port In Trunk: 0
--------------------------------------------------------------------------------
ActorPortName Status PortType PortPri PortNo PortKey PortState Weight
Ethernet0/0/20 Unselect 100M 32768 21 289 10100010 1
Ethernet0/0/21 Unselect 100M 32768 22 289 10100010 1
Ethernet0/0/22 Unselect 100M 32768 23 289 10100010 1
Partner:
--------------------------------------------------------------------------------
ActorPortName SysPri SystemID PortPri PortNo PortKey PortState
Ethernet0/0/20 0 0000-0000-0000 0 0 0 10100011
Ethernet0/0/21 0 0000-0000-0000 0 0 0 10100011
Ethernet0/0/22 0 0000-0000-0000 0 0 0 10100011
[sw 1-Eth-Trunk1] User interface con0 is available
[sw 1]int eth-t 1 '进入e-tunk1模式,给其链路赋予trunk模式'
[sw 1-Eth-Trunk1]p l t
[sw 1-Eth-Trunk1]p
[sw 1-Eth-Trunk1]port t a v a
[sw 1-Eth-Trunk1]un sh
Info: Interface Eth-Trunk1 is not shutdown.
LSW2配置:
<Huawei>sys '进入系统视图'
Enter system view, return user view with Ctrl+Z.
[Huawei]un in en '关闭信息中心'
Info: Information center is disabled.
[Huawei]sysn SW2 '改名'
[SW2]vlan b 10 20 '创建vlan'
Info: This operation may take a few seconds. Please wait for a moment...done.
[SW2]int e 0/0/1 '进入e0/0/1,给其链路配置access,vlan10'
[SW2-Ethernet0/0/1]p l a
[SW2-Ethernet0/0/1]p d v 10
[SW2-Ethernet0/0/1]un shu
Info: Interface Ethernet0/0/1 is not shutdown.
[SW2-Ethernet0/0/1]int e 0/0/2 '进入e0/0/2,给其链路配置为access,vlan20'
[SW2-Ethernet0/0/2]p l a
[SW2-Ethernet0/0/2]p d v 20
[SW2-Ethernet0/0/2]un sh
Info: Interface Ethernet0/0/2 is not shutdown.
[SW2-Ethernet0/0/2]int eth-t 2 '进入e-trunk2,加入物理接口,链路类型access,vlan20'
[SW2-Eth-Trunk2]trunkport g 0/0/1 to 0/0/2
Info: This operation may take a few seconds. Please wait for a moment...done.
[SW2-Eth-Trunk2]p l a
[SW2-Eth-Trunk2]p d v 20
[SW2-Eth-Trunk2]q
[SW2]dis eth-t 2
Eth-Trunk2's state information is:
WorkingMode: NORMAL Hash arithmetic: According to SIP-XOR-DIP
Least Active-linknumber: 1 Max Bandwidth-affected-linknumber: 8
Operate status: up Number Of Up Port In Trunk: 2
--------------------------------------------------------------------------------
PortName Status Weight
GigabitEthernet0/0/1 Up 1
GigabitEthernet0/0/2 Up 1
[SW2]dis vlan '查看vlan'
The total number of vlans is : 3
--------------------------------------------------------------------------------
U: Up; D: Down; TG: Tagged; UT: Untagged;
MP: Vlan-mapping; ST: Vlan-stacking;
#: ProtocolTransparent-vlan; *: Management-vlan;
--------------------------------------------------------------------------------
VID Type Ports
--------------------------------------------------------------------------------
1 common UT:Eth0/0/3(D) Eth0/0/4(D) Eth0/0/5(D) Eth0/0/6(D)
Eth0/0/7(D) Eth0/0/8(D) Eth0/0/9(D) Eth0/0/10(D)
Eth0/0/11(D) Eth0/0/12(D) Eth0/0/13(D) Eth0/0/14(D)
Eth0/0/15(D) Eth0/0/16(D) Eth0/0/17(D) Eth0/0/18(D)
Eth0/0/19(D) Eth0/0/20(U) Eth0/0/21(U) Eth0/0/22(U)
10 common UT:Eth0/0/1(U)
20 common UT:Eth0/0/2(U) Eth-Trunk2(U)
VID Status Property MAC-LRN Statistics Description
--------------------------------------------------------------------------------
1 enable default enable disable VLAN 0001
10 enable default enable disable VLAN 0010
20 enable default enable disable VLAN 0020
[SW2]int eth-t 1 '进入e-tunk1接口'
[SW2-Eth-Trunk1]bpdu enable 'bpdu启用'
[SW2-Eth-Trunk1]mod lacp-static '模式设为lacp静态'
[SW2-Eth-Trunk1]trunkport e 0/0/20 to 0/0/22 '接口加入'
Info: This operation may take a few seconds. Please wait for a moment...done.
[SW2-Eth-Trunk1]q
[SW2]dis eth-t 1 '查看e-tunk1'
Eth-Trunk1's state information is:
Local:
LAG ID: 1 WorkingMode: STATIC
Preempt Delay: Disabled Hash arithmetic: According to SIP-XOR-DIP
System Priority: 32768 System ID: 4c1f-ccf9-6c1a
Least Active-linknumber: 1 Max Active-linknumber: 8
Operate status: up Number Of Up Port In Trunk: 2
--------------------------------------------------------------------------------
ActorPortName Status PortType PortPri PortNo PortKey PortState Weight
Ethernet0/0/20 Selected 100M 32768 21 289 10111100 1
Ethernet0/0/21 Selected 100M 32768 22 289 10111100 1
Ethernet0/0/22 Unselect 100M 32768 23 289 10110000 1
Partner:
--------------------------------------------------------------------------------
ActorPortName SysPri SystemID PortPri PortNo PortKey PortState
Ethernet0/0/20 1000 4c1f-cc25-0f29 32768 21 289 10111100
Ethernet0/0/21 1000 4c1f-cc25-0f29 32768 22 289 10111100
Ethernet0/0/22 1000 4c1f-cc25-0f29 32768 23 289 10100000
[SW2]int eth-t 2 '进入e-trunk接口'
[SW2-Eth-Trunk2]p l t '配置链路模式为trunk'
Error: Please renew the default configurations.
[SW2-Eth-Trunk2]int eth-t 1
[SW2-Eth-Trunk1]p l t
[SW2-Eth-Trunk1]p t a v a
[SW2-Eth-Trunk1]un sh
Info: Interface Eth-Trunk1 is not shutdown.
PC1:
PC>ping 192.168.10.1 'pc1去ping 网关'
Ping 192.168.10.1: 32 data bytes, Press Ctrl_C to break
From 192.168.10.1: bytes=32 seq=1 ttl=255 time=47 ms
From 192.168.10.1: bytes=32 seq=2 ttl=255 time=31 ms
From 192.168.10.1: bytes=32 seq=3 ttl=255 time=31 ms
From 192.168.10.1: bytes=32 seq=4 ttl=255 time=31 ms
From 192.168.10.1: bytes=32 seq=5 ttl=255 time=31 ms
--- 192.168.10.1 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 31/34/47 ms
PC>ping 192.168.10.20 'pc1去ping pc3'
Ping 192.168.10.20: 32 data bytes, Press Ctrl_C to break
From 192.168.10.20: bytes=32 seq=1 ttl=128 time=62 ms
From 192.168.10.20: bytes=32 seq=2 ttl=128 time=47 ms
From 192.168.10.20: bytes=32 seq=3 ttl=128 time=78 ms
From 192.168.10.20: bytes=32 seq=4 ttl=128 time=63 ms
From 192.168.10.20: bytes=32 seq=5 ttl=128 time=47 ms
--- 192.168.10.20 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 47/59/78 ms
PC>ping 192.168.20.10 'pc1去ping PC2'
Ping 192.168.20.10: 32 data bytes, Press Ctrl_C to break
From 192.168.20.10: bytes=32 seq=1 ttl=126 time=265 ms
From 192.168.20.10: bytes=32 seq=2 ttl=126 time=125 ms
From 192.168.20.10: bytes=32 seq=3 ttl=126 time=125 ms
From 192.168.20.10: bytes=32 seq=4 ttl=126 time=141 ms
From 192.168.20.10: bytes=32 seq=5 ttl=126 time=141 ms
--- 192.168.20.10 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 125/159/265 ms
PC>ping 192.168.20.20 'pc1去ping pc4'
Ping 192.168.20.20: 32 data bytes, Press Ctrl_C to break
From 192.168.20.20: bytes=32 seq=1 ttl=126 time=157 ms
From 192.168.20.20: bytes=32 seq=2 ttl=126 time=109 ms
From 192.168.20.20: bytes=32 seq=3 ttl=126 time=94 ms
From 192.168.20.20: bytes=32 seq=4 ttl=126 time=109 ms
From 192.168.20.20: bytes=32 seq=5 ttl=126 time=125 ms
--- 192.168.20.20 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 94/118/157 ms
PC2:
PC>ping 192.168.10.20 'pc2去ping pc3'
Ping 192.168.10.20: 32 data bytes, Press Ctrl_C to break
From 192.168.10.20: bytes=32 seq=1 ttl=126 time=250 ms
From 192.168.10.20: bytes=32 seq=2 ttl=126 time=157 ms
From 192.168.10.20: bytes=32 seq=3 ttl=126 time=171 ms
From 192.168.10.20: bytes=32 seq=4 ttl=126 time=157 ms
From 192.168.10.20: bytes=32 seq=5 ttl=126 time=172 ms
--- 192.168.10.20 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 157/181/250 ms
PC>ping 192.168.20.20 'PC2去ping pc4'
Ping 192.168.20.20: 32 data bytes, Press Ctrl_C to break
From 192.168.20.20: bytes=32 seq=1 ttl=128 time=63 ms
From 192.168.20.20: bytes=32 seq=2 ttl=128 time=62 ms
From 192.168.20.20: bytes=32 seq=3 ttl=128 time=63 ms
From 192.168.20.20: bytes=32 seq=4 ttl=128 time=47 ms
From 192.168.20.20: bytes=32 seq=5 ttl=128 time=62 ms
--- 192.168.20.20 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 47/59/63 ms
PC3:
PC>ping 192.168.20.20 'pc3去ping pc4'
Ping 192.168.20.20: 32 data bytes, Press Ctrl_C to break
From 192.168.20.20: bytes=32 seq=1 ttl=126 time=125 ms
From 192.168.20.20: bytes=32 seq=2 ttl=126 time=125 ms
From 192.168.20.20: bytes=32 seq=3 ttl=126 time=125 ms
From 192.168.20.20: bytes=32 seq=4 ttl=126 time=125 ms
From 192.168.20.20: bytes=32 seq=5 ttl=126 time=125 ms
--- 192.168.20.20 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 125/125/125 ms
tatistics —
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 47/59/63 ms
PC3:
```shell
PC>ping 192.168.20.20 'pc3去ping pc4'
Ping 192.168.20.20: 32 data bytes, Press Ctrl_C to break
From 192.168.20.20: bytes=32 seq=1 ttl=126 time=125 ms
From 192.168.20.20: bytes=32 seq=2 ttl=126 time=125 ms
From 192.168.20.20: bytes=32 seq=3 ttl=126 time=125 ms
From 192.168.20.20: bytes=32 seq=4 ttl=126 time=125 ms
From 192.168.20.20: bytes=32 seq=5 ttl=126 time=125 ms
--- 192.168.20.20 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 125/125/125 ms