blob: cf6193f3faca44820dd6e7391395db75cdac8565 [file] [log] [blame]
ChetanGaonker901727c2016-11-29 14:05:03 -08001#!/bin/bash
2
3sudo brctl addbr fabric
4sudo ip link set fabric up
5sudo ip link add veth0 type veth peer name veth1
6sudo ip link set veth0 up
7sudo ip link set veth1 up
8sudo brctl addif fabric veth0
9sudo brctl addif fabric eth1
10sudo ip addr flush eth1
11sudo ip link set address 00:00:00:00:00:01 dev fabric
12sudo ip link set address 00:00:00:00:00:01 dev eth1
13sudo ip address add 20.0.0.1/24 dev fabric
14sudo ip address add 10.168.0.1/24 dev fabric
15sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE