Friday 21 December 2012

SRE Interview Questions 1

*) Linked list:

 In computer science, a linked list is a data structure that consists of a sequence of data records such that in each record there is a field that contains a reference (i.e., a link) to the next record in the sequence.

*) Traceroute:

traceroute is a computer network tool used to show the route taken by packets across an IP network.

Traceroute works by increasing the "time-to-live" value of each successive batch of packets sent. The first three packets sent have a time-to-live (TTL) value of one (implying that they are not forwarded by the next router and make only a single hop). The next three packets have a TTL value of 2, and so on. When a packet passes through a host, normally the host decrements the TTL value by one, and forwards the packet to the next host. When a packet with a TTL of one reaches a host, the host discards the packet and sends an ICMP time exceeded (type 11) packet to the sender. The traceroute utility uses these returning packets to produce a list of hosts that the packets have traversed in transit to the destination. The three timestamp values returned for each host along the path are the delay (aka latency) values typically in milliseconds (ms) for each packet in the batch.

If a packet does not return within the expected timeout window, a star (asterisk) is traditionally printed. On modern Unix-like operating systems, the traceroute utility by default uses UDP datagrams with destination ports numbering from 33434 to 33534. Traceroute is often used for network troubleshooting. By showing a list of routers traversed, it allows the user to identify the path taken to reach a particular destination on the network. This can help identify routing problems or firewalls that may be blocking ICMP traffic, or high port UDP in UNIX ping, to a site.

*) ICMP:

The Internet Control Message Protocol (ICMP) is one of the core protocols of the Internet Protocol Suite. It is chiefly used by networked computers' operating systems to send error messages—indicating, for instance, that a requested service is not available or that a host or router could not be reached.

    * Type - ICMP type as specified below.
    * Code - further specification of the ICMP type; e.g. : an ICMP Destination Unreachable might have this field set to 1 through 15 each bearing different meaning.
    * Checksum - This field contains error checking data calculated from the ICMP header+data, with value 0 for this field. The algorithm is the same as the header checksum for IPv4.
    * ID - This field contains an ID value, should be returned in case of ECHO REPLY.
    * Sequence - This field contains a sequence value, should be returned in case of ECHO REPLY.


*) The Internet Protocol Suite:

Application Layer
BGP · DHCP · DNS · FTP · GTP · HTTP · IMAP · IRC · LDAP · Megaco · MGCP · NNTP · NTP · POP · RIP · RPC · RTP · RTSP · SDP · SIP · SMTP · SNMP · SOAP · SSH · Telnet · TLS/SSL · XMPP · (more)

Transport Layer
TCP · UDP · DCCP · SCTP · RSVP · ECN · (more)

Internet Layer
IP (IPv4, IPv6) · ICMP · ICMPv6 · IGMP · IPsec · (more)

Link Layer
ARP/InARP · NDP · OSPF · Tunnels (L2TP) · PPP · Media Access Control (Ethernet, DSL, ISDN, FDDI) ...


*) TCP [ protocol operation ]:

   1. LISTEN : In case of a server, waiting for a connection request from any remote client.
   2. SYN-SENT : waiting for the remote peer to send back a TCP segment with the SYN and ACK flags set. (usually set by TCP clients)
   3. SYN-RECEIVED : waiting for the remote peer to send back an acknowledgment after having sent back a connection acknowledgment to the remote peer. (usually set by TCP servers)
   4. ESTABLISHED : the port is ready to receive/send data from/to the remote peer.
   5. FIN-WAIT-1
   6. FIN-WAIT-2
   7. CLOSE-WAIT
   8. CLOSING
   9. LAST-ACK
  10. TIME-WAIT : represents waiting for enough time to pass to be sure the remote peer received the acknowledgment of its connection termination request. According to RFC 793 a connection can stay in TIME-WAIT for a maximum of four minutes.
  11. CLOSED


*) OSI Model:

7. Application Layer
NNTP  · SIP  · SSI  · DNS  · FTP  · Gopher  · HTTP  · NFS  · NTP  · SMPP  · SMTP  · SNMP  · Telnet  · (more)

6. Presentation Layer
MIME  · XDR  · TLS  · SSL

5. Session Layer
Named Pipes  · NetBIOS  · SAP

4. Transport Layer
TCP  · UDP  · SCTP  · DCCP

3. Network Layer
IP  · ICMP  · IPsec  · IGMP  · IPX  · AppleTalk

2. Data Link Layer
ARP  · CSLIP  · SLIP  · Ethernet  · Frame relay  · ITU-T G.hn DLL  · L2TP  · PPP  · PPTP

1. Physical Layer
RS-232  · RS-449  · V.35  · V.34  · I.430  · I.431  · T1  · E1  · POTS  · SONET/SDH  · OTN  · DSL  · 802.11a/b/g/n PHY  · ITU-T G.hn PHY  · Ethernet  · USB  · Bluetooth


*) Perl: http://www.onesmartclick.com/interviews/perl-programming-interview-questions-answers.html

*) Perl: http://www.techpreparation.com/perl-interview-questions-answers1.htm

*) Perl: http://www.techinterviews.com/perl-interview-questions-and-answers

*) shell: http://www.sybaseteam.com/unix-interview-questions-shell-scripting-t-147.html

*) shell: http://www.techinterviews.com/basic-shell-scripting-questions

*) http://www.techpreparation.com/mysql-interview-questions-answers1.htm

*) mysql: http://www.techinterviews.com/29-mysql-interview-questions


No comments:

Post a Comment