Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
-- created public subnet
# neutron subnet-create public --name public_subnet --allocation-pool start=172.16.21.21,end=172.16.21.171 --disable-dhcp --gateway 172.16.20.1 172.16.20.0/23
-- Traffic captured in tcpdump
hcuser@localhost ~]$ sudo ip netns exec qdhcp-852f04cb-b478-4b08-ba25-77991a118497 tcpdump -ln -i ns-0b36c82a-61
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on ns-0b36c82a-61, link-type EN10MB (Ethernet), capture size 65535 bytes
14:18:48.338784 ARP, Request who-has 10.0.0.1 tell 10.0.0.2, length 28
14:18:49.340207 ARP, Request who-has 10.0.0.1 tell 10.0.0.2, length 28
14:18:50.342206 ARP, Request who-has 10.0.0.1 tell 10.0.0.2, length 28
14:18:52.338852 ARP, Request who-has 10.0.0.1 tell 10.0.0.2, length 28
14:18:53.340232 ARP, Request who-has 10.0.0.1 tell 10.0.0.2, length 28
14:18:54.342232 ARP, Request who-has 10.0.0.1 tell 10.0.0.2, length 28
-- ping status from dhcp to router
[hcuser@localhost ~]$ sudo ip netns exec qdhcp-852f04cb-b478-4b08-ba25-77991a118497 ping 10.0.0.1
PING 10.0.0.1 (10.0.0.1) 56(84) bytes of data.
From 10.0.0.2 icmp_seq=1 Destination Host Unreachable
^C
--- 10.0.0.1 ping statistics ---
6 packets transmitted, 0 received, +5 errors, 100% packet loss, time 5001ms
pipe 4
[hcuser@localhost ~]$ sudo ip netns exec qdhcp-852f04cb-b478-4b08-ba25-77991a118497 ping 10.0.0.2
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.027 ms
^C
--- 10.0.0.2 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.027/0.027/0.028/0.005 ms
-- ping status from router to dhcp
[hcuser@localhost ~]$ sudo ip netns exec qdhcp-852f04cb-b478-4b08-ba25-77991a118497 ping 10.0.0.1
PING 10.0.0.1 (10.0.0.1) 56(84) bytes of data.
From 10.0.0.2 icmp_seq=1 Destination Host Unreachable
^C
--- 10.0.0.1 ping statistics ---
6 packets transmitted, 0 received, +5 errors, 100% packet loss, time 5001ms
pipe 4
[hcuser@localhost ~]$ sudo ip netns exec qdhcp-852f04cb-b478-4b08-ba25-77991a118497 ping 10.0.0.2
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.027 ms
^C
--- 10.0.0.2 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.027/0.027/0.028/0.005 ms
[root@localhost ~(keystone_admin)]# neutron router-list
+--------------------------------------+---------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------+-------+
| id | name | external_gateway_info | distributed | ha |
+--------------------------------------+---------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------+-------+
| 168fe615-95ea-4c72-824d-03a1b44921df | router1 | {"network_id": "fe3a3489-9114-4fb0-9a81-b12e125d4204", "enable_snat": true, "external_fixed_ips": [{"subnet_id": "6b0599d5-5407-440d-89f8-51ca2daa6fff", "ip_address": "172.16.21.21"}]} | False | False |
+--------------------------------------+---------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------+-------+
[root@localhost ~(keystone_admin)]# neutron net-list
+--------------------------------------+---------+-----------------------------------------------------+
| id | name | subnets |
+--------------------------------------+---------+-----------------------------------------------------+
| 852f04cb-b478-4b08-ba25-77991a118497 | private | d8601bb2-a0e5-43d7-b17c-1b9232a20ca5 10.0.0.0/24 |
| fe3a3489-9114-4fb0-9a81-b12e125d4204 | public | 6b0599d5-5407-440d-89f8-51ca2daa6fff 172.16.20.0/23 |
+--------------------------------------+---------+-----------------------------------------------------+
[root@localhost ~(keystone_admin)]# neutron subnet-list
+--------------------------------------+----------------+----------------+---------------------------------------------------+
| id | name | cidr | allocation_pools |
+--------------------------------------+----------------+----------------+---------------------------------------------------+
| d8601bb2-a0e5-43d7-b17c-1b9232a20ca5 | private_subnet | 10.0.0.0/24 | {"start": "10.0.0.2", "end": "10.0.0.254"} |
| 6b0599d5-5407-440d-89f8-51ca2daa6fff | public_subnet | 172.16.20.0/23 | {"start": "172.16.21.21", "end": "172.16.21.171"} |
+--------------------------------------+----------------+----------------+---------------------------------------------------+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment