OpenStack networking debug operations skill for SDN troubleshooting, packet tracing, and flow analysis. Covers OVS/OVN debugging (ovs-vsctl, ovs-ofctl, ovs-appctl, ovn-nbctl, ovn-sbctl, ovn-trace), security group analysis via OVS flow rules and conntrack, DHCP troubleshooting through namespace inspection and dnsmasq diagnostics, floating IP diagnosis with NAT rule and ARP verification, network namespace inspection (ip netns), MTU chain analysis for overlay networks, DNS resolution debugging, and east-west traffic diagnosis. Use when diagnosing network connectivity failures, tracing packets through the SDN stack, or analyzing flow tables in a running OpenStack cloud.
Networking debug is the most hands-on troubleshooting domain in cloud operations. Virtual networks add multiple abstraction layers between user intent and physical packets -- an instance's traffic passes through a tap device, a Linux bridge or OVS port, integration bridge flows, tunnel encapsulation, and physical NIC before reaching the wire. When connectivity breaks, the operator must trace through every layer to find where packets stop flowing.
The debugging mental model: Start at the instance and trace outward. The packet path for a tenant instance is: instance vNIC -> tap device -> qbr bridge (if OVS with iptables) -> OVS br-int -> tunnel or VLAN tag -> OVS br-ex (for external traffic) -> physical NIC. For OVN, the path simplifies: instance vNIC -> OVS br-int (with OVN flows) -> tunnel or physical port. Every hop is inspectable. Every hop can be the failure point.
This skill is the primary reference for the CRAFT-network agent when diagnosing connectivity issues during Phase E operations.
Verify all diagnostic tools are available before beginning any debug session.
OVS diagnostic commands (available inside openvswitch_vswitchd container):
# Verify OVS tools are accessible
docker exec openvswitch_vswitchd ovs-vsctl --version
docker exec openvswitch_vswitchd ovs-ofctl --version
docker exec openvswitch_vswitchd ovs-appctl --version
# Show complete OVS configuration
docker exec openvswitch_vswitchd ovs-vsctl show
OVN diagnostic commands (available inside ovn_northd and ovn_controller containers):
# Verify OVN tools
docker exec ovn_northd ovn-nbctl --version
docker exec ovn_northd ovn-sbctl --version
# OVN trace (powerful logical packet tracing)
docker exec ovn_controller ovn-trace --version
Network namespace tools (on the host or inside Neutron containers):
# List all network namespaces
ip netns list
# Expected: qrouter-<id>, qdhcp-<id> (OVS backend)
# OVN uses fewer namespaces (metadata only)
Packet capture (tcpdump inside containers or namespaces):
# Capture on a tap interface (instance-facing)
tcpdump -i tap<port-id-prefix> -n -c 50
# Capture inside a network namespace
ip netns exec qrouter-<router-id> tcpdump -i qr-<port-prefix> -n -c 50
# Capture on physical NIC
tcpdump -i eth1 -n port 4789 # VXLAN traffic
For persistent debug environments, Kolla-Ansible provides tooling containers:
# Enter the neutron_server container for API-level debugging
docker exec -it neutron_server /bin/bash
# Enter openvswitch_vswitchd for flow-level debugging
docker exec -it openvswitch_vswitchd /bin/bash
# Enter the relevant agent container for namespace access
docker exec -it neutron_l3_agent /bin/bash # OVS backend
docker exec -it neutron_dhcp_agent /bin/bash # OVS backend
Adjust OVS logging to capture more detail during active debugging, then restore to production levels.
# Increase OVS daemon logging (temporary, resets on restart)
docker exec openvswitch_vswitchd ovs-appctl vlog/set vswitchd:dbg
docker exec openvswitch_vswitchd ovs-appctl vlog/set ofproto:dbg
# Restore production logging
docker exec openvswitch_vswitchd ovs-appctl vlog/set vswitchd:warn
docker exec openvswitch_vswitchd ovs-appctl vlog/set ofproto:warn
# Check current log levels
docker exec openvswitch_vswitchd ovs-appctl vlog/list
OVN trace simulates a packet through the logical pipeline without sending real traffic.
# Trace a packet from a logical port through OVN
docker exec ovn_controller ovn-trace <datapath> \
'inport == "<logical-port>" && eth.src == <mac> && eth.dst == <mac> \
&& ip4.src == <src-ip> && ip4.dst == <dst-ip> && ip.ttl == 64'
Enable debug logging on individual agents for detailed event tracing.
# Check current log level
docker exec neutron_server grep -i "debug" /etc/neutron/neutron.conf
# Enable debug via Kolla-Ansible config override
# In /etc/kolla/config/neutron/neutron.conf:
# [DEFAULT]
# debug = True
# After config change, reconfigure the service
# kolla-ansible -i inventory reconfigure --tags neutron
# Identify the tap device for an instance port
openstack port show <port-id> -c id
# Tap device name: tap<first-11-chars-of-port-id>
# Identify the OVS port number for correlation with flow tables
docker exec openvswitch_vswitchd ovs-vsctl --columns=name,ofport list Interface | grep tap
# Set up continuous capture with rotation (for intermittent issues)
tcpdump -i tap<prefix> -n -w /tmp/capture-%H%M.pcap -G 300 -W 12
# Dump all flow tables on br-int (primary integration bridge)
docker exec openvswitch_vswitchd ovs-ofctl dump-flows br-int
# Dump flows for a specific table (table 0 = ingress classification)
docker exec openvswitch_vswitchd ovs-ofctl dump-flows br-int table=0
# Watch flows in real-time (shows packet/byte counts)
docker exec openvswitch_vswitchd ovs-ofctl dump-flows br-int --no-stats=false
Scenario: Instance cannot reach the external network.
Step-by-step trace from instance outward:
openstack server show <instance> -c addressesopenstack port show <port-id> -c binding_vif_type -- must be ovs or ovn, not binding_failedip link show tap<port-prefix> -- if missing, the port was not wired by the agentdocker exec openvswitch_vswitchd ovs-vsctl list-ports br-int | grep <port-prefix>docker exec openvswitch_vswitchd ovs-ofctl dump-flows br-int | grep <port-tag> -- look for matching ingress/egress rulesip netns exec qrouter-<router-id> ip route -- verify the default route points to the external gatewaydocker exec openvswitch_vswitchd ovs-vsctl list-ports br-ex -- the physical NIC must be attachedip link show <nic> -- verify it is UP, check for errors with ip -s link show <nic>Scenario: Instance gets no IP address.
openstack network agent list | grep dhcp -- must show alive and UPip netns exec qdhcp-<network-id> ps aux | grep dnsmasq -- dnsmasq must be runningip netns exec qdhcp-<network-id> tcpdump -i tap<dhcp-port-prefix> -n port 67 or port 68 -c 20
openstack server reboot <instance> to trigger a DHCP requestip netns exec qdhcp-<network-id> cat /var/lib/neutron/dhcp/<network-id>/leasesdocker exec ovn_northd ovn-nbctl list DHCP_Options -- verify DHCP options are programmed for the subnetScenario: Cannot reach instance from external network via floating IP.
openstack floating ip show <fip> -- check fixed_ip_address and floating_ip_address fields, confirm port_id is setip netns exec qrouter-<router-id> ip addr show -- the floating IP must appear on the qg-<port> interfaceip netns exec qrouter-<router-id> iptables -t nat -L -n -v -- look for DNAT rule mapping floating IP to fixed IParping -I <external-iface> <floating-ip> -- if no response, the L3 agent is not answering ARP for this IPdocker exec ovn_northd ovn-nbctl lr-nat-list <router-name> -- verify dnat_and_snat entry existsScenario: Traffic blocked that should be allowed.
openstack security group rule list <group> --long -- check protocol, port range, direction, remote prefixopenstack port show <port-id> -c port_security_enabled -- if False, security groups are bypassed entirelydocker exec openvswitch_vswitchd ovs-ofctl dump-flows br-int | grep <port-tag> -- match flow rules against security group rulesconntrack -L | grep <instance-ip>docker restart neutron_openvswitch_agentdocker exec ovn_northd ovn-nbctl acl-list <logical-switch> -- verify ACLs match security group intentScenario: Large packets fail, SSH works but SCP stalls, HTTP transfers hang.
ip link show <nic> | grep mtu -- note the value (typically 1500 or 9000)ping -M do -s 1400 <target> -- decrease size until it works; that is the effective MTUopenstack subnet show <subnet> -c mtu -- must match the calculated tenant MTUip link show eth0 | grep mtu -- must match the subnet MTUneutron_mtu in globals.yml to match physical MTU, then kolla-ansible reconfigure --tags neutronScenario: Instance cannot resolve hostnames.
openstack subnet show <subnet> -c dns_nameservers -- must have at least one DNS servercat /etc/resolv.conf -- should list the DNS server from DHCP optionsip netns exec qdhcp-<network-id> nslookup google.com <dns-server> -- test DNS from the DHCP namespacecurl http://169.254.169.254/latest/meta-data/ from inside the instanceSymptoms: Instance boots, may or may not have an IP, cannot reach gateway or other instances.
Resolution steps:
openstack port list --server <instance> -- get the port IDbinding_vif_type -- if binding_failed, check agent logs: docker logs neutron_openvswitch_agent --tail 100ip link show tap<port-prefix>binding_host_iddocker exec openvswitch_vswitchd ovs-vsctl get port tap<prefix> tag -- compare with expected network segmentation IDip netns exec qrouter-<id> ip route -- missing default route means no external connectivitySymptoms: Floating IP assigned in OpenStack but not reachable from the external network.
Resolution steps:
openstack router show <router> -c external_gateway_infoip netns list | grep qrouterdocker restart neutron_l3_agentip netns exec qrouter-<id> iptables -t nat -S -- DNAT and SNAT rules must existopenstack floating ip set --port <port-id> <fip> to reassociatearping -c 3 -I <external-iface> <floating-ip> on a machine on the external networkdocker exec openvswitch_vswitchd ovs-vsctl list-ports br-exSymptoms: Instances in different projects can communicate when they should not.
Resolution steps:
openstack network show <net1> -c provider:segmentation_id and compare with net2 -- collision means shared L2 domainopenstack port show <port> -c security_group_ids -- default groups deny cross-tenant ingressdocker exec openvswitch_vswitchd ovs-ofctl dump-flows br-int -- look for flows that bridge between different tunnel IDsopenstack network show <net> -c shared -- shared networks are accessible across projects by designdocker restart neutron_openvswitch_agentSymptoms: Instance boots without IP address, gets wrong IP, or IP assignment is delayed.
Resolution steps:
openstack network agent list | grep dhcp -- must be aliveip netns list | grep qdhcp-<network-id> -- if missing, restart DHCP agentip netns exec qdhcp-<network-id> ps aux | grep dnsmasq -- if not running, check agent logsopenstack port list --network <net> --device-owner network:dhcp with the dnsmasq config filedocker exec ovn_northd ovn-nbctl list DHCP_Options -- verify subnet options exist and contain correct CIDRSymptoms: Instance cannot reach 169.254.169.254, cloud-init fails, SSH key injection fails.
Resolution steps:
docker ps | grep metadata -- container must be runningip netns exec qrouter-<id> iptables -t nat -S | grep 169.254 -- a DNAT rule must redirect metadata requestscurl http://localhost:8775/ from the controller -- must return metadata API version listdocker exec neutron_metadata_agent cat /etc/neutron/metadata_agent.ini | grep nova_metadataneutron_ovn_metadata_agent running in a namespace on the chassis hosting the instanceSymptoms: Instances on the same or different subnets cannot communicate.
Resolution steps:
docker exec openvswitch_vswitchd ovs-vsctl get port tap<prefix1> tag vs tap<prefix2>ip netns exec qrouter-<id> ip route -- both subnets must be presentip netns exec qrouter-<id> arp -n -- missing entries indicate L2 reachability problemsip netns exec qrouter-<id> ping <instance-ip> -- if this works, the issue is between the namespace and the instance| SE Phase | Networking Debug Activity | Reference | |----------|--------------------------|-----------| | Phase D (Integration & Test) | Network integration testing: verify end-to-end connectivity through the SDN stack, validate security group enforcement, confirm DHCP assignment across all network types, test floating IP reachability from external networks. Each test exercises a different segment of the packet path. | SP-6105 SS 5.2 (Product Integration -- service interface verification) | | Phase E (Operations) | Operational network troubleshooting: diagnose connectivity failures using the systematic trace workflows in this skill. Every troubleshooting procedure follows the "observe symptom, form hypothesis, test hypothesis, resolve or escalate" pattern from NASA's anomaly resolution process. | SP-6105 SS 5.4 (Product Validation -- operational environment verification) | | Phase E (Sustainment) | Network configuration changes during operations: MTU adjustments, security group updates, new network creation. Each change requires verification using the diagnostic procedures in this skill to confirm the change achieved the intended effect without side effects. | NPR 7123.1 SS 5.4 (Sustainment -- operational baseline management) |
npx skills add Tibsfox/openstack-networking-debug下载完整 Skill 目录,包含 SKILL.md 及所有相关文件
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer