OSI Interview Questions and Answer


OSI Layer Interview Questions and Answer 




1. List the layers of OSI?

The layers are stacked this way:

Application. Presentation. Session.

Transport. Network. Data link. Physical.

2. What are the responsibilities of data link layer?


The data link layer is also responsible for logical link control, media access control, hardware addressing, error detection and handling and defining physical layer standards. It provides reliable data transfer by transmitting packets with the necessary synchronization, error control and flow control.

3. What are the responsibilities of network layer?


The network layer is responsible for packet forwarding including routing through intermediate routers, since it knows the address of neighboring network nodes, and it also manages quality of service (qos), and recognizes and forwards local host domain messages to the transport layer (layer4).

4. What are the responsibilities of transport layer?

Major duties of transport layer are
:

1. Creating an end-to-end connection between hosts in different network,

2. Error recovery,

3. Flow control,

4. Ensuring complete data transfer in tcp

5. Congestion avoidance

Major transport layer protocols


1. Tcp ( transmission control protocol)

2. Udp (user datagram protocol)

3. Dccp (datagram congestion control protocol)

4. Sctp (stream control transmission protocol).

5. Routers work at which osi layer?

Routers operate on the third layer of the osi model, the network-control layer. Rather than passing packets based on the media access control (mac) layer addresses (as bridges do), a router examines the packet's data structure and determines whether or not to forward it.

6. Switches work at which osi layer?

A switch works at layer 2 of the osi model (data-link). It is a lan device that can also be called a multi-port bridge. A switch switches ethernet frames between ethernet devices. Switches do not care about ip addresses nor do they even examine ip addresses as the frames flow through the switch.

7. What is a window in networking terms?


A window refers to the number of segments that is allowed to be sent from source to destination before an acknowledgement is sent back.

8. What is the role of the llc sub layer in data link layer?

The logical link control (llc) data communication protocol layer is the upper sub-layer of the data link layer (which is itself layer 2, just above the physical layer) in the seven-layer osi reference model. It provides multiplexing mechanisms that make it possible for several network protocols (ip, ipx) to coexist within a multipoint network and to be transported over the same network media, and can also provide flow control mechanisms.

The llc sub-layer acts as an interface between the media access control (mac) sublayer and the network layer.

As the ethertype in an ethernet ii framing formatted frame is used to multiplex different protocols on top of the ethernet mac header it can be seen as llc identifier.

Operation the llc sublayer is primarily concerned with:

Multiplexing protocols transmitted over the mac layer (when transmitting) and decoding them (when receiving).

Providing flow and error control

The protocol used for llc in ieee 802 networks, such as ieee 802.3/ethernet (if the ethertype field isn't used), ieee 802.5, and ieee 802.11, and in some non-ieee 802 networks such as fddi, is specified by the ieee 802.2 standard.
Some non-ieee 802 protocols can be thought of as being split into mac and llc layers. For example, while hdlc specifies both mac functions (framing of packets) and llc functions (protocol multiplexing, flow control, detection, and error control through a retransmission of dropped packets when indicated), some protocols such as cisco hdlc can use hdlc-like packet framing and their own llc protocol.
Another example of a data link layer which is split between llc (for flow and error control) and mac (for multiple access) is the itu-t g.hn standard, which provides high-speed local area networking over existing home wiring (power lines, phone lines and coaxial cables).

An llc header tells the data link layer what to do with a packet once a frame is received. It works like this: a host will receive a frame and look in the llc header to find out where the packet is destined for - for example, the ip protocol at the network layer or ipx.

The gprs llc layer also does ciphering and deciphering of sn-pdu (sndcp) packets.

9. What is the function of the application layer in networking?

The application layer is a layer in the open systems interconnection (osi) seven-layer model and in the tcp/ip protocol suite. It consists of protocols that focus on process-to-process communication across an ip network and provides a firm communication interface and end-user services.

10. What is the port no of dns and telnet?
20 ftp data (file transfer protocol)

21 ftp (file transfer protocol)

22 ssh (secure shell)

23 telnet

25 smtp (send mail transfer protocol)

53 dns (domain name service)

68 dhcp (dynamic host control protocol)

80 http (hypertext transfer protocol)

110 pop3 (post office protocol, version 3)

115 sftp (secure file transfer protocol)

119 nntp (network new transfer protocol)

123 ntp (network time protocol)

139 netbios

143 imap (internet message access protocol)

161 snmp (simple network management protocol)

220 imap3 (internet message access protocol 3)

389 ldap (lightweight directory access protocol)

443 ssl (secure socket layer)

11. Which service use both tcp and udp?


Dns and some other services work on both the protocols. We will take an example of dns service. Two protocols are somewhat different from each other. Tcp is a connection-oriented protocol and it requires data to be consistent at the destination and udp is connection-less protocol and doesn't require data to be consistent or don't need a connection to be established with host for consistency of data.

Udp packets are smaller in size. Udp packets can not be greater then 512 bytes. So any application needs data to be transferred greater than 512 bytes require tcp in place. For example, dns uses both tcp and udp for valid reasons described below. Note that udp messages are not larger than 512 bytes and are truncated when greater than this size. Dns uses tcp for zone transfer and udp for name queries either regular (primary) or reverse. Udp can be used to exchange small information whereas tcp must be used to exchange information larger than 512 bytes. If a client doesn't get response from dns it must re-transmit the data using tcp after 3-5 seconds of interval.

There should be consistency in dns zone database. To make this, dns always transfer zone data using tcp because tcp is reliable and make sure zone data is consistent by transferring the full zone to other dns servers who has requested the data.

The problem occurs when windows 2000 server and advanced server products uses dynamic ports for all above 1023. In this case your dns server should not be internet facing i.e. Doing all standard queries for

client machines on the network. The router (acl) must permitted all udp inbound traffic to access any high udp ports for it to work.

Ldap always uses tcp - this is true and why not udp because a secure connection is established between client and server to send the data and this can be done only using tcp not udp. Udp is only used when finding a domain controller (kerberos) for authentication. For example, a domain client finding a domain controller using dns.

12. In which layer term “frames” is used?

Data link layer

13. In which layer term “packets” is used?


Network layer

14. In which layer term “segments” is used?

Transport layer





15. Give some example for protocols work at application layer?

Bgp,dhcp,dns ftp http imap ldap mgcp nntp ntp pop onc/rpc rtp rtsp rip sip smtp snmp ssh telnet tls/ssl xmpp

16. What is crc? Which layer crc works?

A cyclic redundancy check (crc) is an error-detecting code commonly used in digital networks and storage devices to detect accidental changes to raw data. Blocks of data entering these systems get a short check value attached, based on the remainder of a polynomial division of their contents. On retrieval, the calculation is repeated and, in the event the check values do not match, corrective action can be taken against data corruption.it work on data link layer

17. What is the purpose of the data link?

It makes sure the appropriate physical protocol is assigned to the data. The data link layer is the second layer in the osi model. The three main functions of the data link layer are to deal with transmission errors, regulate the flow of data, and provide a well-defined interface to the network layer.

18. Which one is reliable – tcp or udp?

Tcp

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

FTP(Data) - 20
FTP - 21

20. Which layer provides logical addressing that routers will use for path determination?

Network layer

21. Which layer specifies voltage, wire speed, and pinout cables and moves bits between devices?
Physical layer

22. Which layer combines bits into bytes and bytes into frames, uses mac addressing, and provide error detection?

Data link layer

23. Which layer is responsible for keeping the data from different applications separate on the network?

The session layer creates sessions between different hosts’ applications

24. Which layer segments and resembles data into a data stream?

Transport layer

25. Which layer provides the physical transmission of the data and handless error notification, network topology, and flow control?

Data link layer

26. Which layer manages device addressing, tracks the location of devices on the network, and determines the best way to move data?

Network layer

27. How data breaks down on each layer from top to bottom?

Table 1: pdu names on the layers of the osi model

Osi layer Pdu name

Application Data

Presentation Data

Session Data

Transport Segment

Network Packet

Data link Frame

Physical Bits

28. Mac address works on which layer? What are the differences of mac sub layer and llc sub layer?

Data link layer

29. Which layer is responsible for converting data packets from the data link layer into electrical signals?

Physical layer

30. At which layer is routing implemented, enabling connections and path selection between two end systems?

Network layer

31. Which layer defines how data is formatted, presented, encoded, and converted for use on the network?


Presentation layer

32. Which layer is responsible for creating, managing and terminating sessions between app? 

The session layer sets up, maintains, and terminates sessions between applications.

33. Dns uses which protocol? Why?

Dns queries consist of a single udp request from the client followed by a single udp reply from the server. The transmission control protocol (tcp) is used when the response data size exceeds 512 bytes, or for tasks such as zone transfers. Some resolver implementations use tcp for all queries.

34. Which layer is closer to the user?

Application layer

35. Differentiate between forward lookup and reverse lookup in dns?

Forward dns lookup is used to convert the human meaningful name (domain name) which is in easy to understand format to computer meaningful name (ip address), however reverse dns lookup works in reverse way to convert ip address to domain name.

36. What is ipsec?

Ipsec is an internet engineering task force (ietf) standard suite of protocols that provides data authentication, integrity, and confidentiality as data is transferred between communication points across ip networks. Ipsec provides data security at the ip packet level.

37. What is the way to establish a tcp connection?

The tcp three-way handshake intransmission control protocol (also called the tcp-handshake; three message handshake and/or syn-syn-ack) is the method used by tcp set up a tcp/ip connection over aninternet protocol based network. Tcp's three way handshaking technique is often referred to as "syn-syn-ack" (or more accurately syn, syn-ack, ack) because there are three messages transmitted by tcp to negotiate and start a tcp session between twocomputers. The tcp handshaking mechanism is designed so that two computers attempting to communicate can negotiate the parameters of the network tcp socket connection before transmitting data such as ssh and http web browser requests.

This 3-way handshake process is also designed so that both ends can initiate and negotiate separate tcp socket connections at the same time. Being able to negotiate multiple tcp socket connections in both directions at the same time allows a single physical network interface, such as ethernet, to bemultiplexed to transfer multiple streams of tcp data simultaneously.

38. What is the difference between flow control and error control?

Flow control and error control are the control mechanism at data link layer and transport layer. Whenever the sends the data to the receiver these two mechanisms helps in proper delivering of the reliable data to the receiver. The main difference between the flow control and error control is that the flow control observes the proper flow of the data from sender to receiver, on the other hand, the error control observes that the data delivered to the receiver is error free and reliable.

Share:

0 comments

Please leave your comments...... Thanks