HCIP阶段企业三层架构实验

一、实验拓扑

 

二、实验需求

1、内网IP地址172.16.0.0/16 合理分配
2、SW1/2之间互为备份
3、VRRP/STP/VLAN/TRUNK均使用

4、所有PC通过DHCP获取IP地址

 

三、IP规划

内网:

172.16.0.0/30   左边骨干  
172.16.0.4/30   右边骨干
172.16.1.0/24   vlan 1
172.16.2.0/24   vlan 2

外网:

12.1.1.0/24       R1-R2

6.6.6.6/24         ISP环回

四、配置步骤

1.将SW1和SW2之间连接的两条链路变为一条逻辑链路

 SW1

[Huawei]sysname SW1
[SW1]
Aug 22 2023 06:00:54-08:00 SW1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 4, the c
hange loop count is 0, and the maximum number of records is 4095.
[SW1]interface Eth-Trunk 1
[SW1-Eth-Trunk1]port link-type trunk 
[SW1-Eth-Trunk1]
Aug 22 2023 06:01:24-08:00 SW1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 5, the c
hange loop count is 0, and the maximum number of records is 4095.t    

[SW1-Eth-Trunk1]port trunk allow-pass vlan 2 to 4094
[SW1-Eth-Trunk1]int    
[SW1-Eth-Trunk1]int
Aug 22 2023 06:01:55-08:00 SW1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 6, the c
hange loop count is 0, and the maximum number of records is 4095.     
[SW1-Eth-Trunk1]int g0/0/2
[SW1-GigabitEthernet0/0/2]eth-trunk 1
Info: This operation may take a few seconds. Please wait for a moment...
Aug 22 2023 06:02:20-08:00 SW1 %%01IFNET/4/IF_STATE(l)[0]:Interface Eth-Trunk1 h
as turned into UP state.done.
[SW1-GigabitEthernet0/0/2]
Aug 22 2023 06:02:25-08:00 SW1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 7, the c
hange loop count is 0, and the maximum number of records is 4095.  
[SW1-GigabitEthernet0/0/2]int g0/0/3
[SW1-GigabitEthernet0/0/3]eth-trunk 1
Info: This operation may take a few seconds. Please wait for a moment...done.
[SW1-GigabitEthernet0/0/3]
Aug 22 2023 06:02:45-08:00 SW1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 8, the c
hange loop count is 0, and the maximum number of records is 4095.

 SW2

The device is running!

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname SW2
[SW2]
Aug 22 2023 06:07:25-08:00 SW2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 4, the c
hange loop count is 0, and the maximum number of records is 4095.   
[SW2]interface Eth-Trunk 1
[SW2-Eth-Trunk1]port link-type trunk 
[SW2-Eth-Trunk1]
Aug 22 2023 06:07:55-08:00 SW2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 5, the c
hange loop count is 0, and the maximum number of records is 4095. 
[SW2-Eth-Trunk1]port trunk allow-pass vlan 2 to 4090
[SW2-Eth-Trunk1]
Aug 22 2023 06:08:15-08:00 SW2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 6, the c
hange loop count is 0, and the maximum number of records is 4095.int    
[SW2-Eth-Trunk1]int g0/0/2
[SW2-GigabitEthernet0/0/2]eth-trunk 1
Info: This operation may take a few seconds. Please wait for a moment...done.
[SW2-GigabitEthernet0/0/2]
Aug 22 2023 06:08:31-08:00 SW2 %%01IFNET/4/IF_STATE(l)[0]:Interface Eth-Trunk1 h
as turned into UP state.
[SW2-GigabitEthernet0/0/2]
Aug 22 2023 06:08:35-08:00 SW2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 7, the c
hange loop count is 0, and the maximum number of records is 4095.
[SW2-GigabitEthernet0/0/2]    
[SW2-GigabitEthernet0/0/2]int g0/0/3
[SW2-GigabitEthernet0/0/3]eth-trunk 1
Info: This operation may take a few seconds. Please wait for a moment...done.
[SW2-GigabitEthernet0/0/3]
[SW2-GigabitEthernet0/0/3]
Aug 22 2023 06:08:55-08:00 SW2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 8, the c
hange loop count is 0, and the maximum number of records is 4095.
[SW2-GigabitEthernet0/0/3]

2、将PC2和PC4划入VLAN2

SW3

