Monday, June 6, 2022
HomeNetworkingnetsim-tools VLAN Trunk Instance « ipSpace.internet weblog

netsim-tools VLAN Trunk Instance « ipSpace.internet weblog


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 pink VLAN and two Linux hosts in blue VLAN.

Lab topology

Like within the earlier instance, we’ll use teams within the lab topology file to outline our gadgets. Members of the hosts group shall be Linux containers, members of the switches group shall 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 pink and blue VLANs; as earlier than, netsim-tools will assign 802.1q tags to VLANs as wanted.

Defining VLANs

vlans:
  pink:
  blue:

Lastly, we’d like hyperlinks between nodes. Entry VLANs with be outlined on swap interfaces. Checklist of VLANs within the VLAN trunk shall 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.

Defining hyperlinks

hyperlinks:
- h1:
  s1:
    vlan.entry: pink
- h3:
  s1:
    vlan.entry: blue
- s1:
  s2:
  vlan.trunk: [ red, blue ]
- h2:
  s2:
    vlan.entry: pink
- h4:
  s2:
    vlan.entry: blue

And that’s all it’s a must to do. Execute netlab up and revel in your first multi-VLAN lab.

Listed below are the related elements of Arista cEOS configuration (for the 2 readers who nonetheless don’t have a working netsim-tools surroundings):

Arista cEOS multi-VLAN configuration

spanning-tree mode mstp
!
vlan 1000
   title pink
!
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 pink (1000) -> [h1,s2,h2]
   ip handle 172.16.0.5/24
!
interface Vlan1001
   description VLAN blue (1001) -> [h3,s2,h4]
   ip handle 172.16.1.5/24

Wish to run this lab by yourself, or attempt it out with totally different gadgets? No drawback:

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments