神州数码交换机划分vlan命令
时间: 2024-12-09 13:12:05 浏览: 32
神州数码交换机命令-相对全面
在神州数码交换机上划分VLAN(虚拟局域网)的命令如下:
1. **进入特权模式**:
```shell
enable
```
2. **进入全局配置模式**:
```shell
configure terminal
```
3. **创建VLAN并进入VLAN配置模式**:
```shell
vlan <VLAN_ID>
```
例如,创建VLAN 10:
```shell
vlan 10
```
4. **为VLAN命名**(可选):
```shell
name <VLAN_NAME>
```
例如,为VLAN 10命名为`Sales`:
```shell
name Sales
```
5. **分配端口到VLAN**:
```shell
interface <INTERFACE_ID>
```
例如,进入端口GigabitEthernet 1/0/1:
```shell
interface GigabitEthernet 1/0/1
```
6. **将端口设置为访问模式**:
```shell
switchport mode access
```
7. **分配端口到VLAN**:
```shell
switchport access vlan <VLAN_ID>
```
例如,将端口分配到VLAN 10:
```shell
switchport access vlan 10
```
8. **退出接口配置模式**:
```shell
exit
```
9. **重复步骤5-8**,为其他端口分配VLAN。
10. **保存配置**:
```shell
write memory
```
完整示例如下:
```shell
enable
configure terminal
vlan 10
name Sales
vlan 20
name Engineering
interface GigabitEthernet 1/0/1
switchport mode access
switchport access vlan 10
exit
interface GigabitEthernet 1/0/2
switchport mode access
switchport access vlan 20
exit
write memory
```
阅读全文