-
Notifications
You must be signed in to change notification settings - Fork 9
Build
jpereira edited this page Oct 17, 2014
·
9 revisions
-
The system used to build and develop is Linux "Debian 7.6 (wheezy)"
# lsb_release -a No LSB modules are available. Distributor ID: Debian> Description: Debian GNU/Linux 7.6 (wheezy) Release: 7.6 Codename: wheezy #
-
Install the development dependencies
# apt-get install git build-essential autoconf automake pkg-config
-
now, install the softgre build dependencies
# apt-getinstall libdhash-dev libpcap-dev iproute-dev libapache2-mod-php5
-
Generate debian package from source
# apt-get install debian-builder # git clone https://github.com/jpereira/softgre.git softgre.git # cd softgre.git # ./autogen.sh # make debian-package # dpkg -i ../softgred-*.deb
-
Install from source
# git clone https://github.com/jpereira/softgre.git softgre.git # cd softgre.git # ./autogen.sh # ./configure # make # make install
-
check the help of softgre
# softgred --help
-
sample of settings
Example: We have a interface 'eth0' there is a 'endpoint' of GRE tunnel, and we have a trunk interface 'eth1'. that can reach many vlans, like 2420,2421 and 2422. Now, we would like to attach with some vlans over GRE tunnel.
-> Create the bridge
# ip link add br-vlan2420 type bridge
# ip link add br-vlan2421 type bridge
# ip link add br-vlan2422 type bridge
-> Create the local VLANs
# ip link add link eth1 name eth1.2420 up type vlan id 2420
# ip link add link eth1 name eth1.2421 up type vlan id 2421
# ip link add link eth1 name eth1.2422 up type vlan id 2422
-> Attach the local VLANs with the bridges
# ip link set eth1.2420 master br-vlan2420
# ip link set eth1.2421 master br-vlan2421
# ip link set eth1.2422 master br-vlan2422
-> Now, we can begin the provision!
# softgred -i eth0 -a 10@br-vlan2420 -a 11@br-vlan2421 -a 12@br-vlan2422 -t -ddd 1> /var/log/softgred.log 2>&1
-> Conclusion
The SoftGREd will listen GRE Packets on the eth0, and will be forwarded to internals VLANs/bridge.