Sie sind auf Seite 1von 7

Interview Questions

Algorithm Complexity
• http://en.wikipedia.org/wiki/Sorting_algorithm

Operating System Interview Questions


• http://pages.cs.wisc.edu/~bart/537/lecturenotes/
• http://people.csail.mit.edu/rinard//osnotes/
• http://www.personal.kent.edu/~rmuhamma/OpSystems/os.html

C Language Interview Questions


new and delete are C++ specific features. They didn't exist in C. malloc is the old school C
way to do things. Most of the time, you won't need to use it in C++.
• malloc allocates uninitialized memory. The allocated memory has to be released
with free.
• calloc is like malloc but initializes the allocated memory with a constant (0). It needs
to be freed with free.
• new initializes the allocated memory by calling the constructor (if it's an object).
Memory allocated with new should be released with delete (which in turn calls the
destructor). It does not need you to manually specify the size you need and cast it to the
appropriate type. Thus, it's more modern and less prone to errors.

TCP/IP Interview Questions


http://www.academictutorials.com/TCP-IP/TCP-IP-interview-questions.asp

• What are the differences of MAC sublayer and LLC sublayer?


In fact, Data Link layer has 2 sublayes: MAC sublayer & LLC sublayer.

* MAC sublayer(802.3): defines how to transmit data on physical layer


* LLC sublayer(802.2): responsible for identifying different protocol logically & encapsulate
them.

• What is the data unit of "Transport layer"?


Segment

• TCP/IP has how many layers?


5 layers: Network layer, Internet layer, Transport layer and Application layer.

• How is data send by IP layer?


IP layer PDU is "packet". So, data is send as packet.

• Name the 2 sublayers of data link layer.


MAC sublayer and LLC sublayer

• Error control is down in which layer?


Layer 4
• How does ARP response the request?
ARP sents the request in broadcast, response is unicast

• Name 4 example of application layer?


DNS, FTP, Telnet, http

• What is the upper layer name of OSI layer?


Application layer.

• Switch operates on which layer of OSI model?


Normal switch operates at Layer 2 i.e. data link layer and Intelligent switch operates at Layer
3 i.e. network layer.

• What are the differences among router, switch, bridge and hub?
All of them are devices and are used in network. Their differences are:

* Router: Layer 3 device, can work on physical, data and network layer.
* Switch: Layer 2 device, can work on data link layer
* Bridge: Layer 2 device, can work on data link layer.
* Hub: Layer 1device, just a multi-port repeater and works on physical layer

• What are the differences between OSI and TCP/IP model?


Important differences are:

OSI is a reference model and TCP/IP is an implementation of OSI model.

OSI has 7 layers whereas TCP/IP has only 4 layers The upper 3 layers of the OSI model is
combined on the TCP/IP model.

OSI has: physical layer, data link layer, network layer, transport layer, session layer,
presentation layer and application layer TCP/IP has : Network layer, Internet layer, transport
layer and application layer.

• What is the full form of OSI and TCP/IP model?


* OSI stands for = Open Systems Interconnection (OSI) model
* TCP/IP stands for = Transmission Control Protocol/ Internet Protocol

• What is TCP/IP model?


TCP/IP model is an implementation of OSI reference model. It has five layers. They are:
Network layer, Internet layer, Transport layer and Application layer.

• What is OSI model?


OSI model is a reference model containing 7 layers such as physical layer, data link layer,
network layer, transport layer, session layer, presentation layer and application layer.

• RARP resolves what? Address or IP?


RARP stands for Reverse Address Resolution Protocol. It helps to find the IP address when
physical or hardware or MAC address is known.

• Why we have to use router?


To communicate several networks, routers are used. Routers have both broadcast domain
and collision domain.

• Which layer of OSI is responsible for end-to-end communication?


Transport layer.

• ARP resolves what? Address or IP?


ARP stands for Address Resolution Protocol. It helps to find the hardware address or MAC
address when IP address is known.

• What is the port number of ftp(data) and ftp?


ftp(data) = 20 and ftp=21

• What is the port number of Telnet and DNS?


Telnet = 23 and DNS = 53

• Data link layer is sub-divide into how many groups?


* 2 sub-divided groups: MAC Layer and LLC layer
* MAC: Media Access Control/Medium Access Control
* LLC: Logical Link Control

• What is the responsibilities of Network Layer?


* Logical addressing
* Best effort delivery

• Mention one real place to use TCP/IP.


LAN cards

• Mark one of the most important difference between TCP and UDP.
TCP is a connection-oriented and UDP is a connection-less protocol

• What is the difference between flow control and error control?


* Flow control: adjust and confirm data flow rate for successful transmission.
* Error Control: a way to recover corrupted data .

• What is the way to establish a TCP connection?


By using acknowledgement.

• What is IPSec?
IPSec is "Internet Protocol Security". It is a suite of protocols for securing Internet
Protocol(IP) communications.

• what are the difference between TCP and UDP?


* TCP: Connection oriented protocol, acknowledged one, Point to point communication.
* UDP: Connection less protocol, unreliable, less traffic

• Differentiate between forward lookup and reverse lookup in DNS?


* Forward lookup is: name-to-address,
* Reverse lookup is: address-to-name.

• Which layer is closer to the user?


Upper layer i.e. Application layer is closer to the user.
• DNS uses which protocol? Why?
DNS uses both TCP or UDP or both. UDP can handle only 512bytes. If data size is withing
512 bytes UDP is used, otherwise, TCP is used.

• You are in home. But you need to access the office server router. How can you
do that?
By using "Telnet"

• You have one IP: 192.168.10.29. In which layere this IP works?


Network layer.

• What is the PDU of "Network layer" and "Data link layer".


PDU for Network Layer is: "Packet" and PDU for Data Link Layer is :"Frame"

• What is "Segment"?
"Segment" is a PDU (Protocol Data Unit) of Transport layer of OSI model.

• Can I set up a gateway to the Internet that translates IP addresses, so that I


don't have to change all our internal addresses to an official network?
This is called Network Address Translation, or NAT. In general it
is a difficult thing to do properly because many applications
embed IP addresses in the application-level data (FTP's "PORT"
command is a notable example) so NAT isn't simply a matter of
translating addresses in the IP header and recalculating header
checksums. Also, if the network number(s) you're using match those
assigned to another organisation, your gateway may not be able to
communicate with that organisation. As noted above, RFC 1918
proposes network numbers that are reserved for private use, to
avoid such conflicts, but if you're already using a different
network number this won't help you.

• What IP addresses should I assign to machines on a private internet?


You shouldn't use IP addresses that have been assigned to some
other organisation, because if knowledge of your network ever gets
leaked onto the Internet they may disrupt that innocent
organisation's activity. RFC 1918 provides a solution for this
problem by allocating several IP address ranges specifically for
use on private networks. These addresses will never be assigned
to any organisation and are never supposed to appear on the
Internet.

• How can I measure the performance of an IP link?


You can get a quick approximation by timing how long it takes to
FTP or RCP a large file over the link, but bear in mind that that
measurement will be skewed by the time spent in dealing with the
local and remote filesystems, not simply with the network itself.
And remember to measure the time it takes to receive a file, not
the time it takes to send it; the sender can report completion
even though large amounts of data are still buffered locally by
TCP and have not yet been delivered to the destination.
• Where do I find assigned port numbers?
The IANA allocates and keeps track of all kinds of arbitrary
numbers used by TCP/IP, including well-known port numbers. The
entire collection is published periodically in an RFC called the
Assigned Numbers RFC, each of which supersedes the previous one in
the series. The current Assigned Numbers RFC is RFC 1700.

• How do applications coexist over TCP and UDP?


Each application running over TCP or UDP distinguishes itself from
other applications using the service by reserving and using a
16-bit port number. Destination and source port numbers are placed
in the UDP and TCP headers by the originator of the packet before
it is given to IP, and the destination port number allows the
packet to be delivered to the intended recipient at the
destination system.

• How does TCP try to avoid network meltdown?


TCP includes several mechanisms that attempt to sustain good data
transfer rates while avoiding placing excessive load on the
network. TCP's "Slow Start", "Congestion Avoidance", "Fast
Retransmit" and "Fast Recovery" algorithms are summarised in RFC
2001. TCP also mandates an algorithm that avoids "Silly Window
Syndrome" (SWS), an undesirable condition that results in very
small chunks of data being transferred between sender and
receiver. SWS Avoidance is discussed in RFC 813. The "Nagle
Algorithm", which prevents the sending side of TCP from flooding
the network with a train of small frames, is described in RFC
896.

• What is IPsec?
IPsec stands for "IP Security". The IPsec working group of the
IETF is developing standards for cryptographic authentication and
for encryption within IP. The base specifications are defined in
RFC's 1825, 1826 and 1827. Products that implement these are
beginning to appear.

IPsec stands for "IP Security". The IPsec working group of the
IETF is developing standards for cryptographic authentication and
for encryption within IP. The base specifications are defined in
RFC's 1825, 1826 and 1827. Products that implement these are
beginning to appear.

• Does IP Protect Data On The Network?


IP itself does not guarantee to deliver data correctly. It leaves
all issues of data protection to the transport protocol. Both TCP
and UDP have mechanisms that guarantee that the data they deliver
to an application is correct.

• How Is IP Carried On A Network?


IP really isn't very fussy about how its packets are transported.
The details of how an IP packet is carried over a particular kind
of network are usually chosen to be convenient for the network
itself. As long as the transmitter and receiver observe some
convention that allows IP packets to be differentiated from any
other data that might be seen by the receiver, then IP can be used
to carry data between those stations.

• What is IP?

Internet Protocol (IP) is the central, unifying protocol in the


TCP/IP suite. It provides the basic delivery mechanism for packets
of data sent between all systems on an internet, regardless of
whether the systems are in the same room or on opposite sides of
the world. All other protocols in the TCP/IP suite depend on IP to
carry out the fundamental function of moving packets across the
internet.

In terms of the OSI networking model, IP provides a Connectionless


Unacknowledged Network Service, which means that its attitude to
data packets can be characterised as "send and forget". IP does
not guarantee to actually deliver the data to the destination, nor
does it guarantee that the data will be delivered undamaged, nor
does it guarantee that data packets will be delivered to the
destination in the order in which they were sent by the source,
nor does it guarantee that only one copy of the data will be
delivered to the destination.

Internet Protocol (IP) is the central, unifying protocol in the


TCP/IP suite. It provides the basic delivery mechanism for packets
of data sent between all systems on an internet, regardless of
whether the systems are in the same room or on opposite sides of
the world. All other protocols in the TCP/IP suite depend on IP to
carry out the fundamental function of moving packets across the
internet.

In terms of the OSI networking model, IP provides a Connectionless


Unacknowledged Network Service, which means that its attitude to
data packets can be characterised as "send and forget". IP does
not guarantee to actually deliver the data to the destination, nor
does it guarantee that the data will be delivered undamaged, nor
does it guarantee that data packets will be delivered to the
destination in the order in which they were sent by the source,
nor does it guarantee that only one copy of the data will be
delivered to the destination.

• How is TCP/IP defined?


All of the protocols in the TCP/IP suite are defined by documents called Requests For
Comments (RFC's). An important difference between TCP/IP RFC's and other (say, IEEE or
ITU) networking standards is that RFC's are freely available online.

• What is TCP/IP

TCP/IP is a name given to the collection (or suite) of networking protocols that have been
used to construct the global Internet. The protocols are also referred to as the DoD (dee-
oh-dee) or Arpanet protocol suite because their early development was funded by the
Advanced Research Projects Agency (ARPA) of the US Department of Defense (DoD).

TCP/IP is a name given to the collection (or suite) of networking protocols that have been
used to construct the global Internet. The protocols are also referred to as the DoD (dee-
oh-dee) or Arpanet protocol suite because their early development was funded by the
Advanced Research Projects Agency (ARPA) of the US Department of Defense (DoD).

• Can the TCP keepalive timeouts be configured?


This varies by operating system. There is a program that works on many Unices (though not
Linux or Solaris), called netconfig, that allows one to do this and documents many of the
variables.

Das könnte Ihnen auch gefallen