User login

Scamper PMTUD

Scamper is designed for doing Internet-scale measurement in parallel, so the operation of scamper might seem bewildering at first. Scamper will not output anything indicating progress until the test has completed. Depending on the server being tested, this can take some time -- several minutes if it fails PMTUD because the server will wait for the TCP retransmit timer to expire before retransmitting.
To use the TBIT-style PMTUD test, first build scamper. Note that the test requires IPFW to be installed and operating on the system, so the test is restricted to FreeBSD and MacOS X at present. By default, scamper will use rules 1-500 (as necessary) to block TCP packets from the host's TCP stack so that the host does not interfere in the measurement by resetting the TCP connection, so it is important there are no rules on the system in these positions because scamper will delete them after it has used a particular rule number. Please read the FreeBSD handbook for more information about using ipfw. Here is the IPFW configuration I use:

$ ipfw list
65534 allow ip from any to any
65535 deny ip from any to any

Then, run something like this to test an HTTP server:

$ scamper -F ipfw -I "tbit -M 1280 -u 'http://www.debian.org/' 2001:388:1034:2900::26"
tbit from 2001:df0:4:4000:205:1cff:fe11:beff to 2001:388:1034:2900::26
 port 80, mss 1440, result: pmtud-success
 [  0.050] TX SYN       64  seq = 0:0            
 [  0.295] RX SYN/ACK   64  seq = 0:1            
 [  0.295] TX           60  seq = 1:1            
 [  0.295] TX          233  seq = 1:1(173)       
 [  0.541] RX           60  seq = 1:174          
 [  0.543] RX         1500  seq = 1:174(1440)    
 [  0.543] TX PTB     1280  mtu = 1280
 [  0.543] RX         1500  seq = 1441:174(1440) 
 [  0.543] RX         1500  seq = 2881:174(1440) 
 [  0.790] RX         1280  seq = 1:174(1220)    
 [  0.790] TX           60  seq = 174:1221       
 [  0.790] RX         1280  seq = 1221:174(1220) 
 [  0.790] TX FIN       60  seq = 174:2441       
 [  0.790] RX          500  seq = 2441:174(440)  
 [  0.790] TX FIN       60  seq = 174:2881       
 [  1.035] RX         1280  seq = 2881:174(1220) 
 [  1.035] TX FIN       60  seq = 174:4101       
 [  1.035] RX          280  seq = 4101:174(220)  
 [  1.036] RX         1280  seq = 4321:175(1220) 
 [  1.036] RX         1280  seq = 5541:175(1220) 
 [  1.036] RX          500  seq = 6761:175(440)  
 [  1.036] RX         1280  seq = 7201:175(1220) 
 [  1.087] TX FIN       60  seq = 174:4321       
 [  1.137] TX           60  seq = 175:5541       
 [  1.187] TX           60  seq = 175:6761       
 [  1.237] TX           60  seq = 175:7201       
 [  1.281] RX         1280  seq = 8421:175(1220) 
 [  1.281] RX          500  seq = 9641:175(440)  
 [  1.287] TX           60  seq = 175:8421       
 [  1.334] RX         1280  seq = 10081:175(1220)
 [  1.336] TX           60  seq = 175:9641       
 [  1.387] TX           60  seq = 175:10081      
 [  1.433] RX         1280  seq = 11301:175(1220)
 [  1.433] RX          500  seq = 12521:175(440) 
 [  1.436] TX           60  seq = 175:11301      
 [  1.483] RX         1280  seq = 12961:175(1220)
 [  1.483] RX FIN      265  seq = 14181:175(205) 
 [  1.486] TX           60  seq = 175:12521      
 [  1.536] TX           60  seq = 175:12961      
 [  1.588] TX           60  seq = 175:14181      
 [  1.638] TX           60  seq = 175:14387  

The output shows the result of the test and then all packets involved in the TCP connection. This test shows success, and by inspecting the packet trace dumped we see the following packet sequence showing the reason why success was inferred:

 [  0.543] RX         1500  seq = 1:174(1440)    
 [  0.543] TX PTB     1280  mtu = 1280
 [  0.543] RX         1500  seq = 1441:174(1440) 
 [  0.543] RX         1500  seq = 2881:174(1440) 
 [  0.790] RX         1280  seq = 1:174(1220)

We see a TCP packet with sequence 1 being received of size 1500 bytes. Then we see the PTB message being sent, and then 250ms later the TCP packet with sequence 1 is received, and it is 1280 bytes in size.
If you want to test DNS and SMTP servers, you can do so with the following commands respectively:

$ scamper -F ipfw -I "tbit -p dns "
$ scamper -F ipfw -I "tbit -p smtp "