l
To prevent hackers from stealing user information by forging the MAC address of the
server, configure a static MAC address entry on the Router for the server.
Figure 1-4
Network diagram
Server
Router
MAC:
0004-0004-0004
Eth2/0/2
VLAN2
Eth2/0/1
VLAN2
LSW
PC1
PC2
MAC:
0002-0002-0002
MAC:
0003-0003-0003
Configuration Roadmap
The configuration roadmap is as follows:
1.
Create VLANs on the Router and add the interfaces to the VLANs.
2.
Configure static MAC address entries.
3.
Set the aging time for the dynamic MAC address entries.
Procedure
Step 1
Add static MAC address entries.
# Create VLAN 2 and add Ethernet2/0/1 and Ethernet2/0/2 to VLAN 2.
<Huawei>
system-view
[Huawei]
sysname Router
[Router]
vlan 2
[Router-vlan2]
quit
[Router]
interface ethernet 2/0/1
[Router-Ethernet2/0/1]
port hybrid tagged vlan 2
[Router-Ethernet2/0/1]
quit
[Router]
interface ethernet 2/0/2
[Router-Ethernet2/0/2]
port hybrid pvid vlan 2
[Router-Ethernet2/0/2]
port hybrid untagged vlan 2
[Router-Ethernet2/0/2]
quit
# Configure static MAC address entries.
[Router]
mac-address static 0002-0002-0002 ethernet 2/0/1 vlan 2
[Router]
mac-address static 0003-0003-0003 ethernet 2/0/1 vlan 2
[Router]
mac-address static 0004-0004-0004 ethernet 2/0/2 vlan 2
Huawei AR530&AR550 Series Industrial Switch Routers
Configuration Guide - Ethernet Switching
1 MAC Address Table Configuration
Issue 01 (2014-11-30)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
20