200 Embedded and IoT Software Engineering Interview Questions – Part 5 Networking

So far in part-1 of this interview questions series, we saw about

  • Questions about yourself
  • Questions about the projects you have done and
  • Questions from C programming language

Then in part-2, we saw some questions about the Basics of electronics. In part-3 we same some questions about Microcontrollers and peripherals. Then in Part 4, we saw about operating systems.

You can find parts 1, 2, 3 and 4 in the links below.

200 Embedded and IoT Software Engineering Interview Questions – Part 1

200 Embedded and IoT Software Engineering Interview Questions – Part 2 Basics of Electronics

200 Embedded and IoT Software Engineering Interview Questions – Part 3 Microcontrollers

200 Embedded and IoT Software Engineering Interview Questions – Part 4 Operating Systems

Now lets head onto the next part and in this part, we will look at some questions about Networking. Networking is the backbone of Internet of Things and many embedded systems these days have inbuilt networking capabilities and hence a good understanding of how computer networks work is necessary if you need to write applications on them. So that’s what this part is going to be about.

As usual, I have divided the questions into 3 categories of easy medium and hard. So let’s begin!

Difficulty level: Easy

Question #1: Give the 7 layers of the OSI model

Answer #1: An interviewer probably will not ask you this, but there will be many questions from each layer so it’s a good idea to refresh your memory so I have presented this question.

The OSI Layers include 

  • Physical layer
  • Datalink layer
  • Network layer
  • Transport layer
  • Session layer
  • Presentation layer
  • Application layer

Question #2: Give the 4 layers of TCP/IP model

Answer #2: They include 

  • Application layer
  • Transport layer
  • Internet layer
  • Network access layer

Question #3: What is MAC address? 

Answer #3: MAC stands for Media Access Control, it a 48bit address given to every networking device, such that each device gets a unique address. It is used in the physical layer of the OSI model.

Question #4: What is IP address?

Answer #4: IP stands for Internet Protocol, there are presently 2 versions in use IPv4 and IPv6. IPv4 is a 32-bit address and IPv6 is 64 bits. This type of address is used in identifying the device’s location on the internet. 

Question #5: What is the difference between MAC address and IP address? Why do we need both?

Answer #5:  MAC address is unique to every device with networking capability that is ever produced. They are physical addresses used for identification of a device on the internet 

IP addresses are assigned to devices once they are connected to the network. They can be thought of as the address to a particular connection of a device to the internet. It is assigned by Internet service providers

You can read more about it in this article by techdifferences.com

Question #6: Give 2 protocols used in the Transport layer of the OSI model

Answer #6: The transport layer protocols include

  • Transmission Control Protocol (TCP) and 
  • User Datagram Protocol (UDP)

Question #7: Explain the difference between TCP and UDP

Answer #7:

TCP is 

  • Connection-oriented and hence more reliable
  • Used in applications where each bit transferred need to be reliably delivered
  • Confirms delivery using Acknowledgements/ACK packets

Examples can include email and web browsing

UDP on the other hand

  • Is connectionless and hence less reliable
  • Used when a large amount of data needs to be transferred. 

Examples can include video streaming and Voice over IP (VoIP) where missing a few frames in a video or half a second of voice is less important compared to live real-time transfer of data.

Question #8: Explain the duty of the transport layer of the OSI model

Answer #8: Files that need to be transferred can be in gigabytes but data is usually transferred on the internet as smaller Packets, usually under 2kilobytes. So the bigger files need to be broken down into smaller packets on the sending end and they need to be reassembled on the receiving end. This job is done by the transport layer.

Question #9: What is the duty of Internet layer?

Answer #9: The Internet layer is responsible for routing the packets. This layer uses the IP address to make the best logical connection between the 2 communication nodes. The main device in this layer is the  router.

Question #10: What are the devices present in the data link layer and physical layer?

Answer #10: Data Link layer devices can include the network interface cards in our computers and smartphones and switches.

Physical layer is simply the communication channel, it can be twisted pair cables, fiber optics or just air as in WiFi.

Difficulty level: Medium

Question #1: Explain how TCP connections are established

Answer #1: It uses a 3-way handshake of SYN => SYN-ACK => ACK to establish the connection.

 TCP 3-way handshake
TCP 3-way handshake

You can see the process in the image above

  • The client/host first sends a TCP SYN packet to the TCP server. This is called synchronization request and it contains the host sequence number
  • The server acknowledges the request and responds with a TCP SYN-ACK packet which consists of the host’s seq number incremented by 1 and server’s sequence number.
  • Then the Host responds again by sending an ACK packet which is server’s sequence number incremented by 1.

Once this process is complete, they can start communicating with each other.

Question #2: Give the name of the protocol used to find the MAC address of a machine provided its IP address is known.

Answer #2: Address Resolution Protocol a.k.a ARP

Question #3: Give the name of the protocol used to assign IP address dynamically to machines connected to a Local Area Network.

Answer #3: Dynamic Host Configuration Protocol (DHCP). The device that gives out these dynamic IP addresses is called a DHCP server. This role is usually taken by the router or the server in the Local Area Network.

Question #4: Give the name of the device used to resolve domain name like www.google.com into IP address.

Answer #4: Domain Name Server (DNS)

Question #5: What is the duty of a firewall in a network, what is its default configuration.

Answer #5: Firewalls help prevent devices in a LAN from being attacked from devices outside the LAN. Its default configuration is to block all incoming connection requests and only allow outgoing connection requests.

Question #6: Expand and explain ACL

Answer #6: ACL stands for Access Control Lists, it’s used to shape the traffic in a LAN. for example, ACL can be configured to give more bandwidth for VoIP and less bandwidth for video streaming so that the more necessary services will get the required bandwidth needed.

Question #7: What are proxy servers? Explain 2 types of proxy servers.

Answer #7: Proxy servers act on behalf of the client to get the resources the client needs from other external servers. There are 2 types of proxy servers

  • Forward proxy servers and 
  • Reverse Proxy servers

Forward proxy servers sit on the client-side of the internet and talks to the server as if it is the client. 

The reverse proxy, on the other hand, sits on the server-side of the internet and acts on behalf of the server and talk to the clients as if it is the server.

Question #8: Expand and explain VPN

Answer #8: VPN stands for Virtual Private Network. 

Consider an organization with 3 branches, branch1, branch2, and branch3 in 3 different cities. 

Now they all work on the same data and need to be in the same network. So we can take the 3 LANs from the 3 branches and connect them over the internet to make something called a virtual private network. We do it in such a way that there is encryption and other security features that are typically available on a private network so that the other users cannot steal our data. 

This way we achieve all the necessities of a private network over a public network, hence the name virtual private network! 

VPNs can also be used by employees to work from home or outside their offices and connect to their office networks over the internet. 

Question #9: Give 2 examples of tools that can be used to sniff traffic on a network

Answer #9:  To sniff the network traffic we can use tools like

  • Wireshark and
  • TCPdump

Question #10: Expand and explain VLANs

Answer #10: VLANs stands for Virtual Local Area Networks

Generally, LANs are made up of a number of devices connected to a switch. But in a company there might be several departments like marketing, human resources, engineering, etc and each department will need its own LAN to store department-specific information.

If each department has their own room and their computers are connected to their own switches then there is no problem as they will act as separate broadcast domains.

But imagine a small organization with 5 marketing people, 5 HR, and 5 engineers. In this case, using a separate switch for each of the teams is not a good economic solution.

This led to the concept of VLANs where the switch is smart enough to divide the devices connected to it into separate LANs as we ask it too.

It does this by tagging each machine with a LAN ID and then using the LAN ID to segregate the devices connected to the switches into individual LANs.

Difficulty level: Hard

Question #1: Explain symmetric encryption 

Answer #1: This is a type of encryption mechanism used in electronic communication where a single key is used for both encryption and decryption. Before the communication even begins, the sender and receiver must make sure that they have this common key.

The sender can then encrypt the message using the key, send it over a shared communication media like the internet. The receiver on the other end takes this encrypted cipher, puts it through the decryption algorithm using the common key and reads the message.

If someone intercepts the message they will not understand the cipher as they don’t possess the key. One weakness of this symmetric encryption algorithm is the fact that the key initially has to be shared through some means where no one can intercept it.

Question #2: Explain Asymmetric encryption

Answer #2: This is similar to the symmetric encryption except for the fact that encryption and decryption process uses 2 separate keys known as private and public keys. One of these is kept a secret and the other is a public key.

