Hcie fourth day experiment

Insert picture description here

The requirements are as shown in the figure above

The first step is to simply plan the ip network segment

172.16.0.0/24

172.16.2.0/24

172.16.3.0/24

Do not configure here, wait for all the exchanges to be ready before entering the IP configuration

Step 2: Analyze the technology to be used in the exchange and find the sequence of their correlation
Trunk vlan Stp Vrrp Dhcp

Create eth-trunk port

[sw1]int Eth-Trunk 0
[sw1-Eth-Trunk0]int g0/0/4
[sw1-GigabitEthernet0/0/4]eth-trunk 0
[sw1-GigabitEthernet0/0/4]int g0/0/3
[sw1-GigabitEthernet0/0/3]e 0

Create vlan

[sw3]int e0/0/3
[sw3-Ethernet0/0/3]port link-type access
[sw3-Ethernet0/0/3]port default vlan 1
[sw3-Ethernet0/0/3]int e0/0/4
[sw3-Ethernet0/0/4]port link-type access
[sw3-Ethernet0/0/4]port default vlan 2

Create trunk

[sw1]interface Eth-Trunk 0
[sw1-Eth-Trunk0]port link-type trunk
[sw1-Eth-Trunk0]port trunk allow-pass vlan 2
[sw1-Eth-Trunk0]int g0/0/2
[sw1-GigabitEthernet0/0/2]port link-type trunk
[sw1-GigabitEthernet0/0/2]port trunk allow-pass v 2
[sw1-GigabitEthernet0/0/2]int g0/0/5
[sw1-GigabitEthernet0/0/5]port link-type trunk
[sw1-GigabitEthernet0/0/5]port trunk allow-pass v 2

[sw4]int e0/0/1
[sw4-Ethernet0/0/1]port link-type trunk
[sw4-Ethernet0/0/1]port trunk allow-pass v 2
[sw4-Ethernet0/0/1]int e0/0/2
[sw4-Ethernet0/0/2]port link-type trunk
[sw4-Ethernet0/0/2]port trunk allow-pass vlan 2

Configure Spanning Tree Protocol

Sw1:
[sw1]stp enable
[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
[sw1]stp instance 1 root primary //主根
[sw1]stp instance 2 root secondary //备份
Sw2:
[sw2]stp enable
[sw2]stp region-configuration
[sw2-mst-region]region-name a
[sw2-mst-region]instance 1 vlan 1
[sw2-mst-region]instance 2 vlan 2
[sw2-mst-region]active region-configuration
[sw2]stp instance 2 root primary //主根
[sw2]stp instance 1 root secondary //备份
Sw3:
[sw3]stp enable
[sw3]stp region-configuration
[sw3-mst-region]region-name a
[sw3-mst-region]instance 1 vlan 1
[sw3-mst-region]instance 2 vlan 2
[sw3-mst-region]active region-configuration

Sw4:
[sw4]stp enable
[sw4]stp region-configuration
[sw4-mst-region]region-name a
[sw4-mst-region]instance 1 vlan 1
[sw4-mst-region]instance 2 vlan 2
[sw4-mst-region]active region-configuration

Configure svi

Sw1:
[sw1]int Vlan 1
[sw1-Vlanif1]ip address 172.16.10.1 24
[sw1]int Vlanif 2
[sw1-Vlanif2]ip address 172.16.20.1 24
Sw2:
[sw2]int Vlanif 1
[sw2-Vlanif1]ip address 172.16.10.2 24
[sw2]int Vlanif 2
[sw2-Vlanif2]ip address 172.16.20.2 24

Configure vrrp

Sw1:
[sw1]interface Vlanif 1
[sw1-Vlanif1]vrrp vrid 1 virtual-ip 172.16.10.254
[sw1-Vlanif1]vrrp vrid 1 priority 101
[sw1-Vlanif1]vrrp vrid 1 track interface GigabitEthernet 0/0/5
[sw1]int Vlanif 2
[sw1-Vlanif2]vrrp vrid 2 virtual-ip 172.16.20.254
[sw1-Vlanif2]vrrp vrid 2 track interface GigabitEthernet 0/0/5

Sw2:
[sw2]interface Vlanif 1
[sw2-Vlanif1]vrrp vrid 1 virtual-ip 172.16.10.254
[sw2-Vlanif1]vrrp vrid 1 track interface GigabitEthernet 0/0/5
[sw2]interface Vlanif 2
[sw2-Vlanif2]vrrp vrid 2 virtual-ip 172.16.20.254
[sw2-Vlanif2]vrrp vrid 2 priority 101
[sw2-Vlanif2]vrrp vrid 2 track interface GigabitEthernet 0/0/5

Configure DHCP

Sw1:
[sw1]dhcp enable
[sw1]ip pool v1
[sw1-ip-pool-v1]network 172.16.10.0 mask 24
[sw1-ip-pool-v1]gateway-list 172.16.10.254
[sw1-ip-pool-v1]dns-list 114.114.114.144
[sw1]ip pool v2
[sw1-ip-pool-v2]network 172.16.20.0 mask 24
[sw1-ip-pool-v2]gateway-list 172.16.20.254
[sw1-ip-pool-v2]dns-list 114.114.114.114
在接口上启用DHCP功能:
[sw1]int Vlanif 1
[sw1-Vlanif1]dhcp select global
[sw1]int Vlanif 2
[sw1-Vlanif1]dhcp select global

Sw2:
[sw2]dhcp enable
[sw2]ip pool v1
[sw2-ip-pool-v1]network 172.16.10.0 mask 24
[sw2-ip-pool-v1]gateway-list 172.16.10.254
[sw2-ip-pool-v1]dns-list 114.114.114.144
[sw2]ip pool v2
[sw2-ip-pool-v2]network 172.16.20.0 mask 24
[sw2-ip-pool-v2]gateway-list 172.16.20.254
[sw2-ip-pool-v2]dns-list 114.114.114.114
在接口上启用DHCP功能:
[sw2]int Vlanif 1
[sw2-Vlanif1]dhcp select global
[sw2]int Vlanif 2
[sw2-Vlanif1]dhcp select global

Core layer configuration

Sw1:
[sw1]vlan 99
[sw1]int Vlanif 99
[sw1-Vlanif99]ip address 12.1.1.1 24
[sw1]int g0/0/5
[sw1-GigabitEthernet0/0/5]port link-type access
[sw1-GigabitEthernet0/0/5]port default vlan 99
[sw1]ip route-static 0.0.0.0 0 12.1.1.2

Sw2:
[sw2]vlan 99
[sw2]int Vlanif 99
[sw2-Vlanif99]ip address 12.1.2.1 24
[sw2]int g0/0/5
[sw2-GigabitEthernet0/0/5]port link-type access
[sw2-GigabitEthernet0/0/5]port default vlan 99
[sw2]ip route-static 0.0.0.0 0 12.1.2.2

R1:
[r1]interface GigabitEthernet 0/0/0
[r1-GigabitEthernet0/0/0]ip address 12.1.1.2 24
[r1-GigabitEthernet0/0/0]int g0/0/1
[r1-GigabitEthernet0/0/1]ip address 12.1.2.2 24
[r1]ip route-static 172.16.10.0 24 12.1.1.1
[r1]ip route-static 172.16.20.0 24 12.1.1.1
[r1]ip route-static 172.16.10.0 24 12.1.2.1
[r1]ip route-static 172.16.20.0 24 12.1.2.1

Guess you like

Origin blog.csdn.net/weixin_45050702/article/details/112798354