├── NFs ├── docker │ ├── nat │ │ ├── sysctl.conf │ │ ├── Dockerfile │ │ ├── start.sh │ │ └── README.md │ ├── gre-nat │ │ ├── sysctl.conf │ │ ├── Dockerfile │ │ └── README.md │ ├── firewall │ │ ├── Dockerfile │ │ ├── start.sh │ │ └── README.md │ ├── example │ │ ├── Dockerfile │ │ ├── README.md │ │ └── CMakeLists.txt │ └── README.md ├── native │ ├── example │ │ ├── nativeNF_example.tar.gz │ │ ├── README.md │ │ ├── stop │ │ └── start │ ├── VPNStrongswan │ │ ├── rt_tables │ │ ├── strongswan │ │ │ ├── ipsec.secrets │ │ │ └── ipsec.conf │ │ ├── stop │ │ ├── configure.sh │ │ └── start │ ├── dhcp │ │ ├── stop │ │ └── start │ ├── NAT │ │ ├── stop │ │ └── start │ ├── bridge │ │ ├── stop │ │ └── start │ ├── vpn_security │ │ ├── remote_setkey.conf │ │ └── setkey.conf │ └── VNFt5 │ │ └── stop ├── README.md ├── dpdk │ ├── dpi │ │ ├── Makefile │ │ ├── init.h │ │ └── main.c │ └── example │ │ ├── Makefile │ │ ├── init.h │ │ ├── main.c │ │ └── README.md └── kvm │ ├── README.md │ └── example-dpdk │ └── nat-ivshmem.xml ├── use-cases ├── frog │ ├── isp_data_center │ │ ├── authentication_graph │ │ │ ├── controller-openflow │ │ │ │ ├── mac │ │ │ │ ├── start.sh │ │ │ │ ├── controller.conf │ │ │ │ ├── client_mac.sh │ │ │ │ ├── README-FROG4.md │ │ │ │ └── Dockerfile │ │ │ ├── captive_portal │ │ │ │ ├── captive_portal │ │ │ │ │ ├── .settings │ │ │ │ │ │ ├── org.eclipse.wst.jsdt.ui.superType.name │ │ │ │ │ │ ├── org.eclipse.wst.jsdt.ui.superType.container │ │ │ │ │ │ ├── org.eclipse.wst.common.project.facet.core.xml │ │ │ │ │ │ ├── org.eclipse.jdt.core.prefs │ │ │ │ │ │ ├── org.eclipse.wst.common.component │ │ │ │ │ │ └── .jsdtscope │ │ │ │ │ ├── WebContent │ │ │ │ │ │ ├── META-INF │ │ │ │ │ │ │ ├── MANIFEST.MF │ │ │ │ │ │ │ └── maven │ │ │ │ │ │ │ │ └── polito │ │ │ │ │ │ │ │ └── captive_portal │ │ │ │ │ │ │ │ ├── pom.properties │ │ │ │ │ │ │ │ └── pom.xml │ │ │ │ │ │ ├── WEB-INF │ │ │ │ │ │ │ ├── classes │ │ │ │ │ │ │ │ └── logging.properties │ │ │ │ │ │ │ ├── lib │ │ │ │ │ │ │ │ ├── httpcore-4.3.2.jar │ │ │ │ │ │ │ │ ├── json-20140107.jar │ │ │ │ │ │ │ │ ├── httpclient-4.3.4.jar │ │ │ │ │ │ │ │ ├── commons-codec-1.6.jar │ │ │ │ │ │ │ │ └── commons-logging-1.1.3.jar │ │ │ │ │ │ │ └── captive_portal.properties │ │ │ │ │ │ └── resources │ │ │ │ │ │ │ └── images │ │ │ │ │ │ │ ├── dead_frog.jpg │ │ │ │ │ │ │ ├── icons │ │ │ │ │ │ │ ├── psw.png │ │ │ │ │ │ │ ├── email.png │ │ │ │ │ │ │ ├── user.png │ │ │ │ │ │ │ ├── ic_left.png │ │ │ │ │ │ │ ├── ic_right.png │ │ │ │ │ │ │ ├── login-icon.png │ │ │ │ │ │ │ ├── newaccount.jpg │ │ │ │ │ │ │ ├── ajax-loader.gif │ │ │ │ │ │ │ ├── login-icon2.png │ │ │ │ │ │ │ ├── logout-icon.png │ │ │ │ │ │ │ ├── artwork-pattern.png │ │ │ │ │ │ │ └── message-boxes │ │ │ │ │ │ │ │ ├── error.png │ │ │ │ │ │ │ │ └── information.png │ │ │ │ │ │ │ ├── frog-jump-high.gif │ │ │ │ │ │ │ └── frog-background.jpg │ │ │ │ │ ├── ROOT.war │ │ │ │ │ ├── build │ │ │ │ │ │ ├── Login.class │ │ │ │ │ │ ├── Logout.class │ │ │ │ │ │ ├── Update.class │ │ │ │ │ │ ├── Message.class │ │ │ │ │ │ ├── LoginFilter.class │ │ │ │ │ │ ├── MessageWithIP.class │ │ │ │ │ │ ├── Message$MsgType.class │ │ │ │ │ │ ├── AuthResponseMessage.class │ │ │ │ │ │ ├── DeleteResponseMessage.class │ │ │ │ │ │ ├── DeployResponseMessage.class │ │ │ │ │ │ └── SessionIdentifierGenerator.class │ │ │ │ │ ├── lib │ │ │ │ │ │ └── servlet-api.jar │ │ │ │ │ ├── old_ROOT_before_logout.war │ │ │ │ │ ├── ImportedClasses │ │ │ │ │ │ ├── MessageWithIP.class │ │ │ │ │ │ └── AuthResponseMessage.class │ │ │ │ │ ├── src │ │ │ │ │ │ └── SessionIdentifierGenerator.java │ │ │ │ │ ├── .classpath │ │ │ │ │ ├── readme.md │ │ │ │ │ └── .project │ │ │ │ ├── ROOT.war │ │ │ │ ├── start_cp.sh │ │ │ │ ├── TakeMac │ │ │ │ │ ├── main.py │ │ │ │ │ └── TakeMac.py │ │ │ │ └── Dockerfile │ │ │ └── switch_auth │ │ │ │ ├── start.sh │ │ │ │ ├── configure_ovs.sh │ │ │ │ └── Dockerfile │ │ └── isp_graph │ │ │ ├── dhcp_isp │ │ │ ├── default.conf │ │ │ ├── start_dhcp.sh │ │ │ └── Dockerfile │ │ │ ├── nat_isp │ │ │ ├── start_nat.sh │ │ │ └── Dockerfile │ │ │ └── switch │ │ │ ├── start.sh │ │ │ ├── configure_ovs.sh │ │ │ └── Dockerfile │ └── fat_cpe │ │ ├── firewall_client1 │ │ ├── Dockerfile │ │ └── start.sh │ │ └── firewall_client2 │ │ ├── Dockerfile │ │ └── start.sh ├── configuration-service │ ├── docker │ │ ├── dhcp_config │ │ │ ├── configuration_agent │ │ │ │ ├── tests │ │ │ │ │ └── __init__.py │ │ │ │ ├── common │ │ │ │ │ └── __init__.py │ │ │ │ ├── dhcp_server_config │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── constants.py │ │ │ │ │ ├── client.py │ │ │ │ │ ├── dhcp_server_agent.py │ │ │ │ │ ├── configuration_dhcp_example_file.json │ │ │ │ │ └── default_configuration1.json │ │ │ │ ├── __init__.py │ │ │ │ ├── constants.py │ │ │ │ └── README.md │ │ │ ├── sysctl.conf │ │ │ ├── metadata │ │ │ ├── start_dhcp_agent.sh │ │ │ ├── start.sh │ │ │ ├── a-keys.json │ │ │ ├── b-keys.json │ │ │ ├── start_dhcp.sh │ │ │ ├── public-keys.json │ │ │ └── broker-keys.json │ │ ├── nat_config │ │ │ ├── configuration_agent │ │ │ │ ├── common │ │ │ │ │ └── __init__.py │ │ │ │ ├── tests │ │ │ │ │ └── __init__.py │ │ │ │ ├── nat_config │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── constants.py │ │ │ │ │ ├── default_configuration_1eth.json │ │ │ │ │ ├── nat_agent.py │ │ │ │ │ └── default_configuration.json │ │ │ │ ├── __init__.py │ │ │ │ ├── constants.py │ │ │ │ └── README.md │ │ │ ├── sysctl.conf │ │ │ ├── metadata │ │ │ ├── start_nat_agent.sh │ │ │ ├── start.sh │ │ │ ├── start_nat.sh │ │ │ ├── a-keys.json │ │ │ ├── b-keys.json │ │ │ ├── public-keys.json │ │ │ └── broker-keys.json │ │ ├── dhcp │ │ │ ├── default.conf │ │ │ ├── start_dhcp.sh │ │ │ └── Dockerfile │ │ ├── switch │ │ │ ├── start.sh │ │ │ ├── configure_ovs.sh │ │ │ └── Dockerfile │ │ └── README.md │ └── README.md ├── README.md └── sigcomm-native │ └── nffgNAT.json ├── virtualizer ├── virtualizer_library │ └── Put_here_the_virtualizer_library_py_files ├── config │ ├── universal-node-example.xml │ └── configuration.ini └── exception.py ├── orchestrator ├── node_resource_manager │ ├── database_manager │ │ └── SQLite │ │ │ └── SQLiteManager_constants.h │ ├── pub_sub │ │ └── pub_sub_constants.h │ ├── graph │ │ ├── generic_actions │ │ │ ├── generic_action.cc │ │ │ ├── generic_action.h │ │ │ ├── eth_action.h │ │ │ └── vlan_action.h │ │ ├── output_actions │ │ │ ├── output_action.cc │ │ │ ├── action_port.cc │ │ │ ├── action_port.h │ │ │ ├── action_endpoint_gre.h │ │ │ ├── action_endpoint_hostStack.h │ │ │ ├── action_endpoint_internal.h │ │ │ ├── action_network_function.h │ │ │ ├── output_action.h │ │ │ ├── action_network_function.cc │ │ │ ├── action_endpoint_hostStack.cc │ │ │ └── action_endpoint_gre.cc │ │ ├── high_level_graph │ │ │ ├── high_level_element_position.cc │ │ │ ├── high_level_element_position.h │ │ │ ├── high_level_rule.cc │ │ │ ├── high_level_action.cc │ │ │ ├── nf_port_configuration.h │ │ │ ├── high_level_graph_endpoint_internal.cc │ │ │ ├── high_level_graph_endpoint_interface.cc │ │ │ └── high_level_graph_nodeConfigDefaultGateway.cc │ │ └── graph-parser │ │ │ ├── address_validator.h │ │ │ ├── graph_parser.h │ │ │ ├── node_configuration_parser.h │ │ │ ├── node_configuration_parser_exception.h │ │ │ └── match_parser.h │ ├── graph_manager │ │ ├── nf_port_req.h │ │ ├── virtual_link.cc │ │ ├── virtual_link.h │ │ ├── rule_removed_info.h │ │ └── graph_info.cc │ ├── rest_server │ │ ├── x-auth-token-header.cc │ │ └── x-auth-token-header.h │ ├── configuration_agent │ │ ├── constants.h │ │ ├── scripts │ │ │ └── set_default_gateway.sh │ │ └── ConfigurationAgent.h │ ├── interface_manager │ │ ├── scripts │ │ │ ├── set_mac_address.sh │ │ │ └── set_ip_address.sh │ │ └── InterfaceManager.h │ └── resource_manager │ │ └── resource_manager.h ├── compute_controller │ ├── uri_type.h │ ├── nf_type.h │ ├── plugins │ │ ├── native │ │ │ ├── capability.cc │ │ │ ├── Capabilities.xml │ │ │ ├── capability.h │ │ │ ├── native_constants.h │ │ │ ├── Capabilities.xsd │ │ │ └── native.h │ │ ├── dpdk │ │ │ ├── dpdk_constants.h │ │ │ ├── dpdk.h │ │ │ └── scripts │ │ │ │ └── stopNF.sh │ │ ├── docker │ │ │ ├── docker_constants.h │ │ │ ├── scripts │ │ │ │ ├── checkDockerRun.sh │ │ │ │ └── stopNF.sh │ │ │ └── docker.h │ │ └── kvm-libvirt │ │ │ └── libvirt_constants.h │ ├── nfs_manager.cc │ ├── port_technology.h │ ├── template │ │ ├── port.h │ │ └── port.cc │ ├── nf.cc │ ├── stopNF_in.h │ ├── scripts │ │ └── retrieveImage.sh │ ├── README.md │ └── nf.h ├── network_controller │ └── switch_manager │ │ ├── plugins │ │ ├── ovs-ovsdb │ │ │ ├── scripts │ │ │ │ ├── destroy_ip_link_tunnel.sh │ │ │ │ ├── prep_usvhost.sh │ │ │ │ ├── create_ip_link_tunnel.sh │ │ │ │ └── create_veth_pair.sh │ │ │ └── ovsdb_constants.h │ │ ├── erfs │ │ │ ├── constants.h │ │ │ └── scripts │ │ │ │ ├── createLSI.sh │ │ │ │ └── connectLSIs.sh │ │ └── xdpd │ │ │ ├── scripts │ │ │ ├── detachWirelessInterface.sh │ │ │ └── attachWirelessInterface.sh │ │ │ └── xdpd_constants.h │ │ ├── README.md │ │ ├── addVirtualLink_out.h │ │ ├── addEndpointGre_out.h │ │ ├── destroyEndpoint_in.h │ │ ├── addVirtualLink_in.h │ │ ├── destroyHoststackEndpoint_in.h │ │ ├── addEndpointHoststack_in.h │ │ ├── addEndpointHoststack_out.h │ │ ├── destroyNFports_in.h │ │ └── addEndpointGre_in.h ├── README.md └── config │ └── simple_passthrough_nffg.json ├── images ├── RUD.png ├── Creation.png ├── Database.JPG ├── Pictures.pptx ├── deployment.png ├── frog-isp-graph.PNG ├── service-graph.png ├── universal-node.png ├── frog-auth-graph.PNG ├── playground_components.PNG ├── vpn_sec_configuration.png ├── playground_example_graph.PNG ├── configuration_demo_scenario.png ├── frog-setup-and-isp-graphs.PNG ├── frog-user-graph-local-case.PNG ├── frog-user-graph-remote-case.PNG ├── vlan_configuration_OpenWRT_NetGear.png ├── orchestrator_in_band_and_out_of_band.png └── interface_configuration_OpenWRT_NetGear.png ├── contrib ├── inih-r35.zip ├── json-spirit.zip ├── rofl-common.zip ├── double-decker-client-header.zip ├── double-decker-client-library.zip ├── README.md ├── OpenWrt │ └── package │ │ ├── librofl │ │ └── patches │ │ │ ├── 003-execinfo.patch │ │ │ ├── 004-thread_name.patch │ │ │ └── 002-eventfd_function.patch │ │ ├── doubledecker │ │ └── patches │ │ │ └── 001-execinfo.patch │ │ └── un-orchestrator │ │ └── patches │ │ └── 001-execinfo.patch └── inih.patch ├── utils ├── kvm_utils │ ├── run_kvm.sh │ └── who_own_this_mac.sh ├── ovs_utils │ ├── start_ovs.sh │ ├── cleaner.sh │ └── README.md └── travis-ci │ └── build.sh ├── .gitignore ├── COPYRIGHT ├── AUTHORS ├── .gitmodules ├── Vagrantfile ├── .travis.yml └── db_manager └── CMakeLists.txt /NFs/docker/nat/sysctl.conf: -------------------------------------------------------------------------------- 1 | net.ipv4.ip_forward=1 2 | 3 | -------------------------------------------------------------------------------- /NFs/docker/gre-nat/sysctl.conf: -------------------------------------------------------------------------------- 1 | net.ipv4.ip_forward=1 2 | 3 | -------------------------------------------------------------------------------- /use-cases/frog/isp_data_center/authentication_graph/controller-openflow/mac: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /virtualizer/virtualizer_library/Put_here_the_virtualizer_library_py_files: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /orchestrator/node_resource_manager/database_manager/SQLite/SQLiteManager_constants.h: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /use-cases/configuration-service/docker/dhcp_config/configuration_agent/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /use-cases/configuration-service/docker/nat_config/configuration_agent/common/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /use-cases/configuration-service/docker/nat_config/configuration_agent/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /use-cases/configuration-service/docker/dhcp_config/configuration_agent/common/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /use-cases/configuration-service/docker/dhcp_config/sysctl.conf: -------------------------------------------------------------------------------- 1 | net.ipv4.ip_forward=1 2 | 3 | -------------------------------------------------------------------------------- /use-cases/configuration-service/docker/nat_config/configuration_agent/nat_config/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /use-cases/configuration-service/docker/nat_config/sysctl.conf: -------------------------------------------------------------------------------- 1 | net.ipv4.ip_forward=1 2 | 3 | -------------------------------------------------------------------------------- /images/RUD.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/netgroup-polito/un-orchestrator/HEAD/images/RUD.png -------------------------------------------------------------------------------- /use-cases/configuration-service/docker/dhcp_config/configuration_agent/dhcp_server_config/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /contrib/inih-r35.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/netgroup-polito/un-orchestrator/HEAD/contrib/inih-r35.zip -------------------------------------------------------------------------------- /images/Creation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/netgroup-polito/un-orchestrator/HEAD/images/Creation.png -------------------------------------------------------------------------------- /images/Database.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/netgroup-polito/un-orchestrator/HEAD/images/Database.JPG -------------------------------------------------------------------------------- /images/Pictures.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/netgroup-polito/un-orchestrator/HEAD/images/Pictures.pptx -------------------------------------------------------------------------------- /use-cases/configuration-service/docker/nat_config/metadata: -------------------------------------------------------------------------------- 1 | vnf-name = nat 2 | tenant-id = 123 3 | vnf-id = 11 -------------------------------------------------------------------------------- /contrib/json-spirit.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/netgroup-polito/un-orchestrator/HEAD/contrib/json-spirit.zip -------------------------------------------------------------------------------- /contrib/rofl-common.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/netgroup-polito/un-orchestrator/HEAD/contrib/rofl-common.zip -------------------------------------------------------------------------------- /images/deployment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/netgroup-polito/un-orchestrator/HEAD/images/deployment.png -------------------------------------------------------------------------------- /use-cases/configuration-service/docker/dhcp_config/metadata: -------------------------------------------------------------------------------- 1 | vnf-name = dhcp 2 | tenant-id = 123 3 | vnf-id = 12 -------------------------------------------------------------------------------- /images/frog-isp-graph.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/netgroup-polito/un-orchestrator/HEAD/images/frog-isp-graph.PNG -------------------------------------------------------------------------------- /images/service-graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/netgroup-polito/un-orchestrator/HEAD/images/service-graph.png -------------------------------------------------------------------------------- /images/universal-node.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/netgroup-polito/un-orchestrator/HEAD/images/universal-node.png -------------------------------------------------------------------------------- /images/frog-auth-graph.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/netgroup-polito/un-orchestrator/HEAD/images/frog-auth-graph.PNG -------------------------------------------------------------------------------- /utils/kvm_utils/run_kvm.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | sudo service libvirt-bin stop 3 | sudo /usr/local/sbin/libvirtd --daemon 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /.vagrant 2 | *.pyc 3 | nffglib.py 4 | virtualizer3.py 5 | *~ 6 | orchestrator/virtualizer 7 | .idea/ 8 | *.project 9 | -------------------------------------------------------------------------------- /images/playground_components.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/netgroup-polito/un-orchestrator/HEAD/images/playground_components.PNG -------------------------------------------------------------------------------- /images/vpn_sec_configuration.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/netgroup-polito/un-orchestrator/HEAD/images/vpn_sec_configuration.png -------------------------------------------------------------------------------- /use-cases/configuration-service/docker/nat_config/start_nat_agent.sh: -------------------------------------------------------------------------------- 1 | sudo python3 -m configuration_agent.nat_config.nat_agent 2 | -------------------------------------------------------------------------------- /images/playground_example_graph.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/netgroup-polito/un-orchestrator/HEAD/images/playground_example_graph.PNG -------------------------------------------------------------------------------- /use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/.settings/org.eclipse.wst.jsdt.ui.superType.name: -------------------------------------------------------------------------------- 1 | Window -------------------------------------------------------------------------------- /images/configuration_demo_scenario.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/netgroup-polito/un-orchestrator/HEAD/images/configuration_demo_scenario.png -------------------------------------------------------------------------------- /images/frog-setup-and-isp-graphs.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/netgroup-polito/un-orchestrator/HEAD/images/frog-setup-and-isp-graphs.PNG -------------------------------------------------------------------------------- /images/frog-user-graph-local-case.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/netgroup-polito/un-orchestrator/HEAD/images/frog-user-graph-local-case.PNG -------------------------------------------------------------------------------- /images/frog-user-graph-remote-case.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/netgroup-polito/un-orchestrator/HEAD/images/frog-user-graph-remote-case.PNG -------------------------------------------------------------------------------- /contrib/double-decker-client-header.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/netgroup-polito/un-orchestrator/HEAD/contrib/double-decker-client-header.zip -------------------------------------------------------------------------------- /contrib/double-decker-client-library.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/netgroup-polito/un-orchestrator/HEAD/contrib/double-decker-client-library.zip -------------------------------------------------------------------------------- /use-cases/configuration-service/docker/dhcp_config/start_dhcp_agent.sh: -------------------------------------------------------------------------------- 1 | sudo python3 -m configuration_agent.dhcp_server_config.dhcp_server_agent 2 | -------------------------------------------------------------------------------- /NFs/native/example/nativeNF_example.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/netgroup-polito/un-orchestrator/HEAD/NFs/native/example/nativeNF_example.tar.gz -------------------------------------------------------------------------------- /images/vlan_configuration_OpenWRT_NetGear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/netgroup-polito/un-orchestrator/HEAD/images/vlan_configuration_OpenWRT_NetGear.png -------------------------------------------------------------------------------- /use-cases/configuration-service/docker/dhcp_config/configuration_agent/__init__.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Created on Dec 18, 2015 3 | 4 | @author: fabiomignini 5 | ''' 6 | -------------------------------------------------------------------------------- /use-cases/configuration-service/docker/nat_config/configuration_agent/__init__.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Created on Dec 18, 2015 3 | 4 | @author: fabiomignini 5 | ''' 6 | -------------------------------------------------------------------------------- /images/orchestrator_in_band_and_out_of_band.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/netgroup-polito/un-orchestrator/HEAD/images/orchestrator_in_band_and_out_of_band.png -------------------------------------------------------------------------------- /images/interface_configuration_OpenWRT_NetGear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/netgroup-polito/un-orchestrator/HEAD/images/interface_configuration_OpenWRT_NetGear.png -------------------------------------------------------------------------------- /utils/ovs_utils/start_ovs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | sudo /usr/share/openvswitch/scripts/ovs-ctl start 3 | sudo ovs-appctl -t ovsdb-server ovsdb-server/add-remote ptcp:6632 4 | -------------------------------------------------------------------------------- /orchestrator/node_resource_manager/pub_sub/pub_sub_constants.h: -------------------------------------------------------------------------------- 1 | #ifndef PUB_SUB_CONSTANTS_H_ 2 | #define PUB_SUB_CONSTANTS_H_ 1 3 | 4 | #endif //PUB_SUB_CONSTANTS_H_ 5 | 6 | -------------------------------------------------------------------------------- /use-cases/configuration-service/docker/nat_config/configuration_agent/nat_config/constants.py: -------------------------------------------------------------------------------- 1 | # Configuration Agent - configuration file 2 | configuration_interface = 'eth0' 3 | -------------------------------------------------------------------------------- /use-cases/configuration-service/docker/dhcp_config/configuration_agent/dhcp_server_config/constants.py: -------------------------------------------------------------------------------- 1 | # Configuration Agent - configuration file 2 | configuration_interface = 'eth0' 3 | -------------------------------------------------------------------------------- /use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/.settings/org.eclipse.wst.jsdt.ui.superType.container: -------------------------------------------------------------------------------- 1 | org.eclipse.wst.jsdt.launching.baseBrowserLibrary -------------------------------------------------------------------------------- /NFs/native/VPNStrongswan/rt_tables: -------------------------------------------------------------------------------- 1 | # 2 | # reserved values 3 | # 4 | 255 local 5 | 254 main 6 | 253 default 7 | 0 unspec 8 | # 9 | # local 10 | # 11 | #1 inr.ruhep 12 | 250 tapIPSEC 13 | -------------------------------------------------------------------------------- /NFs/native/VPNStrongswan/strongswan/ipsec.secrets: -------------------------------------------------------------------------------- 1 | # /etc/ipsec.secrets - strongSwan IPsec secrets file 2 | 3 | @moon.strongswan.org @sun.strongswan.org : PSK 0sv+NkxY9LLZvwj4qCC2o/gGrWDF2d21jL 4 | -------------------------------------------------------------------------------- /use-cases/configuration-service/docker/dhcp_config/start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | hs="$(cat /etc/hostname)" && echo "127.0.1.1 $hs" >> /etc/hosts 3 | ./start_dhcp.sh 4 | sleep 1 5 | ./start_dhcp_agent.sh 6 | -------------------------------------------------------------------------------- /use-cases/configuration-service/docker/nat_config/start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | hs="$(cat /etc/hostname)" && echo "127.0.1.1 $hs" >> /etc/hosts 4 | ./start_nat.sh 5 | sleep 1 6 | ./start_nat_agent.sh 7 | -------------------------------------------------------------------------------- /use-cases/configuration-service/docker/dhcp_config/configuration_agent/constants.py: -------------------------------------------------------------------------------- 1 | # Configuration Agent - configuration file 2 | dealer = 'tcp://10.0.0.2:5555' 3 | keyfile = '/etc/doubledecker/a-keys.json' 4 | -------------------------------------------------------------------------------- /use-cases/configuration-service/docker/nat_config/configuration_agent/constants.py: -------------------------------------------------------------------------------- 1 | # Configuration Agent - configuration file 2 | dealer = 'tcp://10.0.0.2:5555' 3 | keyfile = '/etc/doubledecker/a-keys.json' 4 | -------------------------------------------------------------------------------- /contrib/README.md: -------------------------------------------------------------------------------- 1 | # Additional software needed to compile the UN 2 | 3 | This folder contains some additional software that is required to compile the universal node, in a version that is known to work with it. 4 | -------------------------------------------------------------------------------- /use-cases/frog/isp_data_center/authentication_graph/captive_portal/ROOT.war: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/netgroup-polito/un-orchestrator/HEAD/use-cases/frog/isp_data_center/authentication_graph/captive_portal/ROOT.war -------------------------------------------------------------------------------- /orchestrator/compute_controller/uri_type.h: -------------------------------------------------------------------------------- 1 | #ifndef URI_TYPE_H 2 | #define URI_TYPE_H 3 | enum uri_t { 4 | REMOTE_FILE, 5 | LOCAL_FILE, 6 | DOCKER_REGISTRY, 7 | UNDEFINED_URITYPE 8 | }; 9 | 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /NFs/docker/firewall/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu 2 | MAINTAINER Politecnico di Torino 3 | 4 | RUN apt-get update 5 | RUN apt-get install -y iptables bridge-utils net-tools 6 | 7 | ADD start.sh start.sh 8 | RUN chmod +x start.sh 9 | -------------------------------------------------------------------------------- /orchestrator/node_resource_manager/graph/generic_actions/generic_action.cc: -------------------------------------------------------------------------------- 1 | #include "generic_action.h" 2 | 3 | GenericAction::GenericAction() 4 | { 5 | 6 | } 7 | 8 | GenericAction::~GenericAction() 9 | { 10 | 11 | } 12 | -------------------------------------------------------------------------------- /use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/WebContent/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Built-By: frog 3 | Build-Jdk: 1.7.0_51 4 | Created-By: Maven Integration for Eclipse 5 | 6 | -------------------------------------------------------------------------------- /use-cases/frog/fat_cpe/firewall_client1/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu 2 | MAINTAINER Politecnico di Torino 3 | 4 | RUN apt-get update 5 | RUN apt-get install -y iptables bridge-utils 6 | 7 | ADD start.sh start.sh 8 | RUN chmod +x start.sh 9 | -------------------------------------------------------------------------------- /use-cases/frog/fat_cpe/firewall_client2/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu 2 | MAINTAINER Politecnico di Torino 3 | 4 | RUN apt-get update 5 | RUN apt-get install -y iptables bridge-utils 6 | 7 | ADD start.sh start.sh 8 | RUN chmod +x start.sh 9 | -------------------------------------------------------------------------------- /use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/ROOT.war: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/netgroup-polito/un-orchestrator/HEAD/use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/ROOT.war -------------------------------------------------------------------------------- /NFs/docker/nat/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu 2 | MAINTAINER Politecnico di Torino 3 | 4 | RUN apt-get update && apt-get install -y iptables 5 | 6 | ADD sysctl.conf /etc/sysctl.conf 7 | ADD ./start.sh start.sh 8 | 9 | RUN chmod +x start.sh 10 | -------------------------------------------------------------------------------- /NFs/docker/gre-nat/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu 2 | MAINTAINER Politecnico di Torino 3 | 4 | RUN apt-get update && apt-get install -y iptables 5 | 6 | ADD sysctl.conf /etc/sysctl.conf 7 | ADD ./start.sh start.sh 8 | 9 | RUN chmod +x start.sh 10 | -------------------------------------------------------------------------------- /use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/build/Login.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/netgroup-polito/un-orchestrator/HEAD/use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/build/Login.class -------------------------------------------------------------------------------- /use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/build/Logout.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/netgroup-polito/un-orchestrator/HEAD/use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/build/Logout.class -------------------------------------------------------------------------------- /use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/build/Update.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/netgroup-polito/un-orchestrator/HEAD/use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/build/Update.class -------------------------------------------------------------------------------- /use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/build/Message.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/netgroup-polito/un-orchestrator/HEAD/use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/build/Message.class -------------------------------------------------------------------------------- /use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/lib/servlet-api.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/netgroup-polito/un-orchestrator/HEAD/use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/lib/servlet-api.jar -------------------------------------------------------------------------------- /orchestrator/compute_controller/nf_type.h: -------------------------------------------------------------------------------- 1 | #ifndef NF_TYPE_H 2 | #define NF_TYPE_H 3 | typedef enum{ 4 | DPDK, 5 | DOCKER, 6 | KVM, 7 | NATIVE, 8 | UNDEFINED 9 | //[+] Add here other implementations for the execution environment 10 | }nf_t; 11 | 12 | 13 | #endif -------------------------------------------------------------------------------- /orchestrator/node_resource_manager/graph_manager/nf_port_req.h: -------------------------------------------------------------------------------- 1 | #ifndef NF_PORT_REQ_H_ 2 | #define NF_PORT_REQ_H_ 1 3 | 4 | typedef struct 5 | { 6 | //A network function can be several input 7 | unsigned int num_input; 8 | } 9 | 10 | #endif //NF_PORT_REQ_H_ 11 | -------------------------------------------------------------------------------- /use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/build/LoginFilter.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/netgroup-polito/un-orchestrator/HEAD/use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/build/LoginFilter.class -------------------------------------------------------------------------------- /use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/build/MessageWithIP.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/netgroup-polito/un-orchestrator/HEAD/use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/build/MessageWithIP.class -------------------------------------------------------------------------------- /use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/old_ROOT_before_logout.war: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/netgroup-polito/un-orchestrator/HEAD/use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/old_ROOT_before_logout.war -------------------------------------------------------------------------------- /orchestrator/node_resource_manager/rest_server/x-auth-token-header.cc: -------------------------------------------------------------------------------- 1 | #include "x-auth-token-header.h" 2 | 3 | void XAuthToken::parse(const std::string& data) 4 | { 5 | token_ = data; 6 | } 7 | 8 | void XAuthToken::write(std::ostream& os) const 9 | { 10 | os << token_; 11 | } -------------------------------------------------------------------------------- /use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/build/Message$MsgType.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/netgroup-polito/un-orchestrator/HEAD/use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/build/Message$MsgType.class -------------------------------------------------------------------------------- /use-cases/frog/isp_data_center/authentication_graph/controller-openflow/start.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | ifconfig eth0 192.168.4.4/24 4 | netstat 5 | 6 | cd /controller 7 | ./client_mac.sh 8 | netstat 9 | 10 | #start the IP forger 11 | cd /controller 12 | ./pox.py IP_forger 13 | -------------------------------------------------------------------------------- /use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/build/AuthResponseMessage.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/netgroup-polito/un-orchestrator/HEAD/use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/build/AuthResponseMessage.class -------------------------------------------------------------------------------- /use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/WebContent/WEB-INF/classes/logging.properties: -------------------------------------------------------------------------------- 1 | org.apache.catalina.core.ContainerBase.[Catalina].level = INFO 2 | org.apache.catalina.core.ContainerBase.[Catalina].handlers = java.util.logging.ConsoleHandler 3 | 4 | -------------------------------------------------------------------------------- /use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/build/DeleteResponseMessage.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/netgroup-polito/un-orchestrator/HEAD/use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/build/DeleteResponseMessage.class -------------------------------------------------------------------------------- /use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/build/DeployResponseMessage.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/netgroup-polito/un-orchestrator/HEAD/use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/build/DeployResponseMessage.class -------------------------------------------------------------------------------- /use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/ImportedClasses/MessageWithIP.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/netgroup-polito/un-orchestrator/HEAD/use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/ImportedClasses/MessageWithIP.class -------------------------------------------------------------------------------- /use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/build/SessionIdentifierGenerator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/netgroup-polito/un-orchestrator/HEAD/use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/build/SessionIdentifierGenerator.class -------------------------------------------------------------------------------- /utils/ovs_utils/cleaner.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | #REMOVE BRDIGES 3 | sudo ovs-vsctl show | grep Bridge | awk {'print $2'} | cut -d '"' -f 2 | while read b ; do sudo ovs-vsctl del-br $b; done 4 | 5 | #REMOVE DOCKER 6 | sudo docker ps -a | awk {'print $1'} | while read d; do sudo docker rm -f $d; done 7 | 8 | -------------------------------------------------------------------------------- /use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/ImportedClasses/AuthResponseMessage.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/netgroup-polito/un-orchestrator/HEAD/use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/ImportedClasses/AuthResponseMessage.class -------------------------------------------------------------------------------- /use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/WebContent/WEB-INF/lib/httpcore-4.3.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/netgroup-polito/un-orchestrator/HEAD/use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/WebContent/WEB-INF/lib/httpcore-4.3.2.jar -------------------------------------------------------------------------------- /use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/WebContent/WEB-INF/lib/json-20140107.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/netgroup-polito/un-orchestrator/HEAD/use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/WebContent/WEB-INF/lib/json-20140107.jar -------------------------------------------------------------------------------- /use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/WebContent/resources/images/dead_frog.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/netgroup-polito/un-orchestrator/HEAD/use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/WebContent/resources/images/dead_frog.jpg -------------------------------------------------------------------------------- /use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/WebContent/resources/images/icons/psw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/netgroup-polito/un-orchestrator/HEAD/use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/WebContent/resources/images/icons/psw.png -------------------------------------------------------------------------------- /NFs/README.md: -------------------------------------------------------------------------------- 1 | # VNF Examples 2 | 3 | This folder contains some examples of Virtual Network Functions. 4 | Please check individual README's in each sub-package. 5 | 6 | An additional file, [README_LAUNCH_VNF.md](README_LAUNCH_VNF.md) describes the entire process required to create and launch a VNF in the UN. 7 | -------------------------------------------------------------------------------- /use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/WebContent/WEB-INF/lib/httpclient-4.3.4.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/netgroup-polito/un-orchestrator/HEAD/use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/WebContent/WEB-INF/lib/httpclient-4.3.4.jar -------------------------------------------------------------------------------- /use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/WebContent/resources/images/icons/email.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/netgroup-polito/un-orchestrator/HEAD/use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/WebContent/resources/images/icons/email.png -------------------------------------------------------------------------------- /use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/WebContent/resources/images/icons/user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/netgroup-polito/un-orchestrator/HEAD/use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/WebContent/resources/images/icons/user.png -------------------------------------------------------------------------------- /use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/WebContent/WEB-INF/lib/commons-codec-1.6.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/netgroup-polito/un-orchestrator/HEAD/use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/WebContent/WEB-INF/lib/commons-codec-1.6.jar -------------------------------------------------------------------------------- /use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/WebContent/resources/images/frog-jump-high.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/netgroup-polito/un-orchestrator/HEAD/use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/WebContent/resources/images/frog-jump-high.gif -------------------------------------------------------------------------------- /use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/WebContent/resources/images/icons/ic_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/netgroup-polito/un-orchestrator/HEAD/use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/WebContent/resources/images/icons/ic_left.png -------------------------------------------------------------------------------- /use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/WebContent/resources/images/icons/ic_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/netgroup-polito/un-orchestrator/HEAD/use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/WebContent/resources/images/icons/ic_right.png -------------------------------------------------------------------------------- /use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/WebContent/WEB-INF/lib/commons-logging-1.1.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/netgroup-polito/un-orchestrator/HEAD/use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/WebContent/WEB-INF/lib/commons-logging-1.1.3.jar -------------------------------------------------------------------------------- /use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/WebContent/resources/images/frog-background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/netgroup-polito/un-orchestrator/HEAD/use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/WebContent/resources/images/frog-background.jpg -------------------------------------------------------------------------------- /use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/WebContent/resources/images/icons/login-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/netgroup-polito/un-orchestrator/HEAD/use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/WebContent/resources/images/icons/login-icon.png -------------------------------------------------------------------------------- /use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/WebContent/resources/images/icons/newaccount.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/netgroup-polito/un-orchestrator/HEAD/use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/WebContent/resources/images/icons/newaccount.jpg -------------------------------------------------------------------------------- /use-cases/configuration-service/docker/dhcp_config/configuration_agent/dhcp_server_config/client.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Created on Dec 30, 2015 3 | 4 | @author: fabiomignini 5 | ''' 6 | class Client(object): 7 | def __init__(self, mac_address, ip_address): 8 | self.mac_address = mac_address 9 | self.ip_address = ip_address -------------------------------------------------------------------------------- /use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/WebContent/resources/images/icons/ajax-loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/netgroup-polito/un-orchestrator/HEAD/use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/WebContent/resources/images/icons/ajax-loader.gif -------------------------------------------------------------------------------- /use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/WebContent/resources/images/icons/login-icon2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/netgroup-polito/un-orchestrator/HEAD/use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/WebContent/resources/images/icons/login-icon2.png -------------------------------------------------------------------------------- /use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/WebContent/resources/images/icons/logout-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/netgroup-polito/un-orchestrator/HEAD/use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/WebContent/resources/images/icons/logout-icon.png -------------------------------------------------------------------------------- /use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/WebContent/resources/images/icons/artwork-pattern.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/netgroup-polito/un-orchestrator/HEAD/use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/WebContent/resources/images/icons/artwork-pattern.png -------------------------------------------------------------------------------- /orchestrator/node_resource_manager/graph/output_actions/output_action.cc: -------------------------------------------------------------------------------- 1 | #include "output_action.h" 2 | 3 | OutputAction::OutputAction(output_action_t type) 4 | { 5 | this->type=type; 6 | } 7 | 8 | OutputAction::~OutputAction() 9 | { 10 | 11 | } 12 | 13 | output_action_t OutputAction::getType() 14 | { 15 | return type; 16 | } -------------------------------------------------------------------------------- /use-cases/configuration-service/docker/nat_config/start_nat.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | #Assign the ip addresses dinamically 3 | ifconfig 4 | cp /sbin/dhclient /usr/sbin/dhclient && /usr/sbin/dhclient eth0 -v 5 | ifconfig 6 | 7 | iptables -t nat -A POSTROUTING -o eth2 -j MASQUERADE 8 | 9 | #while true 10 | #do 11 | # sleep 1 12 | #done 13 | -------------------------------------------------------------------------------- /use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/WebContent/resources/images/icons/message-boxes/error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/netgroup-polito/un-orchestrator/HEAD/use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/WebContent/resources/images/icons/message-boxes/error.png -------------------------------------------------------------------------------- /COPYRIGHT: -------------------------------------------------------------------------------- 1 | This Source Code Form is subject to the terms of the Mozilla Public 2 | License, v. 2.0. If a copy of the MPL was not distributed with this 3 | file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 | 5 | Copyright (c) 2014, Berlin Institute for Software Defined Networks 6 | GmbH (Germany), 2014-16 Politecnico di Torino (Italy) 7 | -------------------------------------------------------------------------------- /use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/WebContent/resources/images/icons/message-boxes/information.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/netgroup-polito/un-orchestrator/HEAD/use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/WebContent/resources/images/icons/message-boxes/information.png -------------------------------------------------------------------------------- /use-cases/configuration-service/docker/dhcp/default.conf: -------------------------------------------------------------------------------- 1 | no-hosts 2 | no-resolv 3 | strict-order 4 | domain-needed 5 | bogus-priv 6 | resolv-file=/etc/resolv.conf 7 | dhcp-range=10.0.0.10,10.0.0.100,255.255.255.0,12h 8 | dhcp-option=3,10.0.0.2 9 | dhcp-option=6,8.8.8.8 10 | dhcp-option=15,dhcp.server.lan 11 | interface=eth0 12 | bind-interfaces 13 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | Ivano Cerrato 2 | Fulvio Risso 3 | Roberto Bonafiglia 4 | Francesco Benforte 5 | Giuseppe Piscopo 6 | Federica Li Muti 7 | Patrick Tomassone 8 | Stefano Petrangeli 9 | Mauricio Vasquez 10 | Fabio Mignini 11 | David Verbeiren 12 | Sergio Nuccio 13 | Alessio Viola 14 | Ennio Gurgone 15 | Davide Pezzolla 16 | Renato Carella 17 | Alessandro Patti 18 | -------------------------------------------------------------------------------- /use-cases/configuration-service/docker/nat_config/configuration_agent/nat_config/default_configuration_1eth.json: -------------------------------------------------------------------------------- 1 | { 2 | "config-nat:interfaces": { 3 | "ifEntry": [ 4 | { 5 | "name": "eth0", 6 | "address": "10.0.0.30", 7 | "configurationType": "static", 8 | "type": "lan", 9 | "default_gw": "" 10 | } 11 | ] 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /orchestrator/node_resource_manager/configuration_agent/constants.h: -------------------------------------------------------------------------------- 1 | #ifndef PROJECT_CONSTANTS_H 2 | #define PROJECT_CONSTANTS_H 3 | 4 | /** 5 | * @brief: paths of the bash scripts exploited by the plugin 6 | */ 7 | #define SET_DEFAULT_GATEWAY "./node_resource_manager/configuration_agent/scripts/set_default_gateway.sh" 8 | 9 | 10 | #endif //PROJECT_CONSTANTS_H 11 | -------------------------------------------------------------------------------- /use-cases/frog/isp_data_center/isp_graph/dhcp_isp/default.conf: -------------------------------------------------------------------------------- 1 | no-hosts 2 | no-resolv 3 | strict-order 4 | domain-needed 5 | bogus-priv 6 | resolv-file=/etc/resolv.conf 7 | dhcp-range=192.168.4.20,192.168.4.250,255.255.255.0,12h 8 | dhcp-option=3,192.168.4.254 9 | dhcp-option=6,8.8.8.8 10 | dhcp-option=15,dhcp.server.lan 11 | interface=eth0 12 | bind-interfaces 13 | -------------------------------------------------------------------------------- /NFs/docker/nat/start.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | #This gives time to the UN to configure the network namespace of the container 4 | sleep 3 5 | 6 | #Assign the ip addresses dinamically 7 | cp /sbin/dhclient /usr/sbin/dhclient && /usr/sbin/dhclient eth0 -v && /usr/sbin/dhclient eth1 -v 8 | 9 | ifconfig 10 | 11 | iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE 12 | -------------------------------------------------------------------------------- /orchestrator/node_resource_manager/interface_manager/scripts/set_mac_address.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #$1 name of the interface 4 | #$2 mac address 5 | 6 | if (( $EUID != 0 )) 7 | then 8 | echo "[$0] This script must be executed with ROOT privileges" 9 | exit 0 10 | fi 11 | 12 | echo "ifconfig $1 hw ether $2" 13 | ifconfig $1 hw ether $2 14 | 15 | exit 1 16 | -------------------------------------------------------------------------------- /use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/WebContent/WEB-INF/captive_portal.properties: -------------------------------------------------------------------------------- 1 | captive_portal_ip = 192.168.4.3 2 | keystone_ip = keystone 3 | keystone_port = 35357 4 | controller_ip = 192.168.4.4 5 | controller_port = 6666 6 | orchestrator_ip = 10.0.0.1 7 | orchestrator_port = 8000 8 | orchestrator_servicepath = /service-layer 9 | -------------------------------------------------------------------------------- /NFs/docker/firewall/start.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | #To change the rules of the firewall, edit the next rows and/or add new rows 4 | brctl addbr br0 5 | brctl addif br0 eth0 6 | brctl addif br0 eth1 7 | ifconfig br0 up 8 | 9 | brctl show br0 10 | 11 | iptables -I FORWARD -m physdev --physdev-in eth0 --physdev-out eth1 -d 8.8.8.8 -j DROP 12 | 13 | echo "Firewall started" 14 | -------------------------------------------------------------------------------- /use-cases/frog/isp_data_center/authentication_graph/controller-openflow/controller.conf: -------------------------------------------------------------------------------- 1 | [my_infos] 2 | ip = 192.168.4.4 3 | tcp_port = 6666 4 | not_user_ports = 1 2 3 5 | 6 | [captive_portal_infos] 7 | ip = 192.168.4.3 8 | tcp_port = 80 9 | mac_address = 16:f0:9b:3e:44:c4 10 | switch_port = 1 11 | 12 | [log] 13 | log_file = log.txt 14 | verbose = true 15 | debug = false 16 | -------------------------------------------------------------------------------- /use-cases/configuration-service/docker/nat_config/configuration_agent/nat_config/nat_agent.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Created on Dec 28, 2015 3 | 4 | @author: fabiomignini 5 | ''' 6 | import logging 7 | 8 | from configuration_agent.agent import ConfigurationAgent 9 | from configuration_agent.nat_config.nat import Nat 10 | 11 | logging.basicConfig(level=logging.DEBUG) 12 | ConfigurationAgent(Nat()) -------------------------------------------------------------------------------- /use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/WebContent/META-INF/maven/polito/captive_portal/pom.properties: -------------------------------------------------------------------------------- 1 | #Generated by Maven Integration for Eclipse 2 | #Thu Jul 10 11:30:25 CEST 2014 3 | version=0.0.1-SNAPSHOT 4 | groupId=polito 5 | m2e.projectName=captive_portal 6 | m2e.projectLocation=/home/frog/workspace/captive_portal 7 | artifactId=captive_portal 8 | -------------------------------------------------------------------------------- /orchestrator/compute_controller/plugins/native/capability.cc: -------------------------------------------------------------------------------- 1 | #include "capability.h" 2 | 3 | Capability::Capability(std::string name, std::string path, captype_t type) 4 | : name(name), path(path), type(type) {} 5 | 6 | Capability::~Capability() {} 7 | 8 | std::string Capability::getName(){ 9 | return name; 10 | } 11 | 12 | std::string Capability::getPath(){ 13 | return path; 14 | } 15 | -------------------------------------------------------------------------------- /use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/src/SessionIdentifierGenerator.java: -------------------------------------------------------------------------------- 1 | import java.math.BigInteger; 2 | import java.security.SecureRandom; 3 | 4 | public final class SessionIdentifierGenerator { 5 | private SecureRandom random = new SecureRandom(); 6 | 7 | public String nextSessionId() { 8 | return new BigInteger(130, random).toString(32); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /orchestrator/compute_controller/nfs_manager.cc: -------------------------------------------------------------------------------- 1 | #include "nfs_manager.h" 2 | 3 | void NFsManager::setDescription(Description *description) 4 | { 5 | this->description = description; 6 | } 7 | 8 | nf_t NFsManager::getNFType() 9 | { 10 | return description->getTemplate()->getVnfType(); 11 | } 12 | 13 | string NFsManager::getCores() 14 | { 15 | return ""; 16 | } 17 | 18 | NFsManager::~NFsManager(){ 19 | 20 | } 21 | -------------------------------------------------------------------------------- /use-cases/configuration-service/docker/dhcp_config/a-keys.json: -------------------------------------------------------------------------------- 1 | { 2 | "hash": "0289930e584807661b5b35157972cb447cfdbe98cb2da8e1991dfaf0fb962727", 3 | "publicpubkey": "DnLZtAhN4JMucaSeuHuvVh3gMSKiuEcYweo4wr3dRGk=", 4 | "ddpubkey": "fgR9xeKZT5HZAbwtvLR8858gRuITL06BA4yv1+YKKR4=", 5 | "privkey": "/3P77s24Q2CWEIni1w91qi+nWA2GT8zPyntjeWEDSCY=", 6 | "pubkey": "AomTDlhIB2YbWzUVeXLLRHz9vpjLLajhmR368PuWJyc=" 7 | } 8 | -------------------------------------------------------------------------------- /use-cases/configuration-service/docker/dhcp_config/b-keys.json: -------------------------------------------------------------------------------- 1 | { 2 | "hash": "bdb55b1ca232777085b6c6fb5199638a7f681022d935701c545994616df2aa15", 3 | "publicpubkey": "DnLZtAhN4JMucaSeuHuvVh3gMSKiuEcYweo4wr3dRGk=", 4 | "ddpubkey": "fgR9xeKZT5HZAbwtvLR8858gRuITL06BA4yv1+YKKR4=", 5 | "privkey": "M3kN+BkH/aYl7Xk+HJ3xz1tdfjO30wb2nRowPJ7XyRk=", 6 | "pubkey": "vbVbHKIyd3CFtsb7UZljin9oECLZNXAcVFmUYW3yqhU=" 7 | } 8 | -------------------------------------------------------------------------------- /use-cases/configuration-service/docker/dhcp_config/configuration_agent/dhcp_server_config/dhcp_server_agent.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Created on Dec 28, 2015 3 | 4 | @author: fabiomignini 5 | ''' 6 | import logging 7 | 8 | from configuration_agent.agent import ConfigurationAgent 9 | from configuration_agent.dhcp_server_config.dhcp_server import Dhcp 10 | 11 | logging.basicConfig(level=logging.DEBUG) 12 | ConfigurationAgent(Dhcp()) -------------------------------------------------------------------------------- /use-cases/configuration-service/docker/nat_config/a-keys.json: -------------------------------------------------------------------------------- 1 | { 2 | "hash": "0289930e584807661b5b35157972cb447cfdbe98cb2da8e1991dfaf0fb962727", 3 | "publicpubkey": "DnLZtAhN4JMucaSeuHuvVh3gMSKiuEcYweo4wr3dRGk=", 4 | "ddpubkey": "fgR9xeKZT5HZAbwtvLR8858gRuITL06BA4yv1+YKKR4=", 5 | "privkey": "/3P77s24Q2CWEIni1w91qi+nWA2GT8zPyntjeWEDSCY=", 6 | "pubkey": "AomTDlhIB2YbWzUVeXLLRHz9vpjLLajhmR368PuWJyc=" 7 | } 8 | -------------------------------------------------------------------------------- /use-cases/configuration-service/docker/nat_config/b-keys.json: -------------------------------------------------------------------------------- 1 | { 2 | "hash": "bdb55b1ca232777085b6c6fb5199638a7f681022d935701c545994616df2aa15", 3 | "publicpubkey": "DnLZtAhN4JMucaSeuHuvVh3gMSKiuEcYweo4wr3dRGk=", 4 | "ddpubkey": "fgR9xeKZT5HZAbwtvLR8858gRuITL06BA4yv1+YKKR4=", 5 | "privkey": "M3kN+BkH/aYl7Xk+HJ3xz1tdfjO30wb2nRowPJ7XyRk=", 6 | "pubkey": "vbVbHKIyd3CFtsb7UZljin9oECLZNXAcVFmUYW3yqhU=" 7 | } 8 | -------------------------------------------------------------------------------- /NFs/docker/example/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu 2 | MAINTAINER Politecnico di Torino 3 | 4 | RUN apt-get update 5 | RUN apt-get install -y libpcap-dev 6 | RUN apt-get install -y build-essential cmake 7 | 8 | RUN mkdir example 9 | ADD example.c example/example.c 10 | ADD CMakeLists.txt example/CMakeLists.txt 11 | #RUN gcc example.c -lpcap -o example 12 | RUN cd example && cmake . && make 13 | 14 | CMD ./example/example 15 | -------------------------------------------------------------------------------- /use-cases/frog/isp_data_center/authentication_graph/controller-openflow/client_mac.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | while : ; do 3 | [[ -f "./mac" ]] && break 4 | wget 192.168.4.3:81/mac 5 | sleep 1 6 | done 7 | 8 | mac=`wget -S -O - 192.168.4.3:81/mac | grep : | awk '{print $3}'` 9 | cd /controller 10 | cat controller.conf | sed s/16:f0:9b:3e:44:c4/$mac/ > controller_new.conf 11 | mv controller_new.conf controller.conf 12 | -------------------------------------------------------------------------------- /use-cases/frog/isp_data_center/authentication_graph/captive_portal/start_cp.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | #Set the address of the captive portal 4 | 5 | ifconfig eth0 192.168.4.3/24 up 6 | route add default gw 192.168.4.254 7 | 8 | #start the takeMac service 9 | cd /opt/TakeMac 10 | 11 | gunicorn -b 192.168.4.3:81 main:app -t 100 & 12 | 13 | #Start the captive portal 14 | service tomcat7 start 15 | echo "Captive portal started" 16 | -------------------------------------------------------------------------------- /use-cases/configuration-service/docker/dhcp/start_dhcp.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | #useful link: 3 | # http://www.cyberciti.biz/faq/howto-debian-ubutnu-set-default-gateway-ipaddress/ 4 | 5 | #Assign the ip address to the port usd by the dhcp server 6 | ifconfig eth0 10.0.0.1/24 7 | 8 | #start the DHCP server 9 | service dnsmasq start 10 | echo "DHCP service started" 11 | 12 | #start the SSH server 13 | #service ssh start 14 | #echo "ssh service started" 15 | -------------------------------------------------------------------------------- /use-cases/frog/isp_data_center/isp_graph/dhcp_isp/start_dhcp.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | #useful link: 3 | # http://www.cyberciti.biz/faq/howto-debian-ubutnu-set-default-gateway-ipaddress/ 4 | 5 | #Assign the ip address to the port usd by the dhcp server 6 | ifconfig eth0 192.168.4.2/24 7 | 8 | #start the DHCP server 9 | service dnsmasq start 10 | echo "DHCP service started" 11 | 12 | #start the SSH server 13 | #service ssh start 14 | #echo "ssh service started" 15 | -------------------------------------------------------------------------------- /use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/.settings/org.eclipse.wst.common.project.facet.core.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 4 | org.eclipse.jdt.core.compiler.compliance=1.7 5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 6 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 7 | org.eclipse.jdt.core.compiler.source=1.7 8 | -------------------------------------------------------------------------------- /orchestrator/compute_controller/plugins/dpdk/dpdk_constants.h: -------------------------------------------------------------------------------- 1 | #ifndef DPDK_CONSTANTS_H_ 2 | #define DPDK_CONSTANTS_H_ 1 3 | 4 | #define DPDK_MODULE_NAME "DPDK-Process-Manager" 5 | 6 | /** 7 | * @brief: paths of the bash scripts used to manage DPDK 8 | */ 9 | #define RUN_DPDK_NF "./compute_controller/plugins/dpdk/scripts/RunNF.sh" 10 | #define STOP_DPDK_NF "./compute_controller/plugins/dpdk/scripts/stopNF.sh" 11 | 12 | #define NUM_MEMORY_CHANNELS 2 13 | 14 | #endif //DPDK_CONSTANTS_H_ 15 | -------------------------------------------------------------------------------- /utils/travis-ci/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -ev # print every line before executing it and exit if one command fails 4 | 5 | # build name resolver and orchestrator 6 | cmake -DCMAKE_BUILD_TYPE=Release \ 7 | -DENABLE_KVM=$KVM -DENABLE_DOCKER=$DOCKER \ 8 | -DENABLE_NATIVE=$NATIVE \ 9 | -DENABLE_DPDK_PROCESSES=$DPDK \ 10 | -DVSWITCH_IMPLEMENTATION=$VSWITCH \ 11 | -DENABLE_DOUBLE_DECKER_CONNECTION=$DD \ 12 | -DENABLE_RESOURCE_MANAGER=$DD \ 13 | -DBUILD_ExternalProjects=OFF . 14 | 15 | make -j2 16 | -------------------------------------------------------------------------------- /orchestrator/network_controller/switch_manager/plugins/ovs-ovsdb/scripts/destroy_ip_link_tunnel.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #Author: Francesco Benforte 4 | #Date: 2016-10-05 5 | #Brief: Destroy tunnel interface using the command "ip link" 6 | 7 | #$1 name of the port 8 | 9 | if (( $EUID != 0 )) 10 | then 11 | echo "[$0] This script must be executed with ROOT privileges" 12 | exit 0 13 | fi 14 | 15 | echo "[$0] Destroying tunnel interface $1" 16 | 17 | ip link delete $1 &> /dev/null 18 | 19 | exit 1 20 | -------------------------------------------------------------------------------- /orchestrator/network_controller/switch_manager/plugins/erfs/constants.h: -------------------------------------------------------------------------------- 1 | #ifndef ERFS_CONSTANTS_H_ 2 | #define ERFS_CONSTANTS_H_ 1 3 | 4 | /** 5 | * @brief: Scripts to manage OVS bridges 6 | */ 7 | #define CMD_CREATE_LSI "./network_controller/switch_manager/plugins/erfs/scripts/createLSI.sh" 8 | #define CMD_ADD_PORT "./network_controller/switch_manager/plugins/erfs/scripts/addPort.sh" 9 | #define CMD_VIRTUAL_LINK "./network_controller/switch_manager/plugins/erfs/scripts/connectLSIs.sh" 10 | 11 | #endif //ERFS_CONSTANTS_H 12 | -------------------------------------------------------------------------------- /use-cases/frog/fat_cpe/firewall_client2/start.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | brctl addbr br0 4 | brctl addif br0 eth0 5 | brctl addif br0 eth1 6 | ifconfig br0 up 7 | 8 | #block packets to www.repubblica.it 9 | iptables -I FORWARD -m physdev --physdev-in eth0 --physdev-out eth1 -d 213.92.16.171 -j DROP 10 | iptables -I FORWARD -m physdev --physdev-in eth0 --physdev-out eth1 -d 213.92.16.191 -j DROP 11 | iptables -I FORWARD -m physdev --physdev-in eth0 --physdev-out eth1 -d 213.92.16.101 -j DROP 12 | 13 | echo "Firewall started" 14 | -------------------------------------------------------------------------------- /use-cases/configuration-service/docker/nat_config/configuration_agent/nat_config/default_configuration.json: -------------------------------------------------------------------------------- 1 | { 2 | "config-nat:interfaces": { 3 | "ifEntry": [ 4 | { 5 | "name": "eth1", 6 | "configurationType": "static", 7 | "type": "lan", 8 | "address": "192.168.1.1", 9 | "default_gw": "12.0.0.1" 10 | }, 11 | { 12 | "name": "eth2", 13 | "address": "12.0.0.2", 14 | "configurationType": "static", 15 | "type": "wan", 16 | "default_gw": "12.0.0.1" 17 | } 18 | ] 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /utils/ovs_utils/README.md: -------------------------------------------------------------------------------- 1 | This folder contains some scripts that automatize some annoying operations: 2 | 3 | * `start_ovs.sh`: start OvS and the associated data base. It is usefull at the 4 | boot of the UN 5 | * `cleaner.sh`: remove all the bridges created in OvS and the Docker containers. 6 | It is usefull in case the un-orchestrator crashes 7 | * `ovs_dump_flows.php` : has the same purpose of the command `ovs-ofctl dump-flows`, but uses interface names instead of interface numbers. Hence its output is more readable 8 | -------------------------------------------------------------------------------- /orchestrator/node_resource_manager/configuration_agent/scripts/set_default_gateway.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #$1 ip address for the default gateway 4 | 5 | if (( $EUID != 0 )) 6 | then 7 | echo "[$0] This script must be executed with ROOT privileges" 8 | exit 0 9 | fi 10 | 11 | #check if a default gw already exists 12 | route -n | grep UG 13 | if [ $?==0 ] 14 | then 15 | echo "route del default" 16 | route del default 17 | fi 18 | 19 | echo "route add default gw $1" 20 | route add default gw $1 21 | 22 | exit $? 23 | -------------------------------------------------------------------------------- /orchestrator/compute_controller/port_technology.h: -------------------------------------------------------------------------------- 1 | #ifndef PORT_TECHNOLOGY_H 2 | #define PORT_TECHNOLOGY_H 3 | enum PortTechnology { 4 | INVALID_PORT = -1, 5 | UNDEFINED_PORT = 0, 6 | //Ports used for virtual machines 7 | USVHOST_PORT, //user space vhost port 8 | IVSHMEM_PORT, //ivshmem port 9 | VHOST_PORT, //(in kernel) vhost port 10 | //Ports used fro Docker containers 11 | VETH_PORT, //veth pair port 12 | //Ports used for DPDK processes executed in the host 13 | DPDKR_PORT //dpdkr port 14 | }; 15 | 16 | 17 | #endif -------------------------------------------------------------------------------- /contrib/OpenWrt/package/librofl/patches/003-execinfo.patch: -------------------------------------------------------------------------------- 1 | Index: librofl-0.11.1/examples/ethswctld/cunixenv.h 2 | =================================================================== 3 | --- librofl-0.11.1.orig/examples/ethswctld/cunixenv.h 2017-05-30 00:53:45.000000000 +0200 4 | +++ librofl-0.11.1/examples/ethswctld/cunixenv.h 2017-05-30 01:56:34.722030999 +0200 5 | @@ -6,7 +6,6 @@ 6 | #define CUNIXENV_H 1 7 | 8 | #include 9 | -#include 10 | #include 11 | #include 12 | #include 13 | -------------------------------------------------------------------------------- /contrib/OpenWrt/package/doubledecker/patches/001-execinfo.patch: -------------------------------------------------------------------------------- 1 | Index: DoubleDecker-0.4/include/dd_classes.h 2 | =================================================================== 3 | --- DoubleDecker-0.4.orig/include/dd_classes.h 2017-05-06 12:20:39.901316000 +0200 4 | +++ DoubleDecker-0.4/include/dd_classes.h 2017-05-06 12:21:11.833316000 +0200 5 | @@ -9,7 +9,7 @@ 6 | #include 7 | #include 8 | #include 9 | -#include 10 | +//#include 11 | #include 12 | #include 13 | #include 14 | -------------------------------------------------------------------------------- /use-cases/frog/isp_data_center/isp_graph/nat_isp/start_nat.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | #useful link: 4 | # http://www.cyberciti.biz/faq/howto-debian-ubutnu-set-default-gateway-ipaddress/ 5 | 6 | #Assign the ip address to user port 7 | ifconfig eth1 192.168.4.254/24 8 | #Assign the ip address to wan port using the dhcp server 9 | cp /sbin/dhclient /usr/sbin/dhclient && /usr/sbin/dhclient eth0 -v 10 | 11 | #start the SSH server 12 | #service ssh start 13 | #echo "ssh service started" 14 | 15 | iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE 16 | 17 | ifconfig 18 | -------------------------------------------------------------------------------- /orchestrator/network_controller/switch_manager/plugins/ovs-ovsdb/scripts/prep_usvhost.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #Author: UNIFY Consortium 4 | #Date: 2015-01-18 5 | #Brief: Prepare for a usvhost port creation 6 | 7 | #$1 full port name as will be created in OVS 8 | 9 | socket_path="/usr/local/var/run/openvswitch/" 10 | 11 | port="$1" 12 | 13 | if (( $EUID != 0 )) 14 | then 15 | echo "[$0] This script must be executed with ROOT privileges" 16 | exit 0 17 | fi 18 | 19 | echo "Cleaning up socket for USVHOST port $port" 20 | 21 | rm -f "$socket_path/$port" 22 | exit 1 23 | -------------------------------------------------------------------------------- /orchestrator/node_resource_manager/graph_manager/virtual_link.cc: -------------------------------------------------------------------------------- 1 | #include "virtual_link.h" 2 | 3 | uint64_t VLink::nextID = 0; 4 | 5 | VLink::VLink(uint64_t remote_dpid) : 6 | remote_dpid(remote_dpid), local_id(0), remote_id(0) 7 | { 8 | ID = nextID; 9 | nextID++; 10 | } 11 | 12 | uint64_t VLink::getRemoteDpid() 13 | { 14 | return remote_dpid; 15 | } 16 | 17 | unsigned int VLink::getLocalID() 18 | { 19 | return local_id; 20 | } 21 | unsigned int VLink::getRemoteID() 22 | { 23 | return remote_id; 24 | } 25 | 26 | uint64_t VLink::getID() 27 | { 28 | return ID; 29 | } 30 | -------------------------------------------------------------------------------- /orchestrator/node_resource_manager/interface_manager/scripts/set_ip_address.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #$1 name of the interface 4 | #$2 configuration type 5 | #$3 ip address (for static configuration) 6 | 7 | if (( $EUID != 0 )) 8 | then 9 | echo "[$0] This script must be executed with ROOT privileges" 10 | exit 0 11 | fi 12 | 13 | case "$2" in 14 | "DHCP") 15 | echo "dhclient $1 -v" 16 | dhclient $1 -v 17 | ;; 18 | "static") 19 | echo "ifconfig $1 $3" 20 | ifconfig $1 $3 21 | ;; 22 | esac 23 | 24 | ip link set $1 up 25 | 26 | exit 1 27 | -------------------------------------------------------------------------------- /orchestrator/compute_controller/plugins/dpdk/dpdk.h: -------------------------------------------------------------------------------- 1 | #ifndef DPDK_H_ 2 | #define DPDK_H_ 1 3 | 4 | #pragma once 5 | 6 | #include "../../nfs_manager.h" 7 | #include "dpdk_constants.h" 8 | 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | using namespace std; 15 | 16 | class Dpdk : public NFsManager 17 | { 18 | public: 19 | 20 | bool isSupported(Description&); 21 | 22 | 23 | bool startNF(StartNFIn sni); 24 | bool stopNF(StopNFIn sni); 25 | bool updateNF(UpdateNFIn uni); 26 | 27 | string getCores(); 28 | }; 29 | 30 | #endif //DPDK_H_ 31 | -------------------------------------------------------------------------------- /use-cases/configuration-service/docker/dhcp_config/start_dhcp.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | #useful link: 3 | # http://www.cyberciti.biz/faq/howto-debian-ubutnu-set-default-gateway-ipaddress/ 4 | 5 | #start the DHCP server 6 | 7 | ifconfig 8 | cp /sbin/dhclient /usr/sbin/dhclient && /usr/sbin/dhclient eth0 -v 9 | ifconfig 10 | 11 | service dnsmasq start 12 | echo "DHCP service started" 13 | 14 | ifconfig 15 | 16 | #start the SSH server 17 | #service ssh start 18 | #echo "ssh service started" 19 | 20 | #Keep the container alive 21 | #while true 22 | #do 23 | # sleep 100 24 | #done 25 | 26 | -------------------------------------------------------------------------------- /contrib/OpenWrt/package/un-orchestrator/patches/001-execinfo.patch: -------------------------------------------------------------------------------- 1 | Index: un-orchestrator-1.0.0/orchestrator/node_orchestrator.cc 2 | =================================================================== 3 | --- un-orchestrator-1.0.0.orig/orchestrator/node_orchestrator.cc 2016-09-21 12:55:12.000000000 +0200 4 | +++ un-orchestrator-1.0.0/orchestrator/node_orchestrator.cc 2016-09-21 15:38:15.063778898 +0200 5 | @@ -24,7 +24,6 @@ 6 | #include 7 | 8 | #include 9 | -#include 10 | #include 11 | #include 12 | #ifdef __x86_64__ 13 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "virtualizer/un_native_nffg_library"] 2 | path = virtualizer/un_native_nffg_library 3 | url = https://github.com/netgroup-polito/nffg-library.git 4 | [submodule "GUI"] 5 | path = GUI 6 | url = https://github.com/netgroup-polito/fg-gui 7 | [submodule "use-cases/frog/isp_data_center/authentication_graph/controller-openflow/pox"] 8 | path = use-cases/frog/isp_data_center/authentication_graph/controller-openflow/pox 9 | url = https://github.com/noxrepo/pox.git 10 | [submodule "datastore"] 11 | path = datastore 12 | url = https://github.com/netgroup-polito/frog4-datastore 13 | -------------------------------------------------------------------------------- /contrib/OpenWrt/package/librofl/patches/004-thread_name.patch: -------------------------------------------------------------------------------- 1 | Index: librofl-0.11.1/src/rofl/common/cthread.cpp 2 | =================================================================== 3 | --- librofl-0.11.1.orig/src/rofl/common/cthread.cpp 2017-05-30 04:04:23.000000000 +0200 4 | +++ librofl-0.11.1/src/rofl/common/cthread.cpp 2017-05-30 18:47:51.798173999 +0200 5 | @@ -332,8 +332,6 @@ 6 | __LINE__); 7 | } 8 | 9 | - if (thread_name.length() && thread_name.length() < 16) 10 | - pthread_setname_np(tid, thread_name.c_str()); 11 | 12 | state = STATE_RUNNING; 13 | -------------------------------------------------------------------------------- /use-cases/frog/isp_data_center/authentication_graph/controller-openflow/README-FROG4.md: -------------------------------------------------------------------------------- 1 | # POX Controller - IP_forger module 2 | 3 | The source files of the implemented module are located in the "ext" directory. In particular 4 | - ext/IP_forger.py: is the main module 5 | - ext/Config.py: is a utily class used for read configuration paramenters 6 | 7 | The configuration file is named "controller.conf" and it is placed in the root directory, where the "pox.py" file is located. 8 | 9 | ### Execution 10 | To run the controller with the module type: 11 | ```sh 12 | $ ./pox.py IP_forger 13 | ``` 14 | -------------------------------------------------------------------------------- /orchestrator/compute_controller/plugins/docker/docker_constants.h: -------------------------------------------------------------------------------- 1 | #ifndef DOCKER_CONSTANTS_H_ 2 | #define DOCKER_CONSTANTS_H_ 1 3 | 4 | /** 5 | * @brief: paths of the bash scripts used to manage dockers 6 | */ 7 | #define CHECK_DOCKER "./compute_controller/plugins/docker/scripts/checkDockerRun.sh" 8 | #define PULL_AND_RUN_DOCKER_NF "./compute_controller/plugins/docker/scripts/pullAndRunNF.sh" 9 | #define STOP_DOCKER_NF "./compute_controller/plugins/docker/scripts/stopNF.sh" 10 | #define HOTPLUG_DOCKER_NF "./compute_controller/plugins/docker/scripts/hotplugNF.sh" 11 | 12 | #endif //DOCKER_CONSTANTS_H_ 13 | -------------------------------------------------------------------------------- /NFs/native/dhcp/stop: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #Author: Roberto Bonafiglia 4 | # 5 | 6 | #command line: 7 | # sudo ./start $1 $2 $3 $4 $5 8 | 9 | #dependencies: strongswan 10 | 11 | #$1 LSI ID (e.g., 2) 12 | #$2 NF name (e.g., firewall) 13 | #$3 number_of_ports (it is supposed to be 2 for this NF) 14 | #$4 and $5 names of port1 and port2 respectively (e.g., vEth0 vEth1) 15 | 16 | if (( $EUID != 0 )) 17 | then 18 | echo "[nativeNF_example_start] This script must be executed with ROOT privileges" 19 | exit 0 20 | fi 21 | 22 | 23 | 24 | namespace_name=$1_$2_ns 25 | 26 | exit 1 27 | -------------------------------------------------------------------------------- /use-cases/configuration-service/docker/switch/start.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | #start the ssh server 4 | 5 | #start ovs 6 | 7 | #FIXME: put the two next commands in the Dockerfile? 8 | if [ ! -d /dev/net ]; then 9 | su -c "mkdir -p /dev/net" 10 | fi 11 | 12 | if [ ! -c /dev/net/tun ]; then 13 | su -c "mknod /dev/net/tun c 10 200" 14 | fi 15 | 16 | ovsdb-server --remote=punix:/usr/local/var/run/openvswitch/db.sock \ 17 | --remote=db:Open_vSwitch,Open_vSwitch,manager_options --pidfile --detach 18 | 19 | ovs-vsctl --no-wait init 20 | ovs-vswitchd --pidfile --detach 21 | 22 | ./configure_ovs.sh start 23 | -------------------------------------------------------------------------------- /use-cases/frog/isp_data_center/isp_graph/switch/start.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | #start the ssh server 4 | 5 | #start ovs 6 | 7 | #FIXME: put the two next commands in the Dockerfile? 8 | if [ ! -d /dev/net ]; then 9 | su -c "mkdir -p /dev/net" 10 | fi 11 | 12 | if [ ! -c /dev/net/tun ]; then 13 | su -c "mknod /dev/net/tun c 10 200" 14 | fi 15 | 16 | ovsdb-server --remote=punix:/usr/local/var/run/openvswitch/db.sock \ 17 | --remote=db:Open_vSwitch,Open_vSwitch,manager_options --pidfile --detach 18 | 19 | ovs-vsctl --no-wait init 20 | ovs-vswitchd --pidfile --detach 21 | 22 | ./configure_ovs.sh start 23 | -------------------------------------------------------------------------------- /NFs/native/NAT/stop: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #Author: Roberto Bonafiglia 4 | # 5 | 6 | #command line: 7 | # sudo ./start $1 $2 $3 $4 $5 8 | 9 | #dependencies: strongswan 10 | 11 | #$1 LSI ID (e.g., 2) 12 | #$2 NF name (e.g., firewall) 13 | #$3 number_of_ports (it is supposed to be 2 for this NF) 14 | #$4 and $5 names of port1 and port2 respectively (e.g., vEth0 vEth1) 15 | 16 | if (( $EUID != 0 )) 17 | then 18 | echo "[nativeNF_example_start] This script must be executed with ROOT privileges" 19 | exit 0 20 | fi 21 | 22 | 23 | 24 | namespace_name=$1_$2_ns 25 | 26 | 27 | exit 1 28 | -------------------------------------------------------------------------------- /contrib/OpenWrt/package/librofl/patches/002-eventfd_function.patch: -------------------------------------------------------------------------------- 1 | Index: librofl-0.11.1/src/rofl/common/cthread.cpp 2 | =================================================================== 3 | --- librofl-0.11.1.orig/src/rofl/common/cthread.cpp 2017-05-30 00:53:45.000000000 +0200 4 | +++ librofl-0.11.1/src/rofl/common/cthread.cpp 2017-05-30 01:55:41.694030999 +0200 5 | @@ -30,7 +30,7 @@ 6 | } 7 | 8 | // eventfd 9 | - event_fd = eventfd(0, EFD_NONBLOCK); 10 | + event_fd = eventfd(0, 0); 11 | if (event_fd < 0) { 12 | throw eSysCall("eSysCall", "eventfd", __FILE__, __FUNCTION__, __LINE__); 13 | } 14 | -------------------------------------------------------------------------------- /use-cases/frog/fat_cpe/firewall_client1/start.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | brctl addbr br0 4 | brctl addif br0 eth0 5 | brctl addif br0 eth1 6 | ifconfig br0 up 7 | 8 | #block packets to www.lastampa.it 9 | iptables -I FORWARD -m physdev --physdev-in eth0 --physdev-out eth1 -d 107.154.127.10 -j DROP 10 | iptables -I FORWARD -m physdev --physdev-in eth0 --physdev-out eth1 -d 107.154.113.10 -j DROP 11 | iptables -I FORWARD -m physdev --physdev-in eth0 --physdev-out eth1 -d 107.154.115.10 -j DROP 12 | iptables -I FORWARD -m physdev --physdev-in eth0 --physdev-out eth1 -d 107.154.118.10 -j DROP 13 | 14 | echo "Firewall started" 15 | -------------------------------------------------------------------------------- /use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/.settings/org.eclipse.wst.common.component: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /NFs/native/bridge/stop: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #Author: Roberto Bonafiglia 4 | # 5 | 6 | #command line: 7 | # sudo ./start $1 $2 $3 $4 $5 8 | 9 | #dependencies: strongswan 10 | 11 | #$1 LSI ID (e.g., 2) 12 | #$2 NF name (e.g., firewall) 13 | #$3 number_of_ports (it is supposed to be 2 for this NF) 14 | #$4 and $5 names of port1 and port2 respectively (e.g., vEth0 vEth1) 15 | 16 | if (( $EUID != 0 )) 17 | then 18 | echo "[nativeNF_example_start] This script must be executed with ROOT privileges" 19 | exit 0 20 | fi 21 | 22 | 23 | 24 | namespace_name=$1_$2_ns 25 | 26 | brctl delbr br0 27 | exit 1 28 | -------------------------------------------------------------------------------- /orchestrator/compute_controller/template/port.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include "../port_technology.h" 4 | 5 | using namespace std; 6 | 7 | class TPort{ 8 | private: 9 | string portsRange; 10 | PortTechnology technology; 11 | 12 | public: 13 | TPort(); 14 | void setPortsRange(string portsRange); 15 | void setTechnology(PortTechnology technology); 16 | string getPortsRange(); 17 | PortTechnology getTechnology(); 18 | void splitPortsRangeInInt(int& begin, int& end); //it splits portsRange in integers,so i can add in a map each port with the appropriate technology through a loop 19 | 20 | }; 21 | 22 | -------------------------------------------------------------------------------- /use-cases/README.md: -------------------------------------------------------------------------------- 1 | # Universal Node Use Cases 2 | 3 | This folder contains the files required to demonstrate the UN in some real use cases. 4 | In particular, it includes: 5 | 6 | * the configuration files for the UN (orchestrator, name resolver, etc) 7 | * (possibly) all the VNFs, properly configured for that use case (e.g., through a Dockerfile) 8 | 9 | **Important**: those use cases may not work immediately in your network environment, e.g., because of a different physical setup (e.g., network interfaces available on the UN, IP addresses, etc). 10 | However, they represent an easier start to demonstrate the UN at work. 11 | -------------------------------------------------------------------------------- /NFs/dpdk/dpi/Makefile: -------------------------------------------------------------------------------- 1 | ifeq ($(RTE_SDK),) 2 | $(error "Please define RTE_SDK environment variable") 3 | endif 4 | 5 | include $(RTE_SDK)/mk/rte.vars.mk 6 | 7 | # binary name 8 | APP = dpi 9 | 10 | # all source are stored in SRCS-y 11 | SRCS-y := main.c init.c runtime.c 12 | 13 | CFLAGS += -O3 14 | CFLAGS += $(WERROR_FLAGS) 15 | 16 | #CFLAGS += -g 17 | 18 | #Uncomment the next line to enable the usage of the semaphore in the NF 19 | #CFLAGS += -DENABLE_SEMAPHORE 20 | 21 | #Uncomment the next line to enable the log in the NF 22 | CFLAGS += -DENABLE_LOG 23 | 24 | LDFLAGS += -lpcre 25 | 26 | include $(RTE_SDK)/mk/rte.extapp.mk 27 | 28 | -------------------------------------------------------------------------------- /orchestrator/compute_controller/plugins/docker/scripts/checkDockerRun.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #Author: Ivano Cerrato 4 | #Date: June 16th 2014 5 | #Brief: check if the Docker deamon is running on this machine 6 | # Docker should be started with the LXC implementation 7 | 8 | #command line: sudo ./checkDockerRun.sh 9 | 10 | if (( $EUID != 0 )) 11 | then 12 | echo "[$0] This script must be executed with ROOT privileges" 13 | exit 0 14 | fi 15 | 16 | num=`ps aux | grep "docker" | grep -v "grep" | wc -l` 17 | 18 | if [ $num -ge 1 ] 19 | then 20 | exit 1 21 | fi 22 | 23 | echo "[$0] Docker is not running" 24 | 25 | exit 0 26 | 27 | -------------------------------------------------------------------------------- /NFs/dpdk/example/Makefile: -------------------------------------------------------------------------------- 1 | ifeq ($(RTE_SDK),) 2 | $(error "Please define RTE_SDK environment variable") 3 | endif 4 | 5 | include $(RTE_SDK)/mk/rte.vars.mk 6 | 7 | # binary name 8 | APP = example 9 | 10 | # all source are stored in SRCS-y 11 | SRCS-y := main.c init.c runtime.c 12 | #control_connection.c sockutils.c 13 | 14 | CFLAGS += -O3 15 | CFLAGS += $(WERROR_FLAGS) 16 | 17 | #CFLAGS += -g 18 | 19 | #Uncomment the next line to enable the usage of the semaphore in the NF 20 | #CFLAGS += -DENABLE_SEMAPHORE 21 | 22 | #Uncomment the next line to enable the log in the NF 23 | #CFLAGS += -DENABLE_LOG 24 | 25 | include $(RTE_SDK)/mk/rte.extapp.mk 26 | 27 | -------------------------------------------------------------------------------- /utils/kvm_utils/who_own_this_mac.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ $# -ne 1 ] ; then 4 | echo "USAGE: $0 mac-address" 5 | echo "" 6 | echo "This script return the name of the VM that own the specified mac-address" 7 | exit 2 8 | fi 9 | 10 | MAC=$1 11 | 12 | [[ "$MAC" =~ ^([a-fA-F0-9]{2}:){5}[a-fA-F0-9]{2}$ ]] 13 | 14 | if [ $? -ne 0 ]; then 15 | echo "'$MAC' is not a valid mac-address" 16 | exit 3 17 | fi 18 | 19 | RET=1 20 | for l in $(virsh list --all | awk '{print $2}' | grep "_"); do 21 | virsh dumpxml $l | grep $1 >> /dev/null 22 | if [ $? -eq 0 ]; then 23 | echo "The VM '$l' owns the mac-address $1" 24 | RET=0 25 | fi 26 | done 27 | 28 | exit $RET 29 | -------------------------------------------------------------------------------- /virtualizer/config/universal-node-example.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /use-cases/frog/isp_data_center/isp_graph/nat_isp/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu 2 | MAINTAINER Politecnico di Torino 3 | 4 | RUN apt-get update && apt-get install -y ssh iptraf iptables 5 | 6 | #Prepare the ssh server 7 | 8 | RUN mkdir -p /var/run/sshd && \ 9 | mkdir -p /root/.ssh && \ 10 | echo 'root:root' | chpasswd 11 | 12 | RUN echo "UseDNS no" >> /etc/ssh/sshd_config 13 | RUN sed '/PermitRootLogin without-password/d' /etc/ssh/sshd_config > tmp_file && \ 14 | rm /etc/ssh/sshd_config && \ 15 | mv tmp_file /etc/ssh/sshd_config 16 | 17 | #Prepare the DHCP server 18 | ADD sysctl.conf /etc/sysctl.conf 19 | ADD ./start_nat.sh start.sh 20 | 21 | RUN chmod +x start.sh 22 | -------------------------------------------------------------------------------- /use-cases/frog/isp_data_center/isp_graph/dhcp_isp/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu 2 | MAINTAINER Politecnico di Torino 3 | 4 | RUN apt-get update && apt-get install -y dnsmasq ssh iptraf 5 | 6 | #Prepare the ssh server 7 | 8 | RUN mkdir -p /var/run/sshd && \ 9 | mkdir -p /root/.ssh && \ 10 | echo 'root:root' | chpasswd 11 | 12 | RUN echo "UseDNS no" >> /etc/ssh/sshd_config 13 | RUN sed '/PermitRootLogin without-password/d' /etc/ssh/sshd_config > tmp_file && \ 14 | rm /etc/ssh/sshd_config && \ 15 | mv tmp_file /etc/ssh/sshd_config 16 | 17 | #Prepare the DHCP server 18 | 19 | ADD default.conf /etc/dnsmasq.conf 20 | 21 | ADD start_dhcp.sh start.sh 22 | 23 | RUN chmod +x start.sh 24 | -------------------------------------------------------------------------------- /use-cases/configuration-service/docker/dhcp/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu 2 | MAINTAINER Politecnico di Torino 3 | 4 | RUN apt-get update && apt-get install -y dnsmasq ssh iptraf net-tools 5 | 6 | #Prepare the ssh server 7 | 8 | RUN mkdir -p /var/run/sshd && \ 9 | mkdir -p /root/.ssh && \ 10 | echo 'root:root' | chpasswd 11 | 12 | RUN echo "UseDNS no" >> /etc/ssh/sshd_config 13 | RUN sed '/PermitRootLogin without-password/d' /etc/ssh/sshd_config > tmp_file && \ 14 | rm /etc/ssh/sshd_config && \ 15 | mv tmp_file /etc/ssh/sshd_config 16 | 17 | #Prepare the DHCP server 18 | 19 | ADD default.conf /etc/dnsmasq.conf 20 | 21 | ADD start_dhcp.sh start.sh 22 | 23 | RUN chmod +x start.sh 24 | -------------------------------------------------------------------------------- /orchestrator/compute_controller/plugins/dpdk/scripts/stopNF.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | #Author: Ivano Cerrato 4 | #Date: June 26th 2014 5 | #Brief: stop a NF 6 | 7 | #command line: sudo ./stopNF.sh $1 $2 8 | 9 | #$1 LSI ID (e.g., 2) 10 | #$2 NF name (e.g., firewall) 11 | 12 | if (( $EUID != 0 )) 13 | then 14 | echo "[$0] This script must be executed with ROOT privileges" 15 | exit 0 16 | fi 17 | 18 | file="$1_$2" 19 | 20 | echo "[$0] Executing command: '"sudo kill -2 `cat $file | awk {'print $1'}`"'" 21 | 22 | sudo kill -2 `cat $file | awk {'print $1'}` 23 | 24 | sudo rm `cat $file | awk {'print $2'}` 25 | 26 | echo "[$0] DPDK NF stopped" 27 | 28 | rm $file 29 | 30 | exit 1 31 | -------------------------------------------------------------------------------- /use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/.settings/.jsdtscope: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /orchestrator/compute_controller/plugins/kvm-libvirt/libvirt_constants.h: -------------------------------------------------------------------------------- 1 | #ifndef LIBVIRT_CONSTANTS_H_ 2 | #define LIBVIRT_CONSTANTS_H_ 1 3 | 4 | #define KVM_MODULE_NAME "KVM-Manager" 5 | 6 | /* TODO - These should come from an orchestrator config file (curently, there is only one for the UN ports) */ 7 | static const char* QEMU_BIN_PATH = NULL; /* Can point to qemu bin or a wrapper script that tweaks the command line. If NULL, Libvirt default or path found in XML is used */ 8 | 9 | static const char* OVS_BASE_SOCK_PATH = "/usr/local/var/run/openvswitch/"; 10 | static const char* BASE_LIBVIRT_TEMPLATE="compute_controller/plugins/kvm-libvirt/template-base.xml"; 11 | #endif //LIBVIRT_CONSTANTS_H_ 12 | -------------------------------------------------------------------------------- /orchestrator/network_controller/switch_manager/plugins/xdpd/scripts/detachWirelessInterface.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #Author: Ivano Cerrato 4 | #Date: Aug 21th 2014 5 | #Brief: destroys a bridge 6 | 7 | #command line: 8 | # sudo ./graph_manager/scripts/detachWirelessInterface.sh 2 wlan0 9 | 10 | #$1 LSI ID (e.g., 2) 11 | #$2 port name (e.g., wlan0) 12 | 13 | if (( $EUID != 0 )) 14 | then 15 | echo "[$0] This script must be executed with ROOT privileges" 16 | exit 0 17 | fi 18 | 19 | bridgeName=`echo br_$1` 20 | bridgeName+=$2 21 | 22 | echo "[$0] Deleting the bridge $bridgeName" 23 | 24 | sudo ifconfig $bridgeName down 25 | sudo brctl delbr $bridgeName 26 | 27 | exit 1 28 | 29 | -------------------------------------------------------------------------------- /NFs/dpdk/dpi/init.h: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 | 5 | /** 6 | * @file init.h 7 | * @author Ivano Cerrato 8 | * 9 | * @brief Initialize the NF. 10 | */ 11 | 12 | #ifndef _INIT_H_ 13 | #define _INIT_H_ 1 14 | 15 | #pragma once 16 | 17 | #include 18 | #include 19 | 20 | #include 21 | #include 22 | 23 | #include "main.h" 24 | 25 | /** 26 | * @brief Initialize the NF 27 | */ 28 | int init(int argc, char *argv[]); 29 | 30 | #endif //_INIT_H_ 31 | -------------------------------------------------------------------------------- /NFs/dpdk/example/init.h: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 | 5 | /** 6 | * @file init.h 7 | * @author Ivano Cerrato 8 | * 9 | * @brief Initialize the NF. 10 | */ 11 | 12 | #ifndef _INIT_H_ 13 | #define _INIT_H_ 1 14 | 15 | #pragma once 16 | 17 | #include 18 | #include 19 | 20 | #include 21 | #include 22 | 23 | #include "main.h" 24 | 25 | /** 26 | * @brief Initialize the NF 27 | */ 28 | int init(int argc, char *argv[]); 29 | 30 | #endif //_INIT_H_ 31 | -------------------------------------------------------------------------------- /NFs/native/vpn_security/remote_setkey.conf: -------------------------------------------------------------------------------- 1 | ## configuration file for remote IPsec network function 2 | ## 3 | ## change ip addresses, encryption and keys in order to match the correponding 4 | ## in the setkey.conf file 5 | 6 | ## flush SAD and SPD 7 | flush; 8 | spdflush; 9 | 10 | ## add SAs in SAD 11 | add x.x.x.x y.y.y.y esp 0x1001 -m tunnel -u 100 -E aes-cbc 0xaa112233445566778811223344556677; 12 | add y.y.y.y x.x.x.x esp 0x2001 -m tunnel -u 101 -E aes-cbc 0xbb112233445566778811223344556677; 13 | 14 | # add SPs in SPD 15 | spdadd 10.0.1.0/24 10.0.2.0/24 any -P in ipsec esp/tunnel/x.x.x.x-y.y.y.y/unique:100; 16 | spdadd 10.0.2.0/24 10.0.1.0/24 any -P out ipsec esp/tunnel/y.y.y.y-x.x.x.x/unique:101; 17 | 18 | 19 | -------------------------------------------------------------------------------- /orchestrator/node_resource_manager/graph/high_level_graph/high_level_element_position.cc: -------------------------------------------------------------------------------- 1 | #include "high_level_element_position.h" 2 | 3 | namespace highlevel { 4 | 5 | Position::Position() { 6 | x = 0; 7 | y = 0; 8 | } 9 | 10 | int Position::getX() { 11 | return x; 12 | } 13 | 14 | int Position::getY() { 15 | return y; 16 | } 17 | 18 | void Position::setX(int x) { 19 | this->x = x; 20 | } 21 | 22 | void Position::setY(int y) { 23 | this->y = y; 24 | } 25 | 26 | Object Position::toJSON() { 27 | Object pos; 28 | pos[X_POSITION] = x; 29 | pos[Y_POSITION] = y; 30 | return pos; 31 | } 32 | 33 | } -------------------------------------------------------------------------------- /orchestrator/node_resource_manager/graph/high_level_graph/high_level_element_position.h: -------------------------------------------------------------------------------- 1 | #ifndef NODE_ORCHESTRATOR_POSITION_H 2 | #define NODE_ORCHESTRATOR_POSITION_H 3 | #include "../../../utils/constants.h" 4 | 5 | #include 6 | #include 7 | #include 8 | 9 | using namespace json_spirit; 10 | 11 | namespace highlevel { 12 | 13 | class Position { 14 | int x, y; 15 | public: 16 | Position(); 17 | 18 | int getX(); 19 | 20 | int getY(); 21 | 22 | void setX(int x); 23 | 24 | void setY(int y); 25 | 26 | Object toJSON(); 27 | }; 28 | } 29 | 30 | #endif //NODE_ORCHESTRATOR_POSITION_H 31 | -------------------------------------------------------------------------------- /virtualizer/exception.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Created on Apr 5, 2016 3 | 4 | @author: stefanopetrangeli 5 | ''' 6 | 7 | class ClientError(Exception): 8 | def __init__(self, message): 9 | self.message = message 10 | # Call the base class constructor with the parameters it needs 11 | super(ClientError, self).__init__(message) 12 | 13 | def get_mess(self): 14 | return self.message 15 | 16 | class ServerError(Exception): 17 | def __init__(self, message): 18 | self.message = message 19 | # Call the base class constructor with the parameters it needs 20 | super(ServerError, self).__init__(message) 21 | 22 | def get_mess(self): 23 | return self.message -------------------------------------------------------------------------------- /orchestrator/README.md: -------------------------------------------------------------------------------- 1 | ### Compile and run 2 | 3 | Some additional files are provided to compile and use the un-orchestrator: 4 | 5 | * [README_COMPILE.md](README_COMPILE.md): to compile the un-orchestrator 6 | * [README_RUN.md](README_RUN.md): to start the un-orchestrator 7 | * [README_NF-FG.md](README_NF-FG.md): description of the NF-FG formalism through examples 8 | * [README_RESTAPI.md](README_RESTAPI.md): some usage examples about the REST interface of 9 | the un-orchestrator 10 | * [README_security.md](README_security.md): description of the security features of the un-orchestrator 11 | * [README_orchestrator_mode.md](README_orchestrator_mode.md): description of the operation modes of the un-orchestrator 12 | -------------------------------------------------------------------------------- /orchestrator/node_resource_manager/resource_manager/resource_manager.h: -------------------------------------------------------------------------------- 1 | #ifndef RESOURCE_MANAGER_H_ 2 | #define RESOURCE_MANAGER_H_ 1 3 | 4 | #include "../pub_sub/pub_sub.h" 5 | #include "../../utils/logger.h" 6 | #include "../../utils/constants.h" 7 | 8 | class ResourceManager 9 | { 10 | /** 11 | * @brief: this class exports resources of the Universal Node, by means of the 12 | ** DoubleDecker client 13 | */ 14 | 15 | public: 16 | /** 17 | * @breif: Publish the domain information written in a specific file 18 | * 19 | * @param descr_file: file containing the descriptio of the domain to 20 | * be exported 21 | */ 22 | static void publishDescriptionFromFile(string descr_file); 23 | }; 24 | 25 | #endif // RESOURCE_MANAGER_H_ 26 | -------------------------------------------------------------------------------- /orchestrator/node_resource_manager/graph_manager/virtual_link.h: -------------------------------------------------------------------------------- 1 | #ifndef VIRTUAL_LINK_H_ 2 | #define VIRTUAL_LINK_H_ 1 3 | 4 | #pragma once 5 | 6 | #define __STDC_FORMAT_MACROS 7 | #include 8 | #include 9 | 10 | using namespace std; 11 | 12 | class VLink 13 | { 14 | friend class LSI; 15 | 16 | private: 17 | //FIXME: protect it with a mutex? 18 | static uint64_t nextID; 19 | 20 | uint64_t ID; 21 | 22 | protected: 23 | uint64_t remote_dpid; 24 | unsigned int local_id; 25 | unsigned int remote_id; 26 | 27 | public: 28 | VLink(uint64_t remote_dpid); 29 | uint64_t getRemoteDpid(); 30 | unsigned int getLocalID(); 31 | unsigned int getRemoteID(); 32 | uint64_t getID(); 33 | 34 | }; 35 | 36 | #endif //VIRTUAL_LINK_H_ 37 | -------------------------------------------------------------------------------- /orchestrator/node_resource_manager/rest_server/x-auth-token-header.h: -------------------------------------------------------------------------------- 1 | #ifndef X_AUTH_TOKEN_H_ 2 | #define X_AUTH_TOKEN_H_ 1 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | 9 | using namespace Pistache; 10 | using namespace Pistache::Http; 11 | using namespace std; 12 | 13 | class XAuthToken : public Header::Header 14 | { 15 | public: 16 | NAME("X-Auth-Token"); 17 | 18 | XAuthToken() 19 | : token_("") 20 | {} 21 | 22 | explicit XAuthToken(string token) 23 | : token_(token) 24 | {} 25 | 26 | void parse(const string& data); 27 | void write(ostream& os) const; 28 | 29 | string token() const { return token_; } 30 | 31 | private: 32 | string token_; 33 | }; 34 | 35 | #endif //X_AUTH_TOKEN_H_ 36 | -------------------------------------------------------------------------------- /NFs/native/VPNStrongswan/stop: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #Author: Roberto Bonafiglia 4 | # 5 | 6 | #command line: 7 | # sudo ./start $1 $2 $3 $4 $5 8 | 9 | #dependencies: strongswan 10 | 11 | #$1 LSI ID (e.g., 2) 12 | #$2 NF name (e.g., firewall) 13 | #$3 number_of_ports (it is supposed to be 2 for this NF) 14 | #$4 and $5 names of port1 and port2 respectively (e.g., vEth0 vEth1) 15 | 16 | if (( $EUID != 0 )) 17 | then 18 | echo "[nativeNF_example_start] This script must be executed with ROOT privileges" 19 | exit 0 20 | fi 21 | 22 | 23 | 24 | namespace_name=$1_$2_ns 25 | 26 | ip netns exec $namespace_name ipsec stop 27 | rm -rf /etc/netns/$namespace_name 28 | 29 | echo "[nativeNF_strongswan_start] script executed" 30 | 31 | exit 1 32 | -------------------------------------------------------------------------------- /use-cases/frog/isp_data_center/authentication_graph/captive_portal/captive_portal/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /orchestrator/compute_controller/plugins/docker/docker.h: -------------------------------------------------------------------------------- 1 | #ifndef DOCKER_H_ 2 | #define DOCKER_H_ 1 3 | 4 | #pragma once 5 | 6 | #include "../../nfs_manager.h" 7 | #include "docker_constants.h" 8 | 9 | #include 10 | #include 11 | #include 12 | 13 | using namespace std; 14 | 15 | class Docker : public NFsManager 16 | { 17 | private: 18 | 19 | #if 0 20 | /** 21 | * @brief: starting from a netmask, returns the / 22 | * 23 | * @param: netmask Netmask to be converted 24 | */ 25 | unsigned int convertNetmask(string netmask); 26 | #endif 27 | 28 | public: 29 | bool isSupported(Description&); 30 | 31 | bool startNF(StartNFIn sni); 32 | bool updateNF(UpdateNFIn uni); 33 | bool stopNF(StopNFIn sni); 34 | }; 35 | 36 | #endif //DOCKER_H_ 37 | -------------------------------------------------------------------------------- /use-cases/frog/isp_data_center/authentication_graph/captive_portal/TakeMac/main.py: -------------------------------------------------------------------------------- 1 | 2 | 3 | import logging 4 | from TakeMac import TakeMac 5 | import falcon 6 | import subprocess 7 | 8 | 9 | 10 | logging.basicConfig(filename="TakeMac.log",level=logging.DEBUG,format='%(asctime)s %(message)s', datefmt='%m/%d/%Y %I:%M:%S %p') 11 | logging.debug("TakeMac Starting") 12 | 13 | bashCommand = TakeMac.ifconfig + TakeMac.interface + TakeMac.pipe 14 | process = subprocess.Popen(bashCommand, stdout=subprocess.PIPE, shell=True) 15 | mac_address,err = process.communicate() 16 | logging.debug("The received MAC is " + str(mac_address)[:-1]) 17 | # logging.debug("The error is " + str(err)) 18 | 19 | app = falcon.API() 20 | mac = TakeMac(mac_address[:-1]) 21 | app.add_route('/mac', mac) -------------------------------------------------------------------------------- /orchestrator/node_resource_manager/graph/graph-parser/address_validator.h: -------------------------------------------------------------------------------- 1 | #ifndef ADDRESS_VALIDATOR_H_ 2 | #define ADDRESS_VALIDATOR_H_ 1 3 | 4 | #ifndef __STDC_FORMAT_MACROS 5 | #define __STDC_FORMAT_MACROS 6 | #endif 7 | 8 | #pragma once 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | 16 | using namespace std; 17 | 18 | class AddressValidator 19 | { 20 | public: 21 | static bool validateMac(const char* mac); 22 | static bool validateIpv4(const string &ipAddress); 23 | static bool validateIpv4Netmask(const string &netmask); 24 | static bool validateIpv6(const string &ipAddress); 25 | 26 | static bool isUnicastMac(const char* mac); 27 | }; 28 | 29 | #endif // ADDRESS_VALIDATOR_H_ 30 | -------------------------------------------------------------------------------- /orchestrator/compute_controller/nf.cc: -------------------------------------------------------------------------------- 1 | #include "nf.h" 2 | 3 | NF::NF(string name) : 4 | name(name), selectedDescription(NULL), isRunning(false) 5 | { 6 | 7 | } 8 | 9 | void NF::addDescription(Description *description) 10 | { 11 | descriptions.push_back(description); 12 | } 13 | 14 | list NF::getAvailableDescriptions() 15 | { 16 | return descriptions; 17 | } 18 | 19 | void NF::setSelectedDescription(NFsManager *impl) 20 | { 21 | selectedDescription = impl; 22 | } 23 | 24 | NFsManager *NF::getSelectedDescription() 25 | { 26 | return selectedDescription; 27 | } 28 | 29 | bool NF::getRunning() 30 | { 31 | return isRunning; 32 | } 33 | 34 | void NF::setRunning(bool val) 35 | { 36 | isRunning = val; 37 | } 38 | 39 | string NF::getName() 40 | { 41 | return name; 42 | } 43 | -------------------------------------------------------------------------------- /NFs/kvm/README.md: -------------------------------------------------------------------------------- 1 | # KVM-based VNF examples 2 | 3 | This folder contains some examples of network functions implemented as KVM virtual machines. 4 | 5 | ## How to install KVM 6 | 7 | In order to create your own VNF, you need to install KVM, QEMU and libvirt by executing the following command: 8 | 9 | $ sudo apt-get install qemu-kvm libvirt-bin bridge-utils qemu-system 10 | 11 | ## How to create your VNFs 12 | 13 | Please check individual README's in each sub-package. 14 | Those files will give you the instruction to create the libvirt template describing the KVM virtual machine that will run the VNF. 15 | Once you have that template, you can pass the link to the UN (by writing the appropriate entry in the name resolver configuration file) in order to instantiate the described virtual machine. 16 | -------------------------------------------------------------------------------- /NFs/native/example/README.md: -------------------------------------------------------------------------------- 1 | ## Native example VNF 2 | 3 | This file contains the instructions to build an example of native network function that marks traffic exploiting ebtables. 4 | 5 | 6 | This function works as follows: when a packet is received on the interface, it 7 | is marked with a specific value and then it is forwarded to the other interface. 8 | 9 | 10 | The mark value is an hexadecimal value built as follows: 11 | 12 | 0xcade 13 | 14 | where: 15 | * `lsi_id` is the id of the LSI of the graph in hexadecimal format 16 | * `cade` is a fixed 2 bytes value specific for this network function; 17 | other network functions can specify different values 18 | * `port_n` is the number of the port from which the packet is received 19 | 20 | 21 | -------------------------------------------------------------------------------- /orchestrator/node_resource_manager/graph/graph-parser/graph_parser.h: -------------------------------------------------------------------------------- 1 | #ifndef GRAPH_PARSER_H_ 2 | #define GRAPH_PARSER_H_ 1 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | #include "../../../utils/logger.h" 12 | #include "../../../utils/constants.h" 13 | 14 | #include "graph_parser_utils.h" 15 | #include "match_parser.h" 16 | 17 | #include "../../graph_manager/graph_manager.h" 18 | 19 | using namespace json_spirit; 20 | using namespace std; 21 | 22 | class GraphParser 23 | { 24 | 25 | friend class RestServer; 26 | 27 | protected: 28 | static void parseGraph(Value value, highlevel::Graph &graph, bool newGraph, GraphManager *gm); 29 | }; 30 | 31 | #endif //GRAPH_PARSER_H_ 32 | -------------------------------------------------------------------------------- /use-cases/configuration-service/docker/switch/configure_ovs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | start(){ 4 | echo "ovs-vsctl show" 5 | ovs-vsctl show 6 | 7 | echo "Executing command 'ovs-vsctl add-br br-swt2 -- set bridge br-swt2 datapath_type=netdev'" 8 | ovs-vsctl add-br br-swt2 -- set bridge br-swt2 datapath_type=netdev 9 | 10 | for i in `ls /sys/class/net` 11 | do 12 | if [ $i != lo -a $i != 'ovs-system' ] 13 | then 14 | echo "Executing 'ovs-vsctl add-port br-swt2 $i'" 15 | ovs-vsctl add-port br-swt2 $i 16 | fi 17 | done 18 | echo "ovs-vsctl show" 19 | ovs-vsctl show 20 | 21 | 22 | } 23 | 24 | case $1 in 25 | start) 26 | start 27 | ;; 28 | stop) 29 | ;; 30 | *) 31 | echo "Usage: $0 {start}" 32 | exit 2 33 | ;; 34 | esac 35 | 36 | -------------------------------------------------------------------------------- /use-cases/frog/isp_data_center/isp_graph/switch/configure_ovs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | start(){ 4 | echo "ovs-vsctl show" 5 | ovs-vsctl show 6 | 7 | echo "Executing command 'ovs-vsctl add-br br-swt2 -- set bridge br-swt2 datapath_type=netdev'" 8 | ovs-vsctl add-br br-swt2 -- set bridge br-swt2 datapath_type=netdev 9 | 10 | for i in `ls /sys/class/net` 11 | do 12 | if [ $i != lo -a $i != 'ovs-system' ] 13 | then 14 | echo "Executing 'ovs-vsctl add-port br-swt2 $i'" 15 | ovs-vsctl add-port br-swt2 $i 16 | fi 17 | done 18 | echo "ovs-vsctl show" 19 | ovs-vsctl show 20 | 21 | 22 | } 23 | 24 | case $1 in 25 | start) 26 | start 27 | ;; 28 | stop) 29 | ;; 30 | *) 31 | echo "Usage: $0 {start}" 32 | exit 2 33 | ;; 34 | esac 35 | 36 | -------------------------------------------------------------------------------- /orchestrator/network_controller/switch_manager/plugins/ovs-ovsdb/scripts/create_ip_link_tunnel.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #Author: Francesco Benforte 4 | #Date: 2016-10-05 5 | #Brief: Create tunnel interface using the command "ip link" 6 | 7 | #$1 name of the port 8 | #$2 local ip 9 | #$3 remote ip 10 | #$4 gre key 11 | 12 | if (( $EUID != 0 )) 13 | then 14 | echo "[$0] This script must be executed with ROOT privileges" 15 | exit 0 16 | fi 17 | 18 | #The following instruction ensures that the interface we are going to create does not exist yet. 19 | ip link delete $1 &> /dev/null 20 | 21 | echo "[$0] Creating tunnel interface $1" 22 | 23 | ip link add $1 type gretap local $2 remote $3 key $4 24 | 25 | ip link set dev $1 up 26 | 27 | echo "[$0] tunnel interface $1 created" 28 | 29 | exit 1 30 | -------------------------------------------------------------------------------- /contrib/inih.patch: -------------------------------------------------------------------------------- 1 | diff -Naurw inih-r35-orig/extra/Makefile.static inih-r35/extra/Makefile.static 2 | --- inih-r35-orig/extra/Makefile.static 2016-01-02 19:00:30.000000000 +0100 3 | +++ inih-r35/extra/Makefile.static 2016-07-13 10:12:56.851325990 +0200 4 | @@ -1,17 +1,14 @@ 5 | # Simple makefile to build inih as a static library using g++ 6 | 7 | -SRC = ../ini.c 8 | -OBJ = $(SRC:.c=.o) 9 | +SRC = ../ini.c ../cpp/INIReader.cpp 10 | +OBJ := $(patsubst %.c,%.o,$(SRC)) 11 | +OBJ := $(patsubst %.cpp,%.o,$(OBJ)) 12 | OUT = libinih.a 13 | INCLUDES = -I.. 14 | -CCFLAGS = -g -O2 15 | -CC = g++ 16 | +CCFLAGS = -g -O2 -fPIC 17 | 18 | default: $(OUT) 19 | 20 | -.c.o: 21 | - $(CC) $(INCLUDES) $(CCFLAGS) $(EXTRACCFLAGS) -c $< -o $@ 22 | - 23 | $(OUT): $(OBJ) 24 | ar rcs $(OUT) $(OBJ) $(EXTRAARFLAGS) 25 | 26 | -------------------------------------------------------------------------------- /use-cases/configuration-service/docker/README.md: -------------------------------------------------------------------------------- 1 | ### Creating the Docker image 2 | 3 | You can create the Docker image of a function (e.g. NAT or DHCP) by launching the following command: 4 | 5 | sudo docker build --tag="nat" . 6 | 7 | This will create the Docker image starting from the base image specified in `Dockerfile`; the new image is stored in the Docker default folder on your filesystem (localhost). 8 | 9 | If you want to be more generic and publish the Docker image in a (public or private) repository, you can use the following command: 10 | 11 | sudo docker build --tag="localhost:5000/nat" . 12 | docker push localhost:5000/nat 13 | 14 | This will register your VNF named `nat` in the local registry (given by the the string `localhost:5000`), which has to be up and running on localhost. 15 | 16 | 17 | -------------------------------------------------------------------------------- /NFs/native/dhcp/start: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #Author: Roberto Bonafiglia 4 | # 5 | 6 | #command line: 7 | # sudo ./start $1 $2 $3 $4 $5 8 | 9 | #dependencies: strongswan 10 | 11 | #$1 LSI ID (e.g., 2) 12 | #$2 NF name (e.g., firewall) 13 | #$3 number_of_ports (it is supposed to be 2 for this NF) 14 | #$4 and $5 names of port1 and port2 respectively (e.g., vEth0 vEth1) 15 | 16 | if (( $EUID != 0 )) 17 | then 18 | echo "[nativeNF_example_start] This script must be executed with ROOT privileges" 19 | exit 0 20 | fi 21 | 22 | #debug 23 | #set -x 24 | 25 | br_name=$1_$2_br 26 | namespace_name=$1_$2_ns 27 | 28 | ifconfig lo up 29 | ifconfig $4 192.168.1.50 netmask 255.255.255.0 30 | 31 | dnsmasq --dhcp-range=192.168.1.10,192.168.1.49,72h --interface=$4 --dhcp-option=3,192.168.1.1 32 | 33 | exit 1 34 | -------------------------------------------------------------------------------- /Vagrantfile: -------------------------------------------------------------------------------- 1 | # -*- mode: ruby -*- 2 | 3 | $script = <