自学内容网 自学内容网

ENSP常见命令及协议命令

1、常见查看命令

1、查看当前接口/模式下的配置
display this     

2、查看接口IP地址及配置的简洁信息
display ip interface brief    

3、查看当前的路由表
display ip routing-table 

4、查看VLAN中包含的接口信息
display port vlan

5、查看VLAN的转发规则
display port vlan active

6、查看ACL信息
display acl all

7、查看TCP状态
display tcp status

8、查看FIB表
display fib

9、查看STP信息
display stp brief

10、查看stp组信息
display stp region-configuration

11、查看VRRP信息
display vrrp 
 
12、查看VRRP简约信息
display vrrp brief

2、常见操作

1、接口组操作
port-group group-member GigabitEthernet 0/0/1 to GigabitEthernet 0/0/2

3、RIP协议命令

1、启动RIP协议并指定进程号,取值范围为1-65535
[R1]rip 1 

2、指定RIP协议版本号,取值范围为1-2
[R1-rip-1]version 2

3、宣告网段,仅支持主类网段
[R1-rip-1]network 1.0.0.0

4、手工汇总路由
[R1-GigabitEthernet0/0/0]rip summary-address 1.1.1.0 255.255.255.0

5、缺省路由
[R1-rip-1]default-route originate 

6、空接口/黑洞路由
[R1]ip route-static 1.1.1.0 24 NULL 0

4、OSPF协议命令

1、配置OSPF进程号和RID
[r1]ospf 1 router-id 1.1.1.1
 
2、区域划分
[r1-ospf-1]area  0

3、宣告网段
[r1-ospf-1-area-0.0.0.0]network 12.1.1.1 0.0.0.0

5、VRRP虚拟路由冗余技术

配置命令:

1、配置虚拟路由器标识符(1-255)和虚拟IP地址
vrrp vrid 1 virtual-ip 1.1.1.1 
 
2、虚拟路由器(1-255)监听上行/下行端口,当端口关闭时,优先级减少30
vrrp vrid 1 track interface GigabitEthernet0/0/1 reduced 30
 
3、虚拟路由器(1-255)关闭抢占模式
vrrp vrid 1 preempt-mode disable 
 
4、虚拟路由器配置延迟抢占,延迟5秒
vrrp vrid 1 preempt-mode timer delay 5:
 
5、虚拟路由器配置初始优先级为100(1-254)
vrrp vrid 1 priority 100

6、VLAN虚拟局域网

配置命令:

1、创建单个VLAN(1-4094)
vlan 10
 
2、批量创建VLAN(1-4094)
vlan batch 10 to 20
vlan batch 30 40 50
 
3、access接口
int g0/0/0
port link-type access
port default vlan 10
 
4、trunk接口
port link-type trunk
port turnk allow-pass vlan 10/all
port trunk pvid  vlan 2 修改PVID
 
5、子接口封装协议配置并指定识别的VLAN号(1-4094)
dot1q termination vid 10
 
6、子接口开启ARP应答广播
arp broadcast enable
 
7、Hybrid接口
port hybrid vlan 1
port hybrid tagged vlan 10
port hybrid untagged vlan 20
port hybrid pvid vlan 30

7、STP、RSTP、MSTP

注意:使用VLAN时,需将接口配置为Trunk

STP配置命令:

1、修改为802.1D算法,当下华为默认为MSTP
[sw1]stp mode stp   
 
2、修改网桥优先级,取值范围为0-61440
[sw1]stp priority 4096    
 
3、修改接口cost值,取值范围为1-200000000
[sw1-GigabitEthernet0/0/1]stp cost 10
 
4、修改接口优先级,取值范围为0-240
[sw1-GigabitEthernet0/0/1]stp port priority 10

RSTP配置命令:

1、启动RSTP协议
[sw1]stp mode rstp
 
2、快速定义根网桥角色
[sw1]stp root primary/secondary
 
2、修改网桥优先级,取值范围为0-61440,步长为4096
[sw1]stp priority 32768
 
3、修改接口优先级,取值范围为0-240,步长为16
[sw1-GigabitEthernet0/0/1]stp port priority 32
 
4、修改接口cost值,取值范围为1-200000000
[sw1-GigabitEthernet0/0/1]stp cost 19
 
5、定义边缘接口
[sw1-GigabitEthernet0/0/1]stp edged-port enable

MSTP配置命令:

1、开启STP
[sw1]stp enable
 
2、启动MSTP
[sw1]stp mode mstp 
 
3、进入组配置
[sw1]stp region-configuration 
 
4、定义组名,所有设备应在一个组内
[sw1-mst-region]region-name a    
 
5、实例树,取值范围为0-48
[sw1-mst-region]instance 1 vlan 1 to 5
[sw1-mst-region]instance 2 vlan 6 to 10
 
6、激活当前配置(必须配置该指令)
[sw1-mst-region]active region-configuration     
 
7、定义本地为组1的主根,组2的备份根
stp instance 1 root primary      优先级修改为0
stp instance 2 root secondary    优先级修改为4096
 
8、定义实例的优先级,取值范围0-61440,步长为4096
[sw1]stp instance  1  priority ?
 
9、定义接口的cost值,取值范围为1-200000000
[sw1-GigabitEthernet0/0/1]stp instance 1 cost 200
 
10、定义接口的优先级,取值范围为0-240,步长为16
[sw1-GigabitEthernet0/0/1]stp instance 1 port priority ?


原文地址:https://blog.csdn.net/Thewei666/article/details/140405438

免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!