-
Notifications
You must be signed in to change notification settings - Fork 4
emulation
Stefan Schneider edited this page May 9, 2018
·
1 revision
sudo python place_emu/emulator/topology_zoo.py -g inputs/networks/Abilene.graphml
- Check if everything is working (other terminal):
vim-emu datacenter list
The used service has four containers:
User -> Proxy (Squid) -> L4FW (Socat) -> Webservice (Apache)
Example Service Chain an IPs
+-------+ +------+
| | | |
| User | | Web |
| | | |
+-------+ +---^--+
10.0.0.1/24| | 30.0.0.2/24
| |
10.0.0.2/24| | 30.0.0.1/24
+---v---+ +---+--+
| | | |
| Proxy +--------> L4FW |
| | | |
+-------+ +------+
20.0.0.1/24 20.0.0.2/24
# deploy VNFs
vim-emu compute start -n vnf_user -i placement-user-img --net '(id=output,ip=10.0.0.1/24)' -d pop0
vim-emu compute start -n vnf_proxy -i placement-squid-img --net '(id=input,ip=10.0.0.2/24),(id=output,ip=20.0.0.1/24)' -d pop1
vim-emu compute start -n vnf_l4fw -i placement-socat-img --net '(id=input,ip=20.0.0.2/24),(id=output,ip=30.0.0.1/24)' -d pop2
vim-emu compute start -n vnf_web -i placement-apache-img --net '(id=input,ip=30.0.0.2/24)' -d pop3
# setup network forwarding rules
vim-emu network add -src vnf_user:output -dst vnf_proxy:input
vim-emu network add -src vnf_proxy:output -dst vnf_l4fw:input
vim-emu network add -src vnf_l4fw:output -dst vnf_web:input
(this script is also available in emulator/deploy_example.sh
)
# check deployment
vim-emu compute list
+--------------+-------------+----------------------+------------------+-------------------------+
| Datacenter | Container | Image | Interface list | Datacenter interfaces |
+==============+=============+======================+==================+=========================+
| pop3 | vnf_web | placement-apache-img | input | dc4.s1-eth3 |
+--------------+-------------+----------------------+------------------+-------------------------+
| pop2 | vnf_l4fw | placement-socat-img | input,output | dc3.s1-eth3,dc3.s1-eth4 |
+--------------+-------------+----------------------+------------------+-------------------------+
| pop1 | vnf_proxy | placement-squid-img | input,output | dc2.s1-eth3,dc2.s1-eth4 |
+--------------+-------------+----------------------+------------------+-------------------------+
| pop0 | vnf_user | placement-user-img | output | dc1.s1-eth3 |
+--------------+-------------+----------------------+------------------+-------------------------+
# check basic connectivity
containernet> vnf_user ping -c3 10.0.0.2
containernet> vnf_proxy ping -c3 20.0.0.2
containernet> vnf_l4fw ping -c3 30.0.0.2
# full chain HTTP connectivity
containernet> vnf_user curl -x http://10.0.0.2:3128 http://20.0.0.2:8899
This curl
command might look confusing. It does the following:
- a HTTP request to the IP of
vnf_l4fw
that forwards the request arriving at portTCP:8899
tovnf_web
on portTCP:80
- for the request it has to use the proxy (
vnf_proxy
) which is specified by-x http://10.0.0.2:3128
(in a new terminal)
# log into to vnf_user
docker exec -it mn.vnf_user /bin/bash
# basic check
vnf_user curl -x http://10.0.0.2:3128 http://20.0.0.2:8899 -v
# use httping to measure RTT between user and vnf_web
vnf_user httping --proxy 10.0.0.2:3128 --url http://20.0.0.2 -p 8899 -c 5
containernet> exit
- Each node of the given graph is turned into an emulated datacenter (PoP)
- PoPs are named based on the node IDs of the networkx graph (not their labels):
pop<ID>
e.g.pop42
- Link latencies are calculated based on node's geo. locations
- Link bandwidth is set if given in the graph (not many topologies have it)