Skip to content

Commit

Permalink
router-on-a-stick example
Browse files Browse the repository at this point in the history
  • Loading branch information
ipspace committed Oct 16, 2022
1 parent 7c9b068 commit 5b56c33
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 1 deletion.
22 changes: 22 additions & 0 deletions VLAN/vlan-router-on-a-stick/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Router-on-a-Stick Connected to a VLAN Trunk

This directory contains *netlab* topology file for a router-on-a-stick scenario with a two VLANs stretched across two switches and terminated on a router.

![VLAN trunk topology](netlab-router-stick.png)

After starting the lab, *h1* should be able to ping *h3*.

## Changing Device Types

This topology can be used with all network devices supporting VLAN configuration module and all virtualization providers supported by *netlab*:

* To change all devices in the topology (apart from Linux hosts), use the `-d xxx` CLI argument
* To change the switch device type, use `-s groups.switches.device=xxx` CLI argument
* To change the router device type, use `-s groups.routers.device=xxx` CLI argument
* To change the virtualization provider, use `-p` CLI argument.

For example, to start the lab with Cisco IOSv devices, use:

```
netlab up -p libvirt -d iosv
```
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
42 changes: 42 additions & 0 deletions VLAN/vlan-router-on-a-stick/topology.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
provider: clab

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

vlans:
red:
mode: bridge
blue:
mode: bridge

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

links:
- h1:
s1:
vlan.access: red
- h3:
s1:
vlan.access: blue
- s1:
s2:
vlan.trunk: [ red, blue ]
- s2:
ros:
vlan.trunk: [ red, blue ]
Binary file added VLAN/vlan-router-on-a-stick/vlan-trunk.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion tools
Submodule tools updated from dddd3d to 931850

0 comments on commit 5b56c33

Please sign in to comment.