0% found this document useful (0 votes)
65 views

VRRP MSTP and Ospf Configuration

The document describes the configuration of MSTP, VLANs, routing protocols, and VRRP on switches SwitchA, SwitchB and SwitchC. It defines an MST region named RG1 on the switches, assigns root bridges and backup bridges for MSTI 1 and 2, sets path cost calculation methods, configures ports as edge ports, adds ports to VLANs 2 and 3, assigns IP addresses to VLAN interfaces, runs OSPF on the switches, and creates VRRP groups 1 and 2 on the switches with SwitchA as the master for group 1 and SwitchB as the master for group 2.

Uploaded by

Asadullah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
65 views

VRRP MSTP and Ospf Configuration

The document describes the configuration of MSTP, VLANs, routing protocols, and VRRP on switches SwitchA, SwitchB and SwitchC. It defines an MST region named RG1 on the switches, assigns root bridges and backup bridges for MSTI 1 and 2, sets path cost calculation methods, configures ports as edge ports, adds ports to VLANs 2 and 3, assigns IP addresses to VLAN interfaces, runs OSPF on the switches, and creates VRRP groups 1 and 2 on the switches with SwitchA as the master for group 1 and SwitchB as the master for group 2.

Uploaded by

Asadullah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 4

<HUAWEI> system-view

[HUAWEI] sysname SwitchA


[SwitchA] stp region-configuration
[SwitchA-mst-region] region-name RG1
[SwitchA-mst-region] instance 1 vlan 2
[SwitchA-mst-region] instance 2 vlan 3
[SwitchA-mst-region] active region-configuration
[SwitchA-mst-region] quit
# Configure an MST region on Switch B.

<HUAWEI> system-view
[HUAWEI] sysname SwitchB
[SwitchB] stp region-configuration
[SwitchB-mst-region] region-name RG1
[SwitchB-mst-region] instance 1 vlan 2
[SwitchB-mst-region] instance 2 vlan 3
[SwitchB-mst-region] active region-configuration
[SwitchB-mst-region] quit
# Configure an MST region on Switch C.

<HUAWEI> system-view
[HUAWEI] sysname SwitchC
[SwitchC] stp region-configuration
[SwitchC-mst-region] region-name RG1
[SwitchC-mst-region] instance 1 vlan 2
[SwitchC-mst-region] instance 2 vlan 3
[SwitchC-mst-region] active region-configuration
[SwitchC-mst-region] quit

------------------------
Configure the root bridge and backup bridge for MSTI 1.

# Set Switch A as the root bridge of MSTI 1.

[SwitchA] stp instance 1 root primary


# Set Switch B as the backup bridge of MSTI 1.

[SwitchB] stp instance 1 root secondary


Configure the root bridge and backup bridge for MSTI 2.

# Set Switch B as the root bridge of MSTI 2.

[SwitchB] stp instance 2 root primary


# Set Switch A as the backup bridge of MSTI 2.

[SwitchA] stp instance 2 root secondary

-------------------------------------------------
[SwitchA] stp pathcost-standard legacy
# Set the path cost calculation method on Switch B to Huawei calculation method.

[SwitchB] stp pathcost-standard legacy

-------------------------------------------------
[SwitchC] stp pathcost-standard legacy
[SwitchC] interface gigabitethernet 1/0/1
[SwitchC-GigabitEthernet1/0/1] stp instance 2 cost 20000
[SwitchC-GigabitEthernet1/0/1] quit
[SwitchC] interface gigabitethernet 1/0/4
[SwitchC-GigabitEthernet1/0/4] stp instance 1 cost 20000
[SwitchC-GigabitEthernet1/0/4] quit
-----------------------------------------------
SwitchC] interface gigabitethernet 1/0/2
[SwitchC-GigabitEthernet1/0/2] stp edged-port enable
[SwitchC-GigabitEthernet1/0/2] quit
[SwitchC] interface gigabitethernet 1/0/3
[SwitchC-GigabitEthernet1/0/3] stp edged-port enable
[SwitchC-GigabitEthernet1/0/3] quit
(Optional) Configure BPDU protection on SwitchC.

[SwitchC] stp bpdu-protection


Configure the ports connected to Router as edge ports.

# Configure GE1/0/3 of Switch A as an edge port.

[SwitchA] interface gigabitethernet 1/0/3


[SwitchA-GigabitEthernet1/0/3] stp edged-port enable
[SwitchA-GigabitEthernet1/0/3] quit
------------------------------------------------
[SwitchA] interface gigabitethernet 1/0/1
[SwitchA-GigabitEthernet1/0/1] port link-type trunk
[SwitchA-GigabitEthernet1/0/1] port trunk allow-pass vlan 2 to 3
[SwitchA-GigabitEthernet1/0/1] quit
# Add GE1/0/2 of Switch A to VLANs.

[SwitchA] interface gigabitethernet 1/0/2


[SwitchA-GigabitEthernet1/0/2] port link-type trunk
[SwitchA-GigabitEthernet1/0/2] port trunk allow-pass vlan 2 to 3
[SwitchA-GigabitEthernet1/0/2] quit
# Add GE1/0/1 of Switch B to VLANs.

