华为交换机配置命令大全
时间: 2023-10-12 10:10:17 浏览: 194
以下是一些常用的 Huawei 交换机配置命令:
1. 设置设备主机名
```
sysname <hostname>
```
2. 配置管理口 IP 地址
```
interface vlanif <vlan-id>
ip address <ip-address> <subnet-mask>
```
3. 配置 SSH 登录
```
user-interface vty 0 4
protocol inbound ssh
authentication-mode aaa
```
4. 配置 Telnet 登录
```
user-interface vty 0 4
protocol inbound telnet
authentication-mode aaa
```
5. 配置 SNMP
```
snmp-agent
snmp-agent community <community-name> [read-view <read-view-name>] [write-view <write-view-name>] [notify-view <notify-view-name>]
snmp-agent sys-info version v2c
```
6. 配置 VLAN
```
vlan batch <vlan-id-list>
interface <interface-type> <interface-number>
port link-type access
port default vlan <vlan-id>
```
7. 配置 LACP
```
interface <interface-type> <interface-number>
lacp enable
```
8. 配置 STP
```
stp enable
interface <interface-type> <interface-number>
stp edged-port enable
```
9. 配置 OSPF
```
ospf
area <area-id>
network <network-address> <wildcard-mask> [cost <cost>] [type <type>]
```
10. 配置 BGP
```
bgp <as-number>
router-id <router-id>
import-route direct
import-route static
import-route ospf
peer <peer-ip-address> as-number <peer-as-number>
peer <peer-ip-address> enable
```
这些命令只是 Huawei 交换机配置命令的冰山一角,具体的命令和使用方式还需要根据实际情况进行查阅和学习。
阅读全文