Mellanox:Ethernet Switch Configure VLANs
Jump to navigation
Jump to search
This setup was used for Piston Coud, multiple VLANs routing between each other on the same switch.
Setup VLANs on SX1024
Default username and password: admin/admin
HPC-10GB [standalone: master] > enable
HPC-10GB [standalone: master] # configure terminal
HPC-10GB [standalone: master] (config) # ip routing
HPC-10GB [standalone: master] (config) # vlan 13
HPC-10GB [standalone: master] (config vlan 13) # name services
HPC-10GB [standalone: master] (config vlan 13) # exit
HPC-10GB [standalone: master] (config) # vlan 14
HPC-10GB [standalone: master] (config vlan 14) # name cloud
HPC-10GB [standalone: master] (config vlan 14) # exit
HPC-10GB [standalone: master] (config) # vlan 15
HPC-10GB [standalone: master] (config vlan 15) # name public
HPC-10GB [standalone: master] (config vlan 15) # exit
HPC-10GB [standalone: master] (config) # show vlan
VLAN Name Ports
---- ----------- --------------------------------------
1 default Eth1/1, Eth1/2, Eth1/3, Eth1/4, Eth1/5,
Eth1/6, Eth1/7, Eth1/8, Eth1/9, Eth1/10,
Eth1/11, Eth1/12, Eth1/13, Eth1/14, Eth1/15,
Eth1/16, Eth1/17, Eth1/18, Eth1/19, Eth1/20,
Eth1/21, Eth1/22, Eth1/23, Eth1/24, Eth1/25,
Eth1/26, Eth1/27, Eth1/28, Eth1/29, Eth1/30,
Eth1/31, Eth1/32, Eth1/33, Eth1/34, Eth1/35,
Eth1/36, Eth1/37, Eth1/38, Eth1/39, Eth1/40,
Eth1/41, Eth1/42, Eth1/43, Eth1/44, Eth1/45,
Eth1/46, Eth1/47, Eth1/48, Eth1/49, Eth1/50,
Eth1/51, Eth1/52, Eth1/53, Eth1/54, Eth1/55,
Eth1/56, Eth1/57, Eth1/58, Eth1/59, Eth1/60
13 services
14 cloud
15 public
HPC-10GB [standalone: master] (config) # interface vlan 13 ip address 192.168.2.1 255.255.255.192
HPC-10GB [standalone: master] (config) # interface vlan 13 no shutdown
HPC-10GB [standalone: master] (config) # interface vlan 14 ip address 192.168.3.1 255.255.255.0
HPC-10GB [standalone: master] (config) # interface vlan 14 no shutdown
HPC-10GB [standalone: master] (config) # interface vlan 15 ip address 192.168.4.1 255.255.255.192
HPC-10GB [standalone: master] (config) # interface vlan 15 no shutdown
HPC-10GB [standalone: master] (config) # write memory
# VLANs are down at the moment
HPC-10GB [standalone: master] (config) # interface vlan 13
HPC-10GB [standalone: master] (config interface vlan 13) # show interface vlan 13
# Set ports up as hybrid and assign ports to VLANs, repeat for every port
HPC-10GB [standalone: master] (config) # interface ethernet 1/2
HPC-10GB [standalone: master] (config interface ethernet 1/2) # switchport mode hybrid
HPC-10GB [standalone: master] (config interface ethernet 1/2) # switchport hybrid allowed-vlan all
HPC-10GB [standalone: master] (config interface ethernet 1/2) # exit
Vlan 13
Admin state: Enabled
Operational state: Down (no up member port)
Mac Address: f4:52:14:2d:bb:d8
Internet Address: 192.168.2.1/26
Broadcast address: 192.168.2.63
MTU: 1500 bytes
Arp timeout: 1500 seconds
Description: N/A
Counters: DisabledShow all the VLAN Interfaces
HPC-10GB [standalone: master] (config) # show interfaces vlan
Vlan 13
Admin state: Enabled
Operational state: Down (no up member port)
Mac Address: f4:52:14:2d:bb:d8
Internet Address: 192.168.2.1/26
Broadcast address: 192.168.2.63
MTU: 1500 bytes
Arp timeout: 1500 seconds
Description: N/A
Counters: Disabled
Vlan 14
Admin state: Enabled
Operational state: Down (no up member port)
Mac Address: f4:52:14:2d:bb:d8
Internet Address: 192.168.3.1/24
Broadcast address: 192.168.3.255
MTU: 1500 bytes
Arp timeout: 1500 seconds
Description: N/A
Counters: Disabled
Vlan 15
Admin state: Enabled
Operational state: Down (no up member port)
Mac Address: f4:52:14:2d:bb:d8
Internet Address: 192.168.4.1/26
Broadcast address: 192.168.4.63
MTU: 1500 bytes
Arp timeout: 1500 seconds
Description: N/A
Counters: DisabledSetting all the ports to hybrid and all VLANs
Not even sure if this is required
interface ethernet 1/15
switchport mode hybrid
switchport hybrid allowed-vlan all
exit
interface ethernet 1/16
switchport mode hybrid
switchport hybrid allowed-vlan all
exit
interface ethernet 1/17
switchport mode hybrid
switchport hybrid allowed-vlan all
exit
interface ethernet 1/18
switchport mode hybrid
switchport hybrid allowed-vlan all
exit
interface ethernet 1/19
switchport mode hybrid
switchport hybrid allowed-vlan all
exit
interface ethernet 1/20
switchport mode hybrid
switchport hybrid allowed-vlan all
exit
interface ethernet 1/21
switchport mode hybrid
switchport hybrid allowed-vlan all
exit
interface ethernet 1/22
switchport mode hybrid
switchport hybrid allowed-vlan all
exit
interface ethernet 1/23
switchport mode hybrid
switchport hybrid allowed-vlan all
exit
interface ethernet 1/24
switchport mode hybrid
switchport hybrid allowed-vlan all
exit
interface ethernet 1/25
switchport mode hybrid
switchport hybrid allowed-vlan all
exit
interface ethernet 1/26
switchport mode hybrid
switchport hybrid allowed-vlan all
exit
interface ethernet 1/27
switchport mode hybrid
switchport hybrid allowed-vlan all
exit
interface ethernet 1/28
switchport mode hybrid
switchport hybrid allowed-vlan all
exit
interface ethernet 1/29
switchport mode hybrid
switchport hybrid allowed-vlan all
exit
interface ethernet 1/30
switchport mode hybrid
switchport hybrid allowed-vlan all
exit
interface ethernet 1/31
switchport mode hybrid
switchport hybrid allowed-vlan all
exit
interface ethernet 1/32
switchport mode hybrid
switchport hybrid allowed-vlan all
exit
interface ethernet 1/33
switchport mode hybrid
switchport hybrid allowed-vlan all
exit
interface ethernet 1/34
switchport mode hybrid
switchport hybrid allowed-vlan all
exit
interface ethernet 1/35
switchport mode hybrid
switchport hybrid allowed-vlan all
exit
interface ethernet 1/36
switchport mode hybrid
switchport hybrid allowed-vlan all
exit
interface ethernet 1/37
switchport mode hybrid
switchport hybrid allowed-vlan all
exit
interface ethernet 1/38
switchport mode hybrid
switchport hybrid allowed-vlan all
exit
interface ethernet 1/39
switchport mode hybrid
switchport hybrid allowed-vlan all
exit
interface ethernet 1/40
switchport mode hybrid
switchport hybrid allowed-vlan all
exit
interface ethernet 1/41
switchport mode hybrid
switchport hybrid allowed-vlan all
exit
interface ethernet 1/42
switchport mode hybrid
switchport hybrid allowed-vlan all
exit
interface ethernet 1/43
switchport mode hybrid
switchport hybrid allowed-vlan all
exit
interface ethernet 1/44
switchport mode hybrid
switchport hybrid allowed-vlan all
exit
interface ethernet 1/45
switchport mode hybrid
switchport hybrid allowed-vlan all
exit
interface ethernet 1/46
switchport mode hybrid
switchport hybrid allowed-vlan all
exit
interface ethernet 1/47
switchport mode hybrid
switchport hybrid allowed-vlan all
exit
interface ethernet 1/48
switchport mode hybrid
switchport hybrid allowed-vlan all
exitAfter the above my VLANs are UP
HPC-10GB [standalone: master] (config) # show interfaces vlan
Vlan 13
Admin state: Enabled
Operational state: Up
Mac Address: f4:52:14:2d:bb:d8
Internet Address: 192.168.2.1/26
Broadcast address: 192.168.2.63
MTU: 1500 bytes
Arp timeout: 1500 seconds
Description: N/A
Counters: Disabled
Vlan 14
Admin state: Enabled
Operational state: Up
Mac Address: f4:52:14:2d:bb:d8
Internet Address: 192.168.3.1/24
Broadcast address: 192.168.3.255
MTU: 1500 bytes
Arp timeout: 1500 seconds
Description: N/A
Counters: Disabled
Vlan 15
Admin state: Enabled
Operational state: Up
Mac Address: f4:52:14:2d:bb:d8
Internet Address: 192.168.4.1/26
Broadcast address: 192.168.4.63
MTU: 1500 bytes
Arp timeout: 1500 seconds
Description: N/A
Counters: DisabledRemoving a VLAN
Incorrectly created
HPC-10GB [standalone: master] (config) # no vlan 3
HPC-10GB [standalone: master] (config) # no vlan 4
HPC-10GB [standalone: master] (config) # no vlan 5
# or just remove the interface ip if configured and leave the vlan
HPC-10GB [standalone: master] (config) # interface vlan 5 no