Huawei ensp basic experiment series - small network comprehensive experiment

Recently, there have been a lot of exams and tests. Today I would like to share with you how to build a multi-protocol network with the least number of devices. The requirements are as follows: 1.
Basic
configuration methods for routers and switches
2. Static routing technology
3. Virtual LAN technology
4. Links Aggregation technology
5, three-layer switching technology
6, DHCP technology
7, dynamic routing technology RIP or OSPF
8, ACL access control list technology
Generally speaking, the first reaction when seeing these requirements is the small enterprise network, and there is still a need for nat here , but did not give
the topology diagram as follows:
insert image description here
configuration ideas The technologies needed in the second layer and the second layer are stp and vlan, then stp can be extended to mstp, vlan is nothing more than interface status, acc and trunk, and edge ports, aggregation/core can also be
enabled
Configure link aggregation between switches
Layer 3
Layer 3 gateway uses VRrp master/standby priority and multiple instances of mstp to respond, dynamic route selection ospf
egress device configures static route, acl, ospf sends default route
so that the protocol adds up There are almost 7-8 types, so it can basically meet any needs of the teacher. The above mentioned are common needs and technologies. If the teacher is a little professional, he may propose some partial knowledge, or intermediate and advanced knowledge, then follow me , I will continue to update the content.
The configuration is as follows
Access switch configuration (sw3, sw4)
sw3 switch configuration
sysname LSW3

vlan batch 10 20

stp region-configuration
region-name huawei
instance 1 vlan 10 20
instance 2 vlan 30 40
active region-configuration

interface Ethernet0/0/2
port link-type trunk
port trunk allow-pass vlan 10 20

interface Ethernet0/0/3
port link-type trunk
port trunk allow-pass vlan 30 40

interface Ethernet0/0/11
port link-type access
port default vlan 10
stp edged-port enable

interface Ethernet0/0/12
port link-type access
port default vlan 20
stp edged-port enable

sw4 switch configuration
sysname LSW4

vlan batch 30 40

stp region-configuration
region-name huawei
instance 1 vlan 10 20
instance 2 vlan 30 40
active region-configuration

interface Ethernet0/0/2
port link-type trunk
port trunk allow-pass vlan 30 40

interface Ethernet0/0/3
port link-type trunk
port trunk allow-pass vlan 30 40

interface Ethernet0/0/11
port link-type access
port default vlan 30
stp edged-port enable

interface Ethernet0/0/12
port link-type access
port default vlan 40
stp edged-port enable

sw1 switch configuration
sysname LSW1

Layer 2 configuration
vlan batch 10 20 30 40 100

stp instance 1 root primary
stp instance 2 root secondary

stp region-configuration
region-name huawei
instance 1 vlan 10 20
instance 2 vlan 30 40
active region-configuration

interface Eth-Trunk1
port link-type trunk
port trunk allow-pass vlan 10 20 30 40

interface GigabitEthernet0/0/1
port link-type access
port default vlan 100

interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 10 20

interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 30 40

interface GigabitEthernet0/0/11
eth-trunk 1

interface GigabitEthernet0/0/12
eth-trunk 1

dhcp configure
dhcp enable

ip pool vlan10
gateway-list 192.168.1.254
network 192.168.1.0 mask 255.255.255.0

ip pool vlan20
gateway-list 192.168.2.254
network 192.168.2.0 mask 255.255.255.0

ip pool vlan30
gateway-list 192.168.3.254
network 192.168.3.0 mask 255.255.255.0

ip pool vlan40
gateway-list 192.168.4.254
network 192.168.4.0 mask 255.255.255.0

Layer 3 gateway and vrrp configuration
interface Vlanif10
ip address 192.168.1.252 255.255.255.0
vrrp vrid 10 virtual-ip 192.168.1.254
vrrp vrid 10 priority 120
dhcp select global

interface Vlanif20
ip address 192.168.2.252 255.255.255.0
vrrp vrid 20 virtual-ip 192.168.2.254
vrrp vrid 20 priority 120
dhcp select global

interface Vlanif30
ip address 192.168.3.252 255.255.255.0
vrrp vrid 30 virtual-ip 192.168.3.254
dhcp select global

interface Vlanif40
ip address 192.168.4.252 255.255.255.0
vrrp vrid 40 virtual-ip 192.168.4.254
dhcp select global

interface Vlanif100
ip address 192.168.100.2 255.255.255.252

Layer 3 routing configuration
ospf 1 router-id 1.1.1.1
area 0.0.0.0
network 192.168.1.0 0.0.0.255
network 192.168.2.0 0.0.0.255 network
192.168.3.0 0.0.0.255
network 192.168.4. 0 0.0.0.255
network 192.168.100.0 0.0. 0.255

sw2 switch configuration
sysname LSW2

Layer 2 vlan configuration
vlan batch 10 20 30 40 100

stp instance 1 root secondary
stp instance 2 root primary

stp region-configuration
region-name huawei
instance 1 vlan 10 20
instance 2 vlan 30 40
active region-configuration

interface Eth-Trunk1
port link-type trunk
port trunk allow-pass vlan 10 20 30 40

interface GigabitEthernet0/0/1
port link-type access
port default vlan 100

interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 10 20

interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 30 40

interface GigabitEthernet0/0/11
eth-trunk 1

interface GigabitEthernet0/0/12
eth-trunk 1

Address pool configuration
dhcp enable

ip pool vlan10
gateway-list 192.168.1.254
network 192.168.1.0 mask 255.255.255.0

ip pool vlan20
gateway-list 192.168.2.254
network 192.168.2.0 mask 255.255.255.0

ip pool vlan30
gateway-list 192.168.3.254
network 192.168.3.0 mask 255.255.255.0

ip pool vlan40
gateway-list 192.168.4.254
network 192.168.4.0 mask 255.255.255.0

Layer 3 gateway and vrrp configuration
interface Vlanif10
ip address 192.168.1.253 255.255.255.0
vrrp vrid 10 virtual-ip 192.168.1.254
dhcp select global

interface Vlanif20
ip address 192.168.2.253 255.255.255.0
vrrp vrid 20 virtual-ip 192.168.2.254
dhcp select global

interface Vlanif30
ip address 192.168.3.253 255.255.255.0
vrrp vrid 30 virtual-ip 192.168.3.254
vrrp vrid 30 priority 120
dhcp select global

interface Vlanif40
ip address 192.168.4.253 255.255.255.0
vrrp vrid 40 virtual-ip 192.168.4.254
vrrp vrid 40 priority 120
dhcp select global

interface Vlanif100
ip address 192.168.101.2 255.255.255.252

Routing configuration
ospf 1 router-id 1.1.1.2
area 0.0.0.0
network 192.168.1.0 0.0.0.255
network 192.168.2.0 0.0.0.255 network 192.168.3.0
0.0.0.255
network 192.168.4.0 0.0.0.255
network 192.168.101.0 0.0.0.255

sysname AR1

acl number 2000
rule 5 permit source 192.168.1.0 0.0.0.255
rule 10 permit source 192.168.2.0 0.0.0.255
rule 15 permit source 192.168.3.0 0.0.0.255
rule 20 permit source 192.168.4.0 0.0.0.255

interface GigabitEthernet0/0/0
ip address 100.1.1.1 255.255.255.252
nat outbound 2000

interface GigabitEthernet0/0/1
ip address 192.168.100.1 255.255.255.252

interface GigabitEthernet0/0/2
ip address 192.168.101.1 255.255.255.252

ospf 1 router-id 1.1.1.3
default-route-advertise
area 0.0.0.0
network 192.168.100.0 0.0.0.255
network 192.168.101.0 0.0.0.255

ip route-static 0.0.0.0 0.0.0.0 100.1.1.2

The above configuration can be directly copied to the device, and the final test result can be verified
by MSTP
insert image description here
insert image description here
link aggregation verification
insert image description here
insert image description here

vrrp verification
insert image description here
insert image description here

dhcp verification
insert image description here

ospf verification
insert image description here

nat verification
insert image description here
insert image description here

Guess you like

Origin blog.csdn.net/weixin_45650628/article/details/130877609