The device is running!

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys    
[Huawei]sysname SW3
[SW3]vlan 
Aug 22 2023 06:12:05-08:00 SW3 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 4, the c
hange loop count is 0, and the maximum number of records is 4095.2
[SW3-vlan2]q
[SW3]int e0/0/2
[SW3-Ethernet0/0/2]
Aug 22 2023 06:12:15-08:00 SW3 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 5, the c
hange loop count is 0, and the maximum number of records is 4095.
[SW3-Ethernet0/0/2]port link-type access 
Aug 22 2023 06:12:35-08:00 SW3 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 6, the c
hange loop count is 0, and the maximum number of records is 4095.d    
[SW3-Ethernet0/0/2]port default vlan 2
[SW3-Ethernet0/0/2]
Aug 22 2023 06:12:55-08:00 SW3 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 7, the c
hange loop count is 0, and the maximum number of records is 4095.
[SW3-Ethernet0/0/2]

SW4

The device is running!

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys    
[Huawei]sysname SW4
[SW4]vlan 2
[SW4-vlan2]
Aug 22 2023 06:13:15-08:00 SW4 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 5, the c
hange loop count is 0, and the maximum number of records is 4095.
[SW4-vlan2]int e0/0/2
[SW4-Ethernet0/0/2]port link-type access 
Aug 22 2023 06:13:35-08:00 SW4 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 6, the c
hange loop count is 0, and the maximum number of records is 4095.def     
[SW4-Ethernet0/0/2]port default vlan 2
[SW4-Ethernet0/0/2]
Aug 22 2023 06:13:45-08:00 SW4 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 7, the c
hange loop count is 0, and the maximum number of records is 4095.
[SW4-Ethernet0/0/2]

3、修改各交换机之间的接口模式为trunk模式,并运行所有VLAN通过

四个交换机的两个接口都要配,下面是SW1的配置

[SW1]int g0/0/4
[SW1-GigabitEthernet0/0/4]port link-type trunk 
Aug 22 2023 06:18:55-08:00 SW1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 9, the c
hange loop count is 0, and the maximum number of records is 4095.o      
[SW1-GigabitEthernet0/0/4]port trunk allow-pass vlan all
[SW1-GigabitEthernet0/0/4]
Aug 22 2023 06:19:15-08:00 SW1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 10, the 
change loop count is 0, and the maximum number of records is 4095.
[SW1-GigabitEthernet0/0/4]int g0/0/5
[SW1-GigabitEthernet0/0/5]port link-type trunk 
Aug 22 2023 06:19:45-08:00 SW1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 11, the 
change loop count is 0, and the maximum number of records is 4095.t    
[SW1-GigabitEthernet0/0/5]port trunk allow-pass vlan all
[SW1-GigabitEthernet0/0/5]
Aug 22 2023 06:20:05-08:00 SW1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 12, the 
change loop count is 0, and the maximum number of records is 4095.
[SW1-GigabitEthernet0/0/5]

4、在四个交换机上开启STP生成树

[SW1]stp re    
[SW1]stp region-configuration 
[SW1-mst-region]region-name a
[SW1-mst-region]instance 1 vlan 1
[SW1-mst-region]instance 2 vlan 2
[SW1-mst-region]active region-configuration 
Info: This operation may take a few seconds. Please wait for a moment...done.
[SW1-mst-region]
Aug 22 2023 06:42:45-08:00 SW1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 13, the 
change loop count is 0, and the maximum number of records is 4095.

5、修改SW1为vlan 1 根网桥,vlan 2 的备份网桥,SW2为vlan2 的根网桥,vlan 1 的备份网桥

SW1

[SW1]stp instance 1 root primary 
[SW1]
Aug 22 2023 06:48:36-08:00 SW1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 14, the 
change loop count is 0, and the maximum number of records is 4095.
[SW1]stp instance 2 root secondary 
[SW1]
Aug 22 2023 06:48:56-08:00 SW1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 15, the 
change loop count is 0, and the maximum number of records is 4095.
[SW1]

SW2

[SW2]stp instance 2 root primary 
[SW2]
Aug 22 2023 06:51:56-08:00 SW2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 14, the 
change loop count is 0, and the maximum number of records is 4095.    
[SW2]stp instance 1 root secondary 
[SW2]
Aug 22 2023 06:52:16-08:00 SW2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 15, the 
change loop count is 0, and the maximum number of records is 4095.
[SW2]

6、开启svi,开启DHCP

SW1

[SW1] 
[SW1]interface Vlanif 1
[SW1-Vlanif1]ip address 172.16.1.1 255.255.255.0
[SW1-Vlanif1]
Aug 22 2023 06:56:05-08:00 SW1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
 on the interface Vlanif1 has entered the UP state.
