diff options
Diffstat (limited to 'test/network/configure')
-rwxr-xr-x | test/network/configure | 24 |
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 | |||
3 | brctl addbr br0 | ||
4 | ifconfig br0 10.10.20.1/29 up | ||
5 | # NAT masquerade | ||
6 | iptables -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 | |||
10 | brctl addbr br1 | ||
11 | ifconfig br1 10.10.30.1/24 up | ||
12 | brctl addbr br2 | ||
13 | ifconfig br2 10.10.40.1/24 up | ||
14 | brctl addbr br3 | ||
15 | ifconfig br3 10.10.50.1/24 up | ||
16 | brctl addbr br4 | ||
17 | ifconfig br4 10.10.60.1/24 up | ||
18 | ip link add link eth0 name eth0.5 type vlan id 5 | ||
19 | /sbin/ifconfig eth0.5 10.10.205.10/24 up | ||
20 | ip link add link eth0 name eth0.6 type vlan id 6 | ||
21 | /sbin/ifconfig eth0.6 10.10.206.10/24 up | ||
22 | ip link add link eth0 name eth0.7 type vlan id 7 | ||
23 | /sbin/ifconfig eth0.7 10.10.207.10/24 up | ||
24 | |||