Skip to content

Instantly share code, notes, and snippets.

@ChenLingPeng
Created June 11, 2019 12:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ChenLingPeng/50f02a1c6f6e4e5a195206f60baece14 to your computer and use it in GitHub Desktop.
Save ChenLingPeng/50f02a1c6f6e4e5a195206f60baece14 to your computer and use it in GitHub Desktop.
tcpdump for netperf TCP_CRR test
# bad packet which block the test: 192.168.2.2 is client IP
10:32:43.606095 Out fe:17:af:ce:21:8e ethertype IPv4 (0x0800), length 76: (tos 0x0, ttl 64, id 10789, offset 0, flags [DF], proto TCP (6), length 60)
192.168.2.2.5445 > 192.168.1.2.37963: Flags [S], cksum 0x4e16 (correct), seq 2138771912, win 64240, options [mss 1460,sackOK,TS val 174142831 ecr 0,nop,wscale 7], length 0
10:32:43.606102 In 46:57:76:9e:29:be ethertype IPv4 (0x0800), length 76: (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 60)
192.168.1.2.37963 > 192.168.2.2.5445: Flags [S.], cksum 0x6056 (correct), seq 2657666379, ack 2138771913, win 65160, options [mss 1460,sackOK,TS val 2589060112 ecr 174142831,nop,wscale 7], length 0
10:32:43.606105 Out fe:17:af:ce:21:8e ethertype IPv4 (0x0800), length 68: (tos 0x0, ttl 64, id 10790, offset 0, flags [DF], proto TCP (6), length 52)
192.168.2.2.5445 > 192.168.1.2.37963: Flags [.], cksum 0x8bb5 (correct), seq 2138771913, ack 2657666380, win 502, options [nop,nop,TS val 174142831 ecr 2589060112], length 0
10:32:43.606129 Out fe:17:af:ce:21:8e ethertype IPv4 (0x0800), length 132: (tos 0x0, ttl 64, id 10791, offset 0, flags [DF], proto TCP (6), length 116)
192.168.2.2.5445 > 192.168.1.2.37963: Flags [P.], cksum 0x1928 (correct), seq 2138771913:2138771977, ack 2657666380, win 502, options [nop,nop,TS val 174142831 ecr 2589060112], length 64
10:32:43.606134 In 46:57:76:9e:29:be ethertype IPv4 (0x0800), length 68: (tos 0x0, ttl 64, id 65185, offset 0, flags [DF], proto TCP (6), length 52)
192.168.1.2.37963 > 192.168.2.2.5445: Flags [.], cksum 0x8b6e (correct), seq 2657666380, ack 2138771977, win 509, options [nop,nop,TS val 2589060112 ecr 174142831], length 0
10:32:43.606147 In 46:57:76:9e:29:be ethertype IPv4 (0x0800), length 132: (tos 0x0, ttl 64, id 65186, offset 0, flags [DF], proto TCP (6), length 116)
192.168.1.2.37963 > 192.168.2.2.5445: Flags [P.], cksum 0x18e1 (correct), seq 2657666380:2657666444, ack 2138771977, win 509, options [nop,nop,TS val 2589060112 ecr 174142831], length 64
10:32:43.606154 In 46:57:76:9e:29:be ethertype IPv4 (0x0800), length 68: (tos 0x0, ttl 64, id 65187, offset 0, flags [DF], proto TCP (6), length 52)
192.168.1.2.37963 > 192.168.2.2.5445: Flags [F.], cksum 0x8b2d (correct), seq 2657666444, ack 2138771977, win 509, options [nop,nop,TS val 2589060112 ecr 174142831], length 0
10:32:43.606183 Out fe:17:af:ce:21:8e ethertype IPv4 (0x0800), length 68: (tos 0x0, ttl 64, id 10792, offset 0, flags [DF], proto TCP (6), length 52)
192.168.2.2.5445 > 192.168.1.2.37963: Flags [.], cksum 0x8b34 (correct), seq 2138771977, ack 2657666445, win 502, options [nop,nop,TS val 174142831 ecr 2589060112], length 0
# the good packet pattern shows below: 192.168.2.2 is client IP
10:32:43.605986 Out fe:17:af:ce:21:8e ethertype IPv4 (0x0800), length 76: (tos 0x0, ttl 64, id 8681, offset 0, flags [DF], proto TCP (6), length 60)
192.168.2.2.5443 > 192.168.1.2.37963: Flags [S], cksum 0x5dc7 (correct), seq 1737497092, win 64240, options [mss 1460,sackOK,TS val 174142831 ecr 0,nop,wscale 7], length 0
10:32:43.605992 In 46:57:76:9e:29:be ethertype IPv4 (0x0800), length 76: (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 60)
192.168.1.2.37963 > 192.168.2.2.5443: Flags [S.], cksum 0x00cd (correct), seq 3488088838, ack 1737497093, win 65160, options [mss 1460,sackOK,TS val 2589060112 ecr 174142831,nop,wscale 7], length 0
10:32:43.605995 Out fe:17:af:ce:21:8e ethertype IPv4 (0x0800), length 68: (tos 0x0, ttl 64, id 8682, offset 0, flags [DF], proto TCP (6), length 52)
192.168.2.2.5443 > 192.168.1.2.37963: Flags [.], cksum 0x2c2c (correct), seq 1737497093, ack 3488088839, win 502, options [nop,nop,TS val 174142831 ecr 2589060112], length 0
10:32:43.606020 Out fe:17:af:ce:21:8e ethertype IPv4 (0x0800), length 132: (tos 0x0, ttl 64, id 8683, offset 0, flags [DF], proto TCP (6), length 116)
192.168.2.2.5443 > 192.168.1.2.37963: Flags [P.], cksum 0xb99e (correct), seq 1737497093:1737497157, ack 3488088839, win 502, options [nop,nop,TS val 174142831 ecr 2589060112], length 64
10:32:43.606025 In 46:57:76:9e:29:be ethertype IPv4 (0x0800), length 68: (tos 0x0, ttl 64, id 14570, offset 0, flags [DF], proto TCP (6), length 52)
192.168.1.2.37963 > 192.168.2.2.5443: Flags [.], cksum 0x2be5 (correct), seq 3488088839, ack 1737497157, win 509, options [nop,nop,TS val 2589060112 ecr 174142831], length 0
10:32:43.606036 In 46:57:76:9e:29:be ethertype IPv4 (0x0800), length 132: (tos 0x0, ttl 64, id 14571, offset 0, flags [DF], proto TCP (6), length 116)
192.168.1.2.37963 > 192.168.2.2.5443: Flags [P.], cksum 0xb957 (correct), seq 3488088839:3488088903, ack 1737497157, win 509, options [nop,nop,TS val 2589060112 ecr 174142831], length 64
10:32:43.606039 Out fe:17:af:ce:21:8e ethertype IPv4 (0x0800), length 68: (tos 0x0, ttl 64, id 8684, offset 0, flags [DF], proto TCP (6), length 52)
192.168.2.2.5443 > 192.168.1.2.37963: Flags [.], cksum 0x2bac (correct), seq 1737497157, ack 3488088903, win 502, options [nop,nop,TS val 174142831 ecr 2589060112], length 0
10:32:43.606061 In 46:57:76:9e:29:be ethertype IPv4 (0x0800), length 68: (tos 0x0, ttl 64, id 14572, offset 0, flags [DF], proto TCP (6), length 52)
192.168.1.2.37963 > 192.168.2.2.5443: Flags [F.], cksum 0x2ba4 (correct), seq 3488088903, ack 1737497157, win 509, options [nop,nop,TS val 2589060112 ecr 174142831], length 0
10:32:43.606068 Out fe:17:af:ce:21:8e ethertype IPv4 (0x0800), length 68: (tos 0x0, ttl 64, id 8685, offset 0, flags [DF], proto TCP (6), length 52)
192.168.2.2.5443 > 192.168.1.2.37963: Flags [F.], cksum 0x2baa (correct), seq 1737497157, ack 3488088904, win 502, options [nop,nop,TS val 174142831 ecr 2589060112], length 0
10:32:43.606076 In 46:57:76:9e:29:be ethertype IPv4 (0x0800), length 68: (tos 0x0, ttl 64, id 14573, offset 0, flags [DF], proto TCP (6), length 52)
192.168.1.2.37963 > 192.168.2.2.5443: Flags [.], cksum 0x2ba3 (correct), seq 3488088904, ack 1737497158, win 509, options [nop,nop,TS val 2589060112 ecr 174142831], length 0
# netstat result in client netns after block
root@node-00:/home/vagrant# netstat -apn
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 192.168.2.2:5445 192.168.1.2:37963 FIN_WAIT2 5199/netperf
tcp 656 0 192.168.2.2:38603 192.168.1.2:12865 ESTABLISHED 5199/netperf
192.168.2.2:5445 connection is in FIN_WAIT2 state
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment