这是华为 ensp
时间: 2025-06-21 19:58:19 浏览: 18
感谢您的澄清。下面是基于华为设备(使用ENSP仿真环境)的完整配置命令,涵盖了VLAN划分、链路聚合、STP配置、DHCP配置、无线配置以及设备命名等任务。
### 1. VLAN 划分配置
```bash
# LSW1 和 LSW2 上配置VLAN
# 进入系统视图
system-view
# 创建VLAN
vlan batch 10 20 30 40 50 60
# 将各端口加入相应VLAN
interface GigabitEthernet 0/0/1
port link-type access
port default vlan 10
quit
interface GigabitEthernet 0/0/2
port link-type access
port default vlan 20
quit
interface GigabitEthernet 0/0/3
port link-type access
port default vlan 30
quit
interface GigabitEthernet 0/0/4
port link-type access
port default vlan 40
quit
interface GigabitEthernet 0/0/5
port link-type access
port default vlan 50
quit
interface GigabitEthernet 0/0/6
port link-type access
port default vlan 60
quit
# 重复以上配置在LSW2上
```
### 2. LSW1 与 LSW2 之间的链路聚合配置
```bash
# LSW1 配置
interface Eth-Trunk 1
trunkport GigabitEthernet 0/0/7
mode lacp
quit
# LSW2 配置
interface Eth-Trunk 1
trunkport GigabitEthernet 0/0/7
mode lacp
quit
```
### 3. STP 配置
```bash
# LSW3 配置
stp enable
stp vlan 1 priority 3800
interface GigabitEthernet 0/0/4
stp bpdu-filter enable
stp portfast
quit
# LSW4 配置
stp enable
stp vlan 1 priority 3800
interface GigabitEthernet 0/0/3
stp bpdu-filter enable
stp portfast
quit
```
### 4. DHCP 配置
```bash
# 在LSW1上配置DHCP(假设LSW1作为DHCP服务器)
# 配置VLAN接口IP地址
interface Vlanif 10
ip address 192.168.10.1 255.255.255.0
quit
interface Vlanif 20
ip address 192.168.20.1 255.255.255.0
quit
interface Vlanif 30
ip address 192.168.30.1 255.255.255.0
quit
interface Vlanif 40
ip address 192.168.40.1 255.255.255.0
quit
# 配置DHCP池
dhcp enable
ip pool MarketDept
network 192.168.10.0 mask 255.255.255.0
gateway-list 192.168.10.1
dns-list 8.8.8.8
quit
ip pool FinanceDept
network 192.168.20.0 mask 255.255.255.0
gateway-list 192.168.20.1
dns-list 8.8.8.8
quit
ip pool TechDept
network 192.168.30.0 mask 255.255.255.0
gateway-list 192.168.30.1
dns-list 8.8.8.8
quit
ip pool ProdDept
network 192.168.40.0 mask 255.255.255.0
gateway-list 192.168.40.1
dns-list 8.8.8.8
quit
```
### 5. 接待中心无线配置
```bash
# 在AC1上配置无线接入
# 配置VLAN接口IP地址
interface Vlanif 50
ip address 192.168.50.1 255.255.255.0
quit
# 配置无线SSID
wlan
security-profile name wlan-security
security wpa-wpa2 psk pass-phrase [your-password] aes
quit
ssid-profile name wlan-ssid
ssid CustomerSSID
quit
regulatory-domain-profile name domain
domain cn
quit
radio-2g-profile name wlan-radio
apply regulatory-domain-profile domain
quit
ap-group name default
radio-2g wlan-radio
service-vlan vlan-id 50
ssid-profile wlan-ssid
security-profile wlan-security
quit
```
### 6. 数据中心服务器配置
```bash
# 假设数据中心服务器配置在VLAN 60
# 在LSW1上配置VLAN 60的IP地址
interface Vlanif 60
ip address 192.168.60.1 255.255.255.0
quit
# 确保服务器能够访问外部网络
ospf 1
area 0
network 192.168.60.0 0.0.0.255
quit
```
### 7. AR1 拨号上网配置
```bash
# 配置AR1拨号上网
interface Dialer 1
ip address ppp-negotiate
ppp authentication-mode chap
dialer enable
dialer-group 1
remote-address *.*.*.*
quit
interface GigabitEthernet 0/0/0
dialer enable
dialer-group 1
quit
# PPP配置
ppp chap user your-host-name
ppp chap password cipher your-password
```
### 8. 设备重命名
```bash
# 在所有设备上执行
sysname AR1
sysname LSW1
sysname LSW2
sysname LSW3
sysname LSW4
sysname AC1
```
### 9. 文件保存
完成配置后,将配置文件保存为:`学号 + 姓名`
### 知识点
1. **VLAN划分**:用于逻辑上隔离不同部门的流量,提高网络安全性和管理效率。
2. **STP协议**:确保二层网络无环路,防止广播风暴。
3. **DHCP服务**:自动为客户端分配IP地址等网络配置信息,简化网络管理。
希望这些配置命令能帮助您在华为ENSP环境中完成网络配置任务。如果有任何问题或需要进一步的帮助,请随时告知!
阅读全文
相关推荐















