Monday, October 17, 2022
HomeNetworkingnetlab Router-on-a-Stick Instance « ipSpace.web weblog

netlab Router-on-a-Stick Instance « ipSpace.web weblog


In early June 2022 I described a netlab topology utilizing VLAN trunks in netlab. That topology supplied pure bridging service for 2 IP subnets. Now let’s go a step additional and add a router-on-a-stick:

  • S1 and S2 are layer-2 switches (no IP addresses on crimson or blue VLANs).
  • ROS is a router-on-a-stick routing between crimson and blue VLANs.
  • Hosts on crimson and blue VLANs ought to be capable to ping one another.

Lab topology

We’ll begin with the VLAN trunks lab topology file. We’ll maintain the VLANs, however make them pure layer-2 VLANs with mode: bridge setting:

Defining VLANs

vlans:
  crimson:
    mode: bridge
  blue:
    mode: bridge

Subsequent, we’ll outline the teams of gadgets:

Defining nodes and teams

supplier: clab

teams:
  hosts:
    members: [ h1, h3 ]
    system: linux
  switches:
    members: [ s1, s2 ]
    module: [ vlan ]
    system: eos
  routers:
    members: [ ros ]
    module: [ vlan ]
    system: eos 

Lastly, we’d like nodes and hyperlinks. The one change from the earlier topology is vlan.mode setting on the router – we have now to set it to route to inform netlab we need to have a router connecting two VLANs and never a change.

Defining nodes and hyperlinks

nodes:
  h1:
  h3:
  s1:
  s2:
  ros:
    vlan.mode: route

hyperlinks:
- h1:
  s1:
    vlan.entry: crimson
- h3:
  s1:
    vlan.entry: blue
- s1:
  s2:
  vlan.trunk: [ red, blue ]
- s2:
  ros:
  vlan.trunk: [ red, blue ]

And that’s all it’s important to do. Execute netlab up and begin exploring. Need to use another system as a substitute of Arista cEOS? Add -d system to netlab up command, for instance netlab up -d cumulus.

Listed below are the related components of Arista cEOS configuration (for the few readers who nonetheless don’t have a working netlab surroundings):

Arista cEOS router-on-a-stick configuration

vlan 1000
   title crimson
!
vlan 1001
   title blue
!
interface Ethernet1
   description ros -> s2
   mac-address 52:dc:ca:fe:05:01
   no switchport
!
interface Ethernet1.1
   description ros -> [h3,s1,s2]
   encapsulation dot1q vlan 1001
   ip deal with 172.16.1.5/24
!
interface Ethernet1.2
   description ros -> [h1,s1,s2]
   encapsulation dot1q vlan 1000
   ip deal with 172.16.0.5/24

Need to run this lab by yourself, or attempt it out with completely different gadgets? No downside:

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments