Skip to content
This repository was archived by the owner on Jan 12, 2021. It is now read-only.

Simple labs based on openvswitch #3

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added new lab depicting inter-VLAN routing
damwaar committed Apr 4, 2015
commit 3427f940ac296f8c2ab47e77a642503ba06a1a4f
7 changes: 7 additions & 0 deletions damwaar/openvswitch/ovs-router-on-a-stick/client1.startup
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
ip=$(which ip)

$ip link set eth0 up

$ip addr add 10.0.100.1/24 dev eth0

$ip route add default via 10.0.100.254
Empty file.
7 changes: 7 additions & 0 deletions damwaar/openvswitch/ovs-router-on-a-stick/client2.startup
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
ip=$(which ip)

$ip link set eth0 up

$ip addr add 10.0.100.2/24 dev eth0

$ip route add default via 10.0.100.254
Empty file.
7 changes: 7 additions & 0 deletions damwaar/openvswitch/ovs-router-on-a-stick/client3.startup
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
ip=$(which ip)

$ip link set eth0 up

$ip addr add 10.0.200.3/24 dev eth0

$ip route add default via 10.0.200.254
Empty file.
7 changes: 7 additions & 0 deletions damwaar/openvswitch/ovs-router-on-a-stick/client4.startup
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
ip=$(which ip)

$ip link set eth0 up

$ip addr add 10.0.200.4/24 dev eth0

$ip route add default via 10.0.200.254
Empty file.
15 changes: 15 additions & 0 deletions damwaar/openvswitch/ovs-router-on-a-stick/lab.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
client1[0]="SA"

client2[0]="SB"

client3[0]="SC"

client4[0]="SD"

switch1[0]="SA"
switch1[1]="SB"
switch1[2]="SC"
switch1[3]="SD"
switch1[4]="TRUNK"

router1[0]="TRUNK"
13 changes: 13 additions & 0 deletions damwaar/openvswitch/ovs-router-on-a-stick/router1.startup
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
ip=$(which ip)
vconfig=$(which vconfig)

$vconfig add eth0 100
$vconfig add eth0 200

$ip link set eth0 up
$ip link set eth0.100 up
$ip link set eth0.200 up


$ip addr add 10.0.100.254/24 dev eth0.100
$ip addr add 10.0.200.254/24 dev eth0.200
Empty file.
19 changes: 19 additions & 0 deletions damwaar/openvswitch/ovs-router-on-a-stick/switch1.startup
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
ip=$(which ip)
ovsvsctl=$(which ovs-vsctl)

/etc/init.d/openvswitch-switch start

$ip link set eth0 up
$ip link set eth1 up
$ip link set eth2 up
$ip link set eth3 up
$ip link set eth4 up

$ovsvsctl add-br br1
$ovsvsctl add-port br1 eth0 tag=100
$ovsvsctl add-port br1 eth1 tag=100
$ovsvsctl add-port br1 eth2 tag=200
$ovsvsctl add-port br1 eth3 tag=200
$ovsvsctl add-port br1 eth4 trunks=100,200

$ip link set br1 up
Empty file.