Commit c4fb4a

2026-02-20 10:17:55 Cédric: -/-
astuces esxi.md ..
@@ 94,3 94,55 @@
vmfsfilelockinfo -p /vmfs/volumes/<UUID>/VM_name/VM_name-000001-delta.vmdk -v 192.168.x.x -u administrator@vsphere.local
```
+
+ ##### Débugguer des flux réseau sous ESX avec pktcap :
+ Voir notamment ce billet : https://vblog.io/le-manuel-du-parfait-plombier-nsx-t-maj-continue/
+ D'abord extraire le numéro de port de la nic virtuelle que vous voulez pister :
+ ```shell
+ chronos# net-stats -l
+ PortNum Type SubType SwitchName MACAddress ClientName
+ 33558533 4 0 DvsPortset-0 54:b2:03:8d:65:45 vmnic0
+ 33558535 3 0 DvsPortset-0 54:b2:03:8d:65:46 vmk0
+ 33558542 5 7 DvsPortset-0 00:50:56:a7:4a:d4 exo.eth0
+ 33558543 5 7 DvsPortset-0 00:50:56:a7:22:2c exo.eth3
+ 33558544 5 7 DvsPortset-0 00:50:56:a7:aa:08 exo.eth1
+ 33558545 5 7 DvsPortset-0 00:50:56:a7:de:c3 exo.eth2
+ 33558546 5 9 DvsPortset-0 00:0c:29:5f:49:f1 titan.eth0
+ 33558548 4 0 DvsPortset-0 54:b2:03:8d:65:46 vmnic1
+ 33558558 5 9 DvsPortset-0 00:50:56:a5:5e:af log.vlab.eth0
+ 33558559 5 9 DvsPortset-0 00:50:56:a5:c5:bf edge.eth1
+ 33558560 5 9 DvsPortset-0 00:50:56:a5:08:19 edge.eth0
+ 33558561 5 9 DvsPortset-0 00:0c:29:4f:7d:3a vcenter.vlab.eth0
+ 33558562 5 9 DvsPortset-0 00:50:56:85:0b:68 vpnchu.eth0
+ ```
+ Ensuite lancer le pktcap :
+ ```shell
+ chronos# pktcap-uw --switchport 33558562 --dir 2 -o - | tcpdump-uw -enr -
+ The switch port id is 0x02001022.
+ pktcap: The output file is -.
+ pktcap: No server port specifed, select 62906 as the port.
+ pktcap: Local CID 2.
+ pktcap: Listen on port 62906.
+ pktcap: Accept...
+ reading from file -, link-type EN10MB (Ethernet)
+ pktcap: Vsock connection from port 1032 cid 2.
+ 21:51:51.607466 00:50:56:ba:e3:48 > 01:00:5e:7f:ff:fa, ethertype IPv4 (0x0800), length 143: 172.16.16.7.51483 > 239.255.255.250.1900: UDP, length 101
+ 21:51:51.607518 00:50:56:ba:e3:48 > 01:00:5e:7f:ff:fa, ethertype IPv4 (0x0800), length 143: 172.16.16.7.51483 > 239.255.255.250.1900: UDP, length 101
+ 21:51:51.677905 70:ee:50:05:4c:ea > ff:ff:ff:ff:ff:ff, ethertype ARP (0x0806), length 60: Request who-has 172.16.16.254 tell 172.16.16.151, length 46
+ 21:51:51.677935 70:ee:50:05:4c:ea > ff:ff:ff:ff:ff:ff, ethertype ARP (0x0806), length 60: Request who-has 172.16.16.254 tell 172.16.16.151, length 46
+ 21:51:51.733048 00:11:32:85:4c:41 > ff:ff:ff:ff:ff:ff, ethertype ARP (0x0806), length 60: Request who-has 172.16.16.43 tell 172.16.16.50, length 46
+ 21:51:51.733076 00:11:32:85:4c:41 > ff:ff:ff:ff:ff:ff, ethertype ARP (0x0806), length 60: Request who-has 172.16.16.43 tell 172.16.16.50, length 46
+ 21:51:51.812814 00:50:56:85:0b:68 > 00:50:56:a7:4a:d4, ethertype IPv4 (0x0800), length 118: 172.16.16.27.50397 > 80.82.234.188.4500: UDP-encap: ESP(spi=0x05af6f44,seq=0xa), length 76
+ (...)
+ 21:51:57.087427 00:50:56:ba:e3:48 > ff:ff:ff:ff:ff:ff, ethertype IPv4 (0x0800), length 63: 172.16.16.7.49652 > 172.16.16.255.32414: UDP, length 21
+ 21:51:57.087528 00:50:56:ba:e3:48 > ff:ff:ff:ff:ff:ff, ethertype IPv4 (0x0800), length 63: 172.16.16.7.59333 > 172.16.16.255.32412: UDP, length 21
+ 21:51:57.087539 00:50:56:ba:e3:48 > ff:ff:ff:ff:ff:ff, ethertype IPv4 (0x0800), length 63: 172.16.16.7.59333 > 172.16.16.255.32412: UDP, length 21
+ 21:51:57.235970 f4:5c:89:b4:63:f7 > 01:00:5e:7f:ff:fa, ethertype IPv4 (0x0800), length 217: 172.16.16.28.58719 > 239.255.255.250.1900: UDP, length 175
+ 21:51:57.235985 f4:5c:89:b4:63:f7 > 01:00:5e:7f:ff:fa, ethertype IPv4 (0x0800), length 217: 172.16.16.28.58719 > 239.255.255.250.1900: UDP, length 175
+ tcpdump-uw: pcap_loop: error reading dump file: Interrupted system call
+ pktcap: Join with dump thread failed.
+ pktcap: Destroying session 4.
+ pktcap:
+ pktcap: Dumped 26 packet to file -, dropped 0 packets.
+ pktcap: Done.
+ ```
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9