COMP 3000 Lab 7 2011

From Soma-notes
Revision as of 04:27, 5 December 2011 by Saran (talk | contribs)

Part A

  1. inet address is the IPv4 address of the host. The scope is usually either a subnet or global, the former meaning other computers on the same subnet can talk, and the latter meaning any computer with an access to the Internet can talk to this one. HWaddr is the MAC address of the network card. Computers on the same local network (ethernet/wifi etc) connected via a switch or a hub or some such device can talk to it without having to use the Network layer. inet6 address, or the IPv6 address is a newer replacement for the aging IPv4 address. If it's scope is only link, that means it doesn't have a globally routable address. Routers drop packets that originate with a link-local address. A global scope means a globally routable ipv6 address.
  2. MTU, or the Maximum Transmission Unit, is the maximum frame size of whatever layer 2 protocol is under use, ( e.g Ethernet ).
  3. nc -l 9200 > /tmp/foo
  4. From a lambda machine, I got this :
1:  134.117.27.129    0.118ms pmtu 1500
1:  134.117.27.1      5.051ms
1:  134.117.27.1      5.660ms
2:  10.50.254.10      5.377ms 
3:  10.30.33.1        5.561ms 
4:  10.30.53.1        5.711ms 
5:  134.117.254.242 114.264ms asymm  4 
6:  134.117.254.243   4.572ms asymm  4 
7:  10.30.56.1        4.442ms asymm  6 
8:  no reply
9:  154.54.40.137     7.099ms asymm  8 
10:  154.54.42.85     19.135ms asymm  9 
11:  154.54.44.218    19.609ms asymm 10 
12:  no reply
13:  204.70.198.17    20.179ms asymm 12 
14:  204.70.196.241   30.987ms asymm 11 
15:  no reply
16:  no reply
17:  64.27.160.194    35.202ms asymm 12 
18:  216.34.181.45    31.924ms reached

5. netstat -ant 6. lsof +D /home 7. Read, Write, Execute (self-explanatory) and Private. A page can either be shared ( meaning - "Updates to the mapping are visible to other processes that map this file, and are carried through to the underlying file." ), or private (Updates to the mapping are not visible to other processes mapping the same file, and are not carried through to the underlying file - using copy-on-write).

Part B

  1. Tracepath/Traceroute either use ICMP echo requests, or simply send a UDP packet to a big port number, and wait for ICMP destination unreachable packet. In either case, if a server doesn't receive an ICMP packet as response, tracepath says "no reply".
  2. I see the following system calls : poll, read and write. Poll waits for the file descriptor status to change, until it is ready to perform I/O. read reads a fixed number of bytes into a buffer from a file descriptor, and write writes a given number of bytes to a file descriptor.
  3. /proc/net/tcp. Syntactically, the ip addresses and port numbers in netstat are human-readable and not in hex. The state values have been translated from numbers to words. Further, if used with flags, ( like --program ), netstat retrieves the application name related to the connection, by looking up inode info from /proc/net/tcp.
  4. When lsof recurses through a directory, and encounters a file that it cannot open, it says "permission denied". This is because ordinary users don't have access to some protected files ( for e.g /etc/shadow )