root@cic-1:~# cat UC3.3_configs_2.sh neutron net-create Net1 neutron net-create Net2 neutron net-create Net3 neutron net-create Net4 neutron net-create Net5 neutron net-create Net6 neutron net-create Net7 neutron net-create Net8 neutron subnet-create Net1 11.1.2.0/24 --enable-dhcp --name subnet-ipv4s1 neutron subnet-create Net2 12.23.34.0/24 --enable-dhcp --name subnet-ipv4s2 neutron subnet-create Net3 13.5.4.0/24 --enable-dhcp --name subnet-ipv4s3 neutron subnet-create Net4 14.42.62.0/24 --enable-dhcp --name subnet-ipv4s4 neutron subnet-create Net5 15.8.9.0/24 --enable-dhcp --name subnet-ipv4s5 neutron subnet-create Net6 16.6.67.0/24 --enable-dhcp --name subnet-ipv4s6 neutron subnet-create Net7 17.7.6.0/24 --enable-dhcp --name subnet-ipv4s7 neutron subnet-create Net8 18.6.6.0/24 --enable-dhcp --name subnet-ipv4s8 neutron subnet-create Net1 2001:db8:abcd:0011::/64 --ip-version 6 --ipv6-ra-mode slaac --ipv6-address-mode slaac --name subnet-ipv6s1 neutron subnet-create Net2 2025:caf:3214:0012::/64 --ip-version 6 --ipv6-ra-mode slaac --ipv6-address-mode slaac --name subnet-ipv6s2 neutron subnet-create Net3 2033:456a:f012:0013::/64 --ip-version 6 --ipv6-ra-mode slaac --ipv6-address-mode slaac --name subnet-ipv6s3 neutron subnet-create Net4 2056:212:d562:0014::/64 --ip-version 6 --ipv6-ra-mode slaac --ipv6-address-mode slaac --name subnet-ipv6s4 neutron subnet-create Net5 2062:321:543:0015::/64 --ip-version 6 --ipv6-ra-mode slaac --ipv6-address-mode slaac --name subnet-ipv6s5 neutron subnet-create Net6 2078:fde:2cd:0016::/64 --ip-version 6 --ipv6-ra-mode slaac --ipv6-address-mode slaac --name subnet-ipv6s6 neutron subnet-create Net7 2123:13f:565:0017::/64 --ip-version 6 --ipv6-ra-mode slaac --ipv6-address-mode slaac --name subnet-ipv6s7 neutron subnet-create Net8 2234:777:222:0018::/64 --ip-version 6 --ipv6-ra-mode slaac --ipv6-address-mode slaac --name subnet-ipv6s8 neutron router-create R1 neutron router-interface-add R1 subnet-ipv4s1 neutron router-interface-add R1 subnet-ipv6s1 neutron router-interface-add R1 subnet-ipv4s2 neutron router-interface-add R1 subnet-ipv6s2 neutron router-interface-add R1 subnet-ipv4s3 neutron router-interface-add R1 subnet-ipv6s3 neutron router-interface-add R1 subnet-ipv4s4 neutron router-interface-add R1 subnet-ipv6s4 neutron router-interface-add R1 subnet-ipv4s5 neutron router-interface-add R1 subnet-ipv6s5 neutron router-interface-add R1 subnet-ipv4s6 neutron router-interface-add R1 subnet-ipv6s6 neutron router-interface-add R1 subnet-ipv4s7 neutron router-interface-add R1 subnet-ipv6s7 neutron router-interface-add R1 subnet-ipv4s8 neutron router-interface-add R1 subnet-ipv6s8 neutron port-create Net1 --name PORT1-N1 --security-group CUSTM_SGP --allowed-address-pair ip_address=2111:12f:862:18::/64 --allowed-address-pair ip_address=20.0.0.0/24 neutron port-create Net1 --name PORT2-N1 --security-group CUSTM_SGP neutron port-create Net2 --name PORT3-N2 --security-group CUSTM_SGP neutron port-create Net2 --name PORT4-N2 --security-group CUSTM_SGP --allowed-address-pair ip_address=2111:12f:862:18::/64 --allowed-address-pair ip_address=20.0.0.0/24 neutron port-create Net3 --name PORT5-N3 --security-group CUSTM_SGP --allowed-address-pair ip_address=2111:12f:862:18::/64 --allowed-address-pair ip_address=20.0.0.0/24 neutron port-create Net3 --name PORT6-N3 --security-group CUSTM_SGP neutron port-create Net4 --name PORT7-N4 --security-group CUSTM_SGP neutron port-create Net4 --name PORT8-N4 --security-group CUSTM_SGP --allowed-address-pair ip_address=2111:12f:862:18::/64 --allowed-address-pair ip_address=20.0.0.0/24 neutron port-create Net5 --name PORT9-N5 --security-group CUSTM_SGP --allowed-address-pair ip_address=2111:12f:862:18::/64 --allowed-address-pair ip_address=20.0.0.0/24 neutron port-create Net5 --name PORT10-N5 --security-group CUSTM_SGP neutron port-create Net6 --name PORT11-N6 --security-group CUSTM_SGP neutron port-create Net6 --name PORT12-N6 --security-group CUSTM_SGP --allowed-address-pair ip_address=2111:12f:862:18::/64 --allowed-address-pair ip_address=20.0.0.0/24 neutron port-create Net7 --name PORT13-N7 --security-group CUSTM_SGP --allowed-address-pair ip_address=2111:12f:862:18::/64 --allowed-address-pair ip_address=20.0.0.0/24 neutron port-create Net7 --name PORT14-N7 --security-group CUSTM_SGP neutron port-create Net8 --name PORT15-N8 --security-group CUSTM_SGP neutron port-create Net8 --name PORT16-N8 --security-group CUSTM_SGP --allowed-address-pair ip_address=2111:12f:862:18::/64 --allowed-address-pair ip_address=20.0.0.0/24 nova boot --flavor m1.small --image ubuntu-2 --nic port-id=$(neutron port-list | grep PORT1-N1 |awk '{print $2}') Host1-N1 --availability-zone nova:compute-0-1.domain.tld nova boot --flavor m1.small --image ubuntu-2 --nic port-id=$(neutron port-list | grep PORT2-N1 |awk '{print $2}') Host2-N1 --availability-zone nova:compute-0-2.domain.tld nova boot --flavor m1.small --image ubuntu-2 --nic port-id=$(neutron port-list | grep PORT3-N2 |awk '{print $2}') Host3-N2 --availability-zone nova:compute-0-1.domain.tld nova boot --flavor m1.small --image ubuntu-2 --nic port-id=$(neutron port-list | grep PORT4-N2 |awk '{print $2}') Host4-N2 --availability-zone nova:compute-0-2.domain.tld nova boot --flavor m1.small --image ubuntu-2 --nic port-id=$(neutron port-list | grep PORT5-N3 |awk '{print $2}') Host5-N3 --availability-zone nova:compute-0-1.domain.tld nova boot --flavor m1.small --image ubuntu-2 --nic port-id=$(neutron port-list | grep PORT6-N3 |awk '{print $2}') Host6-N3 --availability-zone nova:compute-0-2.domain.tld nova boot --flavor m1.small --image ubuntu-2 --nic port-id=$(neutron port-list | grep PORT7-N4 |awk '{print $2}') Host7-N4 --availability-zone nova:compute-0-1.domain.tld nova boot --flavor m1.small --image ubuntu-2 --nic port-id=$(neutron port-list | grep PORT8-N4 |awk '{print $2}') Host8-N4 --availability-zone nova:compute-0-2.domain.tld nova boot --flavor m1.small --image ubuntu-2 --nic port-id=$(neutron port-list | grep PORT9-N5 |awk '{print $2}') Host9-N5 --availability-zone nova:compute-0-1.domain.tld nova boot --flavor m1.small --image ubuntu-2 --nic port-id=$(neutron port-list | grep PORT10-N5 |awk '{print $2}') Host10-N5 --availability-zone nova:compute-0-2.domain.tld nova boot --flavor m1.small --image ubuntu-2 --nic port-id=$(neutron port-list | grep PORT11-N6 |awk '{print $2}') Host11-N6 --availability-zone nova:compute-0-1.domain.tld nova boot --flavor m1.small --image ubuntu-2 --nic port-id=$(neutron port-list | grep PORT12-N6 |awk '{print $2}') Host12-N6 --availability-zone nova:compute-0-2.domain.tld nova boot --flavor m1.small --image ubuntu-2 --nic port-id=$(neutron port-list | grep PORT13-N7 |awk '{print $2}') Host13-N7 --availability-zone nova:compute-0-1.domain.tld nova boot --flavor m1.small --image ubuntu-2 --nic port-id=$(neutron port-list | grep PORT14-N7 |awk '{print $2}') Host14-N7 --availability-zone nova:compute-0-2.domain.tld nova boot --flavor m1.small --image ubuntu-2 --nic port-id=$(neutron port-list | grep PORT15-N8 |awk '{print $2}') Host15-N8 --availability-zone nova:compute-0-1.domain.tld nova boot --flavor m1.small --image ubuntu-2 --nic port-id=$(neutron port-list | grep PORT16-N8 |awk '{print $2}') Host16-N8 --availability-zone nova:compute-0-2.domain.tld curl --silent -u cscroot:Ericsson1234 -H "Content-type: application/json" -X POST -d @vpn_body "http://localhost:8181/restconf/operations/neutronvpn:createL3VPN" root@cic-1:~# cat vpn_body {"input" : { "l3vpn" : [ { "id": "4ae8cd92-48ca-49b5-94e1-b2921a2661c5", "name": "Vpn1", "route-distinguisher": ["100:2","100:22","100:4","100:44","100:5","100:55","100:6","100:66"], "export-RT": ["100:1"], "import-RT": ["100:11"], "tenant-id": "2b241d44-2cf3-4009-aa3c-7e8d70243eee" } ] } } root@cic-1:~# cat asso_router.sh curl --silent -u cscroot:Ericsson1234 -H "Content-type: application/json" -X POST -d @router_body "http://localhost:8181/restconf/operations/neutronvpn:associateRouter" root@cic-1:~# cat router_body {"input" : { "vpn-id": "4ae8cd92-48ca-49b5-94e1-b2921a2661c5", "router-id":["6c71bf63-547d-4420-94ea-19d601b484b0"] } } neutron router-update R1 --routes type=dict list=true destination=20.0.0.0/24,nexthop=11.1.2.3 destination=2111:12f:862:18::/64,nexthop=2001:db8:abcd:11:f816:3eff:feff:56b2 destination=20.0.0.0/24,nexthop=12.23.34.4 destination=2111:12f:862:18::/64,nexthop=2025:caf:3214:12:f816:3eff:fe87:f3e0 destination=20.0.0.0/24,nexthop=13.5.4.3 destination=2111:12f:862:18::/64,nexthop=2033:456a:f012:13:f816:3eff:fee9:59fa destination=20.0.0.0/24,nexthop=14.42.62.4 destination=2111:12f:862:18::/64,nexthop=2056:212:d562:14:f816:3eff:fef8:4354 destination=20.0.0.0/24,nexthop=15.8.9.3 destination=2111:12f:862:18::/64,nexthop=2062:321:543:15:f816:3eff:feec:174c destination=20.0.0.0/24,nexthop=16.6.67.4 destination=2111:12f:862:18::/64,nexthop=2078:fde:2cd:16:f816:3eff:fe33:ad93 destination=20.0.0.0/24,nexthop=17.7.6.3 destination=2111:12f:862:18::/64,nexthop=2123:13f:565:17:f816:3eff:fe84:254e destination=20.0.0.0/24,nexthop=18.6.6.4 destination=2111:12f:862:18::/64,nexthop=2234:777:222:18:f816:3eff:feb7:cf39 root@cic-1:~# neutron router-show R1 +-----------------------+---------------------------------------------------------------------------------------------+ | Field | Value | +-----------------------+---------------------------------------------------------------------------------------------+ | admin_state_up | True | | description | | | distributed | False | | external_gateway_info | | | id | 6c71bf63-547d-4420-94ea-19d601b484b0 | | name | R1 | | routes | {"destination": "20.0.0.0/24", "nexthop": "11.1.2.3"} | | | {"destination": "20.0.0.0/24", "nexthop": "12.23.34.4"} | | | {"destination": "20.0.0.0/24", "nexthop": "13.5.4.3"} | | | {"destination": "20.0.0.0/24", "nexthop": "14.42.62.4"} | | | {"destination": "20.0.0.0/24", "nexthop": "15.8.9.3"} | | | {"destination": "20.0.0.0/24", "nexthop": "16.6.67.4"} | | | {"destination": "20.0.0.0/24", "nexthop": "17.7.6.3"} | | | {"destination": "20.0.0.0/24", "nexthop": "18.6.6.4"} | | | {"destination": "2111:12f:862:18::/64", "nexthop": "2001:db8:abcd:11:f816:3eff:feff:56b2"} | | | {"destination": "2111:12f:862:18::/64", "nexthop": "2025:caf:3214:12:f816:3eff:fe87:f3e0"} | | | {"destination": "2111:12f:862:18::/64", "nexthop": "2033:456a:f012:13:f816:3eff:fee9:59fa"} | | | {"destination": "2111:12f:862:18::/64", "nexthop": "2056:212:d562:14:f816:3eff:fef8:4354"} | | | {"destination": "2111:12f:862:18::/64", "nexthop": "2062:321:543:15:f816:3eff:feec:174c"} | | | {"destination": "2111:12f:862:18::/64", "nexthop": "2078:fde:2cd:16:f816:3eff:fe33:ad93"} | | | {"destination": "2111:12f:862:18::/64", "nexthop": "2123:13f:565:17:f816:3eff:fe84:254e"} | | | {"destination": "2111:12f:862:18::/64", "nexthop": "2234:777:222:18:f816:3eff:feb7:cf39"} | | status | ACTIVE | | tenant_id | b0bb63eaae6b4a64980490b59a37a3d9 | +-----------------------+---------------------------------------------------------------------------------------------+ root@cic-1:~# VMs and ports holding extra routes: root@cic-1:~# nova list | grep Host1-N1 | 0ee795f0-e686-4fe9-bf00-5de5ed4268e1 | Host1-N1 | ACTIVE | - | Running | Net1=11.1.2.3, 2001:db8:abcd:11:f816:3eff:feff:56b2 | root@cic-1:~# nova list | grep Host4-N2 | 11657ebb-6ed7-48b5-bf30-128e96e62720 | Host4-N2 | ACTIVE | - | Running | Net2=2025:caf:3214:12:f816:3eff:fe87:f3e0, 12.23.34.4 | root@cic-1:~# root@cic-1:~# nova list | grep Host5-N3 | be0fcc7f-03fc-4d52-b6c6-7eead380e201 | Host5-N3 | ACTIVE | - | Running | Net3=2033:456a:f012:13:f816:3eff:fee9:59fa, 13.5.4.3 | root@cic-1:~# nova list | grep Host8-N4 | dd0e658e-7ead-40b9-b016-a9e2cd7e3568 | Host8-N4 | ACTIVE | - | Running | Net4=14.42.62.4, 2056:212:d562:14:f816:3eff:fef8:4354 | root@cic-1:~# nova list | grep Host9-N5 | fafedd89-4140-4b37-b23c-9e8c7409a003 | Host9-N5 | ACTIVE | - | Running | Net5=2062:321:543:15:f816:3eff:feec:174c, 15.8.9.3 | | cfe0cd5c-3076-434e-bd32-162d15df9305 | Host12-N6 | ACTIVE | - | Running | Net6=2078:fde:2cd:16:f816:3eff:fe33:ad93, 16.6.67.4 | root@cic-1:~# nova list | grep Host13-N7 | 50ef0183-a7f6-42a4-9877-6d09afe0d309 | Host13-N7 | ACTIVE | - | Running | Net7=17.7.6.3, 2123:13f:565:17:f816:3eff:fe84:254e | root@cic-1:~# nova list | grep Host16 | 05943329-b73a-4a9b-81ec-ec0de24baad7 | Host16-N8 | ACTIVE | - | Running | Net8=18.6.6.4, 2234:777:222:18:f816:3eff:feb7:cf39 | root@cic-1:~# | | 7e887812-ab9a-4cc9-bc4a-59f3bda0f06c | PORT4-N2 | fa:16:3e:87:f3:e0 | {"subnet_id": "d75cde39-9ddc-4ac9-9805-7cb710d25e06", "ip_address": "12.23.34.4"} | | 96ad754f-43d5-47b8-a6b6-a280b6f4dc9e | PORT5-N3 | fa:16:3e:e9:59:fa | {"subnet_id": "f3b8a89f-8419-42ef-a04c-a43293ef5691", "ip_address": "13.5.4.3"} | | aad6b743-9c5d-4b92-b5bc-9fd84f0d1093 | PORT16-N8 | fa:16:3e:b7:cf:39 | {"subnet_id": "6846be95-8ff4-4899-a764-d39775cf013e", "ip_address": "18.6.6.4"} | | c2f2f61a-b0f2-4685-8676-2cdbbfa2968e | PORT9-N5 | fa:16:3e:ec:17:4c | {"subnet_id": "cfde01bc-760a-4896-96b8-300a48bed057", "ip_address": "15.8.9.3"} | | c638724a-c176-415b-a4d8-45904a8ac5c5 | PORT8-N4 | fa:16:3e:f8:43:54 | {"subnet_id": "565e3115-8073-4429-ba23-c151179431e9", "ip_address": "14.42.62.4"} | | | dbaa2670-f30d-41bf-8266-7af5489c808b | PORT12-N6 | fa:16:3e:33:ad:93 | {"subnet_id": "ab56837d-bae8-44bc-a6a5-3c0c36709106", "ip_address": "16.6.67.4"} | | e134bfa7-0808-4c34-9bea-2bda9aa86383 | PORT13-N7 | fa:16:3e:84:25:4e | {"subnet_id": "1e3214b6-83d2-436e-bc79-1523afb128ae", "ip_address": "17.7.6.3"} | | ee8e7802-484b-4737-8c6a-319ba6cc6588 | PORT1-N1 | fa:16:3e:ff:56:b2 | {"subnet_id": "3bba4268-2712-4700-86f8-2c469eb9b638", "ip_address": "11.1.2.3"} | |