Version 17 (modified by ibaldin, 8 years ago)

--

6509 VLAN configuration notes

Assumptions

Current 6509 drivers make a crucial assumptions that mappings are enabled on physical interfaces (switchport vlan mapping enable):

interface TenGigabitEthernet3/3
description UNC Euca (Layer 2) Connection to Juniper 3200
switchport
switchport trunk encapsulation dot1q
switchport trunk allowed vlan 100
switchport mode trunk
switchport vlan mapping enable
switchport vlan mapping 17 100
no ip address
mls qos vlan-based
end

ORCA driver then manipulates what is being mapped to what.

Trunk port configuration

Vlan Declaration:
-----------------------
6509-Renci#config t
Enter configuration commands, one per line.  End with CNTL/Z.
6509-Renci(config)#vlan 505
6509-Renci(config-vlan)#name vm2vm1
6509-Renci(config-vlan)#exit
6509-Renci(config)#exit
6509-Renci#

Vlan Definition:
---------------------
6509-Renci#config t
Enter configuration commands, one per line.  End with CNTL/Z.
6509-Renci(config)#interface vlan 505
6509-Renci(config-if)#logging event link-status
6509-Renci(config-if)#no shut
6509-Renci(config-if)#exit

Vlan Assignment (to an interface):
----------------------------------------------
6509-Renci(config-if)#interface gig1/2
6509-Renci(config-if)#switchport
6509-Renci(config-if)#switch
6509-Renci(config-if)#switchport trunk encapsulation dot1q
6509-Renci(config-if)#switchport trunk allowed vlan 505
6509-Renci(config-if)#switchport mode trunk
6509-Renci(config-if)#no ip address
6509-Renci(config-if)#logging event link-status
6509-Renci(config-if)#exit
6509-Renci(config)#int gig1/3
6509-Renci(config-if)#switchport
6509-Renci(config-if)#switchport trunk encapsulation dot1q
6509-Renci(config-if)#switchport trunk allowed vlan 505
6509-Renci(config-if)#switchport mode trunk
6509-Renci(config-if)#no ip address
6509-Renci(config-if)#logging event link
6509-Renci(config-if)#logging event link-status
6509-Renci(config-if)#exit
6509-Renci(config)#
6509-Renci(config)#exit

Access port configuration

The following snippet should work if I understand correctly. It applies access vlan 1234 to GigE ports 1-48 in slot 2. Prior, you will need to declare the vlan by entering 'vlan1234' in config t. name is optional. Then, define vlan '1234' (and add an ip if necessary).

6509-Renci(config)#vlan 1234
6509-Renci(config-vlan)#name RangeTest

6509-Renci(config)#interface vlan 1234
6509-Renci(config-if)#no shut

6509-Renci(config)#interface range gigabitEthernet 2/1 - 48
6509-Renci(config-if-range)#switchport
6509-Renci(config-if-range)#switchport mode access
6509-Renci(config-if-range)#switchport access vlan 1234

Removing port from vlan
----------------------------------------
no switchport access vlan 1234

End-host configuration

1. Create a bridge

> brctl addbr bridge-for-slice1

2. Create tagged interfaces in each node for the VLAN in this slice

> vconfig add eth0 505
> ifconfig eth0.505 up

3. Attach VLAN interface to the bridge

> brctl addif bridge-for-slice1 eth0.505

4. Enable slice bridge

> ifconfig bridge-for-slice1 up

5. Create appropriate configurations for VMs

  • Data interface should have 'bridge=bridge-for-slice1' option set, to make sure that vif#.# for the data interface in the VM gets attached to the bridge

6. Create VMs 7. Assign IP addresses to the data interfaces in the VM 8. Test 9. Removal is opposite:

xm destroy vm-name
brctl delif bridge-for-slice1 eth0.505
ifconfig bridge-for-slice1 down
brctl delbr bridge-for-slice1
vconfig rem eth0.505