IB交換機配置命令總結


串口通過遠程CRT登錄,波特率9600
用戶名和密碼都是admin
Do you want to use the wizard for initial configuration?
選擇no
打開ip routing
sx1012 [standalone: master] (config) # ip routing

設置mgmt0端口的ip地址
sx1012 [standalone: master] (config) # interface mgmt0 ip address 172.21.1.251 255.255.255.0

將mgmt0的dhcp關掉
no interface mgmt0 dhcp

設置默認路由
sx1012 [standalone: master] (config) # ip default-gateway 172.21.1.254

show running-config

重新運行初始配置向導
sx1012 [standalone: master] (config) # configuration jump-start

出廠設置命令:
switch-f0be76 [standalone: master] (config) # reset factory

配置主機名:
switch-534c80 [standalone: *unknown*] (config) # hostname switch-B

保存配置命令
#write memory

【配置完管理地址后,可以通過管理口登錄交換機】

========================================================================================
【預配置】
開啟路由
switch (config)# ip routing

交換機開啟lacp(鏈路聚合控制協議)
switch (config)# lacp

開啟QoS來避免IPL心跳端口擁擠
switch (config)# dcb priority-flow-control enable force

關閉生成樹
no spanning-tree

開啟MLAG協議
switch (config)# protocol mlag

【配置IPL】
為IPL互聯接口創建VLAN
switch (config)# vlan 4000

創建LAG(聚合組)
switch (config)# interface port-channel 1

映射一個或兩個物理端口到LAG上,並激活
switch (config)# interface ethernet 1/11 channel-group 1 mode active
switch (config)# interface ethernet 1/12 channel-group 1 mode active

將這個LAG設置成IPL互聯
switch (config interface port-channel 1)# ipl 1

在這個特定接口上啟用QoS
switch (config interface port-channel 1)# dcb priority-flow-control mode on force

創建VLAN
switch (config)# interface vlan 4000

VLAN4000設置IP地址
交換機A上執行:
switch (config interface vlan 4000)# ip address 10.10.10.1 /30
交換機B上執行:
switch (config interface vlan 4000)# ip address 10.10.10.2 /30

強IPL映射到VLAN接口
交換機A上執行:
switch (config interface vlan 4000)# ipl 1 peer-address 10.10.10.2
交換機B上執行:
switch (config interface vlan 4000)# ipl 1 peer-address 10.10.10.1

為MLAG配置虛擬IP
交換機A上執行:
switch (config)# mlag-vip my-vip ip 10.10.10.254 /24 //mask may also be 255.255.255.0
交換機B上執行:
switch (config)# mlag-vip my-vip
注:vip與管理ip在同一網段

【端口一分四】
interface ethernet 1/1 module-type qsfp-split-4 force

【配置MLAG端口】
為主機創建MLAG端口
switch (config)# interface mlag-port-channel 1

關閉STP生成樹
switch (config interface mlag-port-channel 1)# spanning-tree port type edge
switch (config interface mlag-port-channel 1)# spanning-tree bpdufilter enable

綁定一個以太網口到MLAG組
switch (config interface ethernet 1/2)# mlag-channel-group 1 mode on

創建並開啟MLAG接口
switch (config interface mlag-port-channel 1)# no shutdown

【開啟MLAG】
開啟MLAG
switch [my-vip: master] (config mlag)# no shutdown
注:當在三層網絡配置MLAG時,VRRP或MAGP必須被部署

【驗證MLAG】
檢查MLAG配置與狀態
SX2 [mellanox: master] (config)# show mlag

檢查MLAG匯總表
switch [my-vip: master] (config)# show interfaces mlag-port-channel summary

檢查MLAG統計數據
switch [my-vip: master] (config)# show mlag statistics


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM