华为交换机基本命令1.Ssh:,我来为大家讲解一下关于华为交换机所有配置口令?跟着小编一起来看一看吧!
华为交换机所有配置口令
华为交换机基本命令
1.Ssh:
interface MEth0/0/1
ip address 192.168.90.92 255.255.255.0
ip route-static 0.0.0.0 0.0.0.0 192.168.90.254
stelnet server enable
Aaa
local-user admin password
local-user admin privilege level 15
local-user admin service-type ssh
user-interface vty 0 4
authentication-mode aaa
- System name:
Sysname test
- Clock&time:
[ ]:
clock timezone beijing add 8:00:00
<test >
clock datetime 10:16:30 2021-07-30
- Vlan:
批量建vlan:
vlan batch 100 200 300 400 500
Vlan batch 10 to 50
- Trunk:
port link-type trunk
port trunk allow-pass vlan all
- 开关端口:
Shutdown
Undo shutdown
- L2/L3端口模式:
Portswitch 二层端口
Undo portswitch 三层端口
- 指定端口工作模式和速率:
undo negotiation auto
speed 100
duplex half
Spantree:
stp mode rstp
- 端口捆绑:
interface Eth-Trunk1
port link-type trunk
port trunk allow-pass vlan all
load-balance src-dst-mac
Mode lacp
Int g0/0/45
Eth-trunk 1
Int g0/0/46
Eth-trunk 1
- ospf
ospf 1
area 0.0.0.0
network 4.4.4.4 0.0.0.0
network 172.16.1.0 0.0.0.3
- 端口镜像
observe-port 1 interface Eth-Trunk1
interface GigabitEthernet0/0/20
port-mirroring to observe-port 1 all
- vrrp
interface Vlanif2
ip address 2.2.2.2 255.255.255.0
vrrp vrid 1 virtual-ip 2.2.2.3
vrrp vrid 1 priority 120
vrrp vrid 1 preempt-mode timer delay 30
- bfd
本端:bfd 1 bind peer-ip 1.1.1.2 source-ip 1.1.1.1 auto
对端:bfd 1 bind peer-ip 1.1.1.1 source-ip 1.1.1.2 auto
与vrrp联动:
vrrp vrid 1 track bfd-session session-name 1 reduced 50
与静态路由联动:
ip route-static 3.3.3.0 255.255.255.0 1.1.1.2 track bfd-session 1
#bfd进程shutdown,相应的静态路由将被删除
- 重启
reboot
- Clear 接口配置
Clear configuration interface g0/0/45
或在接口下:clear configuration this
- 恢复出厂配置
reset factory-configuration
- Backup配置文件
dir 查看flash:所有文件
tftp 192.168.63.130 put flash:/vrpcfg.zip
- Stack
Switch A(主):
Stack slot 0 priority 200
Interface stack-port 0/1
Port interface xg0/0/4 enable
Switch B(备):
Stack slot 0 renumber 1
Interface stack-port 0/2
Port interface xg0/0/4 eanble
*配置完后两台交换机关电,连接好堆叠线后加电重启
- 密码恢复
通过Console口连接交换机
重启交换机,看到Ctrl B提示时,快速按Ctrl B进入BootLoader菜单,输入初始密码:Admin@huawei.com
选择"Clear the console login password"
重启并重新配置console密码
- 批量配置端口
int rang g0/0/3 to g0/0/10
Portswitch
Port link-type access
Port default vlan 2
- 组播
multicast routing-enable 开且组播功能
Igmp
version 2 配置igmp版本号
Pim
static-rp 2.2.2.2 配置静态rp
Pim sm 配置组播模式
- 静态路由
ip route-static 0.0.0.0 0.0.0.0 192.168.90.254
,