本站以分享各种运维经验和运维所需要的技能为主
《python零基础入门》:python零基础入门学习
《python运维脚本》: python运维脚本实践
《shell》:shell学习
《terraform》持续更新中:terraform_Aws学习零基础入门到最佳实战
《k8》暂未更新
《docker学习》暂未更新
《ceph学习》ceph日常问题解决分享
《日志收集》ELK+各种中间件
《运维日常》运维日常
《linux》运维面试100问
背景:
有自己华为交换机需要维护的需求,查看华为交换机端口状态
下面分享一些常用命令以及聚合和bgp的配置
查看端口状态:dis ip int brief
<CS>system-view
Enter system view, return user view with return command.
[~CS]dis ip int brief
*down: administratively down
!down: FIB overload down
^down: standby
(l): loopback
(s): spoofing
(d): Dampening Suppressed
The number of interface that is UP in Physical is 10
The number of interface that is DOWN in Physical is 2
The number of interface that is UP in Protocol is 10
The number of interface that is DOWN in Protocol is 2
Interface IP Address/Mask Physical Protocol VPN
LoopBack0 10.255.255.1/32 up up(s) --
MEth0/0/0 unassigned down down --
NULL0 unassigned up up(s) --
Vlanif100 172.26.1.1/16 up up --
Vlanif301 10.10.10.6/30 up up --
Vlanif302 10.10.11.6/30 up up --
Vlanif303 10.10.12.6/30 down down --
Vlanif304 10.10.13.6/30 up up --
Vlanif530 10.70.0.1/30 up up --
Vlanif531 10.71.0.1/30 up up --
Vlanif540 10.70.0.5/30 up up --
Vlanif3012 10.18.12.2/24 up up --
[~CS]
也可以通过dis interface Vlanif
更多的话也可以dis interface 之后问题?看提示,根据自己的需要查看
查看配置:
[~CS]dis current-configuration
这里才分享一下华为聚合和bgp的配置:
<GZ-M6-H-06-U37-SW>system-view
#T口聚合两个口
[~GZ-M6-H-06-U37-SW]vlan batch 1876
[*GZ-M6-H-06-U37-SW]interface Vlanif 1876
[*GZ-M6-H-06-U37-SW-Vlanif1876]ip address x.x.x.x 29
[*GZ-M6-H-06-U37-SW-Vlanif1876]commit
[~GZ-M6-H-06-U37-SW-Vlanif1876]display eth-trunk
[~GZ-M6-H-06-U37-SW]interface Eth-Trunk 6
[~GZ-M6-H-06-U37-SW-Eth-Trunk5]mode lacp-static
[~GZ-M6-H-06-U37-SW-Eth-Trunk5]port link-type trunk
[~GZ-M6-H-06-U37-SW-Eth-Trunk5]port trunk allow-pass vlan 1876
[~GZ-M6-H-06-U37-SW-Eth-Trunk5]commit
[~GZ-M6-H-06-U37-SW-Eth-Trunk5]quit
[~GZ-M6-H-06-U37-SW]int 10g 1/0/17
[~GZ-M6-H-06-U37-SW-10GE1/0/17]eth-trunk 6
[~GZ-M6-H-06-U37-SW-10GE1/0/17]commit
[~GZ-M6-H-06-U37-SW]int 10g 2/0/17
[~GZ-M6-H-06-U37-SW-10GE2/0/17]eth-trunk 6
[~GZ-M6-H-06-U37-SW-10GE2/0/17]commit
#bgp 号需要你从供应商或者你自己有bgp的搭建跟对端连接。
[~GZ-M6-H-06-U37-SW]bgp 66666
[~GZ-M6-H-06-U37-SW-bgp]peer 10.99.0.2 as-number 66666
[~GZ-M6-H-06-U37-SW-bgp]peer 10.99.0.2 password cipher 123
[~GZ-M6-H-06-U37-SW-bgp]commit
[~GZ-M6-H-06-U37-SW-bgp]display bgp peer