Diagnostic Steps Les Cottrell SLAC Presented at the

  • Slides: 37
Download presentation
Diagnostic Steps Les Cottrell – SLAC Presented at the Optimization Technologies for Low-Bandwidth Networks,

Diagnostic Steps Les Cottrell – SLAC Presented at the Optimization Technologies for Low-Bandwidth Networks, ICTP Workshop, Trieste, Italy, 9 -20 October 2006 http: //www. slac. stanford. edu/grp/scs/net/talk 06/diagnostics. ppt Partially funded by DOE/MICS Field Work Proposal on Internet End-to-end Performance Monitoring (IEPM), also supported by IUPAP http: //sdu. ictp. it/lowbandwidth/

Get ready u. Bring up terminal window so can try some commands u. Bring

Get ready u. Bring up terminal window so can try some commands u. Bring up the presentation so can click on links: n www. slac. stanford. edu/grp/scs/net/talk 06/diagnostics. ppt Les Cottrell, SLAC Slide: 2

Aim Goal: provide a practical guide to debugging common problems u. Why is diagnosis

Aim Goal: provide a practical guide to debugging common problems u. Why is diagnosis difficult yet important? u. Local host u. Ping, Traceroute, Ping. Route u. Looking at time series u. Locating bottlenecks u. Correlation of problems with routes u. More tools and problems u. Where is a node u. Who do you tell, what do you say? u. Case studies and More Information Les Cottrell, SLAC Slide: 3

Why is diagnosis difficult? u Internet's evolution as a composition of independently developed and

Why is diagnosis difficult? u Internet's evolution as a composition of independently developed and deployed protocols, technologies, and core applications u Diversity, highly unpredictable, hard to find “invariants” u Rapid evolution & change, no equilibrium so far n Findings may be out of date u Measurement/diagnosis not high on vendors list of priorities n Resources/skill focus on more interesting an profitable issues n Tools lacking or inadequate n Implementations are flaky & not fully tested with new releases Les Cottrell, SLAC Slide: 4

Add to that … u Distributed systems are very hard n A distributed system

Add to that … u Distributed systems are very hard n A distributed system is one in which I can't get my work done because a computer I've never heard of has failed. Butler Lampson u Network is deliberately transparent u The bottlenecks can be in any of the following components: n n the applications the OS the disks, NICs, bus, memory, etc. on sender or receiver the network switches and routers, and so on u Problems may not be logical n Most problems are operator errors, configurations, bugs u When building distributed systems, we often observe unexpectedly low performance l the reasons for which are usually not obvious u Just when you think you’ve cracked it, in steps security n Firewall, NAT boxes etc. n Block pings, traceroute looks like port scan, diagnostic tool ports are blocked … n ISPs worried about providing access to core, making results public, & privacy issues Les Cottrell, SLAC Slide: 5

Sources of problems u. Host “errors” n TCP buffers, heavy utilization … u. Duplex

Sources of problems u. Host “errors” n TCP buffers, heavy utilization … u. Duplex mismatch (Ethernet) u. Misconfigured router/switches n Including routing errors, especially for backup paths u. Bad equipment, wiring/fiber problem u. Congestion Les Cottrell, SLAC Slide: 6

Fire: Local Host u Usual Unix tools (uname-a, top, vmstat, iostat …) n Is

Fire: Local Host u Usual Unix tools (uname-a, top, vmstat, iostat …) n Is the host overloaded, do you have a gateway (route), name server (nslookup/dig), which interface are you using (mii-tool (needs root), gives duplex & speed = common error source) l 21 cottrell@pinger: ~>sudo mii-tool eth 0 – eth 0: 100 Mbit, full duplex, link ok n Net: ifconfig –a (look at errors), netstat –a | more u Is server running (if you know port)? n >telnet localhost 2811 l Trying 127. 0. 0. 1 l 220 aftpexp 04. bnl. gov Grid. FTP Server 1. 12 GSSAPI type Globus/GSI wu-2. 6. 2 (gcc 32 dbg, 1069715860 -42) ready. l ^] l telnet> quit Les Cottrell, SLAC Slide: 7

