aboutsummaryrefslogtreecommitdiffstats
path: root/test/network/configure
diff options
context:
space:
mode:
Diffstat (limited to 'test/network/configure')
-rwxr-xr-xtest/network/configure24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/network/configure b/test/network/configure
new file mode 100755
index 000000000..788c5a9a0
--- /dev/null
+++ b/test/network/configure
@@ -0,0 +1,24 @@
1#!/bin/bash
2
3brctl addbr br0
4ifconfig br0 10.10.20.1/29 up
5# NAT masquerade
6iptables -t nat -A POSTROUTING -o eth0 -s 10.10.20.0/29 -j MASQUERADE
7# port forwarding
8# iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to 10.10.20.2:80
9
10brctl addbr br1
11ifconfig br1 10.10.30.1/24 up
12brctl addbr br2
13ifconfig br2 10.10.40.1/24 up
14brctl addbr br3
15ifconfig br3 10.10.50.1/24 up
16brctl addbr br4
17ifconfig br4 10.10.60.1/24 up
18ip link add link eth0 name eth0.5 type vlan id 5
19/sbin/ifconfig eth0.5 10.10.205.10/24 up
20ip link add link eth0 name eth0.6 type vlan id 6
21/sbin/ifconfig eth0.6 10.10.206.10/24 up
22ip link add link eth0 name eth0.7 type vlan id 7
23/sbin/ifconfig eth0.7 10.10.207.10/24 up
24