- Table of Contents
-
- H3C Campus Fixed-Port Switches CLI-Based Quick Start Configuration Guide-6W101
- 01-H3C Devices CLI Reference
- 02-Login Management Quick Start Configuration Guide
- 03-Configuration File Management Quick Start Configruation Guide
- 04-Software Upgrade Quick Start Configuration Guide
- 05-Device Management Quick Start Configuration Guide
- 06-NTP Quick Start Configuration Guide
- 07-RBAC Quick Start Configuration Guide
- 08-IRF Quick Start Configuration Guide
- 09-Ethernet Interface Quick Start Configuration Guide
- 10-VLAN Quick Start Configuration Guide
- 11-Port Isolation Quick Start Configuration Guide
- 12-Loop Detection Quick Start Configuration Guide
- 13-QinQ Quick Start Configuration Guide
- 14-MAC Address Table Quick Start Configuration Guide
- 15-Ethernet Link Aggregation Quick Start Configuration Guide
- 16-Spanning Tree Quick Start Configuration Guide
- 17-DHCP Quick Start Configuration Guide
- 18-OSPF Quick Start Configuration Guide
- 19-Static Routing Quick Start Configuration Guide
- 20-Basic RIP Quick Start Configuration Guide
- 21-PBR Quick Start Configuration Guide
- 22-IGMP Snooping Quick Start Configuration Guide
- 23-Packet Filtering Quick Start Configuration Guide
- 24-QoS Quick Start Configuration Guide
- 25-IP Source Guard Quick Start Configuration Guide
- 26-SSH Quick Start Configuration Guide
- 27-Port Security Quick Start Configuration Guide
- 28-VRRP Quick Start Configuration Guide
- 29-PoE Quick Start Configuration Guide
- 30-Mirroring Quick Start Configuration Guide
- 31-Information Center Quick Start Configuration Guide
- 32-SNMP Quick Start Configuration Guide
- 33-LAN Networks Quick Start Configuration Guide
- Related Documents
-
Title | Size | Download |
---|---|---|
14-MAC Address Table Quick Start Configuration Guide | 53.55 KB |
MAC Address Table Quick Start Configuration Guide
Copyright © 2022 New H3C Technologies Co., Ltd. All rights reserved.
No part of this manual may be reproduced or transmitted in any form or by any means without prior written consent of New H3C Technologies Co., Ltd.
Except for the trademarks of New H3C Technologies Co., Ltd., any trademarks that may be mentioned in this document are the property of their respective owners.
The information in this document is subject to change without notice.
Configuring static MAC address entries
Introduction
The following information uses an example to describe the basic procedure for configuring static MAC address entries.
Network configuration
As shown in Figure 1, for secure communication between users in VLAN 100 and the server or extranet through Switch A, perform the following tasks:
· Assign GigabitEthernet 1/0/2 and GigabitEthernet 1/0/3 to VLAN 100.
· Add a static MAC address entry on Switch A to bind the server MAC address to GigabitEthernet 1/0/2.
Procedure
# Create VLAN 100.
<Switch A> system-view
[Switch A] vlan 100
[Switch A-vlan100] quit
# Assign GigabitEthernet 1/0/2 to VLAN 100.
[Switch A] interface gigabitethernet 1/0/2
[Switch A-GigabitEthernet1/0/2] port access vlan 100
[Switch A-GigabitEthernet1/0/2] quit
# Configure GigabitEthernet 1/0/3 (port facing the LAN switch) as a trunk port, and assign the port to VLAN 100.
[Switch A] interface gigabitethernet 1/0/3
[Switch A-GigabitEthernet1/0/3] port link-type trunk
[Switch A-GigabitEthernet1/0/3] port trunk permit vlan 100
[Switch A-GigabitEthernet1/0/3] quit
# Add a static entry for MAC address 0033-0033-0033 on GigabitEthernet 1/0/2 that belongs to VLAN 100.
[Switch A] mac-address static 0033-0033-0033 interface gigabitethernet 1/0/2 vlan 100
Verifying the configuration
# Use ping operations to verify that any 10.0.0.0/24 host in VLAN 100 can communicate with the server.
<Sysname> ping 10.0.0.9
Ping 10.0.0.9 (10.0.0.9): 56 data bytes, press CTRL+C to break
56 bytes from 10.0.0.9: icmp_seq=0 ttl=254 time=2.137 ms
56 bytes from 10.0.0.9: icmp_seq=1 ttl=254 time=2.051 ms
56 bytes from 10.0.0.9: icmp_seq=2 ttl=254 time=1.996 ms
56 bytes from 10.0.0.9: icmp_seq=3 ttl=254 time=1.963 ms
56 bytes from 10.0.0.9: icmp_seq=4 ttl=254 time=1.991 ms
--- Ping statistics for 10.0.0.9 ---
5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss
round-trip min/avg/max/std-dev = 1.963/2.028/2.137/0.062 ms
# Verify that the static MAC address entry has been added.
[Switch A] display mac-address
MAC Address VLAN ID State Port/NickName Aging
0033-0033-0033 100 Static GE1/0/2 N
Configuration files
#
vlan 100
#
interface GigabitEthernet1/0/2
port access vlan 100
mac-address static 0033-0033-0033 vlan 100
#
interface GigabitEthernet1/0/3
port link-type trunk
port trunk permit vlan 1 100
#
Related documentation
· MAC address table configuration in the Layer 2—LAN switching configuration guide for the device.
· MAC address table commands in the Layer 2—LAN switching command reference for the device.