Ping u Ping 1. to localhost, 2. ping to gateway (use route or traceroute

Ping u Ping 1. to localhost, 2. ping to gateway (use route or traceroute to find gateway), 3. ping to well known host 4. & to relevant remote host n Use IP address to avoid nameserver problems n Look for connectivity, loss, RTT, jitter, dups n May need to run for a long time to see some pathologies (e. g. bursty loss due to DSL loss of sync) n Try flood pings if suspect rate limited n Use synack or sting if ICMP blocked l www-iepm. slac. stanford. edu/tools/synack/ Les Cottrell, SLAC Slide: 8

Ping example Repeat count Packet size Remote host RTT syrup: /home$ ping -c 6

Ping example Repeat count Packet size Remote host RTT syrup: /home$ ping -c 6 -s 64 thumper. bellcore. com PING thumper. bellcore. com (128. 96. 41. 1): 64 data bytes Missing seq # 72 bytes from 128. 96. 41. 1: icmp_seq=0 ttl=240 time=641. 8 ms 72 bytes from 128. 96. 41. 1: icmp_seq=2 ttl=240 time=1072. 7 ms Summary 72 bytes from 128. 96. 41. 1: icmp_seq=3 ttl=240 time=1447. 4 ms 72 bytes from 128. 96. 41. 1: icmp_seq=4 ttl=240 time=758. 5 ms 72 bytes from 128. 96. 41. 1: icmp_seq=5 ttl=240 time=482. 1 ms --- thumper. bellcore. com ping statistics --- 6 packets transmitted, 5 packets received, 16% packet loss round-trip min/avg/max = 482. 1/880. 5/1447. 4 ms Les Cottrell, SLAC Slide: 9

Try the following Ping Examples ping cepheid. physics. utoronto. ca From mcl-gpb. gw. utoronto.

Try the following Ping Examples ping cepheid. physics. utoronto. ca From mcl-gpb. gw. utoronto. ca … Destination Host Unreachable ping rolandlap. ph. unimelb. edu. au From rtr 4 -000037. unimelb. edu. au … Packet filtered ping www. ncit. edu. np ping: unknown host www. ncit. edu. np ping inpe-gw-sp. cptec. inpe. br From 150. 163. 200. 100 icmp_seq=0 Time to live exceeded ping www. ug. edu. gh 34 packets transmitted, 0 received, 100% packet loss, time 33068 ms synack -p 80 -k 5 www. ug. edu. gh 5 packets transmitted, 5 packets received, 0. 00 percent packet loss round-trip (ms) min/avg/max = 182. 052/182. 701/183. 151 (std = 0. 578) (median = 183. 095) (interquartile range = 1. 039) (25 percentile = 182. 085) (75 percentile = 183. 124) Les Cottrell, SLAC Slide: 10

3 rd party ping u Find servers: n http: //www. slac. stanford. edu/comp/net/wanmon/traceroute-srv. html

3 rd party ping u Find servers: n http: //www. slac. stanford. edu/comp/net/wanmon/traceroute-srv. html l. Glasgow University*# Scotland. l. ICTP +*, Trieste, Italy. l. IHEP + Beijing, China. n Modify URL to request a ping for hosts with + lpinger. ictp. it/cgi-bin/traceroute. pl? function=ping&target=brunsvigia. tenet. ac. za lping from 134. 79. 18. 163 (www. slac. stanford. edu) to 196. 21. 99. 222 (brunsvigia. tenet. ac. za) for 140. 105. 16. 64 – – PING 196. 21. 99. 222: 56 data bytes 64 bytes from brunsvigia. tenet. ac. za (196. 21. 99. 222): icmp_seq=0. time=370. ms 64 bytes from brunsvigia. tenet. ac. za (196. 21. 99. 222): icmp_seq=1. time=1911. ms 64 bytes from brunsvigia. tenet. ac. za (196. 21. 99. 222): icmp_seq=2. time=911. ms 64 bytes from brunsvigia. tenet. ac. za (196. 21. 99. 222): icmp_seq=3. time=385. ms – 64 bytes from brunsvigia. tenet. ac. za (196. 21. 99. 222): icmp_seq=4. time=366. ms – ----196. 21. 99. 222 PING Statistics---- 5 packets transmitted, 5 packets received, 0% packet loss round-trip (ms) min/avg/max = 366/788/1911 Les Cottrell, SLAC Slide: 11

Brazil 300 ms E. Coast US Europe & S. America RTT (ms) Frequency W.

Brazil 300 ms E. Coast US Europe & S. America RTT (ms) Frequency W. Coast US RTT from California to world Europe 0. 3*0. 6 c 300 ms Longitude (degrees) Source = Palo Alto CA, W. Coast RTT (ms. ) Les Cottrell, SLAC Data from CAIDA Skitter. Slide: project 12

Traceroute u. Traceroute to remote host n Is the route direct, over commercial congested

Traceroute u. Traceroute to remote host n Is the route direct, over commercial congested nets u. Reverse traceroute from remote host to you or 3 rd party n www. slac. stanford. edu/comp/net/wan-mon/traceroutesrv. html n www. tracert. com/ CAIDA Mouse sensitive map Les Cottrell, SLAC Slide: 13

Traceroute Probes/hop Max hops Remote host u UDP/ICMP tool to show route packets take

Traceroute Probes/hop Max hops Remote host u UDP/ICMP tool to show route packets take from local to remote host location 17 cottrell@flora 06: ~>traceroute -q 1 -m 20 lhr. comsats. net. pk traceroute to lhr. comsats. net. pk (210. 56. 10), 20 hops max, 40 byte packets 1 RTR-CORE 1. SLAC. Stanford. EDU (134. 79. 19. 2) 0. 642 ms 2 RTR-MSFC-DMZ. SLAC. Stanford. EDU (134. 79. 135. 21) 0. 616 ms 3 ESNET-A-GATEWAY. SLAC. Stanford. EDU (192. 68. 191. 66) 0. 716 ms 4 snv-slac. es. net (134. 55. 208. 30) 1. 377 ms 5 nyc-snv. es. net (134. 55. 205. 22) 75. 536 ms Long delay 6 nynap-nyc. es. net (134. 55. 208. 146) 80. 629 ms satellite 7 gin-nyy-bbl. teleglobe. net (192. 157. 69. 33) 154. 742 ms 8 if-1 -0 -1. bb 5. New. York. Teleglobe. net (207. 45. 223. 5) 137. 403 ms 9 if-12 -0 -0. bb 6. New. York. Teleglobe. net (207. 45. 221. 72) 135. 850 ms No response: 10 207. 45. 205. 18 (207. 45. 205. 18) 128. 648 ms Lost packet or router 11 210. 56. 31. 94 (210. 56. 31. 94) 762. 150 ms 12 islamabad-gw 2. comsats. net. pk (210. 56. 8. 4) 751. 851 ms ignores 13 * Les SLAC Slide: 14 14 Cottrell, lhr. comsats. net. pk (210. 56. 10) 827. 301 ms

Traceroute server results u Example: www. slac. stanford. edu/cgi-bin/nph-traceroute. pl Related info Security warning

Traceroute server results u Example: www. slac. stanford. edu/cgi-bin/nph-traceroute. pl Related info Security warning Traceroute Enter IP address or name Les Cottrell, SLAC Slide: 15

Graphical Traceroute uhttp: //visualroute. visualware. com/ Les Cottrell, SLAC Slide: 16

Graphical Traceroute uhttp: //visualroute. visualware. com/ Les Cottrell, SLAC Slide: 16

Pingroute u Ping routers along route, e. g. a tool to install that helps:

Pingroute u Ping routers along route, e. g. a tool to install that helps: n www. slac. stanford. edu/comp/net/fpingroute. pl n or www. slac. stanford. edu/comp/net/pingroute. pl if fping N/A 15 cottrell@noric 04: ~>fpingroute. pl does a traceroute to the selected host. For each of the hops along the route it then uses fping to ping each node (in parallel) 'count' times. Output includes traceroute information, RTTs, losses for 100 and 'size‘ byte pings. Version=0. 21, 8/24/04 Usage: fpingroute. pl [Opts] host where host is the remote host's IP address or name e. g. www. slac. stanford. edu Opts: [-c count default=10] [-s size default=1400] [-i initial default=1] Example: fpingroute. pl -i 3 -c 10 -s 1400 www. triumf. ca Les Cottrell, SLAC Slide: 17

Pingroute example u. May help tell where losses start u. Will need many pings

Pingroute example u. May help tell where losses start u. Will need many pings if losses small Start of losses? But? Start of sustained losses Routers may not respond Les Cottrell, SLAC Slide: 18

Look at time series u. Look at history plots (Ping. ER, IEPM-BW, ISPs, own

Look at time series u. Look at history plots (Ping. ER, IEPM-BW, ISPs, own border router etc. ), when did problem start, how big an effect is it? n Assumes you know “proximity” of paths for which there archived active measurements to the path that you are interested in n Also that relevant measurements exist lwww-iepm. slac. stanford. edu/pinger/ lamp. nlanr. net/ unfortunately no longer funded l. ISPs plots: (www. slac. stanford. edu/comp/net/wanmon/netmon. html for a a place to start looking) – – Abilene: http: //stryper. uits. iu. edu/abilene/ GEANT: http: //stats. geant. net/usagemap RIPE: http: //www. ripe. net/projects/ttm/Plots/ ESnet: http: //measurement. es. net/ (OWAMP) n Collaboration between Internet 2/ESnet/Geant to provide access to router measurements holds promise u. Look at traceroute histories (see later) Les Cottrell, SLAC Slide: 19

Example time series u. Look for change in measured value n Note time n

Example time series u. Look for change in measured value n Note time n Correlate Italy disconnected Les Cottrell, SLAC Slide: 20

Find location of a bottleneck u Look at hops along the path n Pingroute

Find location of a bottleneck u Look at hops along the path n Pingroute (see earlier) n If possible look at utilizations or active probes launched from there n Pathneck http: //www. cs. cmu. edu/~hnn/pathneck/ l Uses trains of packets to probe hops along route, looking at dispersion induced by queuing n Pipechar (son of pathchar, pchar) http: //www. dsd. lbl. gov/Old. Projects/NCS l Send packets of varying sizes to each router along path l Look at RTT as a function of packet size l From slope deduce “bandwidth” l Diferentiate to find capacity at each hop l However pipechar has uncertain support l Packet size variation limited to 1 -MTU (~1500) Bytes, so on fast links timing is difficult, with the result that estimates may not be reliable (OK for slow links) Les Cottrell, SLAC Slide: 21

Divide & Conquer u. Abilene has hosts at major Po. Ps running bwctl n

Divide & Conquer u. Abilene has hosts at major Po. Ps running bwctl n So make measurements from end to middle to ID loss of performance n http: //e 2 epi. internet 2. edu/pipes/ami/bwctl/ Les Cottrell, SLAC Slide: 22

Correlate with routes (traceanal) Les Cottrell, SLAC Slide: 23

Correlate with routes (traceanal) Les Cottrell, SLAC Slide: 23

Visualizing traceroutes u www. slac. stanford. edu/comp/net/iepmbw. slac. stanford. edu/slac_wan_bw_tests. html, => traceroutes u

Visualizing traceroutes u www. slac. stanford. edu/comp/net/iepmbw. slac. stanford. edu/slac_wan_bw_tests. html, => traceroutes u One compact page per day u One row per host, one column per hour u One character per traceroute to indicate pathology or change (usually period(. ) = no change) u Identify unique routes with a number n Be able to inspect the route associated with a route number n Provide for analysis of long term route evolutions Route # at start of day, gives idea of route stability Multiple route changes (due to GEANT), later restored to original route Period (. ) means no change Les Cottrell, SLAC Slide: 24

Changes in network topology (BGP) can result in dramatic changes in performance Remote host

Changes in network topology (BGP) can result in dramatic changes in performance Remote host Hour s) bp (100 M s o t t e Los-N Samples of traceroute trees generated from the table Snapshot of traceroute summary table Mbits/s Notes: 1. Caltech misrouted via Los-Nettos 100 Mbps commercial net 14: 00 -17: 00 2. ESnet/GEANT working on routes from 2: 00 to 14: 00 3. A previous occurrence went un-noticed for 2 months 4. Next step is to auto detect and notify Drop in performance Back to original path Dynamic BW capacity (DBC) (From original path: SLAC-CENIC-Caltech to SLAC-Esnet-Los. Nettos (100 Mbps) -Caltech ) Changes detected by IEPM-Iperf and Ab. WE Available BW = (DBC-XT) Cross-traffic (XT) Esnet-Los. Nettos segment in the path (100 Mbits/s) measurement Les. ABw. E Cottrell, SLACone/minute for 24 hours Thurs Oct 9 9: 00 am to Fri Oct 10 9: 01 am Slide: 25

Moving towards application u Try user application (mem to mem & disk to disk)

Moving towards application u Try user application (mem to mem & disk to disk) n Grid. FTP, bbcp, bbftp … u Iperf or thrulay (also provides RTT) to test TCP or UDP throughput (injects traffic, +server) n dast. nlanr. net/Projects/Iperf/ n www. internet 2. edu/~shalunov/thrulay/ Bottleneck u Available bandwidth: Min spacing n Pathload: www. Spacing preserved At bottleneck static. cc. gatech. edu/fac/Constantinos. Dovrolis/pathload. html On higher speed links n Pathchirp: www. spin. rice. edu/Software/path. Chirp/ n bing … u NDT n n What are the interface speeds? What is the bottleneck? Is there a duplex mismatch? Are buffers set right (both ends)? Les Cottrell, SLAC Slide: 26

NDT example (Rich Carlson) uhttp: //e 2 epi. internet 2. edu/ndt/ Les Cottrell, SLAC

NDT example (Rich Carlson) uhttp: //e 2 epi. internet 2. edu/ndt/ Les Cottrell, SLAC Slide: 27

Other tools u Ntop n Summarizes libpcap (sniffer) infor u Internet 2 Detective: n

Other tools u Ntop n Summarizes libpcap (sniffer) infor u Internet 2 Detective: n Tests connectivity to I 2, bandwidth, multicast, IPv 6 l Can run as Java applet l http: //detective. internet 2. edu/ u NLANR Internet Advisor u Ethereal, tcpdump, snoop for masochists u Passive tools: n Netflow for characterizing network, spotting abnormalities, e. g. l www. itec. oar. net/abilene-netflow l www. slac. stanford. edu/comp/net/slac-netflow/html/SLACnetflow. html n SNMP based tools Les Cottrell, SLAC Slide: 28

And then … u Wireless n Avoid peer-to-peer/ad-hoc connections l Disable connecting to ad-hoc

And then … u Wireless n Avoid peer-to-peer/ad-hoc connections l Disable connecting to ad-hoc (set infrastructure only) l Disable bridging l How to do it varies by OS (XP, OSX, Linux) n Ad hoc can still interfere if on same channel n Tools to locate an access point (e. g. Yellow-Jacket) n Vendors have management tools to enable APs to detect rogue APs u NAT boxes may block or not support application n Private addresses: l 10. 0 - 10. 255 a single class A net l 172. 16. 0. 0 - 172. 31. 255 16 contiguous class Bs l 192. 168. 0. 0 – 192. 168. 255 256 contiguous class Cs Les Cottrell, SLAC Slide: 29

“Where is” a host? u Beware some of information following is ephemeral, in general

“Where is” a host? u Beware some of information following is ephemeral, in general use heuristics with Google u Google “Internet country codes” for TLDs n Host may not be in TLD country, especially developing regions often use proxies elsewhere u Location may be encoded in router name n ipls=Indianapolis, snv=Sunnyvale … u Name server lookup to find hostname given IP address 47 cottrell@netflow: ~>nslookup Server: localhost Address: 127. 0. 0. 1 Name: lhr. comsats. net. pk Address: 210. 56. 16. 10 u Use a whois server, e. g. l www. networksolutions. com/cgi-bin/whois (Americas & Africa) l www. ripe. net/cgi-bin/whois (Europe) l www. apnic. net/ (Asia) l May identify site name, address, contact, etc, not all domains are in databases (e. g. will not find comsats. net. pk) Les Cottrell, SLAC Slide: 30

“Where is” a host – cont. u Find the Autonomous System (AS) administering n

“Where is” a host – cont. u Find the Autonomous System (AS) administering n Form giving AS for domain name lhttp: //www. fixedorbit. com/search. htm l. Gives AS number, name adjacent AS’s web page for AS n Given an AS find out more about it: l. Use http: //bgp. potaroo. net/cidr/ go to bottom and enter AS into form: – Gives ISP name, web page, phone number, email, hours etc. n Review list of AS's ordered by Upstream AS Adjacency lwww. telstra. net/ops/bgp-as-upsstm. txt l. Tells what AS is upstream of an ISP Les Cottrell, SLAC Slide: 31

“Where is” a host - cont. u. May be able to get latitude &

“Where is” a host - cont. u. May be able to get latitude & longitude: n http: //www. hostip. info/index. html n http: //www. ip 2 location. com/ l. But it is a subscriber service ($$$, but …), however it is probably best for developing regions n Google: lwww. geoiptool. com/http: //www. geoiptool. com/ u. Triangulate pings from landmarks (in development) n http: //www. slac. stanford. edu/comp/net/wan-mon/tulip/ l. Need more landmarks, send email cottrell@slac. stanford. edu n http: //www. cs. cornell. edu/~bwong/octant/ # for US only Les Cottrell, SLAC Slide: 32

Who you gonna tell? u Local network support people u Internet Service Provider (ISP)

Who you gonna tell? u Local network support people u Internet Service Provider (ISP) usually done by local networker n Usually will know immediate one, e. g. trouble@es. net n Use puck. nether. net/netops/nocs. cgi to find ISP n Use www. telstra. net/ops/bgp-as-upsstm. txt to find upstream ISPs u Well managed sites and ISPs maintain a list of email addresses such as abuse@ or postmaster@, that one can send email to, for example to complain about spam etc. n This follows an Internet recommendation (RFC 2142). n Some less helpful sites do not provide such services, for more on these, see RFC-ignorant. org Les Cottrell, SLAC Slide: 33

What ya gonna tell ‘em? u Describe problem with details n What is affected?

What ya gonna tell ‘em? u Describe problem with details n What is affected? l Application, host OS (uname –a), NIC (ifconfig, route) n How is it affected? l Non responsiveness, unable to contact remote host l Slow performance (see Brian’s talk), packet loss n When did it start? u Send ping output between hosts u Send traceroute forward & reverse – if possible n Maybe use –I (ICMP option) u NDT u Identify when it started u If complex think about creating web page with details n Top, vmstat, pingroute, pipechar, application output (Grid. FTP, iperf)… Les Cottrell, SLAC Slide: 34

Web page examples: Case studies uhttp: //www. slac. stanford. edu/grp/scs/net/case/html/ uhttp: //e 2 epi.

Web page examples: Case studies uhttp: //www. slac. stanford. edu/grp/scs/net/case/html/ uhttp: //e 2 epi. internet 2. edu/case-studies/ Les Cottrell, SLAC Slide: 35

More Information u. Tutorial on monitoring n www. slac. stanford. edu/comp/net/wan-mon/tutorial. html u. RFC

More Information u. Tutorial on monitoring n www. slac. stanford. edu/comp/net/wan-mon/tutorial. html u. RFC 2151 on Internet tools n www. freesoft. org/CIE/RFC/Orig/rfc 2151. txt u. Network monitoring tools n www. slac. stanford. edu/xorg/nmtf-tools. html n www. caida. org/tools/taxonomy/ u. Network Performance Tools: an I 2 Cookbook n e 2 epi. internet 2. edu/network-perf-wk/tools-cookbook. pdf u. Network Monitoring sites n www. slac. stanford. edu/comp/net/wan-mon/netmon. html u. How to Accelerate Your Internet, ISBN: 0 -9778093 -15, Ed. Flickenger R. Les Cottrell, SLAC Slide: 36

Local Host - LISA u Localhost Information Service Agent LISA is a Java Web

Local Host - LISA u Localhost Information Service Agent LISA is a Java Web Start application which provides: n Integration with Mon. ALISA n Complete Monitoring of the System (Load, CPU, Memory, Disk IO, Paging, Processes, Network Traffic and Connectivity. . . ). n History and instantaneous n Filters to trigger actions when predefined conditions are detected. n A user Friendly GUI to present the monitoring information. n Optimization modules for distributed applications. n It is a lightweight application that can be easily deployed on any system. n Modules for End to End network measurements ( e. g. IPERF). n See monalisa. caltech. edu/dev_lisa. html Les Cottrell, SLAC Slide: 37