ensp三层交换机配置和二层交换机
时间: 2023-12-15 12:32:57 浏览: 83
以下是ensp三层交换机和二层交换机的配置方法:
1. 二层交换机配置方法:
```shell
sysname L2
vlan batch 2 to 3 100
interface Vlanif100
ip address 192.168.100.101 255.255.255.0
interface Ethernet0/0/1
port link-type access
port default vlan 2
interface Ethernet0/0/2
port link-type access
port default vlan 3
interface GigabitEthernet0/0/1
port link-type access
port default vlan 100
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 2 to 3 100
```
2. 三层交换机配置方法:
```shell
sysname L3
vlan batch 2 to 3 100
interface Vlanif100
ip address 192.168.100.101 255.255.255.0
interface GigabitEthernet0/0/1
port link-type access
port default vlan 2
interface GigabitEthernet0/0/2
port link-type access
port default vlan 3
interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 2 to 3 100
interface Vlanif2
ip address 192.168.2.1 255.255.255.0
interface Vlanif3
ip address 192.168.3.1 255.255.255.0
```