Aug 22 2023 06:56:06-08:00 SW1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 16, the 
change loop count is 0, and the maximum number of records is 4095.
[SW1-Vlanif1]vrrp vrid 1 virtual-ip 172.16.1.10
[SW1-Vlanif1]vr
Aug 22 2023 06:56:30-08:00 SW1 %%01VRRP/4/STATEWARNINGEXTEND(l)[1]:Virtual Route
r state BACKUP changed to MASTER, because of protocol timer expired. (Interface=
Vlanif1, VrId=1, InetType=IPv4)r    
[SW1-Vlanif1]vrrp vr
Aug 22 2023 06:56:36-08:00 SW1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 17, the 
change loop count is 0, and the maximum number of records is 4095.     
[SW1-Vlanif1]vrrp vrid 1 priority 101
[SW1-Vlanif1]vrrp
Aug 22 2023 06:56:56-08:00 SW1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 18, the 
change loop count is 0, and the maximum number of records is 4095.    
[SW1-Vlanif1]vrrp vrid 1 track interface GigabitEthernet 0/0/1
[SW1-Vlanif1]
Aug 22 2023 06:57:26-08:00 SW1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 19, the 
change loop count is 0, and the maximum number of records is 4095.
[SW1-Vlanif1]dhcp select global 
Error: Please enable DHCP in the global view first.
[SW1]vlan 2
[SW1-vlan2]q
[SW1]interface Vlanif 2
[SW1-Vlanif2]
Aug 22 2023 06:58:56-08:00 SW1 %%01IFNET/4/IF_STATE(l)[2]:Interface Vlanif2 has 
turned into UP state.
Aug 22 2023 06:58:56-08:00 SW1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 20, the 
change loop count is 0, and the maximum number of records is 4095.
[SW1-Vlanif2]ip address 172.16.2.1 255.255.255.0
[SW1-Vlanif2]
Aug 22 2023 06:59:26-08:00 SW1 %%01IFNET/4/LINK_STATE(l)[3]:The line protocol IP
 on the interface Vlanif2 has entered the UP state.
[SW1-Vlanif2]vrrp vrid 1 virtual-ip
Aug 22 2023 06:59:36-08:00 SW1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 21, the 
change loop count is 0, and the maximum number of records is 4095.    
[SW1-Vlanif2]vrrp vrid 1 virtual-ip 172.16.2.10
[SW1-Vlanif2]dh
Aug 22 2023 07:00:06-08:00 SW1 %%01VRRP/4/STATEWARNINGEXTEND(l)[4]:Virtual Route
r state BACKUP changed to MASTER, because of protocol timer expired. (Interface=
Vlanif2, VrId=1, InetType=IPv4)
Aug 22 2023 07:00:06-08:00 SW1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 22, the 
change loop count is 0, and the maximum number of records is 4095.    
[SW1]ip pool a
Info:It's successful to create an IP address pool.
[SW1-ip-pool-a]
Aug 22 2023 07:00:36-08:00 SW1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 23, the 
change loop count is 0, and the maximum number of records is 4095.
[SW1-ip-pool-a]g    
[SW1-ip-pool-a]gateway-list 172.16.1.10
Aug 22 2023 07:01:06-08:00 SW1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 24, the 
change loop count is 0, and the maximum number of records is 4095.16.1.0    
[SW1-ip-pool-a]network 172.16.1.0 mas    
[SW1-ip-pool-a]network 172.16.1.0 mask 255.255.255.0
[SW1-ip-pool-a]
Aug 22 2023 07:01:26-08:00 SW1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 25, the 
change loop count is 0, and the maximum number of records is 4095.dn    
[SW1-ip-pool-a]q
[SW1]ip poo    
[SW1]ip pool b
Info:It's successful to create an IP address pool.
[SW1-ip-pool-b]
Aug 22 2023 07:01:46-08:00 SW1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 26, the 
change loop count is 0, and the maximum number of records is 4095.
[SW1-ip-pool-b]ga    
[SW1-ip-pool-b]gateway-list 172.16.2.10
Aug 22 2023 07:02:06-08:00 SW1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 27, the 
change loop count is 0, and the maximum number of records is 4095. 172.16.2    
[SW1-ip-pool-b]network 172.16.2.0 mas    
[SW1-ip-pool-b]network 172.16.2.0 mask 255.255.255.0
[SW1-ip-pool-b]
Aug 22 2023 07:02:26-08:00 SW1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 28, the 
change loop count is 0, and the maximum number of records is 4095.
[SW1-ip-pool-b]q
[SW1]interface Vlanif 1
[SW1-Vlanif1]dhcp select global 
Error: Please enable DHCP in the global view first.
[SW1-Vlanif1]
Aug 22 2023 07:04:41-08:00 SW1 %%01VRRP/4/STATEWARNINGEXTEND(l)[5]:Virtual Route
r state MASTER changed to BACKUP, because of priority calculation. (Interface=Vl
anif2, VrId=1, InetType=IPv4)
[SW1-Vlanif1]
[SW1-Vlanif1]q
[SW1]vlan 3
[SW1-vlan3]q
[SW1]vlan 4
[SW1-vlan4]
Aug 22 2023 07:06:26-08:00 SW1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 30, the 
change loop count is 0, and the maximum number of records is 4095.
[SW1-vlan4]q
[SW1]interface Vlanif3
[SW1-Vlanif3]ip address 172.16.0.1 255.255.255.252
[SW1-Vlanif3] 
[SW1-Vlanif3]interface Vlanif4
[SW1-Vlanif4]ip address 172.16.0.5 255.255.255.252
Aug 22 2023 07:06:29-08:00 SW1 %%01IFNET/4/IF_STATE(l)[6]:Interface Vlanif3 has 
turned into UP state.
Aug 22 2023 07:06:29-08:00 SW1 %%01IFNET/4/LINK_STATE(l)[7]:The line protocol IP
 on the interface Vlanif3 has entered the UP state.
