Closed FastGeert closed 6 years ago
Provided, you connected to the mlnx and did the initial config (hostname/password/ip/ deft gw , Paste this in your session
#!/bin/bash
echo no cli default prefix-modes enable
echo lacp
echo protocol mlag
echo interface port-channel 1
echo vlan 2311-2314,4000
echo interface ethernet 1/12 mtu 9000 force
echo interface mlag-port-channel 1-14 mtu 9000 force
echo interface vlan 4000
cnt=1
for i in {1..4} ; do
echo interface mlag-port-channel ${cnt} mtu 9000 force
echo interface mlag-port-channel ${cnt} switchport mode hybrid
echo interface mlag-port-channel ${cnt} switchport hybrid allowed-vlan all
echo interface ethernet 1/$i mtu 9000 force
echo interface ethernet 1/$i switchport mode hybrid
echo interface ethernet 1/$i switchport hybrid allowed-vlan all
echo interface ethernet 1/$i mlag-channel-group ${cnt} mode active
let cnt++
done
for i in {5..7} ; do
echo interface ethernet 1/$i module-type qsfp-split-4 force
for j in {1..4} ; do
echo interface mlag-port-channel ${cnt} mtu 9000 force
echo interface mlag-port-channel ${cnt} switchport mode hybrid
echo interface mlag-port-channel ${cnt} switchport hybrid allowed-vlan all
echo interface ethernet 1/$i/$j mtu 9000 force
echo interface ethernet 1/$i/$j switchport mode hybrid
echo interface ethernet 1/$i/$j switchport hybrid allowed-vlan all
echo interface ethernet 1/$i/$j mlag-channel-group ${cnt} mode active
let cnt++
done
done
echo interface ethernet 1/11 switchport mode access
echo interface ethernet 1/11 switchport access vlan 2312
echo interface ethernet 1/11 speed 1000 force
echo clock timezone Europe Western Brussels
echo no ntp server 178.79.152.182 disable
echo ntp server 178.79.152.182 keyID 0
echo no ntp server 178.79.152.182 trusted-enable
echo ntp server 178.79.152.182 version 4
Need a python - pyserial for the initial config (see Jan's comment below). Need an ssh based version (js9.3 & prefab) for applying the complete configuration.