How to collect the packet capture from container level and vm level
search cancel

How to collect the packet capture from container level and vm level

book

Article ID: 427962

calendar_today

Updated On:

Products

VMware Tanzu Platform - Cloud Foundry

Issue/Introduction

For app-instance packet capture, there are two options to collect tcpdump:

  • Container-level capture
  • VM-level (bosh pcap) capture with filters

Resolution

# capture network traffic on one instance group
bosh -e vbox -d cf pcap router -o capture.pcap

# capture network traffic on a single instance
bosh -e vbox -d cf pcap router/<GUID> -o capture.pcap

# capture network traffic with filter for a specific source host
bosh -e vbox -d cf pcap router -f "src host 192.168.#.##" -o capture.pcap

# capture network traffic with snap length 64 to save the first 64 bytes of each packet and filter for specific hosts
bosh -e vbox -d cf pcap router -f "host 192.168.#.#1 or host 192.168.#.#2" -s 64 -o capture.pcap