[SwitchB] interface gigabitethernet 1/0/1


[SwitchB-GigabitEthernet1/0/1] port link-type trunk
[SwitchB-GigabitEthernet1/0/1] port trunk allow-pass vlan 2 to 3
[SwitchB-GigabitEthernet1/0/1] quit
# Add GE1/0/2 of Switch B to VLANs.

[SwitchB] interface gigabitethernet 1/0/2


[SwitchB-GigabitEthernet1/0/2] port link-type trunk
[SwitchB-GigabitEthernet1/0/2] port trunk allow-pass vlan 2 to 3
[SwitchB-GigabitEthernet1/0/2] quit
# Add GE1/0/1 of Switch C to VLANs.

[SwitchC] interface gigabitethernet 1/0/1


[SwitchC-GigabitEthernet1/0/1] port link-type trunk
[SwitchC-GigabitEthernet1/0/1] port trunk allow-pass vlan 2 to 3
[SwitchC-GigabitEthernet1/0/1] quit
# Add GE1/0/2 of Switch C to VLAN 2.

[SwitchC] interface gigabitethernet 1/0/2


[SwitchC-GigabitEthernet1/0/2] port link-type access
[SwitchC-GigabitEthernet1/0/2] port default vlan 2
[SwitchC-GigabitEthernet1/0/2] quit
# Add GE1/0/3 of Switch C to VLAN 3.

[SwitchC] interface gigabitethernet 1/0/3


[SwitchC-GigabitEthernet1/0/3] port link-type access
[SwitchC-GigabitEthernet1/0/3] port default vlan 3
[SwitchC-GigabitEthernet1/0/3] quit
# Add GE1/0/4 of Switch C to VLANs.

[SwitchC] interface gigabitethernet 1/0/4


[SwitchC-GigabitEthernet1/0/4] port link-type trunk
[SwitchC-GigabitEthernet1/0/4] port trunk allow-pass vlan 2 to 3
[SwitchC-GigabitEthernet1/0/4] quit
--------------------------------------------------
# Assign an IP address to each interface, for example, the interfaces on SwitchA.
The configuration on SwitchB is similar to the configuration on SwitchA. For
details, see the configuration files.

[SwitchA] vlan batch 4


[SwitchA] interface gigabitethernet 1/0/3
[SwitchA-GigabitEthernet1/0/3] port link-type trunk
[SwitchA-GigabitEthernet1/0/3] port trunk allow-pass vlan 4
[SwitchA-GigabitEthernet1/0/3] quit
[SwitchA] interface vlanif 2
[SwitchA-Vlanif2] ip address 10.1.2.102 24
[SwitchA-Vlanif2] quit
[SwitchA] interface vlanif 3
[SwitchA-Vlanif3] ip address 10.1.3.102 24
[SwitchA-Vlanif3] quit
[SwitchA] interface vlanif 4
[SwitchA-Vlanif4] ip address 10.1.4.102 24
[SwitchA-Vlanif4] quit
--------------------------------------------
# Run OSPF on SwitchA, SwitchB, and routers. The configuration on SwitchA is used
as an example. The configuration on SwitchB is similar to the configuration on
SwitchA. For details, see the configuration files.

[SwitchA] ospf 1
[SwitchA-ospf-1] area 0
[SwitchA-ospf-1-area-0.0.0.0] network 10.1.2.0 0.0.0.255
[SwitchA-ospf-1-area-0.0.0.0] network 10.1.3.0 0.0.0.255
[SwitchA-ospf-1-area-0.0.0.0] network 10.1.4.0 0.0.0.255
[SwitchA-ospf-1-area-0.0.0.0] quit
[SwitchA-ospf-1] quit
----------------------------------------------
# Create VRRP group 1 on SwitchA and SwitchB. Set SwitchA as the master device,
priority to 120, and preemption delay to 20 seconds. Set SwitchB as the backup
device and retain the default priority.

[SwitchA] interface vlanif 2


[SwitchA-Vlanif2] vrrp vrid 1 virtual-ip 10.1.2.100
[SwitchA-Vlanif2] vrrp vrid 1 priority 120
[SwitchA-Vlanif2] vrrp vrid 1 preempt-mode timer delay 20
[SwitchA-Vlanif2] quit
[SwitchB] interface vlanif 2
[SwitchB-Vlanif2] vrrp vrid 1 virtual-ip 10.1.2.100
[SwitchB-Vlanif2] quit
-------------------------------
# Create VRRP group 2 on SwitchA and SwitchB. Set SwitchB as the master device,
priority to 120, and preemption delay to 20 seconds. Set SwitchA as the backup
device and retain the default priority.

[SwitchB] interface vlanif 3


[SwitchB-Vlanif3] vrrp vrid 2 virtual-ip 10.1.3.100
[SwitchB-Vlanif3] vrrp vrid 2 priority 120
[SwitchB-Vlanif3] vrrp vrid 2 preempt-mode timer delay 20
[SwitchB-Vlanif3] quit
[SwitchA] interface vlanif 3
[SwitchA-Vlanif3] vrrp vrid 2 virtual-ip 10.1.3.100
[SwitchA-Vlanif3] quit
--------------------------------------------

You might also like