The following trace demonstrates all of the networking steps required to service a web request. The trace documents a web request from one host (ren.cse.ogi.edu = 129.95.50.113) to another host (www.cse.ogi.edu = 129.95.20.2) using a name server on the same network as the client (church.cse.ogi.edu = 129.95.50.2) and a default router (cse2-gw.net.ogi.edu). Along the way, a variety of standard Unix-based networking utilities are demonstrated. [root@ren root]# [root@ren root]# [root@ren root]# ifconfig -a eth0 Link encap:Ethernet HWaddr 00:04:5A:65:7A:D9 inet addr:129.95.50.113 Bcast:129.95.50.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:224436849 errors:0 dropped:0 overruns:0 frame:0 TX packets:107477935 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 RX bytes:566708121 (540.4 Mb) TX bytes:1807411786 (1723.6 Mb) Interrupt:10 Base address:0x6c00 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:1053 errors:0 dropped:0 overruns:0 frame:0 TX packets:1053 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:109696 (107.1 Kb) TX bytes:109696 (107.1 Kb) [root@ren root]# [root@ren root]# [root@ren root]# cat /etc/resolv.conf nameserver 129.95.50.2 search cse.ogi.edu [root@ren root]# [root@ren root]# [root@ren root]# dig -x 129.95.50.2 ; <<>> DiG 9.2.1 <<>> -x 129.95.50.2 ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 50931 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 3, ADDITIONAL: 3 ;; QUESTION SECTION: ;2.50.95.129.in-addr.arpa. IN PTR ;; ANSWER SECTION: 2.50.95.129.in-addr.arpa. 14400 IN PTR church.cse.ogi.edu. ;; AUTHORITY SECTION: 50.95.129.in-addr.arpa. 14400 IN NS cse.ogi.edu. 50.95.129.in-addr.arpa. 14400 IN NS zeal.admin.ogi.edu. 50.95.129.in-addr.arpa. 14400 IN NS fork.admin.ogi.edu. ;; ADDITIONAL SECTION: cse.ogi.edu. 14400 IN A 129.95.20.2 zeal.admin.ogi.edu. 14400 IN A 129.95.20.109 fork.admin.ogi.edu. 14400 IN A 129.95.20.252 ;; Query time: 225 msec ;; SERVER: 129.95.50.2#53(129.95.50.2) ;; WHEN: Mon Sep 29 15:15:58 2003 ;; MSG SIZE rcvd: 180 [root@ren root]# [root@ren root]# [root@ren root]# route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 129.95.50.0 * 255.255.255.0 U 0 0 0 eth0 127.0.0.0 * 255.0.0.0 U 0 0 0 lo default cse2-gw.net.ogi 0.0.0.0 UG 0 0 0 eth0 [root@ren root]# [root@ren root]# [root@ren root]# netstat -rn Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 129.95.50.0 0.0.0.0 255.255.255.0 U 40 0 0 eth0 127.0.0.0 0.0.0.0 255.0.0.0 U 40 0 0 lo 0.0.0.0 129.95.50.54 0.0.0.0 UG 40 0 0 eth0 [root@ren root]# [root@ren root]# [root@ren root]# dig -x 129.95.50.54 ; <<>> DiG 9.2.1 <<>> -x 129.95.50.54 ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 49220 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 3, ADDITIONAL: 3 ;; QUESTION SECTION: ;54.50.95.129.in-addr.arpa. IN PTR ;; ANSWER SECTION: 54.50.95.129.in-addr.arpa. 14400 IN PTR cse2-gw.net.ogi.edu. ;; AUTHORITY SECTION: 50.95.129.in-addr.arpa. 14400 IN NS cse.ogi.edu. 50.95.129.in-addr.arpa. 14400 IN NS zeal.admin.ogi.edu. 50.95.129.in-addr.arpa. 14400 IN NS fork.admin.ogi.edu. ;; ADDITIONAL SECTION: cse.ogi.edu. 14400 IN A 129.95.20.2 zeal.admin.ogi.edu. 14400 IN A 129.95.20.109 fork.admin.ogi.edu. 14400 IN A 129.95.20.252 ;; Query time: 222 msec ;; SERVER: 129.95.50.2#53(129.95.50.2) ;; WHEN: Mon Sep 29 15:16:18 2003 ;; MSG SIZE rcvd: 186 [root@ren root]# [root@ren root]# [root@ren root]# nslookup www.cse.ogi.edu Note: nslookup is deprecated and may be removed from future releases. Consider using the `dig' or `host' programs instead. Run nslookup with the `-sil[ent]' option to prevent this message from appearing. Server: 129.95.50.2 Address: 129.95.50.2#53 www.cse.ogi.edu canonical name = cse.ogi.edu. Name: cse.ogi.edu Address: 129.95.20.2 [root@ren root]# [root@ren root]# [root@ren root]# arp -a cse2-gw.net.ogi.edu (129.95.50.54) at 00:03:E4:3D:A8:00 [ether] on eth0 church.cse.ogi.edu (129.95.50.2) at 08:00:20:9D:01:1E [ether] on eth0 [root@ren root]# [root@ren root]# [root@ren root]# for i in 2 54 > do > arp -d 129.95.50.$i > done [root@ren root]# [root@ren root]# [root@ren root]# (sleep 10; wget http://www.cse.ogi.edu/class/cse524/test.html) >& /dev/null & [1] 20031 [root@ren root]# tcpdump -X -v -s 2048 -n host ren tcpdump: listening on eth0 15:18:57.132814 arp who-has 129.95.50.2 tell 129.95.50.113 0x0000 0001 0800 0604 0001 0004 5a65 7ad9 815f ..........Zez.._ 0x0010 3271 0000 0000 0000 815f 3202 2q......._2. 15:18:57.133091 arp reply 129.95.50.2 is-at 8:0:20:9d:1:1e 0x0000 0001 0800 0604 0002 0800 209d 011e 815f ..............._ 0x0010 3202 0004 5a65 7ad9 815f 3271 5555 5555 2...Zez.._2qUUUU 0x0020 5555 5555 5555 5555 5555 5555 5555 UUUUUUUUUUUUUU 15:18:57.133110 129.95.50.113.32774 > 129.95.50.2.domain: [udp sum ok] 57805+ A? www.cse.ogi.edu. [|domain] (DF) (ttl 64, id 16900, len 61) 0x0000 4500 003d 4204 4000 4011 917a 815f 3271 E..=B.@.@..z._2q 0x0010 815f 3202 8006 0035 0029 6ef6 e1cd 0100 ._2....5.)n..... 0x0020 0001 0000 0000 0000 0377 7777 0363 7365 .........www.cse 0x0030 036f 6769 0365 6475 0000 0100 01 .ogi.edu..... 15:18:57.134998 129.95.50.2.domain > 129.95.50.113.32774: [udp sum ok] 57805* 2/3/3 www.cse.ogi.edu. CNAME cse.ogi.edu., cse.ogi.edu. A 129.95.20.2 (169) (DF) (ttl 255, id 51166, len 197) 0x0000 4500 00c5 c7de 4000 ff11 4c17 815f 3202 E.....@...L.._2. 0x0010 815f 3271 0035 8006 00b1 24a0 e1cd 8580 ._2q.5....$..... 0x0020 0001 0002 0003 0003 0377 7777 0363 7365 .........www.cse 0x0030 036f 6769 0365 6475 0000 0100 01c0 0c00 .ogi.edu........ 0x0040 0500 0100 0038 4000 02c0 10c0 1000 0100 .....8@......... 0x0050 0100 0038 4000 0481 5f14 02c0 1000 0200 ...8@..._....... 0x0060 0100 0038 4000 02c0 10c0 1000 0200 0100 ...8@........... 0x0070 0038 4000 0d04 7a65 616c 0561 646d 696e .8@...zeal.admin 0x0080 c014 c010 0002 0001 0000 3840 0007 0466 ..........8@...f 0x0090 6f72 6bc0 5ec0 1000 0100 0100 0038 4000 ork.^........8@. 0x00a0 0481 5f14 02c0 5900 0100 0100 0038 4000 .._...Y......8@. 0x00b0 0481 5f14 6dc0 7200 0100 0100 0038 4000 .._.m.r......8@. 0x00c0 0481 5f14 fc .._.. 15:18:57.221843 arp who-has 129.95.50.54 tell 129.95.50.113 0x0000 0001 0800 0604 0001 0004 5a65 7ad9 815f ..........Zez.._ 0x0010 3271 0000 0000 0000 815f 3236 2q......._26 15:18:57.225953 arp reply 129.95.50.54 is-at 0:3:e4:3d:a8:0 0x0000 0001 0800 0604 0002 0003 e43d a800 815f ...........=..._ 0x0010 3236 0004 5a65 7ad9 815f 3271 0000 0000 26..Zez.._2q.... 0x0020 0000 0000 0000 0000 0000 0000 0000 .............. 15:18:57.225981 129.95.50.113.46908 > 129.95.20.2.http: S [tcp sum ok] 3567893113:3567893113(0) win 5840 (DF) (ttl 64, id 63563, len 60) 0x0000 4500 003c f84b 4000 4006 f93e 815f 3271 E..<.K@.@..>._2q 0x0010 815f 1402 b73c 0050 d4a9 ba79 0000 0000 ._...<.P...y.... 0x0020 a002 16d0 3d5f 0000 0204 05b4 0402 080a ....=_.......... 0x0030 21bd 4232 0000 0000 0103 0307 !.B2........ 15:18:57.227024 129.95.20.2.http > 129.95.50.113.46908: S [tcp sum ok] 4135566303:4135566303(0) ack 3567893114 win 17520 (DF) (ttl 255, id 51167, len 44) 0x0000 4500 002c c7df 4000 ff06 6aba 815f 1402 E..,..@...j.._.. 0x0010 815f 3271 0050 b73c f67f bbdf d4a9 ba7a ._2q.P.<.......z 0x0020 6012 4470 1164 0000 0204 05b4 5555 `.Dp.d......UU 15:18:57.227081 129.95.50.113.46908 > 129.95.20.2.http: . [tcp sum ok] ack 1 win 5840 (DF) (ttl 64, id 63564, len 40) 0x0000 4500 0028 f84c 4000 4006 f951 815f 3271 E..(.L@.@..Q._2q 0x0010 815f 1402 b73c 0050 d4a9 ba7a f67f bbe0 ._...<.P...z.... 0x0020 5010 16d0 56c1 0000 P...V... 15:18:57.328424 129.95.50.113.46908 > 129.95.20.2.http: P [tcp sum ok] 1:125(124) ack 1 win 5840 (DF) (ttl 64, id 63565, len 164) 0x0000 4500 00a4 f84d 4000 4006 f8d4 815f 3271 E....M@.@...._2q 0x0010 815f 1402 b73c 0050 d4a9 ba7a f67f bbe0 ._...<.P...z.... 0x0020 5018 16d0 3fbf 0000 4745 5420 2f63 6c61 P...?...GET./cla 0x0030 7373 2f63 7365 3532 342f 7465 7374 2e68 ss/cse524/test.h 0x0040 746d 6c20 4854 5450 2f31 2e30 0d0a 5573 tml.HTTP/1.0..Us 0x0050 6572 2d41 6765 6e74 3a20 5767 6574 2f31 er-Agent:.Wget/1 0x0060 2e38 2e32 0d0a 486f 7374 3a20 7777 772e .8.2..Host:.www. 0x0070 6373 652e 6f67 692e 6564 750d 0a41 6363 cse.ogi.edu..Acc 0x0080 6570 743a 202a 2f2a 0d0a 436f 6e6e 6563 ept:.*/*..Connec 0x0090 7469 6f6e 3a20 4b65 6570 2d41 6c69 7665 tion:.Keep-Alive 0x00a0 0d0a 0d0a .... 15:18:57.349215 129.95.20.2.http > 129.95.50.113.46908: P [tcp sum ok] 1:405(404) ack 125 win 17520 (DF) (ttl 255, id 51168, len 444) 0x0000 4500 01bc c7e0 4000 ff06 6929 815f 1402 E.....@...i)._.. 0x0010 815f 3271 0050 b73c f67f bbe0 d4a9 baf6 ._2q.P.<........ 0x0020 5018 4470 cfc7 0000 4854 5450 2f31 2e31 P.Dp....HTTP/1.1 0x0030 2032 3030 204f 4b0d 0a44 6174 653a 204d .200.OK..Date:.M 0x0040 6f6e 2c20 3239 2053 6570 2032 3030 3320 on,.29.Sep.2003. 0x0050 3232 3a31 383a 3537 2047 4d54 0d0a 5365 22:18:57.GMT..Se 0x0060 7276 6572 3a20 4170 6163 6865 2f31 2e33 rver:.Apache/1.3 0x0070 2e31 3220 2855 6e69 7829 0d0a 4c61 7374 .12.(Unix)..Last 0x0080 2d4d 6f64 6966 6965 643a 204d 6f6e 2c20 -Modified:.Mon,. 0x0090 3239 2053 6570 2032 3030 3320 3231 3a34 29.Sep.2003.21:4 0x00a0 343a 3538 2047 4d54 0d0a 4554 6167 3a20 4:58.GMT..ETag:. 0x00b0 2266 6434 6339 642d 3737 2d33 6637 3861 "fd4c9d-77-3f78a 0x00c0 3764 6122 0d0a 4163 6365 7074 2d52 616e 7da"..Accept-Ran 0x00d0 6765 733a 2062 7974 6573 0d0a 436f 6e74 ges:.bytes..Cont 0x00e0 656e 742d 4c65 6e67 7468 3a20 3131 390d ent-Length:.119. 0x00f0 0a4b 6565 702d 416c 6976 653a 2074 696d .Keep-Alive:.tim 0x0100 656f 7574 3d31 352c 206d 6178 3d31 3030 eout=15,.max=100 0x0110 0d0a 436f 6e6e 6563 7469 6f6e 3a20 4b65 ..Connection:.Ke 0x0120 6570 2d41 6c69 7665 0d0a 436f 6e74 656e ep-Alive..Conten 0x0130 742d 5479 7065 3a20 7465 7874 2f68 746d t-Type:.text/htm 0x0140 6c0d 0a0d 0a3c 6874 6d6c 3e0a 3c68 6561 l......Hello. 0x0160 576f 726c 643c 2f74 6974 6c65 3e0a 3c2f World...

