Você está na página 1de 6

Service

Function
Chaining
Demo

Brady Johnson
brady.allen.johnson@ericsson.com

Ricardo Noriega
ricardo.noriega.de.soto@ericsson.com

July 7, 2015
SFC Demo Introduction
➢ Motivation
Be able to easily setup and use ODL SFC
➢ Graphically shows which Service Chain a client is using
○ Each Service Function adds a different HTTP header
○ An Apache Web Server detects the HTTP headers and returns different web pages
○ Clients assigned to different Service Chains use a web browser to navigate to the same
Web Server, but get different results depending on the Service Chain used
➢ The demo includes the following
○ ODL SFC Lithium RC2 release Karaf distribution
○ SFC JSON Rest configuration for 3 Service Chains, 2 Service Functions and 2 Forwarders
○ Python scripts to set everything up
■ rest_sender.py sends JSON config to ODL SFC RestConf
■ sfcofl2_mininet.py starts entire NW topology in mininet
■ update_tor.py simulate Neutron node connectivity
■ client_tool.py configure which Service Chains each client uses
■ All scripts and JSON configs can be found in SFC git master: sfc-test/sfcofl2_demo/

➢ Complete Demo available in 2 formats


○ Vagrant: Link to Vagrant SFCOFL2 Demo
○ VirtualBox VM: Coming soon...
Demo Overview
SF1 SF2
Classifier mapping
Client1 ⇒ Service Chain1 Add Http Add Http
Client2 ⇒ Service Chain2 Squid Header 1 Squid
Client1 Header 2
Client3 ⇒ Service Chain3
Apache
Web
Client2 Classifier Classifier Server

Client3
if (hdr1 and hdr2)
return purple page
else if (hdr1)
return blue page
else if (hdr2)
SFF1 SFF2 return red page
else
(OVS-OF) (OVS-OF) return default page

OpenFlow 1.3
Legend:
SFF: Service Function Forwarder Service Service Service
SF: Service Function Chain 1 Chain 2 Chain 3
Squid: HTTP Header Enrichment
This NW topology is a logical view
Getting started with the Demo
Getting the Demo
● Currently, the demo is available here Download Vagrant tarball
● VirtualBox 4.0 or newer is required. Download Virtual Box
● Vagrant 1.7 or newer is required. Download Vagrant

An extended version of these


Starting the Vagrant environment instructions is located within the
● Extract the above mentioned Vagrant tarball into a folder Vagrant tarball file linked above,
● Go to the Vagrant demo folder (where the vagrant file was downloaded) and execute: in a file called README
(This will download the VM and all necessary SW, and should take about 30 minutes,
dont do anything in the VM window until the vagrant prompt returns)
○ vagrant up --provider virtualbox Notice the VM is Xubuntu 14.04.
Xubuntu is the same as Ubuntu,
but with a lighter-weight window
● Once the vagrant script completes and the prompt returns, execute: manager. So, the VM is based on
○ vagrant reload --provision Ubuntu 14.04 LTS.

● Once until the vagrant script completes and the prompt returns you will see the Desktop.
○ Login (vagrant/vagrant)
○ See next slide about using the demo

● To stop the VM:


○ vagrant halt
Using the Demo for the first time
● Open a new terminal and execute: An extended version of these
○ sudo screen -ls instructions is located within the
○ Output should be two screen processes (mininet and SFC karaf) Vagrant tarball file linked above,
in a file called README
● Attach to the mininet screen:
(use ctrl-a ctrl-d to detach from the screen without killing the process)
○ sudo screen -r mininet

● Push the default configuration to SFC


(use a different terminal, not the mininet terminal)
○ cd /home/vagrant/sfcofl2
○ python rest_sender.py -prefix rest_sender/vlan-config
■ Press 7 and Enter

● Assign the client IP to a Rendered Service Path


(RSP, this is the actual service chain)
○ cd /home/vagrant/sfcofl2
○ ./client_tool.py -C client1 -I 1 (see usage of client_tool.py to list RSPs and clients)
○ ./update_rsp_tor.py

● Using the mininet terminal, start the apache web server, Squid Service Functions, and client browser:
○ source env_setup.sh
○ A web browser should pop up
○ Navigate to the following webpage with the browser: Notice: its been reported that
■ http://10.10.0.1/index.html sometimes the images take
(you may need to refresh the page several times to update the cache) several minutes to load. We have
○ Notice the browser title changes before the actual web page is displayed identified this problem and will
upload a solution soon.
Using the demo manually
As mentioned previously, the goal of this demo is to allow people to easily start and use SFC.
Here are some more in-depth customizations that can be done with the demo.
● Using the sfcofl2_mininet.py script:
○ The default demo network topology can be started as follows:
■ /home/vagrant/sfcofl2/launch_mininet.sh
○ If you dont want to start the SFs with Squid, the SFs can be simulated with switches using loopback mode:
■ use the same command found in launch_mininet.sh, and add the “-L” command-line option
○ Adding more clients
■ Use the same command found in launch_mininet.sh, and add “-C 2” for 2 clients

● Changing the client to RSP mapping


(All Rendered Service Paths (RSPs) created in this demo are symmetrical.
So, the RSP IDs used with the client_tool.py must be one of [1, 3, 5])
An abbreviated list of steps to start the demo manually:
○ To list the available clients and their mapping 1. Start SFC Karaf:
(clients are named client1, client2, clientN)
/home/vagrant/sfc-karaf-lithium-1.0.1/bin/karaf
■ client_tool.py -L
2. Start mininet: launch_mininet.sh
○ To list the available RSPs 3. Inject the configuration: rest_sender.py
■ client_tool.py -R 4. Configure the underlay network: update_rsp_tor.py
○ To assign the client to an RSP 5. Map the client to an RSP: client_tool.py
■ client_tool.py -C client1 -I 3 6. Start the mininet environment:
mininet> source env_setup.sh
7. Navigate to http://10.10.0.1/index.html

Você também pode gostar