<switch>system-view
[switch]sysname H3C
2.Create VLAN
<switch>system-view
[switch]vlan 100
3.Delete VLAN
<switch>system-view
[switch]undo vlan 100
4.Add IP to VLAN Interface for management
<switch>system-view
[switch]interface Vlan-interface 100
[switch-Vlan-interface100]ip address 192.168.0.100 255.255.255.0
[switch-Vlan-interface100]display interface Vlan-interface100
Vlan-interface100 current state: UP
Line protocol current state: UP
Description: Vlan-interface100 Interface
The Maximum Transmit Unit is 1500
Internet Address is 192.168.0.100/24 Primary
IP Packet Frame Type: PKTFMT_ETHNT_2, Hardware Address: 3ce5-a64f-8fc0
IPv6 Packet Frame Type: PKTFMT_ETHNT_2, Hardware Address: 3ce5-a64f-8fc0
5.Configure the switch gateway address
<switch>system-view
[switch]ip route-static 0.0.0.00.0.0.0 192.168.0.1
6.VLAN Status
<switch>display vlan100
VLAN ID: 100
VLAN Type: static
Route Interface: configured
IP Address: 192.168.0.100
Subnet Mask: 255.255.255.0
Description: VLAN 00100
Name: VLAN 00100
Tagged Ports: none
Untagged Ports:
GigabitEthernet1/0/23
GigabitEthernet1/0/24
7.Change Port type (Access/Trunk/Hybrid)
<switch>system-view
[switch]interface GigabitEthernet 1/0/1
[switch-GigabitEthernet1/0/1]port link-type access
8.Add the port to VLAN 100
<switch>system-view
[switch] interface GigabitEthernet 1/0/24
[switch] port access vlan 100
9.Set the default VLAN for the trunk port
<switch>system-view
[switch]interface GigabitEthernet 1/0/24
[switch-GigabitEthernet1/0/24]port trunk pvid vlan 100
10.Allow the specified VLAN to pass through the current Trunk port
<switch>system-view
[switch]interface GigabitEthernet 1/0/24
[switch-GigabitEthernet1/0/24]port trunk permit vlan {list|all}
11.View port status
<switch>system-view
[switch] display interface GigabitEthernet1/0/24
12.Enable/Disable the port
<switch>system-view
[switch] interface GigabitEthernet 1/0/24
[switch] undo shutdown
[switch] shutdown
13.View current configuration
<switch>system-view
[switch] display current-configuration
14.Save the switch configuration
<switch>system-view
[switch] save
15.View saved configuration
<switch>system-view
[switch] display saved-configuration
Source :
0 comments:
Post a Comment