This.is.a.test. 0x0190 4854 4d4c 2070 6167 6520 666f 7220 4353 HTML.page.for.CS 0x01a0 4520 3532 3420 3c2f 6831 3e0a 3c2f 626f E.524.

... 15:18:57.349285 129.95.50.113.46908 > 129.95.20.2.http: . [tcp sum ok] ack 405 win 6432 (DF) (ttl 64, id 63566, len 40) 0x0000 4500 0028 f84e 4000 4006 f94f 815f 3271 E..(.N@.@..O._2q 0x0010 815f 1402 b73c 0050 d4a9 baf6 f67f bd74 ._...<.P.......t 0x0020 5010 1920 5261 0000 P...Ra.. 15:18:57.386410 129.95.50.113.46908 > 129.95.20.2.http: F [tcp sum ok] 125:125(0) ack 405 win 6432 (DF) (ttl 64, id 63567, len 40) 0x0000 4500 0028 f84f 4000 4006 f94e 815f 3271 E..(.O@.@..N._2q 0x0010 815f 1402 b73c 0050 d4a9 baf6 f67f bd74 ._...<.P.......t 0x0020 5011 1920 5260 0000 P...R`.. 15:18:57.386840 129.95.20.2.http > 129.95.50.113.46908: . [tcp sum ok] ack 126 win 17520 (DF) (ttl 255, id 51169, len 40) 0x0000 4500 0028 c7e1 4000 ff06 6abc 815f 1402 E..(..@...j.._.. 0x0010 815f 3271 0050 b73c f67f bd74 d4a9 baf7 ._2q.P.<...t.... 0x0020 5010 4470 2710 0000 5555 5555 5555 P.Dp'...UUUUUU 15:18:57.387744 129.95.20.2.http > 129.95.50.113.46908: F [tcp sum ok] 405:405(0) ack 126 win 17520 (DF) (ttl 255, id 51170, len 40) 0x0000 4500 0028 c7e2 4000 ff06 6abb 815f 1402 E..(..@...j.._.. 0x0010 815f 3271 0050 b73c f67f bd74 d4a9 baf7 ._2q.P.<...t.... 0x0020 5011 4470 270f 0000 5555 5555 5555 P.Dp'...UUUUUU 15:18:57.387801 129.95.50.113.46908 > 129.95.20.2.http: . [tcp sum ok] ack 406 win 6432 (DF) (ttl 64, id 0, len 40) 0x0000 4500 0028 0000 4000 4006 f19e 815f 3271 E..(..@.@...._2q 0x0010 815f 1402 b73c 0050 d4a9 baf7 f67f bd75 ._...<.P.......u 0x0020 5010 1920 525f 0000 P...R_.. 16 packets received by filter 0 packets dropped by kernel [root@ren root]# [root@ren root]#