Auto-mode MFF configuration example in a ring network
Network requirements
As shown in Figure 116, all the devices are in VLAN 100, and the switches form a ring. Host A, Host B, and Host C obtain IP addresses from the DHCP server. They are isolated at Layer 2, and can communicate with each other through the gateway. MFF automatic mode is enabled on Switch A and Switch B.
Figure 116: Network diagram
Configuration procedure
Configure the IP address of VLAN-interface 1 on the gateway.
<Gateway> system-view [Gateway] interface Vlan-interface 1 [Gateway-Vlan-interface1] ip address 10.1.1.100 24
Configure the DHCP server:
# Enable DHCP and configure an address pool.
<Device> system-view [Device] dhcp enable [Device] dhcp server ip-pool 1 [Device-dhcp-pool-1] network 10.1.1.0 mask 255.255.255.0
# Add gateway's IP address into DHCP address pool 1.
[Device-dhcp-pool-1] gateway-list 10.1.1.100 [Device-dhcp-pool-1] quit
# Configure the IP address of VLAN-interface 1.
[Device] interface Vlan-interface 1 [Device-Vlan-interface1] ip address 10.1.1.50 24
Configure Switch A:
# Enable DHCP snooping.
<SwitchA> system-view [SwitchA] dhcp-snooping
# Enable STP.
[SwitchA] stp enable
# Enable MFF in automatic mode.
[SwitchA] vlan 100 [SwitchA-vlan-100] mac-forced-forwarding auto [SwitchA-vlan-100] quit
# Configure Ethernet 1/0/2 as a network port.
[SwitchA] interface ethernet 1/0/2 [SwitchA-Ethernet1/0/2] mac-forced-forwarding network-port
# Configure Ethernet 1/0/2 as a DHCP snooping trusted port.
[SwitchA-Ethernet1/0/2] dhcp-snooping trust [SwitchA-Ethernet1/0/2] quit
# Configure Ethernet 1/0/3 as a network port.
[SwitchA] interface ethernet 1/0/3 [SwitchA-Ethernet1/0/3] mac-forced-forwarding network-port
# Configure Ethernet 1/0/3 as a DHCP snooping trusted port.
[SwitchA-Ethernet1/0/3] dhcp-snooping trust no-user-binding
Configure Switch B:
# Enable DHCP snooping.
<SwitchB> system-view [SwitchB] dhcp-snooping
# Enable STP.
[SwitchB] stp enable
# Enable MFF in automatic mode.
[SwitchB] vlan 100 [SwitchB-vlan-100] mac-forced-forwarding auto [SwitchB-vlan-100] quit
# Configure Ethernet 1/0/4 as a network port.
[SwitchB] interface ethernet 1/0/4 [SwitchB-Ethernet1/0/4] mac-forced-forwarding network-port
# Configure Ethernet 1/0/4 as a DHCP snooping trusted port.
[SwitchB-Ethernet1/0/4] dhcp-snooping trust no-user-binding [SwitchB-Ethernet1/0/4] quit
# Configure Ethernet 1/0/6 as a network port.
[SwitchB] interface ethernet 1/0/6 [SwitchB-Ethernet1/0/6] mac-forced-forwarding network-port
# Configure Ethernet 1/0/6 as a DHCP snooping trusted port.
[SwitchB-Ethernet1/0/6] dhcp-snooping trust
Enable STP on Switch C.
<SwitchC> system-view [SwitchC] stp enable