Aug 22 2023 07:06:29-08:00 SW1 %%01IFNET/4/IF_STATE(l)[8]:Interface Vlanif4 has 
turned into UP state.
Aug 22 2023 07:06:36-08:00 SW1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 31, the 
change loop count is 0, and the maximum number of records is 4095.
[SW1-Vlanif4]
Aug 22 2023 07:06:37-08:00 SW1 %%01IFNET/4/LINK_STATE(l)[9]:The line protocol IP
 on the interface Vlanif4 has entered the UP state.
[SW1-Vlanif4]
Aug 22 2023 07:06:46-08:00 SW1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 32, the 
change loop count is 0, and the maximum number of records is 4095.
[SW1-Vlanif4]

SW2

[SW2] interface Vlanif1
[SW2-Vlanif1] ip address 172.16.1.2 255.255.255.0
[SW2-Vlanif1] vrrp vrid 1 virtual-ip 172.16.1.10
Aug 22 2023 07:03:41-08:00 SW2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
 on the interface Vlanif1 has entered the UP state.
[SW2-Vlanif1] dhcp select global
Error: Please enable DHCP in the global view first.
[SW2-Vlanif1] 
[SW2] ip pool a
Info:It's successful to create an IP address pool.
[SW2-ip-pool-a] gateway-list 172.16.1.10
[SW2-ip-pool-a] network 172.16.1.0 mask 255.255.255.0
[SW2-ip-pool-a] dns-list 114.114.114.114
[SW2-ip-pool-a] ip pool b
Info:It's successful to create an IP address pool.
[SW2-ip-pool-b] gateway-list 172.16.2.10
[SW2-ip-pool-b] network 172.16.2.0 mask 255.255.255.0
[SW2-ip-pool-b] dns-list 114.114.114.114
Aug 22 2023 07:03:47-08:00 SW2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 24, the 
change loop count is 0, and the maximum number of records is 4095.
[SW2-ip-pool-b]
Aug 22 2023 07:04:07-08:00 SW2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 25, the 
change loop count is 0, and the maximum number of records is 4095.
[SW2-ip-pool-b]q
[SW2]vlan 2
[SW2-vlan2]interface Vlanif2
[SW2-Vlanif2] ip address 172.16.2.2 255.255.255.0
[SW2-Vlanif2] vrrp vrid 1 virtual-ip 172.16.2.10
Aug 22 2023 07:04:40-08:00 SW2 %%01IFNET/4/IF_STATE(l)[1]:Interface Vlanif2 has 
turned into UP state.
Aug 22 2023 07:04:40-08:00 SW2 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP
 on the interface Vlanif2 has entered the UP state.
