Final week I described how simple it’s to make use of entry VLANs in netsim-tools. Subsequent step: VLAN trunks.
We’ll add two Linux hosts to the lab topology used within the earlier weblog publish, leading to two switches, two Linux hosts in crimson VLAN and two Linux hosts in blue VLAN.
Like within the earlier instance, we’ll use teams within the lab topology file to outline our gadgets. Members of the hosts group might be Linux containers, members of the switches group might be Arista EOS containers utilizing vlan configuration module:
Defining nodes and teams
supplier: clab nodes: [ h1, h2, h3, h4 s1, s2 ] teams: hosts: members: [ h1, h2, h3, h4 ] gadget: linux switches: members: [ s1, s2 ] module: [ vlan ] gadget: eos
Subsequent, we’ll outline the VLANs. We want crimson and blue VLANs; as earlier than, netsim-tools will assign 802.1q tags to VLANs as wanted.
vlans: crimson: blue:
Lastly, we want hyperlinks between nodes. Entry VLANs with be outlined on swap interfaces. Record of VLANs within the VLAN trunk might be outlined on the hyperlink itself, because it applies to all nodes related to the trunk. Be aware that we’re working with VLAN names and don’t have to fret in regards to the VLAN 802.1q tags.
hyperlinks: - h1: s1: vlan.entry: crimson - h3: s1: vlan.entry: blue - s1: s2: vlan.trunk: [ red, blue ] - h2: s2: vlan.entry: crimson - h4: s2: vlan.entry: blue
And that’s all you must do. Execute netlab up and revel in your first multi-VLAN lab.
Listed here are the related components of Arista cEOS configuration (for the 2 readers who nonetheless don’t have a working netsim-tools setting):
Arista cEOS multi-VLAN configuration
spanning-tree mode mstp ! vlan 1000 title crimson ! vlan 1001 title blue ! interface Ethernet1 mac-address 52:dc:ca:fe:05:01 switchport entry vlan 1000 ! interface Ethernet2 mac-address 52:dc:ca:fe:05:02 switchport entry vlan 1001 ! interface Ethernet3 description s1 -> s2 mac-address 52:dc:ca:fe:05:03 switchport trunk allowed vlan 1000-1001 switchport mode trunk ! interface Vlan1000 description VLAN crimson (1000) -> [h1,s2,h2] ip deal with 172.16.0.5/24 ! interface Vlan1001 description VLAN blue (1001) -> [h3,s2,h4] ip deal with 172.16.1.5/24
Need to run this lab by yourself, or strive it out with completely different gadgets? No drawback: