add bridge and vlan support
This commit is contained in:
@@ -7,4 +7,6 @@ com,Switch,Adapter1,eth1,vlan7,A,7,,,,
|
||||
com,Switch,Adapter2,eth2,vlan9,B,9,,,,
|
||||
com,Switch,,vlan7,bridge,,,,,,
|
||||
com,Switch,,vlan9,bridge,,,,,,
|
||||
com,Switch,,bridge,,,,,,,
|
||||
com,Switch,,bridge,,,,,,,
|
||||
|
||||
## REMAKE
|
||||
|
@@ -0,0 +1,35 @@
|
||||
meta:
|
||||
id: "lab-bridge"
|
||||
name: "L2 Bridge"
|
||||
description: "Two hosts in separate networks joined by a Linux bridge at L2."
|
||||
|
||||
networks:
|
||||
- name: net1
|
||||
- name: net2
|
||||
|
||||
nodes:
|
||||
- name: srv
|
||||
role: host
|
||||
interfaces:
|
||||
eth1:
|
||||
network: net1
|
||||
ip: "10.0.0.1/24"
|
||||
|
||||
- name: client
|
||||
role: host
|
||||
interfaces:
|
||||
eth1:
|
||||
network: net2
|
||||
ip: "10.0.0.2/24"
|
||||
|
||||
- name: bridge
|
||||
role: switch
|
||||
interfaces:
|
||||
eth1:
|
||||
network: net1
|
||||
eth2:
|
||||
network: net2
|
||||
bridges:
|
||||
- name: br0
|
||||
stp: false
|
||||
members: [eth1, eth2]
|
||||
@@ -0,0 +1,6 @@
|
||||
Name,Role,Adapter,Interface,Interface Type,Slave Interfaces,Network,VLAN,Network IP,Mask,Device IP,Default Gateway
|
||||
srv,Host,Adapter1,eth1,,,net1,,10.0.0.0,/24,10.0.0.1,
|
||||
client,Host,Adapter1,eth1,,,net2,,10.0.0.0,/24,10.0.0.2,
|
||||
bridge,Switch,Adapter1,eth1,,,net1,,,,,
|
||||
bridge,Switch,Adapter2,eth2,,,net2,,,,,
|
||||
bridge,Switch,,br0,bridge,"eth1,eth2",,,,,,
|
||||
|
@@ -0,0 +1,88 @@
|
||||
meta:
|
||||
id: "lab-vlan"
|
||||
name: "VLAN over shared trunk"
|
||||
description: >
|
||||
Two VLANs (5 and 7) isolated at L2, carried over a shared trunk link
|
||||
between two bridge nodes (bright and bleft).
|
||||
|
||||
networks:
|
||||
- name: netA
|
||||
- name: netB
|
||||
- name: netC # trunk between bright and bleft
|
||||
- name: netD
|
||||
- name: netE
|
||||
|
||||
nodes:
|
||||
- name: hostA
|
||||
role: host
|
||||
interfaces:
|
||||
eth1:
|
||||
network: netA
|
||||
ip: "10.0.0.1/24"
|
||||
|
||||
- name: hostB
|
||||
role: host
|
||||
interfaces:
|
||||
eth1:
|
||||
network: netB
|
||||
ip: "10.0.0.2/24"
|
||||
|
||||
- name: hostD
|
||||
role: host
|
||||
interfaces:
|
||||
eth1:
|
||||
network: netD
|
||||
ip: "10.0.0.3/24"
|
||||
|
||||
- name: hostE
|
||||
role: host
|
||||
interfaces:
|
||||
eth1:
|
||||
network: netE
|
||||
ip: "10.0.0.4/24"
|
||||
|
||||
# Right bridge: connects hostA (VLAN 5) and hostB (VLAN 7) via trunk to bleft
|
||||
- name: bright
|
||||
role: switch
|
||||
interfaces:
|
||||
eth1:
|
||||
network: netA # untagged port for VLAN 5
|
||||
eth2:
|
||||
network: netB # untagged port for VLAN 7
|
||||
eth3:
|
||||
network: netC # 802.1Q trunk to bleft
|
||||
vlans:
|
||||
- id: 5
|
||||
parent: eth3
|
||||
name: vlan5 # carries VLAN 5 over trunk
|
||||
- id: 7
|
||||
parent: eth3
|
||||
name: vlan7 # carries VLAN 7 over trunk
|
||||
bridges:
|
||||
- name: br5
|
||||
members: [eth1, vlan5] # VLAN 5 domain
|
||||
- name: br7
|
||||
members: [eth2, vlan7] # VLAN 7 domain
|
||||
|
||||
# Left bridge: connects hostD (VLAN 5) and hostE (VLAN 7) via trunk to bright
|
||||
- name: bleft
|
||||
role: switch
|
||||
interfaces:
|
||||
eth1:
|
||||
network: netD # untagged port for VLAN 5
|
||||
eth2:
|
||||
network: netE # untagged port for VLAN 7
|
||||
eth3:
|
||||
network: netC # 802.1Q trunk to bright
|
||||
vlans:
|
||||
- id: 5
|
||||
parent: eth3
|
||||
name: vlan5
|
||||
- id: 7
|
||||
parent: eth3
|
||||
name: vlan7
|
||||
bridges:
|
||||
- name: br5
|
||||
members: [eth1, vlan5]
|
||||
- name: br7
|
||||
members: [eth2, vlan7]
|
||||
Reference in New Issue
Block a user