[SW2-Vlanif2] vrrp vrid 1 priority 101
[SW2-Vlanif2] vrrp vrid 1 track interface GigabitEthernet0/0/1
[SW2-Vlanif2] dhcp select global
Error: Please enable DHCP in the global view first.
[SW2-Vlanif2]
[SW2]vlan 3
[SW2-vlan3]q
[SW2]vlan 4
[SW2-vlan4]q
[SW2]
[SW2]interface Vlanif3
[SW2-Vlanif3]ip address 172.16.0.1 255.255.255.252
[SW2-Vlanif3] 
[SW2-Vlanif3]interface Vlanif4
[SW2-Vlanif4]ip address 172.16.0.5 255.255.255.252
Aug 22 2023 07:07:51-08:00 SW2 %%01IFNET/4/IF_STATE(l)[4]:Interface Vlanif3 has 
turned into UP state.
Aug 22 2023 07:07:51-08:00 SW2 %%01IFNET/4/LINK_STATE(l)[5]:The line protocol IP
 on the interface Vlanif3 has entered the UP state.
Aug 22 2023 07:07:51-08:00 SW2 %%01IFNET/4/IF_STATE(l)[6]:Interface Vlanif4 has 
turned into UP state.
[SW2-Vlanif4]
Aug 22 2023 07:07:53-08:00 SW2 %%01IFNET/4/LINK_STATE(l)[7]:The line protocol IP
 on the interface Vlanif4 has entered the UP state.
[SW2-Vlanif4]
Aug 22 2023 07:07:57-08:00 SW2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 34, the 
change loop count is 0, and the maximum number of records is 4095.
[SW2-Vlanif4]

6、路由互通

R1

[R1]int g0/0/1
[R1-GigabitEthernet0/0/1]ip add    
[R1-GigabitEthernet0/0/1]ip address 172.16.0.2 30
Aug 22 2023 07:27:42-08:00 R1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state. 
[R1-GigabitEthernet0/0/1]int g0/0/2
[R1-GigabitEthernet0/0/2]ip address 172.16.0.6 30
[R1-GigabitEthernet0/0/2]
Aug 22 2023 07:28:05-08:00 R1 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
on the interface GigabitEthernet0/0/2 has entered the UP state. 
[R1-GigabitEthernet0/0/2]q   
[R1]ospf 1 router-id 1.1.1.1
[R1-ospf-1]area 0.0.0.0
[R1-ospf-1-area-0.0.0.0]net    
[R1-ospf-1-area-0.0.0.0]network 172.16.0.0 0.0.255.255
Aug 22 2023 07:29:32-08:00 R1 %%01OSPF/4/CONFLICT_ROUTERID_INTF(l)[2]:OSPF Route
r id conflict is detected on interface. (ProcessId=256, RouterId=1.1.1.1, AreaId
=0.0.0.0, InterfaceName=GigabitEthernet0/0/1,  IpAddr=2.0.16.172, PacketSrcIp=6.
0.16.172) 
[R1-ospf-1-area-0.0.0.0]
Aug 22 2023 07:29:32-08:00 R1 %%01OSPF/4/CONFLICT_ROUTERID_INTF(l)[3]:OSPF Route
r id conflict is detected on interface. (ProcessId=256, RouterId=1.1.1.1, AreaId
=0.0.0.0, InterfaceName=GigabitEthernet0/0/2,  IpAddr=6.0.16.172, PacketSrcIp=2.
0.16.172) 
[R1-ospf-1-area-0.0.0.0]
Aug 22 2023 07:31:34-08:00 R1 %%01OSPF/4/CONFLICT_ROUTERID_INTF(l)[4]:OSPF Route
r id conflict is detected on interface. (ProcessId=256, RouterId=1.1.1.1, AreaId
=0.0.0.0, InterfaceName=GigabitEthernet0/0/1,  IpAddr=2.0.16.172, PacketSrcIp=6.
0.16.172) 
[R1-ospf-1-area-0.0.0.0]
Aug 22 2023 07:31:39-08:00 R1 %%01OSPF/4/CONFLICT_ROUTERID_INTF(l)[5]:OSPF Route
r id conflict is detected on interface. (ProcessId=256, RouterId=1.1.1.1, AreaId
=0.0.0.0, InterfaceName=GigabitEthernet0/0/2,  IpAddr=6.0.16.172, PacketSrcIp=2.
0.16.172) 
[R1-ospf-1-area-0.0.0.0]
[R1-ospf-1-area-0.0.0.0]q
[R1-ospf-1]
[R1-ospf-1]q
[R1]
[R1]acl number 2000
[R1-acl-basic-2000]rule 5 permit source 172.16.0.0 0.0.255.255
[R1-acl-basic-2000]q
[R1]int    
[R1]interface g0/0/0
[R1-GigabitEthernet0/0/0]nat outbound 2000
[R1-GigabitEthernet0/0/0]q
[R1]
Aug 22 2023 07:33:38-08:00 R1 %%01OSPF/4/CONFLICT_ROUTERID_INTF(l)[6]:OSPF Route
r id conflict is detected on interface. (ProcessId=256, RouterId=1.1.1.1, AreaId
=0.0.0.0, InterfaceName=GigabitEthernet0/0/1,  IpAddr=2.0.16.172, PacketSrcIp=6.
0.16.172) 
[R1]
Aug 22 2023 07:33:48-08:00 R1 %%01OSPF/4/CONFLICT_ROUTERID_INTF(l)[7]:OSPF Route
r id conflict is detected on interface. (ProcessId=256, RouterId=1.1.1.1, AreaId
=0.0.0.0, InterfaceName=GigabitEthernet0/0/2,  IpAddr=6.0.16.172, PacketSrcIp=2.
0.16.172) 
[R1]
Aug 22 2023 07:35:41-08:00 R1 %%01OSPF/4/CONFLICT_ROUTERID_INTF(l)[8]:OSPF Route
r id conflict is detected on interface. (ProcessId=256, RouterId=1.1.1.1, AreaId
=0.0.0.0, InterfaceName=GigabitEthernet0/0/1,  IpAddr=2.0.16.172, PacketSrcIp=6.
0.16.172) 
[R1]
Aug 22 2023 07:35:58-08:00 R1 %%01OSPF/4/CONFLICT_ROUTERID_INTF(l)[9]:OSPF Route
r id conflict is detected on interface. (ProcessId=256, RouterId=1.1.1.1, AreaId
=0.0.0.0, InterfaceName=GigabitEthernet0/0/2,  IpAddr=6.0.16.172, PacketSrcIp=2.
0.16.172) 
[R1]
Aug 22 2023 07:37:45-08:00 R1 %%01OSPF/4/CONFLICT_ROUTERID_INTF(l)[10]:OSPF Rout
er id conflict is detected on interface. (ProcessId=256, RouterId=1.1.1.1, AreaI
d=0.0.0.0, InterfaceName=GigabitEthernet0/0/1,  IpAddr=2.0.16.172, PacketSrcIp=6
.0.16.172) 
[R1]
Aug 22 2023 07:38:07-08:00 R1 %%01OSPF/4/CONFLICT_ROUTERID_INTF(l)[11]:OSPF Rout
er id conflict is detected on interface. (ProcessId=256, RouterId=1.1.1.1, AreaI
d=0.0.0.0, InterfaceName=GigabitEthernet0/0/2,  IpAddr=6.0.16.172, PacketSrcIp=2
.0.16.172) 
[R1]
 

SW1

[SW1]ospf 1 router-id 2.2.2.2
[SW1-ospf-1]area 0.0
Aug 22 2023 07:30:06-08:00 SW1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 33, the 
change loop count is 0, and the maximum number of records is 4095..    
[SW1-ospf-1]area 0.0.0.0
[SW1-ospf-1-area-0.0.0.0]
Aug 22 2023 07:30:16-08:00 SW1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 34, the 
change loop count is 0, and the maximum number of records is 4095.
[SW1-ospf-1-area-0.0.0.0]net    
[SW1-ospf-1-area-0.0.0.0]network 172.16.0.0 0.0.255.255
[SW1-ospf-1-area-0.0.0.0]
Aug 22 2023 07:30:36-08:00 SW1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 35, the 
change loop count is 0, and the maximum number of records is 4095.
Aug 22 2023 07:31:47-08:00 SW1 %%01OSPF/4/NBR_CHANGE_E(l)[0]:Neighbor changes ev
ent: neighbor status changed. (ProcessId=1, NeighborAddress=172.16.1.2, Neighbor
Event=HelloReceived, NeighborPreviousState=Down, NeighborCurrentState=Init)
Aug 22 2023 07:31:47-08:00 SW1 %%01OSPF/4/NBR_CHANGE_E(l)[1]:Neighbor changes ev
ent: neighbor status changed. (ProcessId=1, NeighborAddress=172.16.2.2, Neighbor
Event=HelloReceived, NeighborPreviousState=Down, NeighborCurrentState=Init)
Aug 22 2023 07:31:48-08:00 SW1 %%01OSPF/4/NBR_CHANGE_E(l)[2]:Neighbor changes ev
ent: neighbor status changed. (ProcessId=1, NeighborAddress=172.16.2.2, Neighbor
Event=2WayReceived, NeighborPreviousState=Init, NeighborCurrentState=ExStart)
Aug 22 2023 07:31:48-08:00 SW1 %%01OSPF/4/NBR_CHANGE_E(l)[3]:Neighbor changes ev
ent: neighbor status changed. (ProcessId=1, NeighborAddress=172.16.2.2, Neighbor
Event=NegotiationDone, NeighborPreviousState=ExStart, NeighborCurrentState=Excha
nge)
Aug 22 2023 07:31:48-08:00 SW1 %%01OSPF/4/NBR_CHANGE_E(l)[4]:Neighbor changes ev
ent: neighbor status changed. (ProcessId=1, NeighborAddress=172.16.2.2, Neighbor
Event=ExchangeDone, NeighborPreviousState=Exchange, NeighborCurrentState=Loading
)
Aug 22 2023 07:31:48-08:00 SW1 %%01OSPF/4/NBR_CHANGE_E(l)[5]:Neighbor changes ev
ent: neighbor status changed. (ProcessId=1, NeighborAddress=172.16.2.2, Neighbor
Event=LoadingDone, NeighborPreviousState=Loading, NeighborCurrentState=Full)
Aug 22 2023 07:31:49-08:00 SW1 %%01OSPF/4/NBR_CHANGE_E(l)[6]:Neighbor changes ev
ent: neighbor status changed. (ProcessId=1, NeighborAddress=172.16.1.2, Neighbor
Event=2WayReceived, NeighborPreviousState=Init, NeighborCurrentState=ExStart)
Aug 22 2023 07:31:49-08:00 SW1 %%01OSPF/4/NBR_CHANGE_E(l)[7]:Neighbor changes ev
ent: neighbor status changed. (ProcessId=1, NeighborAddress=172.16.1.2, Neighbor
Event=NegotiationDone, NeighborPreviousState=ExStart, NeighborCurrentState=Excha
nge)
Aug 22 2023 07:31:49-08:00 SW1 %%01OSPF/4/NBR_CHANGE_E(l)[8]:Neighbor changes ev
ent: neighbor status changed. (ProcessId=1, NeighborAddress=172.16.1.2, Neighbor
Event=ExchangeDone, NeighborPreviousState=Exchange, NeighborCurrentState=Loading
)
Aug 22 2023 07:31:49-08:00 SW1 %%01OSPF/4/NBR_CHANGE_E(l)[9]:Neighbor changes ev
ent: neighbor status changed. (ProcessId=1, NeighborAddress=172.16.1.2, Neighbor
Event=LoadingDone, NeighborPreviousState=Loading, NeighborCurrentState=Full) User interface con0 is available

SW2

[SW2]ospf 1 router-id 3.3.3.3
[SW2-ospf-1]
Aug 22 2023 07:30:57-08:00 SW2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 35, the 
change loop count is 0, and the maximum number of records is 4095.
[SW2-ospf-1]are    
[SW2-ospf-1]de    
[SW2-ospf-1]default-route-advertise a    
[SW2-ospf-1]default-route-advertise always 
[SW2-ospf-1]are    
[SW2-ospf-1]area 
Aug 22 2023 07:31:27-08:00 SW2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 36, the 
change loop count is 0, and the maximum number of records is 4095.    
[SW2-ospf-1]area 0
[SW2-ospf-1-area-0.0.0.0]net    
[SW2-ospf-1-area-0.0.0.0]network 172
Aug 22 2023 07:31:37-08:00 SW2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 37, the 
change loop count is 0, and the maximum number of records is 4095..    
[SW2-ospf-1-area-0.0.0.0]network 172.16.0.0 0.0.255.255
[SW2-ospf-1-area-0.0.0.0]
Aug 22 2023 07:31:47-08:00 SW2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 38, the 
change loop count is 0, and the maximum number of records is 4095.
[SW2-ospf-1-area-0.0.0.0]
Aug 22 2023 07:31:48-08:00 SW2 %%01OSPF/4/NBR_CHANGE_E(l)[0]:Neighbor changes ev
ent: neighbor status changed. (ProcessId=1, NeighborAddress=172.16.2.1, Neighbor
Event=HelloReceived, NeighborPreviousState=Down, NeighborCurrentState=Init)
Aug 22 2023 07:31:48-08:00 SW2 %%01OSPF/4/NBR_CHANGE_E(l)[1]:Neighbor changes ev
ent: neighbor status changed. (ProcessId=1, NeighborAddress=172.16.2.1, Neighbor
Event=2WayReceived, NeighborPreviousState=Init, NeighborCurrentState=2Way)
Aug 22 2023 07:31:48-08:00 SW2 %%01OSPF/4/NBR_CHANGE_E(l)[2]:Neighbor changes ev
ent: neighbor status changed. (ProcessId=1, NeighborAddress=172.16.2.1, Neighbor
Event=AdjOk?, NeighborPreviousState=2Way, NeighborCurrentState=ExStart)
Aug 22 2023 07:31:48-08:00 SW2 %%01OSPF/4/NBR_CHANGE_E(l)[3]:Neighbor changes ev
ent: neighbor status changed. (ProcessId=1, NeighborAddress=172.16.2.1, Neighbor
Event=NegotiationDone, NeighborPreviousState=ExStart, NeighborCurrentState=Excha
nge)
Aug 22 2023 07:31:48-08:00 SW2 %%01OSPF/4/NBR_CHANGE_E(l)[4]:Neighbor changes ev
ent: neighbor status changed. (ProcessId=1, NeighborAddress=172.16.2.1, Neighbor
Event=ExchangeDone, NeighborPreviousState=Exchange, NeighborCurrentState=Loading
)
Aug 22 2023 07:31:48-08:00 SW2 %%01OSPF/4/NBR_CHANGE_E(l)[5]:Neighbor changes ev
ent: neighbor status changed. (ProcessId=1, NeighborAddress=172.16.2.1, Neighbor
Event=LoadingDone, NeighborPreviousState=Loading, NeighborCurrentState=Full)
[SW2-ospf-1-area-0.0.0.0]
Aug 22 2023 07:31:49-08:00 SW2 %%01OSPF/4/NBR_CHANGE_E(l)[6]:Neighbor changes ev
ent: neighbor status changed. (ProcessId=1, NeighborAddress=172.16.1.1, Neighbor
Event=HelloReceived, NeighborPreviousState=Down, NeighborCurrentState=Init)
Aug 22 2023 07:31:49-08:00 SW2 %%01OSPF/4/NBR_CHANGE_E(l)[7]:Neighbor changes ev
ent: neighbor status changed. (ProcessId=1, NeighborAddress=172.16.1.1, Neighbor
Event=2WayReceived, NeighborPreviousState=Init, NeighborCurrentState=2Way)
Aug 22 2023 07:31:49-08:00 SW2 %%01OSPF/4/NBR_CHANGE_E(l)[8]:Neighbor changes ev
ent: neighbor status changed. (ProcessId=1, NeighborAddress=172.16.1.1, Neighbor
Event=AdjOk?, NeighborPreviousState=2Way, NeighborCurrentState=ExStart)
Aug 22 2023 07:31:49-08:00 SW2 %%01OSPF/4/NBR_CHANGE_E(l)[9]:Neighbor changes ev
ent: neighbor status changed. (ProcessId=1, NeighborAddress=172.16.1.1, Neighbor
Event=NegotiationDone, NeighborPreviousState=ExStart, NeighborCurrentState=Excha
nge)
Aug 22 2023 07:31:49-08:00 SW2 %%01OSPF/4/NBR_CHANGE_E(l)[10]:Neighbor changes e
vent: neighbor status changed. (ProcessId=1, NeighborAddress=172.16.1.1, Neighbo
rEvent=ExchangeDone, NeighborPreviousState=Exchange, NeighborCurrentState=Loadin
g)
Aug 22 2023 07:31:49-08:00 SW2 %%01OSPF/4/NBR_CHANGE_E(l)[11]:Neighbor changes e
vent: neighbor status changed. (ProcessId=1, NeighborAddress=172.16.1.1, Neighbo
rEvent=LoadingDone, NeighborPreviousState=Loading, NeighborCurrentState=Full)
[SW2-ospf-1-area-0.0.0.0]
[SW2-ospf-1-area-0.0.0.0]
Aug 22 2023 07:39:42-08:00 SW2 %%01ARP/4/ARP_DUPLICATE_IPADDR(l)[12]:Received an
 ARP packet with a duplicate IP address from the interface. (IpAddress=172.16.0.
5, InterfaceName=Vlanif4, MacAddress=4c1f-ccc2-4238) User interface con0 is available
 

五、测试

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值