Server-side Intelligent Switching using vyatta. (10 oct, 2012)
for Japan Vyatta Users Meeting 2012 Autumn in Tokyo.
SAKURA Internet Research Center.
Senior Researcher / Naoto MATSUMOTO
1. 10 Oct, 2012
SAKURA Internet Research Center
Senior Researcher / Naoto MATSUMOTO
2. Inteligent Switching Overview
Process Process Process Process Process Process
Vyatta VM Vyatta VM
IaaS-B IaaS-C
Process Process Process
Tunnel Tunnel Tunnel
Vyatta VM
Bridge + IEEE 802.1w(Rapid STP)
IaaS-D
Virtual Ethernet NIC
Process Process Process
Vyatta VM
IaaS-A Source: SAKURA Internet Research Center. 08/2012: Project THORN
3. How does it works?
Tunnel Interface + Linux Bridge+IEEE 802.1w (Rapid STP) Daemon =
Server-side Intelligent Switching
vyattaVM# sudo rstpctl showport br0
Tunnel Tunnel Tunnel
* vtun1 8001 Fwd 8000-027a0b4f3269 8...3269 8001 D
Bridge + IEEE 802.1w(Rapid STP) * vtun2 8001 Fwd 8000-027a0b4f3269 8...3269 8002 D
:
Virtual Ethernet NIC
veth1 8004 Fwd 8000-027a0b4f3269 8...3269 8004 D
Process Process Process
Vyatta VM
Source: SAKURA Internet Research Center. 08/2012: Project THORN
4. Packages for Inteligent Switching
Tunnel Tunnel Tunnel - Tunneling Protocol:
OpenVPN,GRETAP,L2TPv3 or VXLAN ..etc
Bridge + IEEE 802.1w - Bridging Daemon: bridge-utils
(Rapid STP) - Rapid STP Daemon: rstpd
http://git.kernel.org/?p=linux/kernel/git/shemminger/rstp.git
Virtual Ethernet NIC - Virtual Interface: iproute2
http://kernel.org/pub/linux/utils/net/iproute2/
Process Process Process
VyattaCore 6.4
Source: SAKURA Internet Research Center. 08/2012: Project THORN
5. How to Build Dev-Env on Vyatta
configure
delete system package repository community
set system package repository oxnard components main
set system package repository oxnard distribution oxnard
set system package repository oxnard url http://packages.vyatta.com/vyatta-dev/oxnard/unstable
commit
save
reboot
sudo full-upgrade -k
configure
set system package repository squeeze components main
set system package repository squeeze distribution squeeze
set system package repository squeeze url http://cdn.debian.net/debian
commit
save
sudo apt-get update
sudo aptitude install module-assistant
sudo aptitude install linux-vyatta-kbuild
cd /lib/modules/3.0.23-1-586-vyatta-virt/
sudo ln -s /usr/src/linux-image/debian/build/build-i386-none-586-vyatta-virt/ build
sudo aptitude install rpm zlib1g-dev zlib1g-dbg byacc bison flex
sudo module-assistant prepare
6. Install rstpd and switch-setup
- Downloading latest master from git
http://git.kernel.org/?p=linux/kernel/git/shemminger/rstp.git
cd rstp
sudo make
sudo make install
- L2TPv3 pseudo-wire Config
sudo ip l2tp add tunnel tunnel_id 1 peer_tunnel_id 1 udp_sport 5001 udp_dport 5001 ¥
encap udp local X.X.X.X remote Y.Y.Y.Y
sudo ip l2tp add session tunnel_id 1 session_id 1 peer_session_id 1
:
sudo ifconfig l2tpeth0 0
sudo ifconfig l2tpeth0 up up
- Virtual Ehternet Config Tunnel Tunnel Tunnel
ip link add type veth
sudo ifconfig veth0 up up ; sudo ifconfig veth1 up up Bridge + IEEE 802.1w(Rapid STP)
- Bridge/Switch Config Virtual Ethernet NIC
sudo brctl addbr br0
sudo brctl addif br0 veth1 Process Process Process
sudo brctl addif br0 l2tpeth0
sudo rstpd Vyatta VM
sudo rstpctl rstp br0 on