One example of asymmetric key is in web browsers where SSL/TLS protocols rely heavily on this algorithm.

On the client-side, the public key is used to encrypt messages being sent to the server. Since only the server has the key to decrypt it, nobody else will be able to read the message even if it is intercepted.

Question #3: Explain Port mirroring

Answer #3: Port mirroring is a mechanism wherein all the traffic being sent and received in one port is copied to another port. This can be used for monitoring, analyzing and debugging purposes.

Question #4: Explain link aggregation

Answer #4: Link aggregation is a mechanism where 2 or more ports are bonded together in software to make the communication bandwidth bigger.

For example, 2 100Mbs ports can be bonded together to make a 200Mbps connection between 2 devices.

Question #5: List 3 wireless encryption protocols and explain them

Answer #5:

They include

  • WEP
  • WPA and
  • WPA2

WEP stands for Wired Equivalent Privacy. Even though the name sounds strong this standard has severe security issues. Hence it was replaced using WPA.

WPA stands for WiFi Protected Access. This standard filled in all the security holes on the WEP standard but still has some holes left unsealed. Then came WPA2 which is presently used and considered to be secure.

Question #6: Expand and explain WPS

Answer #6: To make the setup process easier for normal home users, WPS was introduced. WPS stands for WiFi Protected Setup, it introduced several easy methods to add devices to the WiFi network.

They include

  • WPS pin method
  • WPS push button method and
  • NFC method

In the WPS pin method, the user needs to type in a Pin number (usually printed on the backside of the router) to join the network, it has some security flaws and hence not recommended.

The WPS push button method has a simple button that can be used to add devices like printers to the WiFi network. The setup process is very simple, the user has to push the button on the router and the WPS enabled printers at the same time, usually within a 2-minute interval and this will enable the printer to join the wireless network.

NFC stands for Near Field Communication, here the user needs to bring the device that needs to be connected to a distance of less than 4cm to the wireless access point and this will let the device join the wireless network

Question #7: Explain the denial of service attacks

Answer #7: This is a type of attack usually played on a service provider like a web server. Basically it works by sending so many automated illogical network requests by the attacker to the server to confuse it and make this makes the actual client wait too long to get serviced.

Question #8: Explain man in the middle attacks

Answer #8: Consider 2 people communicating with each other in an online chatroom. They are doing it under the belief that they are directly communicating with each other. What happens if you sit in the middle and change the messages being sent to each other to make them see what you want them to see. This type of attack is called the man in the middle attack.

Question #9: Explain the need for ipv6 addressing 

Answer #9: ipv4 address was originally used to assign an address to the devices connected to the internet. This address was 32 bits long, which means a maximum of 2^32 = 4294967296 devices can be connected to the internet. Several portions of this address space were also reserved for special situations and this made the address space even smaller. Pretty soon we ran out of addresses to assign to devices on the internet. To address this issue we came up with Network Address Translation when each LAN has its own ipv4 address, but inside the LAN each device must use a private ipv4 address which is not seen from the internet, thereby mitigating this issue.

But this introduced a lot of extra work by the router to connect each individual device to the internet. This made the entire process inefficient.

Hence we came up with ipv6 addressing which is 64bits long. This address space can accommodate 18446744073709551616 devices, which is considered to be bigger than the number of all the grains of sand on earth’s crust!

So hopefully we will not run out of ipv6 addresses anytime soon!

Question #10: How many valid hosts can there be in the network given by 192.168.1.240/4?

Answer #10: The /4(pronounced as wack 4) at the end of 192.168.1.240/4 means the last 4 bits of the 32bit address are available for the network devices. 2^4 is 16 and hence there can be 16 devices. 2 of these addresses are reserved for network id(4 zeros) and the broadcast address(4 ones) and hence we are left with 14 devices.

Okay with that question I will stop this article. I hope you got some values out of this.

Please use the comment section if you have any questions or suggestions! You can also email us or contact us through this link!

If you liked the post, feel free to share this post with your friends and colleagues! 

EI

We’re passionate about inventing embedded devices and we hope you are too! This blog deals with a wide variety of topics from C programming to IOT to networking certifications and more. Hope you enjoy your time spent here and hope you get some value out of our blog!

You may also like...