Protocol – Network Interview https://networkinterview.com Online Networking Interview Preparations Tue, 22 Oct 2024 07:05:08 +0000 en-US hourly 1 https://wordpress.org/?v=6.8.1 https://networkinterview.com/wp-content/uploads/2019/03/cropped-Picture1-1-32x32.png Protocol – Network Interview https://networkinterview.com 32 32 162715532 What is Zero Configuration Networking? https://networkinterview.com/what-is-zero-configuration-networking/ https://networkinterview.com/what-is-zero-configuration-networking/#respond Tue, 22 Oct 2024 07:05:08 +0000 https://networkinterview.com/?p=21379 The information access is made uninterrupted over wired and wireless networks from anywhere, anytime, any device using modern technology. Today end users are mobile and often equipped with digital portable devices and they expect services availability as and when it is needed. They also do not want to be burdened with complex configuration vows before services discovery and its usage. The zero-configuration networking aims to alleviate configuration burden off the users to discover services and devices with very little manual intervention. 

In today’s topic we will learn about zero configuration networking, how zero configuration networks work, what are the advantages of zero configuration networks, its limitations and use cases. 

Zero Configuration Networking 

Zero configuration networks are a set of protocols and techniques which are used together to create an IP network having no specific configuration servers or manual operation requirements to provide services. These networks allow users to connect to systems, scanners, network devices such as printers, to have a functioning network without the need for complex and manual configurations.

Zero configuration networking (Zeroconf) does not require the user to set up domain name services (DNS), Dynamic host configuration (DHCP) or configure manually any other system settings. The Zeroconf comprises automatic resolution, distribution of system host names (mDNS as they called), numeric network IP addresses assignment to network devices (link local addresses auto configuration) and automatic location detection for network devices. 

How Zero Configuration Networking Works

Zeroconf uses a number of technologies to achieve its objective. For address selection, link-local addressing is a replacement for conventional DHCP server. This capability is in-built in the IPv6 protocol used by Zeroconf. The multicast service is used for name resolution to let a network device select domain name in local namespace and use a designated multicast IP address to announce it. It uses mDNS for discovery of services.

Every computer on the local network stores individual listings of DNS resource records and joins the respective multicast DNS group. DNS based service discovery relies on a type of messaging to discover services and provide notifications on the local network on its availability. 

Advantages of Zeroconf Networks 

  • Normal users can easily network with one or many devices without the need to perform specific setup / configuration 
  • Ideal for home and small office networks 
  • Adhoc networks for meetings and conferences 
  • If two devices need to share or exchange information spontaneously it is an ideal solution for such scenarios 
  • Provides plug/play usability for devices and applications
  • Networked applications provide a friendly experience to user without any hassles
  • It is independent of platform 

Limitations of Zeroconf Networks 

  • Local Network Only: Limited to local network segments, doesn’t scale well across larger networks or subnets.
  • Traffic Overhead: Uses multicast for discovery, which can generate excessive traffic in larger networks.
  • Scalability Issues: Performance degrades with a high number of devices, making it inefficient for large networks.
  • Security Concerns: Lack of authentication or encryption mechanisms, making it vulnerable to attacks.
  • Limited Control: Offers minimal configuration options, which may be insufficient for complex environments.

Uses of Zeroconf Networks

  • Application of Bonjour also known as Rendezvous used by Apple and introduced in Mac OS X 10.2 (‘Jaguar’) operating system 
  • Avahi on Linux and windows CE 5.0 
  • Used by iTunes for service discovery to find music available in local networks
  • iChat instant messaging uses it
  • Released under ASPL for Windows, POSIX platforms and Java 
]]>
https://networkinterview.com/what-is-zero-configuration-networking/feed/ 0 21379
Static IP vs Dynamic IP Addresses: What is the difference? https://networkinterview.com/static-ip-vs-dynamic-ip-addresses/ https://networkinterview.com/static-ip-vs-dynamic-ip-addresses/#respond Sun, 28 Jan 2024 13:53:06 +0000 https://networkinterview.com/?p=20508 All communication in Internet world is govern by OSI (Open Systems Interconnect) framework. There are seven layers in OSI model and each layer performs a set of functions to ensure data delivery to its intended recipient. The layer 3 or network layer is responsible for packet routing, forwarding across interconnected networks. This uses Internet protocol which uses a unique address to identify every host in the network referred as IP address. It is a numeric value assigned to a device and used for identifying the location of network devices. 

Today we look more in detail about IP address and its types, how they function and the difference between them i.e. Static IP vs Dynamic IP Addresses.

What is Static IP Address?

IP address could be distinct having allotted to each device individually on a network. The word static means ‘fixed’ and ‘not change’. The static IP address refers to an IP address which is assigned to a device permanently and does not change. Static IP addresses are usually found on web servers. This is usually utilized by businesses which require to communicate globally and desire a fixed identity. Since they are finite and to be assigned individually, they entail monthly fees.

Use cases for Static IP addresses

  • DNS – website managers use static IP addresses with DNS information which connects consistently using static address as it does not change
  • Website hosting – with a static address assignment to website, it is easier for users to find them easily on Internet
  • Voice communications – Voice over IP works better with consistent connections
  • Remote access – consistent connections between remote works and organization networks is possible with static IP addresses
  • Geolocation reliability – services rely on static IP addresses for geolocation capabilities such as weather or traffic updates
  • IP Allowlisting – Remote workers having static IP address help security teams to filter legitimate traffic to promote better data security.

What is Dynamic IP Address? 

IP address often changes when user reboots the system and its allocated mechanically. Dynamic IP addresses changes every time device connects to Internet. It does not entail cost to use dynamic IP address. ISP servers assign them as required. These are standard identifiers for consumer devices and mostly used in home networks for identification of tablets, laptops, and digital devices such as box.

Use cases for Dynamic IP address

  • Used in home settings and consumer settings
  • Used by mobile devices such as tablets and smartphones

Static IP vs Dynamic IP Addresses: Differences

Key points of comparison between the two types of IP addresses are:

Provider:

Internet service provider provides static IP addresses whereas Dynamic IP address is provided by DHCP (Dynamic host configuration protocol) server.

Nature:

Static IP address is constant and do not change any time. Dynamic IP address is not constant in nature and can change multiple times.

Security:

Since Static IP address is static in nature it is easy to intercept hence less secure. Dynamic IP addresses are more secure as they are difficult to intercept as they keep changing.

Traceability:

Devices assigned static IP addresses are easily traceable. Dynamic IP assignment makes difficult to trace a device to which it is assigned.

Stability:

Stability is higher in static IP address whereas Dynamic IP addresses are less stable.

Costs:

Static IP addresses are costly and provided by ISPs at high charges. Dynamic IP addresses itself do not entail cost, but there could be cost associated to setup initial infrastructure DHCP server etc.

Confidentiality:

If the requirement is that data is not so confidential but service reliability and availability is of concern then static IP addresses are being used such as servers hosting business applications. If the requirement is of higher security and lesser costs then dynamic IP address allocation is preferred such as endpoint systems.

Troubleshooting:

Troubleshooting is easier for static IP address as IP is fixed. Troubleshooting is complex and difficult to diagnose network issues as IP address assignment is not fixed.

Static IP vs Dynamic IP Addresses: Comparison Table

Below table summarizes the differences between Static and Dynamic IP address:

Static IP vs Dynamic IP Addresses

Download the comparison table: Static IP vs Dynamic IP

Continue Reading:

IP Address Restrictions for Improved Access Control

NAT vs PAT: IP Address Translation Explained

]]>
https://networkinterview.com/static-ip-vs-dynamic-ip-addresses/feed/ 0 20508
What is Secure Real-Time Transport Protocol? (SRTP or Secure RTP) https://networkinterview.com/secure-real-time-transport-protocol/ https://networkinterview.com/secure-real-time-transport-protocol/#respond Wed, 17 Jan 2024 17:30:50 +0000 https://networkinterview.com/?p=20475 There are a set of protocols which define how real time traffic handling will be taken care of such as audio and video over the Internet. These protocols are known as Real Time Transport protocol (RTP). RTP protocol is used with UDP or user datagram protocol. In itself UDP is considered an unsecured protocol so how to ensure encryption, authentication, integrity and shielding against cyber attacks while doing real time traffic handling here Secure RTP comes into the picture. 

Today we look more in detail about the secured extension of Real time Transport protocol (RTP) known as Secure Real-Time Transport Protocol, its packet structure, how it works, its advantages and use cases.

SRT or Secure Real-Time Transport Protocol 

Voice over IP (VoIP) has taken over traditional PSTN networks over years and more and more voice calls are shifting from PSTN to VoIP where most people are not aware that security vulnerabilities introduced by VoIP are susceptible to denial of service (DDoS) attacks and VoIP traffic can be mislead or corrupted using DNS hijacking. 

It was published in 2004 by IETF (Internet Engineering Task Force) under RFC 3711. SRTP or Secure RTP is a security profile for RTP which adds confidentiality, integrity, message authentication, and replay protection to RTP protocol. SRTP provides protection for voice over IP traffic as it has minimal impact during usage on voice quality and payload overhead. Its secure variants provide support for authentication algorithms such as HMAC-SHA1 and MD5 and key definition schemes such as PSK, MKI and FT.

Secure RTP is the profile of RTP and not a different protocol but when security is used and packet payload is encrypted it is Secure RTP. RTP is designed to handle play out requirements of real time media streams using time stamps and jitter buffering. Due to the real time nature of data streams, transmissions requests could be a costly affair, it is used in conjunction with UDP to provide lower overhead communication between two systems or endpoints. 

Pros and Cons of Secure RTP 

PROS

  • Wider acceptance to new encryption algorithms
  • Secure for unicast and multicast RTP applications
  • High throughput and low packet expansions
  • Lower bandwidth and computational costs
  • Higher tolerance for packet loss and packet recording 
  • Advanced Encryption Standard (AES) used as default cipher for encryption / decryption by Secure RTP
  • Works independently of transport, network and physical layers used by RTP

CONS

  • Only encrypts the payload of RTP packets and not for RTP extension headers
  • Only available for business applications not meant for individual consumers
  • Usage of selective forwarding mixer to optimize RTP parameters results in disruption of end-to-end security between peer-peer systems 

SRTP Working

How does SRTP (Secure Real-Time Transport Protocol or Secure RTP) work?

Secure RTP uses TLS for encryption, using a handshake (which is depicted in figure below). 

The client and server exchange the keys which are unique for each session, and used to encrypt and decrypt data for data getting transferred between them. SRTP uses AES-CTM – VoIP standard and AES-f8 – used in 3g data networks.

Continue Reading:

12 Most Important Network Protocols Explained

GLBP: Gateway Load Balancing Protocol

]]>
https://networkinterview.com/secure-real-time-transport-protocol/feed/ 0 20475
What is the default SMTP port number? Which port should be used? https://networkinterview.com/what-is-the-default-smtp-port-number/ https://networkinterview.com/what-is-the-default-smtp-port-number/#respond Sun, 26 Nov 2023 13:07:41 +0000 https://networkinterview.com/?p=20345 You might have heard of such things as SMTP ports and already know that it has something to do with setting up your email software. But what is it exactly, and how do you determine the proper one? This article will explain what you need to know.

Before we dive into ports, it’s best to know what SMTP is in the first place and how it works.

What Is SMTP?

It is an abbreviation for Simple Mail Transfer Protocol, the standard protocol for transferring emails from one computer to another. Whenever you type an email and hit the send button, you’re transferring the contents from your device to the recipient’s server. SMTP is a set of rules that guide the data on its way.

Below is a summary of how an email is transmitted from the sender to the receiver:

  • You type an email and hit the send button.
  • Your email client program connects to its assigned mail server.
  • The client forwards all the message contents to the server, including the body, attachments, “From” and “To” addresses, and assorted technical headers.
  • The server checks if the “From” and “To” addresses share the same domain name. If so, it forwards the contents to the recipient’s mailbox immediately because it’s on the same mail server. If not, it queries the domain name system (DNS) for the MX records of the addressee’s domain to identify the mail server servicing that domain, and sends the message there.
  • The receiving server verifies the incoming mail and stores it in the recipient’s mailbox.

In the above scenario, the receiving server is identified by its IP address found in the domain’s MX record. But apart from that address, one more parameter is required for successful communication – the port number. The port number lets the receiving server know which application should process a particular chunk of incoming data. Without it, the server would not distinguish between part of an email in transit and, say, a stream of video data someone else is uploading at the very same time.

It should be noted that when your email client software connects to your SMTP server, it also needs to know the SMTP port number. In most cases, you only enter it once during initial setup (or do not need to provide it at all, as in the case of web-based clients). Read on to learn which port numbers are commonly used for SMTP and what’s the difference between them.

SMTP Ports

There are four main SMTP ports identified by these numbers: 25, 587, 465, and 2525. These ports have unique properties, which you must know when deciding which one to use. We’ll explain these characteristics below.

25

This is the oldest port in use, established in the early 1980s, when the need for data encryption was not yet foreseen. It is prone to abuse by spammers and malicious actors, so many email providers don’t support it at all. 

587

This is SMTP’s default port for secure email submission. It lets users send encrypted emails and avoid interception by unauthorized third parties.

465

This port was established in the late 1990s for secure email submission. However, it was deprecated in favor of 587. Many ESPs still support 465, but you should avoid using it because it’s no longer standard.

2525

This is an alternative to 587. It’s not officially recognized as an SMTP port, but many ESPs support it.

Which Port Should I Use?

The safest way to find out which port to specify when setting up your email client software is to ask your mail server’s administrator. If they are not available, you may still determine the proper port by yourself, through trial and error.

You should first try 587 – it is always the best choice because it offers secure communication mode, and virtually all email service providers support it. 

If 587 isn’t available, you can try 2525. However, it’s important to note that port 2525 is not officially designated for SMTP by the IETF (Internet Engineering Task Force) and might only be supported by some email service providers.

465 has long been deprecated, meaning the server may not support it. However, it has seen a resurgence for secure SMTP submissions and is commonly used with SSL/TLS.

Spammers often abuse port 25, but it’s still widely used for email transfer. Port 25 is appropriate for specific contexts, particularly server-to-server communication, rather than for client submission of emails.

In summary, ports 587 and 2525 are commonly used for secure email submission and are generally good choices, while ports 25 and 465 have their more specific uses. 

Continue Reading:

12 Most Important Network Protocols Explained

TCP 3-Way Handshake (SYN, SYN + ACK, ACK)

]]>
https://networkinterview.com/what-is-the-default-smtp-port-number/feed/ 0 20345
GLBP: Gateway Load Balancing Protocol https://networkinterview.com/glbp-gateway-load-balancing-protocol/ https://networkinterview.com/glbp-gateway-load-balancing-protocol/#respond Fri, 11 Aug 2023 07:32:52 +0000 https://networkinterview.com/?p=19949 Introduction to Gateway Load Balancing Protocol

Load balancing is one of the key requirements in networks and it can be achieved in several ways such as round robin, host dependent and weighted. Protocols supporting load balancing have the capability to use multiple physical gateways in simultaneous manner based on which packet forwarding takes place. These load balancing protocols provide first hop gateway redundancy in LAN. In LAN users are configured with default IP gateway, local router IP address configured as proxy to communicate to remote users. 

LAN uses MAC address of the gateway router with a proxy ARP method. If the gateway router has failed it will impact LAN users as a single point of connection. First hop redundancy protocols have two or more routes to support shared MAC address and advertise ARP queries to LAN users so if the primary router fails the backup router will take up control of traffic going to that MAC.

Today we look more in detail about GLBP (Gateway Load Balancing Protocol) which provides first hop gateway redundancy, its working, how to configure GLBP? etc.

What is Gateway Load Balancing Protocol?

GLBP provides two basic functions as a virtual gateway protocol quite similar to HSRP and VRRP. It provides redundancy like first hop redundancy and also provides load balancing functionality. It is a Cisco proprietary protocol and unlike its counterparts HSRP and VRRP protocols which work in standby/ redundancy mode for packet forwarding , it uses multiple physical gateways simultaneously. Load balancing is achieved by utilizing a single virtual IP address and multiple virtual MAC addresses across multiple routers. Let’s look at some of the terms associated with GLBP to understand its working in a better manner. 

Actual virtual gateway (AVG) is elected within each group and all other members of the group act as elected AVG backups. Hello and Holdtime timers are used to monitor its state. Hello value is ‘3’ and Holdtime value is ‘10’ seconds by default. GLBP routers use local multicast address 224.0.0.102 to send Hello packets every ‘3’ seconds to its peers over UDP 3222. 

The AVG is responsible for assignment of virtual MAC addresses to all routers operating within the GLBP of the group thus enabling Active virtual forwarders (AVFs). AVFs take on the responsibility of forwarding packets sent to their virtual MAC address. 

If AVG fails, AVF having highest priority is designated as AVG and hence becomes responsible for providing MAC addresses of AVFs. If one AVF fails, another AVF in the same group will become responsible for packet forwarding. In a GLBP group maximum four routers are there. 

Algorithm Types: Gateway Load Balancing Protocol

GLBP uses three types of algorithm for load balancing as described below.

  • Round-Robin: Serial wise assignment of virtual MAC address by AVG to AVFs such as AVF1, AVF 2 and so on. 
  • Host-dependent: AVG assigns specific AVF to a particular host if it needs a specific virtual MAC address every time.
  • Weighted: Load distribution will happen according to requirement by assignment of virtual MAC address in proportions; so, weight is changed if there is a need for some AVFs to handle more traffic than their other counterparts.

Features of Gateway Load Balancing Protocol

  • Load balancing over multiple paths. 
  • Supports up to 1024 virtual routers on each physical interface of router with GLBP groups and 4 virtual forwarders within a group. 
  • Traffic from LAN users can be shared by multiple routers. 
  • Authentication methods supported are clear text and MD5.

Sample Configuration: Gateway Load Balancing Protocol

In the topology above, routers – Router 1 and Router 2 are there. Router 1 is connected via f0/0 IP address – 10.1.1.1/24 and Router 2 is connected via fa0/0 IP address 10.1.1.2/24.

 

Step 1 : IP address assignment to Router 1

Router1(config)# int fa0/0

Router1(config)# ip add 10.1.1.1 255.255.255.0 

 

Step 2: IP address assignment to Router 2

Router2(config)# int fa0/0

Router2(config)# ip add 10.1.1.2 255.255.255.0 

 

Step 3: Configure virtual IP , GLBP load balancing type, priority, and pre-emption for Router1

Router1(config-if)# glbp 1 ip 10.1.1.100

Router1(config-if)# glbp 1 priority 120

Router1(config-if)# glbp 1 preempt

Router1(config-if)# glbp 1 load-balancing round-robin

 

Step 4: Configure virtual IP , GLBP load balancing type, priority, and pre-emption for Router2

Router2(config-if)# glbp 1 ip 10.1.1.100

Router2(config-if)# glbp 1 priority 100

Router2(config-if)# glbp 1 preempt

Router2(config-if)# glbp 1 load-balancing round-robin

Continue Reading:

12 Most Important Network Protocols Explained

What is VLAN Trunking Protocol (VTP)?

]]>
https://networkinterview.com/glbp-gateway-load-balancing-protocol/feed/ 0 19949
12 Most Important Network Protocols Explained https://networkinterview.com/12-most-important-network-protocols-explained/ https://networkinterview.com/12-most-important-network-protocols-explained/#respond Tue, 08 Aug 2023 17:08:40 +0000 https://networkinterview.com/?p=19920 Network protocols establish rules of communication to control and govern exchange of information following secure, reliable methods. These are a set of rules designed to have a standard framework for interchange over networks. There are a variety of network protocols which exist, some of them are wired like Ethernet and some are wireless like WLANs and Internet communication. The Internet protocol suite has dozens of networking protocols which are used for transmission and broadcast over the Internet. 

In today’s lesson we will cover in detail about twelve most important networking protocols, their features, purposes they are meant for and so on.

List of 12 Most Important Network Protocols

The very first important protocol in this list is ARP. 

ARP

Address Resolution protocol (ARP) –

It is a communication layer protocol used for identification of Media access control (MAC) address given the IP address basically mapping between data link layer and network layer. ARP translates IP address into MAC address, this is required because IP address and MAC address have different lengths. IPv4 addresses are 32 bit long and IPv6 addresses are 128 bit long whereas MAC address is a device physical hardware number which is 12 hexadecimal digits split into six pairs. The translated address is stored in the ARP cache table when a new device joins the network. Below figure depicts the ARP packet structure. 

Border Gateway Protocol (BGP) –

BGP is an intern domain protocol which uses path vector routing for communication. It is a gateway protocol which is used to exchange routing information between autonomous systems on the Internet. It is an open standard protocol which can run on any window device. It is the only protocol which operates on the Internet backbone and it is an application layer protocol which uses TCP for communication. 

DNS

Domain Name System (DNS) –

DNS is an application layer protocol which defines how an application processes runs on different systems and passes messages to each other. It is a directory service which provides mapping between the network host and its numerical address. It is required to enable Internet functioning. Each node in a tree is a domain name, and full domain name is a sequence of symbols specified by dots (.). This service performs translation of domain name into an IP address. 

DHCP

Dynamic Host Configuration Protocol (DHCP)-

DHCP works on IP networks and assigns them IP addresses. It allows hosts to communicate effectively with each other. DHCP also assigns subnet mask in addition to IP address, default gateway address, the domain name server address and pertinent configuration parameters. DHCP allows systems to request IP addresses and other network parameters automatically from Internet service providers. The TCP/IP protocol supports DHCP for automatic assignment of a unique IP address to each connected device and keeping a track of them.

FTP

File Transfer Protocol (FTP)-

Is a network protocol based on client / server architecture model. It is an Internet protocol provided by TCP/IP and used to transfer files from one host system to another host system. It is majorly used to transfer web page files and also used to download files from other servers.

HTTP

Hypertext Transfer Protocol (HTTP) –

HTTP is used to access data on the World Wide Web (WWW). It is used to transfer data in the form of plain text, hypertext, audio, video formats. It is quite similar to FTP as it also transfers files from one host to another host but it is simpler as it uses only one connection i.e., no control connection for files transfer. 

IP

Internet Protocol (IP) –

Internet protocol is used for sending packets from source location to destination location. The main task of IP is to deliver the packets from source to destination based on IP addresses available in the packet header. It defines the packet structure which hides data which is to be delivered as well as the addressing method which labels the datagram with information on source and destination.

OSPF

Open Shortest Path First (OSPF) –

OSPF is widely used and supported routing protocol as an interdomain protocol and used within an area or a network. It is an interior gateway protocol which is designed within a single autonomous system. It is based on a link state routing algorithm in which each router contains information of every other domain based on which shortest path is determined and its goal is to learn paths.

SMTP

Simple Mail Transfer Protocol (SMTP) –

SNTP is an electronic mail transmission network protocol. It is used to send messages to other systems based on email address. It provides mail exchange between users on the same or different systems and it also supports sending a single message to multiple recipients, messages which include video, audio, and graphics, and also send messages outside the network.

Telnet –

Telnet is an application protocol used on Internet which provides bi-directional interactive session which uses a virtual terminal connection. It establishes connection between remote endpoint and host machine to enable a remote session. Telnet lacks security protections however to secure communication.

TCP

Transmission Control Protocol (TCP) –

TCP is a transport layer protocol which facilitates transmission of packets from source to destination. It is a connection-oriented protocol which establishes connection prior to communication. It takes data from the application layer and divides it into several packets and numbers them before transmission. 

UDP

User Datagram Program (UDP) –

UDP is also a transport layer network protocol but it is unreliable as it is a connectionless state and does not provide an acknowledgement mechanism unlike its counterpart TCP. It works by encapsulating the data into a packet and providing its own header then it is encapsulated to the IP packet and sent to destination.

Continue Reading:

Enabling and Configuring Network Configuration Protocol in a Managed Device

Understand and Configure the UDLD Protocol

]]>
https://networkinterview.com/12-most-important-network-protocols-explained/feed/ 0 19920
OSPF vs ISIS: Dynamic Routing Protocols https://networkinterview.com/ospf-vs-isis/ https://networkinterview.com/ospf-vs-isis/#respond Wed, 07 Jun 2023 02:19:05 +0000 https://networkinterview.com/?p=3192 Computer communication networks are growing at a rapid pace, they are based on technology which provides the technical infrastructure, whereas routing protocols are used for transmission of data packets across the Internet. Routing protocols specify how routers communicate with each other, how routing information will be stored? Prior knowledge of routes helps to choose the most optimal path for data transmissions. There are wide variety of routing protocols being used 

Today we look more in detail about two link state routing protocols OSPF (Open shortest path first) and ISIS (Intermediate System to Intermediate System) dynamic routing protocol and similarities and key differences, OSPF vs ISIS, between both of them.

What is OSPF Dynamic Routing Protocol?

OSPF (Open shortest path first) is used in large enterprise networks. It collects link state information from routers in the network and determines the routing table information for packet forwarding. It creates a topology map of the network. OSPF exchanges routing information only when there is a change in network topology and it is best suited for complex networks which compromise multiple subnets by calculating shortest path effectively with minimum network traffic when change occurs.

ospf dynamic routing protocol

Features of OSPF

  • OSPF has complete visibility of network topology which let routers calculate best routes for all incoming requests
  • There are no limitations on hop count, so it converges faster and has better load balancing
  • It Multicasts link-state updates and sends the update only when there is a change in network 

What is ISIS Dynamic Routing Protocol? 

ANSI ISO developed an open standard and classless Interior gateway link state protocol named IS-IS (Intermediate System to Intermediate System). IS-IS uses Dijkstra SPF (shortest path first) algorithm to build IS-IS protocol databases to calculate the best path. It uses cost value for best path selection. It has fast convergence and large scalability. 

isis dynamic routing protocol

Features of ISIS dynamic routing protocol 

  • Very fast convergence and large scalability
  • Area structure is more flexible
  • Extensible for both IPv4 and IPv6
  • Scalability can be achieved with single area 

Commonalities between: OSPF & ISIS Dynamic Routing Protocols

  • Both are link state routing protocols
  • OSPF and IS-IS dynamic routing protocol uses Dijkstra SPF (Shortest Path First) algorithm
  • OSPF and IS-IS dynamic routing protocol supports Variable length subnet mask (VLSM)
  • Both are highly scalable protocols
  • Both has highest convergence time after changes
  • Both are open standard protocols
  • Both have hierarchical structure (two hierarchy levels)
  • Both support LANs and point-to-point protocols in same way
  • Both use periodic Hello messages for establishment of neighbour 

Comparison Table: OSPF vs ISIS 

Let’s understand the differences between the two types of protocols in tabular form:

ospf vs isis comparison table

Download the comparison table: OSPF vs ISIS

Continue Reading:

OSPF LSA TYPES

OSPF CHEATSHEET

]]> https://networkinterview.com/ospf-vs-isis/feed/ 0 3192 What is VPLS? And how is it different from MPLS? https://networkinterview.com/mpls-vs-vpls/ https://networkinterview.com/mpls-vs-vpls/#respond Wed, 31 May 2023 12:44:45 +0000 https://networkinterview.com/?p=2420 Introduction to VPLS

As we have already discussed MPLS in detail in our previous article, so here I will focus on VPLS first and then the differences between the two.

VPLS i.e. Virtual Private LAN Service. It is a service that uses MPLS and Virtual Private Networking in order to connect multiple LANs over the internet, thereby creating a logical LAN between geographically dispersed sites. It provides a secure and seamless connection. 

So basically VPLS uses MPLS as a shared core network infrastructure enabling a service provider to extend a Layer 2 network across geographically separate/remote sites. It creates a virtual Ethernet switch at the provider’s edge to link remote sites.

VPLS is a mesh network topology, which means each network device  is connected to every other device  through a dedicated link and there is no concept of a central hub which acts as a central point of communication.

How does VPLS work?

The data first travels to a customer edge router /switch, which sends it to a provider edge/router. Then the data is immediately sent to another router within the VPLS network using MPLS core infrastructure. The paths that carry VPLS network traffic are also called pseudowires, as they provide a fast and direct connection similar to physical layer connections. Once the data packet reaches its destination router, it can be immediately directed through the local network.

MPLS vs VPLS

Now, as we have the basic idea of these two terms, let’s discuss their differences.

In MPLS, service provider participates in the routing of customer sites. However, in VPLS service provider does not necessarily participate in the routing of customer sites. Thus the customer gets the option of doing routing on their own based on their needs.

VPLS also provides a more secure service because the service provider stays out of the customer routing scope.

Unlike MPLS, which is based on IP supported traffic, VPLS can also support non IP-traffic.

As far as network scalability, VPLS is less scalable than MPLS.

MPLS is label switching and thus uses labels to locate the endpoint. However, VPLS uses mac address to locate the other end point.

Comparison Table : MPLS vs VPLS

Below table describes the difference between MPLS and VPLS (Credit:ipwithease.com):

MPLS VS VPLS comparison table

Conclusion

Both MPLS and VPLS have their own set of features and advantages, but VPLS can not be regarded independent of MPLS, as it actually uses MPLS as core infrastructure. VPLS do provide advantages like increased level of security and complete control over routing and data, MPLS would still be the choice, if the consideration is scalability.

Continue Reading:

What is MPLS and how is it different from IP Routing?

In case you are preparing for your next interview, then our cheatsheet on MPLS would be really helpful for you as a ready reckoner. Please download MPLS CHEATSHEET FREE PDF 

MPLS CHEATSHEET

If you want to learn more about MPLS, then check our e-book on MPLS Interview Questions and Answers in easy to understand PDF Format explained with relevant Diagrams (where required) for better ease of understanding.

 

]]>
https://networkinterview.com/mpls-vs-vpls/feed/ 0 2420
What is VLAN Trunking Protocol (VTP)? https://networkinterview.com/what-is-vlan-trunking-protocol-vtp/ https://networkinterview.com/what-is-vlan-trunking-protocol-vtp/#respond Wed, 10 May 2023 10:27:47 +0000 https://networkinterview.com/?p=14457 VLAN Trunking Protocol 

VLAN Trunking Protocol is used by Cisco switches to exchange VLAN information. In VTP, synchronization of VLAN information, such as VLAN ID or VLAN name can be done with switches inside the same VTP domain.

VTP domain is a group of trunked switches with the matching VTP settings such as domain name, password and VTP version. All switches present in the same VTP domain share their VLAN information with each other.

For better understanding of VTP, consider an example network with 50 switches. Without VTP, if we want to create a VLAN on each switch, you should manually enter VLAN configuration commands on every switch. But when comes to VTP, it enables you to create the VLAN only on a single switch. That Particular switch can propagate information about the VLAN to every other switch on the network and cause other switches to create it. Similarly, if we delete a VLAN, the change is automatically transmitted to every other switch inside the same domain.

VTP share VLANs information through VTP messages. VTP messages can only be transmitted through the trunk connections. So we need to establish trunk connection between switches. VTP messages are transmitted as layer 2 multicast frames.VTP does not publicize information about which switch ports are assigned to which VLAN.

Related – VDC vs VLAN

VLAN Trunking Protocol VERSIONS:

There are three versions in VTP

  • Version 1
  • Version 2
  • Version 3

Among the three, Version 3 is most popular and has following features –

  • Enhanced authentication
  • Support for extended VLANs (1006 to 4094). It also support for private VLAN
  • VTP mode off that disables VTP
  • Backward compatibility with VTP V1 and V2

VLAN Trunking Protocol (VTP) MODES:

VTP can be configured in four different modes

  1. VTP Server Mode
  2. VTP Client Mode
  3. VTP Transparent Mode
  4. VTP Off Mode

VTP Server Mode:

  • VLANs can be created, modified, and deleted in VTP server and configuration parameters, such as VTP version and VTP pruning can also be specified for the entire VTP domain.
  • VTP servers publicize their VLAN configuration to other switches in the same VTP domain and synchronize their VLAN configuration with other switches based on advertisements received over trunk links.
  • VTP server is the default mode.
  • Saves Configuration in NVRAM

VTP Client Mode:

  • VTP clients are similar to the VTP servers. The only difference is that we cannot create, change, or delete VLANs on a VTP client.
  • Doesn’t save Configuration in NVRAM

VTP Transparent Mode:

  • VTP transparent switches do not take part in VTP.
  • VTP transparent switch does not publicize its VLAN configuration and does not synchronize its VLAN configuration based on received advertisements, but transparent switches forward VTP advertisements that they receive from trunk ports.
  • In addition to supporting private VLANs in client and server modes, VTP version 3 also supports creating extended-range VLANs in client or server mode

VTP Off Mode:

It is similar to the transparent mode. The only difference is that a switch using this mode will not forward received VTP updates. It is supported only in VTP Version3.

Configuration Revision Number:

  • Vlan Trunking Protocol switches use a pointer called the VTP configuration Revision Number to notify the most recent information.
  • Configuration revision number is zero (0) when VTP advertisement process starts.
  • When modification is made on a VTP server, the revision number is incremented by one before the advertisement is sent.

How to add a new switch into the existing VLAN Trunking Protocol Domain

  • While adding a switch to an existing VTP domain, make sure that the switch VTP Revision number is 0 before adding it to a network.
  • Reform the switches VTP mode to transparent and then change the mode back to server.
  • VTP domain name should be changed to a fake name (a nonexistent vtp domain), and then change the VTP domain back to original name.
  • Remove the Vlan .Dat file inside the flash and reload it.

VLAN Trunking Protocol (VTP) CONFIGURATION

There are some prerequisites for VTP to transmit VLAN information between switches.

  • Switches which are to be VTP configured should be with the same domain name and same version.
  • There must be one server switch among the switches.
  • Authentications like Password should match if applied.

Below is a sample lab setup showcasing VTP Server, Client and transparent mode for Switch1, Switch2 and Switch3 respectively.

Configuration of VTP Server Mode in Switch 1

Switch1#configure t

Switch1(config)#interface range Ethernet 0/1

Switch1(config-if-range)# switchport trunk encapsulation dot1q

Switch1(config-if-range)#switchport mode trunk

Switch1(config-if)#exit

Switch1(config)#exit

Switch1#configure t

Switch1(config)# vtp domain cisco

Switch1(config)# vtp mode server

Switch1 (config)#exit

 

Configuration of VTP Client Mode in Switch 2

Switch2#configure t

Switch2 (config) #interface range Ethernet 0/0

Switch2(config-if-range)# switchport trunk encapsulation dot1q

Switch2(config-if-range)#switchport mode trunk

Switch2(config-if)#exit

Switch1(config)#exit

Switch2#configure t

Switch2(config)# vtp domain cisco

Switch2(config)# vtp mode client

Switch2(config)#exit

 

Configuration of VTP Transparent Mode in Switch 3

Switch3#configure t

Switch3(config)#interface range Ethernet 0/0

Switch3(config-if-range)# switchport trunk encapsulation dot1q

Switch3(config-if-range)#switchport mode trunk

Switch3(config-if)#exit

Switch3(config)#exit

Switch3#configure t

Switch3(config)# vtp domain cisco

Switch3(config)# vtp mode transparent

Switch3(config)#exit

 

Below is the VTP mode after configuring the mode as server in Switch1.   

                                  

Switch1# show vtp status

VTP Version capable                                       : 1 to 3

VTP version running                                       : 1

VTP Domain Name                                          : cisco

VTP Pruning Mode                                          : Disabled

VTP Traps Generation                                    : Disabled

Device ID                                                            : aabb.cc80.1000

Configuration last modified by 0.0.0.0 at 0-0-00 00:00:00

Local updater ID is 0.0.0.0 (no valid interface found)

Feature VLAN:

—————–

VTP Operating Mode                                     : Server

Maximum VLANs supported locally                  : 1005

Number of existing VLANs                                  : 5

Configuration Revision                                         : 0

MD5 digest                                                              : 0x57 0x30 0x6D 0x7A 0x76 0x12 0x7B 0x40

0x00 0x7F 0xD1 0x16 0x72 0xC1 0x1C 0x8F

*** MD5 digest checksum mismatch on trunk: Et0/0 ***

*** MD5 digest checksum mismatch on trunk: Et0/1 **

 

Below is the  information of VTP mode after configuring the mode as client in Switch2.

Switch2# show vtp status

VTP Version capable                                       : 1 to 3

VTP version running                                       : 1

VTP Domain Name                                          : cisco

VTP Pruning Mode                                          : Disabled

VTP Traps Generation                                    : Disabled

Device ID                                                            : aabb.cc80.2000

Configuration last modified by 0.0.0.0 at 0-0-00 00:00:00

Feature VLAN:

—————–

VTP Operating Mode                                     : Client

Maximum VLANs supported locally                  : 1005

Number of existing VLANs                                  : 5

Configuration Revision                                         : 0

MD5 digest                                                              : 0x57 0xCD 0x40 0x65 0x63 0x59 0x47 0xBD

0x56 0x9D 0x4A 0x3E 0xA5 0x69 0x35 0xBC

*** MD5 digest checksum mismatch on trunk: Et0/0 ***

 

Below is the information of VTP mode after configuring the mode as transparent in Switch3.

Switch3# show vtp status

VTP Version capable                                       : 1 to 3

VTP version running                                       : 1

VTP Domain Name                                          : cisco

VTP Pruning Mode                                          : Disabled

VTP Traps Generation                                    : Disabled

Device ID                                                           : aabb.cc80.3000

Configuration last modified by 0.0.0.0 at 0-0-00 00:00:00

Feature VLAN:

—————–

VTP Operating Mode                                     : Transparent

Maximum VLANs supported locally                  : 1005

Number of existing VLANs                                   : 5

Configuration Revision                                        : 0

MD5 digest                                                     : 0x57 0xCD 0x40 0x65 0x63 0x59 0x47 0xBD

0x56 0x9D 0x4A 0x3E 0xA5 0x69 0x35 0xBC

*** MD5 digest checksum mismatch on trunk: Et0/0 ***

 

VLAN 10 & VLAN 20 configuration on switch 1.

After Creating the VLANs in Switch 1, the same VLANs are also created in Switch 2 automatically because the Switch 1 is server.

Configuration of switch 1

Switch1#configure t

Switch1(config)#vlan 10

Switch1(config-vlan)#exit

Switch1(config)# vlan 20

Switch1(config-vlan)#exit

Switch1(config)#exit

 

Showing the information about VLANs in Switch 1 use “show vlan brief” command.

Switch1# show vlan brief

VLAN                     Name                                      Status                                   Ports

——————————————————————————————————————–

1                              default                                   active                                Et0/2, Et0/3

10                         VLAN0010                       active

20                         VLAN0020                      active

1002                      fddi-default                          act/ unsup

1003                      token-ring-default              act/ unsup

1004                      fddinet-default                    act/ unsup

1005                      Trnet-default                       act/ unsup

 

Showing the information about VLANs in Switch 2.

Switch2# show vlan brief

VLAN                        Name                                Status                          Ports

—————————————————————————————————————————–

1                              default                                  active                   Et0/1,Et0/2, Et0/3

10                         VLAN0010                       active

20                        VLAN0020                      active

1002                      Fddi-default                        act/unsup

1003                      token-ring-default             act/unsup

1004                      Fddinet-default                  act/unsup

1005                      trnet-default                        act/unsup

 

Note: As per the output, VLAN 10 & VLAN 20 are created in switch 1. Henceforth, VLAN 10 & VLAN 20 are also created in Switch2 by automatically (by VTP) because Switch 1 is VTP server, Switch 2 is VTP Client.

 

Information about VLAN 10 & VLAN 20 in Switch 3.

Switch3# show vlan brief

VLAN                     Name                                      Status                         Ports

—————————————————————————————————————————-

1                              default                                      active                Et0/1, Et0/2, Et0/3

1002                       fddi-default                         act/unsup

1003                       token-ring-default             act/unsup

1004                       fddinet-default                   act/unsup

1005                       trnet-default                        act/unsup

Note: As per the output, no VLANs are created automatically in switch 3, because Switch 3 is VTP transparent.

Related – VTP Interview Q&A

]]>
https://networkinterview.com/what-is-vlan-trunking-protocol-vtp/feed/ 0 14457
When does DNS use TCP or UDP? https://networkinterview.com/when-does-dns-use-tcp-or-udp/ https://networkinterview.com/when-does-dns-use-tcp-or-udp/#respond Wed, 14 Sep 2022 07:20:00 +0000 https://networkinterview.com/?p=13437 Introduction

There are quite is few services which may use both TCP and UDP protocol while communicating. The primary reason is based on type of request/response which needs to be furnished. Before we further drill into detail of protocol type used in DNS, lets have a quick run through TCP and UDP protocols.

What is TCP?

TCP is a connection-oriented protocol where the devices in communication should establish a connection before they can start with data transmission. The same stands true for termination of connection . Notable is that TCP is reliable and it guarantees delivery of data to the destination device.

What is UDP?

UDP is a connectionless protocol where there is no establishment of connection before data transmission. Further, there is no overhead related to opening, maintaining and terminating a connection. A key aspect of UDP is that delivery of data to the destination is not guaranteed.

While considering between UDP or TCP protocol for any application, another key aspect to note is that  UDP packets are smaller in size and cannot be greater then 512 bytes. Hence, any application needs where data to be transferred is greater than 512 bytes will require TCP protocol.

Example Scenario: When does DNS use TCP or UDP?

Lets take scenario of UDP protocol requirement in DNS – A Client queries for a record from DNS server. Even if the DNS server response is lost or becomes corrupt, its not a major challenge since client can ask for it again. Considering such use case, it is rational to use UDP when communicating with DNS for translation of domain name.

So, when does DNS use TCP? In order to maintain a consistent DNS database between DNS Servers. Hence, a transfer of DNS records (Zone transfer) between Primary and secondary DNS Servers is required which uses TCP protocol. The requirement here is that TCP, due to its reliability makes sure zone data is consistent across DNS servers. When a client doesn’t receive a response from DNS, it re-transmits the query using TCP after 3-5 seconds of interval.

Considering the above scenarios, it becomes essential that DNS server operators/providers must provide DNS service over both UDP and TCP. The same understanding stands true for network operators. We may encounter operational challenges when TCP protocol is blocked for communication of DNS service.

Continue Reading:

TCP/IP MODEL vs OSI MODEL: Detailed Comparison

11 States of TCP Transition Explained

Are you preparing for your next interview?

Please check our e-store for e-book on DNS Interview Questions. All the e-books are in easy to understand PDF Format, explained with relevant Diagrams (where required) for better ease of understanding.

]]>
https://networkinterview.com/when-does-dns-use-tcp-or-udp/feed/ 0 13437
11 States of TCP Transition Explained https://networkinterview.com/11-states-of-tcp-transition-explained/ https://networkinterview.com/11-states-of-tcp-transition-explained/#respond Tue, 13 Sep 2022 08:34:01 +0000 https://networkinterview.com/?p=17846 TCP or transmission control protocol operates at the transport layer of the OSI model. It facilitates transmission between packets from source to destination in a reliable manner as it is a connection-oriented protocol. TCP operations are divided into three phases namely –

  • connection establishment,
  • data transfer phase and
  • connection termination.

TCP connection is managed by the operating system through a resource which represents the local end point for communications. The lifetime of a TCP connection goes through various stages. 

Today we look more in detail about 11 states of TCP connection, how it works, and its diagrammatic presentation for ease of understanding. 

TCP Transition

A TCP connection is full duplex and established using a three-way handshake.

A connection in TCP passes through a series of states during its timespan. These states are namely –

  • LISTEN,
  • SYN-SENT,
  • SYN-RECEIVED,
  • ESTABLISHED,
  • FIN-WAIT-1,
  • FIN-WAIT-2,
  • CLOSE-WAIT,
  • CLOSING,
  • LAST-ACK,
  • TIME-WAIT and
  • Fictional state CLOSED.

 

11 States of TCP

Let’s look more in detail about each of the connection states. 

LISTEN – LISTEN is state I and it represents waiting for a connection request from any remote TCP host.

SYN-SENT – SYN-SENT is state II and it represents waiting for a machine connection request after sending a connecting request.

SYN-RECEIVED – SYN-RECEIVED is state III and it represents waiting for confirmation of connection acknowledgement after both sender and receiver has sent / received connection request.

ESTABLISHED – It is state IV and represents an open connection, data received to be delivered to the user. 

FIN-WAIT 1 – FIN-WAIT 1 is state V and it represents waiting for a connection termination request from remote TCP host or acknowledgment of connection termination request sent previously.

FIN-WAIT 2 – It is state VI and represents waiting for connection termination request from remote TCP host.

CLOSE-WAIT – CLOSE-WAIT  is state VII and it represents waiting for a connection termination request from local user.

CLOSING – It is state VIII that represents waiting for a connection termination request acknowledgement from remote TCP host.

LAST-ACK – LAST-ACK is state IX of TCP, which represents waiting for connection termination request acknowledgement previously sent to remote TCP host including its acknowledgement of connection termination request.

TIME-WAIT – It is state X and represents waiting sufficient time to pass to ensure remote TCP host received acknowledgement of its request for connection termination.

CLOSED – CLOSED is state XI. It is a fictional state and represents no connection state 

A TCP connection moves from one state to another in response to events. 

Continue Reading:

TCP/IP MODEL vs OSI MODEL: Detailed Comparison

HTTP vs TCP : Detailed Comparison

]]>
https://networkinterview.com/11-states-of-tcp-transition-explained/feed/ 0 17846
TCP/IP MODEL vs OSI MODEL: Detailed Comparison https://networkinterview.com/tcp-ip-model-vs-osi-model/ https://networkinterview.com/tcp-ip-model-vs-osi-model/#respond Mon, 12 Sep 2022 12:50:49 +0000 https://networkinterview.com/?p=15842 Whenever networks are implemented and different devices try to communicate over the network. Some of the other reference models are being referred to which is a standard specification or framework to provide standardization on how implementation, connectivity, communication will happen. It could be OSI or TCP/IP Model. Both are reference models which means we can take a reference or help from the specification of these two models while designing a network. All reference models follow a layered architecture approach and the same applies to OSI and TCP/IP.

Today we look more in detail about two most popular and widely used reference models – OSI and TCP/IP, their features, functions and use cases.

About TCP/IP model

TCP stands for Transmission Control Program and IP stands for Internet protocol. TCP/IP model has a layered architecture and has four layers. The TCP/IP model is protocol-oriented standard. This model was developed by the Department of Defence (DOD) project agency. Internet protocols are a set of rules defined for communication over the network. TCP/IP is considered the standard model for networking and handles data transmission and IP handles addresses. The TCP/IP suite includes protocols such as TCP, UDP, ARP, DNS, HTTP, ICMP etc.

TCP/IP Model Features

  • Multi-vendor support is available
  • Used for around 35 years and most widely used protocol
  • It supports interoperability
  • It supports logical addressing
  • It has routability feature
  • It has name resolution feature
  • Error control and flow control are supported features

 

About OSI Model

The OSI stands for Open System Interconnection, developed in the 1980s by the International standard organization.  It is a conceptual model used in network communication. The OSI model consists of seven layers and each layer is connected to each other. The data moves through the OSI model from its start till end (Last layer of OSI model).

OSI Model Features 

  • Model to demonstrate how hardware and software work together
  • Ease of troubleshooting (Each layer detects and handles error) 
  • Reduction in complexity
  • Standardization of interfaces
  • Facilitates modular engineering
  • Provides interoperability between vendors 

 

The application layer of the TCP/IP model maps to the first three layers i.e., Application, Presentation & Session Layer of the OSI model. The transport layer maps directly to the transport layer of the OSI model. The Internet layer maps to the Network layer of the OSI model. The last two layers of the OSI model map to the Data link layer and physical layer of OSI model. TCP/IP model is more widely used as compared to OSI model. 

Similarities between TCP/IP and OSI Model

Common Architecture – both models are logical and have similar architecture based on layered approach.

Defined Standards – both models define the standard and framework for implementing the standards and devices. 

Troubleshooting is simplified – by breaking complex functions at each layer into simple components.

Pre-defined standard – the protocols and standards are already pre-defined; and models do not redefine them, it just references it or uses it. Like Ethernet standards were already defined by IEEE before the origin of this model and it uses this in its reference at Physical layer or Network access layer.

Similar functionality at transport and network layer – function performed between presentation and network layer is similar to the function performed at transport layer.

 

Comparison Table: TCP/IP MODEL vs OSI MODEL

Below table summarizes the differences between the two:

FUNCTION

TCP/IP MODEL

OSI MODEL

Definition TCP/IP stands for Transmission control protocol/ Internet protocol OSI stands for Open systems Interconnection
Developed by It is developed by DOD (Department of Defence) project agency. OSI model is developed by ISO (International standard organization).
Technology/ Platform It comprises of a set of standard protocols which lead to development of the Internet. It is a communication medium which provides connection between hosts. It is an independent standard and generic protocol used as a communication gateway between network and end user.
Delivery of Packets No guaranteed delivery of packets at transport layer. Transport layer provides guaranteed delivery of packets.
Approach Based on horizontal approach. Based on vertical approach.
Application Layer Session and presentation layers are not separate, both are included in application layer. Session and presentation layers are separate
Type of  Model Implemented model of OSI model. It is a reference model on which various networks are built.
Network layer Network layer provides only connectionless service. Network layer provides connection oriented and connection less services (Both)
Replaceable/ Non-replaceable Protocols Protocols can’t be easily replaceable In OSI model protocols are hidden and can be easily replaceable when technology changes occur
Number of Layers Comprises of four layers It comprises of seven layers
Protocol Dependent/Independent Services, protocols, and interfaces are not properly segregated but are protocol dependent Services, protocols and interfaces are defined and it is protocol independent
Usage Widely used model Limited usage of the model
Standardization of devices Do not provide standardization of devices Standardization of devices like router, switches, load balancers and other hardware devices

Download the Comparison Table: TCP/IP MODEL vs OSI MODEL

Continue Reading:

OSI Model – The 7 Layers

Introduction to TCP/IP

]]>
https://networkinterview.com/tcp-ip-model-vs-osi-model/feed/ 0 15842
Introduction to TCP/IP https://networkinterview.com/introduction-to-tcp-ip/ https://networkinterview.com/introduction-to-tcp-ip/#comments Fri, 09 Sep 2022 04:29:17 +0000 https://networkinterview.com/?p=12798 Introduction

The Transmission Control Protocol/Internet Protocol (TCP/IP) is a network communication protocol that interconnects the network devices into the internet. It provides a communication between the source and the destination. It specifies how data packets should be broken, addressed, routed, transmitted, and the status to be received at the destination. TCP deals with the delivery of data and how the data packets applications can create their route across the network. It also manages the message into smaller packets before transmission. The IP section deals with obtaining the address of the data and the path a package will use.

The layers of TCP/IP

How TCP/IP works

It uses the client-server communication model. A client provides the service by a central server. The suite protocol is stateless, thus enabling them to free up the network paths to be used continuously. This model of communication is divided into four main layers. Each layer has a set of functions and protocol used for communication.

Protocol in the TCP/IP

Layers of TCP/IP model

The layers of TCP/IP model are explained below:

The application layer

It’s the topmost layer at the TCP/IP model. It defies the internet services standard and network applications to be used by the user. It states the application protocol and how the host application and programs interface with the transport layer in the network. It provides a channel for standardization of data exchange. Its contracts include:

  1. Domain Name Server: it works by resolving the IP address into a textual format for the hosts.
  2. File transfer protocol: Allows the transfer of files amongst the user in a network
  3. Telnet: Manages the connection of remote machine and runs applications
  4. Simple Mail Transport Protocol: It transport electronic mail between the sources and destination through a route.

Transport layer

Its main goal is to maintain an end to end communication between the source and destination across the network. It manages the interaction between the sources and provides multiplexing, flow control and reliability of data. The transport protocols include

  1. Transmission Control Protocol: It’s a connection-oriented protocol that communication in bytes foam from the source to destination without the flow control and error messaging.
  2. User Datagram Protocol: It’s a connection-less protocol that is unreliable. It does not verify the connection between the source and the destination. It doesn’t establish and check the links.

Network layer

It works by controlling movement of data packets across the network. It accepts and delivers the packets across the web. It deals with providing the packets. Routing and congestion avoidance. It packages the data into IP datagrams which contain the address of the source and destination. It allows the host to insert the packets into any network and deliver them independently. The main protocols here include

  1. IP protocol: It deals with IP addressing, packet formatting, fragmentation and host to host communication.
  2. ARP Protocol: The address Resolution Protocol assists the IP in directing the datagrams to the correct hist. It maps the Ethernet address.
  3. ICMP Protocol: The internet control message Protocol helps to detect and control the network errors. It works by either redirection, dropping the packet or connectivity failure.

Datalink layer

This layered work by identification of the network protocol type to use for the packet. It also provides error control and packet framing. It handles the physical section of sending and receiving data over the Ethernet cable, wireless or the network interface card. Some of the protocol used include Ethernet, Token Ring and Point to Point Protocol framing (PPP).

TCP/IP is nonproprietary and compatible with all operating systems. It’s highly scalable and the mostly used over the internet.

Continue Reading:

UDP Header

When does DNS use TCP or UDP?

]]>
https://networkinterview.com/introduction-to-tcp-ip/feed/ 1 12798
TCP 3-Way Handshake (SYN, SYN + ACK, ACK) https://networkinterview.com/tcp-3-way-handshake-syn-syn-ack-ack/ https://networkinterview.com/tcp-3-way-handshake-syn-syn-ack-ack/#respond Wed, 07 Sep 2022 08:23:47 +0000 https://networkinterview.com/?p=18253 The TCP/IP model helps to determine how one computing device would connect to the internet and how data transmission happens between them. It helps to create a virtual network while several computing devices are connected to each other. TCP/IP stands for Transmission control protocol and Internet protocol and it is specifically designed to offer highly reliable , end to end byte stream over an unreliable internetwork.

Today we look more in detail about how TCP/IP offers reliable transmission using 3-way handshake, how TCP 3-way handshake works, its features etc.

What is TCP 3-Way Handshake?

TCP/IP protocol operates at the network layer in OSI stack. TCP/IP model which is derived before OSI model dictates how TCP/IP communication works.

TCP/IP has several characteristics as under:

  • It supports flexible TCP/IP architecture
  • It is easy to add more systems to network 
  • The network remains intact until source and destination machines are working in proper manner
  • TCP is a connection-oriented protocol
  • It offers reliability and ensure that data which arrives out of sequence should be put back to order
  • TCP allows to implement flow control to ensure sender never overloads receiver with data 

TCP/IP provides reliable communication with Positive Acknowledgement and Retransmission (PAR). The Protocol data unit (PDU) of transport layer also known as segment. A device using PAR resends the data until it is acknowledged. If a data unit is found damaged at the receiver end, then the segment is discarded. Sender has to resend the data unit for positive acknowledgement 

 

How does TCP 3-way handshake (SYN, SYN + ACK, ACK) work?

Since TCP is a connection-oriented protocol a connection is mandate to be established before two devices start communication. TCP uses a process of three-way handshake to negotiate the sequence and acknowledgement fields to initiate a session. The graphical representation of process is as under:

  • The three-way handshake starts with Host A initiates connection by sending the TCP SYN packet to the destination host. The packet contains a random sequence number (e.g., 1234) which indicates the beginning of the sequence number of data that host A will be transmitting.
  • The server receives the packet and responds with his own sequence number. This response also includes the acknowledgement number which is increment of host A sequence number by ‘1’ 
  • Host A acknowledges the server response by sending acknowledgement number which is server sequence number incremented by ‘1’. Once they establish a reliable connection, actual data transfer start.

Once the data transmission process is completed. TCP will terminate the connection between two devices. This is a four-step process as outlined below.

  • The client application who wants to close connection send a TCP segment with the FIN flag set as ‘1’
  • The server receives the TCP segment and acknowledge it will ACK
  • Server sends its own TCP segment with FIN flag set to ‘1’ to client to terminate connection
  • The client acknowledges the server FIN segment and connection is closed.

Continue Reading:

11 States of TCP Transition Explained

HTTP vs TCP : Detailed Comparison

]]>
https://networkinterview.com/tcp-3-way-handshake-syn-syn-ack-ack/feed/ 0 18253
IPv6 Stateless Autoconfiguration https://networkinterview.com/stateless-auto-configuration-in-ipv6/ https://networkinterview.com/stateless-auto-configuration-in-ipv6/#respond Thu, 07 Jul 2022 17:36:02 +0000 https://networkinterview.com/?p=13534 IPv6 Stateless Autoconfiguration enables a local link address which allows the user to access the internet from anywhere. No intermediary IP address or support is needed to be created as the DHCP server. All the devices that are connected with the IPv6 network, have their own unique local address which is automatically verified allowing that particular node or let’s just say a user to communicate with other users on that link. The process of auto configuration means that the addresses, links and other such information are automatically configured.

With the earlier versions, only stateful configuration was possible which involved the necessity of an intermediate presence of a DHCP (Dynamic Host Configuration Protocol) server. But, with the advent of IPv6, there is no such need of this support for connecting the network devices over the internet. The devices are able to automatically generate a local IP address and carry on with their tasks.

This feature became an absolute necessity because of the increased number of devices over the internet in these times. Therefore, with the IPv6, the need of having a DHCP server for IP address allocation is snapped out and instead easing out the process for the network devices.

Heading back to the name, “stateless” means that the DHCP server need not recognize the presence of a network device for allotting it an IP address.

Steps:

The steps that are followed by a device to auto generate the IP address are as listed below:-

  1. Generation of local link address: A local address is allotted to the device that joins the internet. The address contains 10 bits going as 1111111010 and then follows 54 zeroes and an interface identifier of 64 bits.
  2. The Uniqueness test: To check the uniqueness of the address, a uniqueness test of the device address is undertaken.
  3. Address Assignment: Link local address is allotted to the IP interface after clearing the uniqueness test. This link is not usable for internet, but, only for the local network.
  4. Contact with Router: A local router is contacted by the network device for moving ahead in the process of auto configuration.
  5. Directions from Router: For the further steps in the configuration process, the device receives the directions from the local router.
  6. Global Internet Address: A unique global internet address is generated by the device. The router assigns the address which includes the device identifier and network prefix.

 Merits of IPv6 Stateless Auto Configuration:

The advantages of stateless auto configuration are as follows:-

  • The presence of a Dynamic Host Configuration Protocol (DHCP) is not required for the IP address assignment.
  • No manual configuration of network devices is required on the network. The devices can immediately connect and auto configures IP addresses on the network.
  • The stateless auto configuration is economical as the need of a proxy server or a DHCP server is evicted.
  • It facilitates high speed communication and data transportation over the internet.
  • It is compatible with wireless networks.

 Demerits of Stateless Auto Configuration:

  • For the host to check whether the address is already in use or unique, more bandwidth use is needed.
  • To prevent the auto configuration from happening, a DOS attack can be made by any unethical user or attacker.
  • Until a dynamic DNS is used, the auto-configured address cannot be name served.

 Application:

Due to the influx of network devices over the internet, the advent of stateless auto configuration was bound to be made. It not only eases out the process of connection of network devices over the internet, but, also enables usage of wireless networks and permits multiple other network devices to access the internet from any hotspots of the world.

This feature of IPv6 has a variety of applications in communication and networking of digital devices like refrigerators, televisions, microwaves, washing machines and many more such devices with the internet. The plugging of the device to the internet has just become a matter of time taken in blinking of an eye and with this feature has also escorted a brand new era of Internet of Things wherein almost all of the electronic devices would be able to connect through the internet.

Related – Features of IPv6 Addressing

]]>
https://networkinterview.com/stateless-auto-configuration-in-ipv6/feed/ 0 13534
Key features of IPv6 addressing: A Comprehensive Guide https://networkinterview.com/key-features-of-ipv6-addressing/ https://networkinterview.com/key-features-of-ipv6-addressing/#respond Wed, 06 Jul 2022 05:38:16 +0000 https://networkinterview.com/?p=13509 Introduction to IPv6

The IPv6 is the abbreviation for the Internet Protocol version 6. The IPv6 is the most updated protocol of network layer which can make the transmission of data possible in packets between two networks. It simply means that one can easily send in and also receive data on the network in packet form. Just for our reference, Ipv6 address are basically categorized into 3 types –

  • Unicast : represent a single interface.
  • Anycast : represent a set of interfaces, where a packet sent to an anycast address which is a member of the set. Anycast addresses are used for load-balancing.
  • Multicast : represents a dynamic group of hosts. In this addressing type, packets are sent to all interfaces that are part of a multicast group

IPv6 protocol was laid down by the IETF– Internet Engineering Task Force well before in time, i.e.  1998, the specification for which is RFC 2460. The extent to which the IPv6 will be able to serve is rightfully considered to be the upcoming generation of the Internet. This protocol has the ability to serve extensively large scale organizations. Back in 2004, Korea and Japan first came up and announced having publicly assigned IPv6. The Internet Protocol Version 6 is the latest protocol version which surpasses and fixes up the limitations of its predecessor internet Protocol Version 4.

Related – IPv4 vs IPv6

Features of IPv6

The key features of IPv6 are:

Address space

To let the subsidiary internets of the large organizations be deployed and to ultimately enable the subnetting, IPv6 has been designed to accommodate larger address space. 128-bits can be possible which makes it up to 16-bytes in the IP address which can possibly have combinations over approximately 3.4×1038 addresses.

Due to a larger possibility of more number of addresses available, the need for conserving the address won’t stand necessary.

Header Format

The header format of version 6 of Internet Protocol is optimized to include the optional and the non-essential fields under the extension headers which come into the sight after the Internet Protocol v 6 header. Both the formats of version 4 and 6 are not directly compatible and for being able to process both, the router must implement both the formats. The version 4 header is twice as small as the version 6 header format.

Address Configuration

The version 6 of the Internet Protocol can configure the addresses both in the absence and the presence of a DHCP server (Dynamic Host Configuration Protocol), which simply means that both stateless and stateful address configurations are supported, respectively.

In the absence, the link local address is configured automatically by the hosts with IpPv6 addresses.

Security

This protocol for IPSec needs some support which for fulfilling the security needs of the network provides a solution based on the standards. This will also assist in interoperations of the protocol implementations.

Routing Infrastructure and Hierarchical Address

The routing infrastructure of the version 6 protocol enables hierarchical addressing system which is more efficient. The hierarchy is formed based on the occurrences of the service providers of the internet.

Connectivity

The connectivity of the hosts to the internet has been enhanced more wherein every unique IP address can directly connect to any other host over the internet though being constrained by the policies of the organization or through firewalls with the IPv6.

Node Interaction

The communication of neighboring nodes in the version 6 internet protocol is managed by a sequence of Internet Control Messages. This neighbor discovery procedure is the new replacement to the Address Resolution Protocol, ICMPv4 redirecting messages and ICMPv4 router discovery which were based on broadcasting with the more competent Neighbor Discovery messages both for one-to-one communication or multicasted, i.e. one-to-many communication.

Support for QoS

The quality of service is taken care of by the IPSec encryption of packet payload in this Internet protocol version. There are new segments or fields incorporated in the header section of the protocol to be able to recognize and manage the traffic. For being able to recognize the traffic, a header field of Flow Label is added which enables the router to spot and endow it with the respective flow of packets to keep the packets communication between the source or host and the receiver. And for enhancing the quality of service, there is even no problem in the flow of packets even if it is IPSec encrypted.

Extension

While the IPv4 can only support up to 40 bytes of address choices or options, for expanding the IPv6 header, the extension headers can be added. The extension header size of IPv6 can be of the size of the IPv6 packet. Simply put, more information can be added in the extension headers.

Related – IPv6 Stateless Autoconfiguration

]]>
https://networkinterview.com/key-features-of-ipv6-addressing/feed/ 0 13509
What is MPLS and how is it different from IP Routing? https://networkinterview.com/mpls-vs-ip-routing/ https://networkinterview.com/mpls-vs-ip-routing/#respond Fri, 01 Jul 2022 04:46:17 +0000 https://networkinterview.com/?p=2424 Introduction to MPLS

MPLS i.e. Multi Protocol Label Switching (MPLS). It is a technique that is used for the routing of network packets. It is called a  Multiprotocol as it supports multiple protocols like Internet Protocol (IP), Asynchronous Transport Mode (ATM) and Frame Relay protocols. Moreover, in MPLS technique the network packet forwarding is done based on the label present on the packet, that’s why it is called Label Switching.

MPLS : The “Shim” Protocol

As we know that there are 5 layers of TCP/IP Model. The MPLS layer lies between the layer 2 i.e. the Ethernet layer and the layer 3 i.e. Network layer of the TCP/IP model. So, in other words, it shims(fill up the space) between two layers and hence also known as the “shim” protocol.

MPLS Header

The MPLS Header consists of 32 bits. It consists of –

MPLS NETWORK – Label Switched Path (LSP)

The MPLS Network consists of LSR i.e. Label Switch Routers. These are named so as they are capable of understanding the MPLS labels. There are 3 types of LSR –

This type of path is also known as PUSH – SWAP- POP Label Switched Path. Thus a network packet follows a fixed path known as the Label Switched Path or LSP in MPLS forwarding

MPLS Forwarding & how is it different from IP Routing

So after understanding the basics of MPLS Network, we can sum up the process of MPLS forwarding easily.

In MPLS forwarding, the Ingress router present at the beginning of the MPLS network pushes a label on the incoming network packet. This label specifies a particular path that the network packet has to follow i.e the Label Switched Path. Each LSR contains Label Forwarding Information Base(LFIB)which base guides the LSR to swap the label with its corresponding outgoing label. This allows the packet to transmit through the network. The Egress router present at the end of the LSP, pops the label of the packet and it is then moved forward as normal IP packet.

In contrast to MPLS forwarding, in IP routing each network packet contains a source IP address and a destination IP address and is passed through several routers in between through hop-by-hop mechanism. Each router contains the routing table that provides information to the next hop till it finally reaches the destination.

So, MPLS forwarding is done on the basis of labels given to the packets while in IP forwarding it is done on the basis of the IP address.

The detailed comparison between the two can be studied through the below given comparison table. (Credit:ipwithease.com)

Comparison Table : MPLS vs IP Routing

PARAMETERS

MPLS

IP ROUTING

Switching/Routing principle Switching traffic based on labels advertised by LDP Routing based on the destination address for entries in the routing table.
Switching/Routing path Establishes LSP (dedicated path) before data can flow. No dedicated path is established, packet is routed based on IP addresses.
Tables usage Builds LFIB (Label Forwarding Information Base) table using LDP protocol. Stores IP routing table.
Layer of functioning Labels inserted between layer 2 and Layer 3 (hence layer 2.5) Performed at Layer 3
Overlapping IP address MPLS can allow communication across overlapping IP addresses of multiple customers Does not allow communication across overlapping address of different customers
Related terms LSP, LDP/TDP, VRF, LFIB, Push, Swap and Pop. Route Lookup, IP protocol
Traffic Latency Lower latency than traditional IP routing Incurs higher latency than MPLS
Topology and services With MPLS, providers can create (with use of different labels and label stacks) different topologies & services (MPLS-TE, MPLS VPNs). Single topology can be created per IP routing domain.
Traffic Engineering Scalable and proficient in service Partially possible but not scalable solution
Separate Routing table In MPLS network , each customer has separate routing network Traditional IP routing can only have 1 Routing table for all customers
Scalability Medium High
Target scope Service provider domain, Large & Multitenant Data Centers. Home, Office, Service PTP/Underlay links,  Data centers etc.
Traffic type Allows non-IP traffic forwarding in addition to IP traffic Allows forwarding of IP traffic
CREDIT:https://ipwithease.com

If you want to learn more about MPLS, then check our e-book on MPLS Interview Questions and Answers in easy to understand PDF Format explained with relevant Diagrams (where required) for better ease of understanding.

 

]]>
https://networkinterview.com/mpls-vs-ip-routing/feed/ 0 2424
What is FTP? How to set up FTP Server? https://networkinterview.com/what-is-ftp-how-to-set-up-ftp-server/ https://networkinterview.com/what-is-ftp-how-to-set-up-ftp-server/#respond Sun, 06 Mar 2022 07:09:59 +0000 https://networkinterview.com/?p=17334 File transfer protocol (FTP) has been around for more time than HTTP and TCP/IP protocol and has more than 40+ years of existence in the industry. Its original specification was written way back in 1971 and initial FTP clients were command line programs, and as they adopted, they grew into GUI (Graphic User Interface) and installed on numerous systems, desktops, mobile devices and so on.  

In this article we will learn more about FTP and how it works, setting up FTP access on systems, its features, functions and limitations in this article.   

About – FTP (File Transfer Protocol)  

File transfer protocol (FTP) is a standard network protocol used for transferring computer files between a client and a server across a computer network. Users can use FTP via a command line interface such as DOS in Windows and Terminal in UNIX systems or MacOS.

To login to FTP server a user name and password is required and the port number (When logging from command line interface). The FTP protocol uses port 20 and 21 by default. FTP can also work anonymously where the default user name can be ‘anonymous’ or email address as the password. 

File Transfer Types

FTP supports two kinds of file transfers: Binary and ASCII

  • ASCII is a 7-bit character set which contains 128 characters. Any file which is text based such as HTML, TXT, PostScript etc are ASCII files. 
  • Binary files have a different structure and require different transfer types which includes images, applications, algorithm generated packages such as .ZIP, and much more. 

Use of Browser FTP let you offer limited functionality to download files. Some examples of FTP Servers and its clients are FileZilla server and FileZilla, SolarWinds and WinSCP, Serv-U and SmartFTP. 

Features of FTP Access   

  • FTP is one of the fastest ways to transfer files from one computer to another computer.
  • FTP is very efficient as we do not need to complete all the operations to get the entire file.
  • FTP access is secure as we need to login with username and password
  • FTP allows you to transfer the files back and forth. 

How to set up FTP Server?

FTP works in the Client – Server model. The server hosts the files to be shared and the client provides the interface to access, download or upload files to the file server. The systems transferring files can be within the same network where FTP is configured or could be outside the network (Over the Internet). FTP uses two ports, one for connection and one for sending data.

FTP runs in two modes – Active and Passive.

It uses two channels: command and data channel.

  • Command channel is used for sending commands and responses and
  • Data channel is meant for sending data.
  • In Active mode client launches command channel and
  • In passive mode both command and data channels are established by client. 

Open channel on FTP client and server

Data and other communications from clients should be able to reach FTP server to allow outgoing data and other communications from the client to FTP server. 

Server-side Port 21 to be opened for initiating connection. The port used by the server to respond to clients can be between Port 21 to 1022. 

Perquisites

  • FTP requires IIS. Both IIS and FTP should be installed for the configuration of FTP server
  • A ‘root’ folder to publish FTP

%SystemDrive%\ftp\ftproot

  • Set permissions to allow anonymous access to the folder

“ICACLS “%SystemDrive%\ftp\ftproot” /Grant IUSR:R /T”

“%SystemDrive%\ ftp \ftproot”

  • The root folder should be set as the path for your FTP site. The software firewall (like Windows firewall or Symantec) should allow connections to the FTP server

Step 1 : Enabling FTP in Windows if IIS is not installed

If IIS is not installed:

  • Go to Start > Control Panel > Administrative Tools > Server Manager in Windows Server Manager.
  • Go to Roles node. Right-click on Roles and click Add Roles
  • In the Add Roles window, open Server Roles and check Web Server (IIS).
  • Proceed through the setup wizard and click Install. Let installation to be completed 

Step 2 : Transferring files

To transfer files, add an FTP site. Post FTP site is enabled, clients can transfer to and from the site using the FTP protocol.

Step 3 : Setting up FTP site

 

Go to Start > Control Panel > Administrative Tools > Internet Information Services (IIS) Manager

Expand Local server in IIS console

Right click on sites , Add FTP site type the FTP server name and the content directory path, and click Next. The directory path should be the same as the one we set permissions to allow anonymous access. Above, we used:

%SystemDrive%\ ftp \ftproot

In  ‘Binding and SSL Settings’ type the IP address of the server

Check the Start FTP Site Automatically option. Choose SSL Based on Constraint. Click Next.

Select Basic for authentication and Click Finish to complete FTP site creation 

Step 4: Accessing files on the FTP server

To access files on the FTP server, open a file explorer and type ftp://serverIP. The FTP server asks for a username and password. Enter the username and password (Windows or Active Directory credentials) and click Logon. The files and folders display under the FTP server.

Continue Reading:

Difference between File Level Storage and Block Level Storage

HTTP vs TCP : Detailed Comparison

]]>
https://networkinterview.com/what-is-ftp-how-to-set-up-ftp-server/feed/ 0 17334
What is ARQ (Automatic Repeat Request)? https://networkinterview.com/what-is-arq-automatic-repeat-request/ https://networkinterview.com/what-is-arq-automatic-repeat-request/#respond Tue, 26 Oct 2021 10:18:33 +0000 https://networkinterview.com/?p=16780 Various techniques are used at the Data link layer to control errors to simply ensure and confirm that all the data frames or packets; i.e., bit streams of data are transmitted and transferred from sender to receiver with accuracy. Using or providing error control at the Data link layer is a feature of optimization rather than a requirement.

Error control process tracks data frames that got lost or corrupted during transmission. The Data link layer follows a technique to retransmit frames to detect or identify transit errors and also take actions which are required to reduce or eliminate such errors. 

In this article we will learn more about a technique used at Data link layer protocols known as Automation Repeat Request (ARQ) to make an effort to detect loss of packets during transmission, its advantages and how it is performed.  

What is ARQ (Automatic Repeat Request)?

There are two ways of doing error control namely error detection and error correction. Error detection simply means detection or identification of error. These errors may cause the receiver to receive garbled or unclear or distorted messages. Error correction means correction or fixing errors. Reconstruction and rebuilding of original data which is error free. 

The main function of ARQ protocol is send receives an acknowledgement from the receiver end suggesting that the frame or packet is received correctly before timeout is occurred, timeout defines a specific time window within which acknowledgement has to be sent by the receiver to the sender.

If timeout happens sender will not get acknowledgement within specific time, which implies that data packet or frame is either lost or got corrupted during its transmission hence sender will re-transmit the data frame or packet and ARQ protocol will ensure that process will be repeated until the right packet transmission is completed.  

Techniques of Error Control

There are various techniques of error control such as:

Stop and Wait ARQ –

It is also known as alternating bit protocol. It is the simplest flow and error control mechanism. This is usually required in telecommunications to transmit data or information between two connected devices. Receiver signals its readiness to receive data for each frame, sender sends information or data packet to receiver. Sender will stop and wait for acknowledgement from the receiver.

If acknowledgement is not received within a fixed time frame, the sender will resend the data frame and wait for acknowledgement. If the sender receives acknowledgement, it will send the next data frame and wait again. And this process will keep on repeating until send has left with no data frame or information to send to the receiver. 

Sliding Window ARQ –

It is used for continuous transmission error control and it is categorized into Go Back N ARQ and Selective repeat ARQ. 

Go Back N ARQ –

It sends frames within a specified window frame even without receiving acknowledgement.

Selective Repeat ARQ –

Only suspected or damaged or lost data frames are retransmitted. Sender only retransmits frames for which No acknowledgement is received. It is used however lesser because of more complexity at sender and receiver end as each packet must be acknowledged individually. 

 

Applications of Automatic Repeat Request

ARQ protocols have a wide range of applications to ensure they provide reliable transmissions over unreliable upstream sources. These protocols operate on short wave radio so as to ensure reliable delivery of signals.  

For the same function of ARQ, there are various applications: 

  • Transmission Control Protocol (TCP)
  • Specific Service Orientation Protocol: Error-correction of message signals in ATM networks
  • High-Level Data Link protocol (HLDL)
  • IBM Binary synchronous Communications Protocol (IBSC) 
  • Xmodem : modem file transfer protocol

Pros and Cons of Automatic Repeat Request

PROS

  • Quite simple error detection and error correction techniques
  • Simple decoding equipment as compared to other techniques
  • ARQ is adaptive, as information is retransmitted only if error occurs 
  • Ideal for using noisy channels
  • It has both error flow and error control mechanism 
  • It has timer implementation 

CONS

  • High error rate on a medium and channel could cause too much transmission of the frames or packets of information
  • High error rate in channel could lead to loss of information and lead to reduction in efficiency or productivity of the system 
  • System throughput is lowered by ARQ when channel error is high 

Continue Reading:

What is HSRP (Hot Standby Router Protocol) ?

What is NETCONF protocol?

What is MPLS and how is it different from IP Routing?

]]>
https://networkinterview.com/what-is-arq-automatic-repeat-request/feed/ 0 16780
JSON vs SOAP: Detailed Comparison https://networkinterview.com/json-vs-soap-detailed-comparison/ https://networkinterview.com/json-vs-soap-detailed-comparison/#respond Mon, 28 Jun 2021 09:03:48 +0000 https://networkinterview.com/?p=15764 Online machine to machine communication is handled by web services. It is used by systems to communicate systems on Internet and only front-end interfaces like websites and applications which reside on end user systems. Data exchange between heterogeneous applications would be complex. Use of XML is an intermediary language for data exchange between applications.

Creation of web services uses either JSON or SOAP. SOAP is a standard protocol which has is used for sending messages. It has rules and security features and complex in nature. JSON was developed to overcome SOAP limitations and it is an architectural style. It supports developers to implement communication as per their choice and requirements.

We will look more in detail about JSON and SOAP, and understand its functionality, use cases, advantages, and disadvantages.

About JSON

JSON is short for JavaScript Object Notation is format for data sharing. JSON is derived from the JavaScript programming language and available for use for many languages – Python, Ruby, PHP, and Java. JSON uses the .json extension as standalone and when it is defined in other file format such as .html it will appear inside quotes as a JSON string to make it easier to transmit between web server and client or browser. It is very readable and lightweight and offers good alternative to XML and require less formatting. This will speed up data which can be used in JSON files and general structure and syntax of this format.

History of JSON

Douglas Crockford given JSON format in early 2000 and the official website was launched in year 2002. Yahoo! started offering its web services in JSON in Dec 2005 and JSON become an ECMA international standard in 2013. The most popular and format standard published in 2017.

How JSON works?

Pros and Cons

PROS

  • Provides support to all browsers
  • Easy to read and understand
  • Ease to create and manipulate
  • Fast to Parse
  • Allows to transmit and serialize structured data on network connections
  • It can be used with modern programming languages
  • JSON library is open source and free for use

CONS

  • JSON is not as robust as data structure in XML
  • Information sets from different systems can’t be combined
  • Does not support extension of base times
  • No namespace support hence poor extensibility
  • No support for formal grammar definition

 

About SOAP (Simple Object Access Protocol)

SOAP was originally defined as S-Simple O-Object A-Access protocol and stands for Simple Object Access Protocol. It is the oldest web focused API protocol which is used widely. SOAP was one of the oldest protocols designed to handle different applications or services to share resources in systematic manner over the network. To make calls XML documents need to be created and it relies on standard protocols like HTTP and SMTP for transport. It is a ‘State-full’ protocol and more secure (supports web services security using SSL [Secure socket layer]) when compared to his other counterparts.

 History of SOAP

In 1997 early days Microsoft looked at developing XML based distributed computing. The objective was to enable applications to communicate via RPC (Remote procedure calls) using HTTP. The name SOAP was derived in 1998. In 1999 Microsoft worked on adding support for namespaces in XML products and SOAP 1.1 was submitted to Worldwide Consortium (W3C) in May 2000 with IBM as co-author.

SOAP Elements

SOAP has following elements:

Envelop – (Mandatory) it is the top element for XML document which represents message. It encapsulates all details in SOAP message. This is root element of SOAP message.

Header – (Optional) this determines how recipient of SOAP message should process the message. It adds feature to SOAP message such as authentication, transaction management, payment, message routes etc.

Body – (Mandatory) – Information exchange intended for recipient of message. A body element contains all call and response information – this element contains actual data which sends between web services and calling applications.

Fault – (Optional) – When request is made to SOAP web service the response can be either successful or unsuccessful.

SOAP messages are generated by web server it calls automatically.

Pros and Cons

PROS

  • SOAP is platform and language independent
  • SOAP provides simplified communication via proxies and firewalls
  • Ability to leverage transport protocols – HTTP , SMTP etc.

CONS

  • Slower compared to its counterparts as it uses verbose XML format
  • Limited to Pooling : one client can use services of one server
  • Firewall latency do exist because they don’t understand difference between use of HTTP over web browser or within SOAP
  • SOAP support on Python and PHP is not strong enough

Comparison Table: JSON vs SOAP

Below table summarizes the difference between the two:

FUNCTION

JSON

SOAP

Definition JSON is short for JavaScript Object Notation is format for data sharing. JSON is derived from the JavaScript programming language and available for use for many languages – Python, Ruby, PHP, and Java. SOAP was original defined as S-Simple O-Object A-Access protocol and stands for Simple Object Access Protocol. It is the oldest web focused API protocol which is used widely. SOAP was one of the oldest protocols designed to handle different applications or services to share resources in systematic manner over the network
Features
  • Not a very efficient way to describe the serialization pattern
  • SOAP packet parsing and mapping which reduces performance
  • Relies on HTTP and doesn’t implement security
  • SOAP based calls can’t be cached
  • It is ‘Stateful’ protocol
  • More bandwidth required
  • Use HTTP which is widely scalable
  • Can be used for RPC
  • Supports WS security and SSL
Applications
  • Helps to transfer data from server
  • Helps to transmit data between web server and server
  • Widely used for Java script-based applications including browser extensions and websites
  • Web services and Restful API use JSON format to fetch public data
  • Web services in enterprise environments
  • Gathering massive data, calculations etc.
  • Applications involving Bank transfers , flight bookings, billing, navigation etc.

Download the Comparison Table: JSON vs SOAP

Continue Reading:

SOAP vs HTTP

Understanding SOAP Web Services

]]>
https://networkinterview.com/json-vs-soap-detailed-comparison/feed/ 0 15764
SOAP vs HTTP: Understanding the difference https://networkinterview.com/soap-vs-http-understanding-the-difference/ https://networkinterview.com/soap-vs-http-understanding-the-difference/#respond Sat, 26 Jun 2021 13:15:22 +0000 https://networkinterview.com/?p=15756 There are several protocols that exist at different layers of OSI and are used for various functions related to data transfer, communication, encryption and so on. OSI model provides a common reference point and universal set of rules which govern the computing functions. Application layer of the OSI model specifies the shared communication protocols and interface methods used by systems in the communication network. There are several protocols which operate at Application layer such as Telnet, HTTP, SOAP , SMTP, NFS , TFTP etc.

Today we look more in depth about two popular application layer protocols SOAP and HTTP , their functionality, advantages , limitations and use cases.

About SOAP (Simple Object Access Protocol) 

SOAP was originally defined as the S-Simple O-Object A-Access protocol. SOAP (Simple Object Access Protocol) is a network protocol to exchange structured data between hosts. XML format is used to transfer messages. It works on top of the application layer for notification and transmission. SOAP allows communication across platforms , languages, and operating systems as it uses HTTP for transport which is already available on all platforms.  SOAP is used for Passing documents, Electronic Document Interchange (EDI). and Remote Procedure Calls (RPC).

History of SOAP

SOAP development started in 1998 with no standard scheme for XML and supported limited data types. SOAP was announced in 1999 by Dave Winer and Microsoft. SOAP ver 1.1 was announced in 2000 by MFST & IBM based on XML 1.0. SOAP 1.2 was introduced in 2007 by the XML protocol working group. It has better interoperability, extensibility, and has better support for web standards and internationalization. 

SOAP Elements

The SOAP specification presents the messaging framework and defines rules for processing model defining the rules for processing a SOAP message, rules for defining a binding to an underlying protocol that can be used for exchanging SOAP messages between SOAP hosts.

The SOAP message construct defining the structure of a SOAP message which is an ordinary XML document comprises of : 

  • Envelop – identified the XML document as SOAP message 
  • Header – contains header information
  • Body – contains call and response information
  • Fault – contains errors and fault message 

Pros and Cons of ‘SOAP’

PROS

  • SOAP over HTTP allows easier communication thru proxies and firewalls
  • Versatile to allow use of different transport protocols 
  • SOAP is platform independent
  • SOAP is language independent
  • SOAP is simple and extensible 

CONS

  • Slower compared to its counterparts 
  • Only one party can use service of the other
  • Not all languages offer appropriate support such as PHP and Python which offer weaker support 

 

About HTTP 

HTTP is an application layer protocol majorly used for most data transfer on the web. It is the foundation of data communication using hypertext files on the world wide web. HTTP is responsible for the action the server must take when information is sent on the network. HTTP works on the URL concept and when we type a URL in browser, protocol sends HTTP request to server and then HTTP response is sent back to browser. HTTP is connection oriented – few or no packets exchanged to set up / maintain sessions and it is usable over firewalls.

History of HTTP 

HTTP 1.0 was published as RFC 1945 in 1996. HTTP 1.1 standard was defined in RFC 2068 which was officially released in 1997. HTTP 2.0 was released as RFC 7540 in May 2015.

How HTTP works?

HTTP communication involves two important components – Client and Server. Client is the one who makes the HTTP request such that the browser is the client. 

Server – Server is the one who receives the request and sends the response. Server is a piece of code which is responsible for accepting the request and sending the response back. 

Pros and Cons of ‘HTTP’

PROS

  • Lower CPU and memory usage due to less simultaneous connections 
  • Enables HTTP pipelining of requests / responses
  • Reduced network congestion due to fewer TCP connections 
  • Reduced latency in subsequent requests
  • Errors can be reported without penalty of closing TCP connections

CONS

  • If client don’t close connection when all data is received by receiver , server will be unavailable for other clients / requests 
  • It does not offer reliable exchange
  • It does not have push capabilities 
  • It is not optimized for mobile 

Comparison Table: SOAP vs HTTP

Below table summarizes the difference between the two:

FUNCTION

SOAP

HTTP

Definition SOAP (Simple Object Access Protocol) is a network protocol to exchange structured data between hosts HTTP is an application layer protocol majorly used for most data transfer on the web. It is the foundation of data communication using hypertext files on world wide web
Technology Works over HTTP Works over TCP and IP
Features 
  • XML based to send / receive messages
  • Supports web socket or WS-addressing, WS-security, SWA
  • Supports runtime checking against WSDL
  • (MTOM) Message Transmission Optimization Mechanism is supported
  • Data centric design
  • Lightweight protocol
  • SOAP has logical tree format which are independent of bitstream format
  • SOAP is a data exchange protocol, SOAP message inside HTTP body in protocol

 

  • Used to transfer information over web
  • Web socket or WS-addressing, WS-security, SWA not supported
  • Don’t support runtime checking against WSDL
  • Support MTOM but use MIME message domain
  • Document centric design
  • Not a lightweight protocol
  • HTTP uses standards such as REST or XML-RFC

 

 

Download the Comparison Table: SOAP vs HTTP

Continue Reading:

Understanding SOAP Web Services

Understanding REST and REST API

HTTP vs TCP : Detailed Comparison

]]>
https://networkinterview.com/soap-vs-http-understanding-the-difference/feed/ 0 15756
HTTP vs TCP : Detailed Comparison https://networkinterview.com/http-vs-tcp-know-the-difference/ https://networkinterview.com/http-vs-tcp-know-the-difference/#respond Tue, 04 Aug 2020 06:24:04 +0000 https://networkinterview.com/?p=14340 Before discussing the difference, let’s understand the two terms first

What is HTTP?

HTTP is a Hypertext Transfer Protocol. HTTP works similar to other application services like SMTP and FTP. Like the performance of FTP, it transfers a document using service of TCP port. But it uses just one TCP connection i.e. at data link and no individual Control Connection is used.

HTTP is a protocol which fetches resources such as HTML documents. It is used for exchanging data on the Web and is a client-server protocol which means requests are initiated by the recipient usually the Web browser.

The controls from the client-side delivered in a request message into the webserver. The web server sends the requested content at a response message. The HTTP doesn’t provide any security and makes use of SSL (Secure Socket layer) to club security in its communication.

How does HTTP works

HTTP provides users a way by distributing hypertext messages between servers and clients to interact. HTTP clients generally use Transmission Control Protocol (TCP) connection to communicate with servers.

HTTP uses various tasks to be performed by request methods which are enlisted as below –

  • GET = Requests a specific source in its entirety.
  • HEAD = A specific resource with no body content.
  • POST = Adds articles, messages and information to another page under an existing web resource.
  • PUT = Directly modifies a current web source and creates a new URL if need be.
  • DELETE = Eliminates a specified source.
  • TRACE = Shows users any modifications or additions made to an internet resource.
  • OPTIONS = Show user’s which HTTP methods are available for a particular URL.
  • CONNECT = Transforms the requested link.
  • PATCH = Partially modifies an internet resource HTTP servers use the GET and HEAD methods.

Related – FTP vs HTTP

What is TCP ?

TCP is a connection-oriented protocol which states a connection is established and maintained until the application data at each end have finished exchange. TCP breaks application data into packets. This packet delivers to the transport layer. Layer 4 manages flow control and provide error free data transmission and handles retransmission of dropped or garbled packets and acknowledges all packets that arrive. In the OSI model, TCP covers parts of Layer 4 the transport layer and Layer 5 covers the session layer.

How TCP Works

TCP’s job is to ensure that all data sent in a stream moves from client to server in a correct order and is intact. TCP uses a technique known as positive acknowledgement with retransmission, requiring the receiving end of a transmission to give a response as to what data has been received. The bytes sent can exactly match the bytes received. No data is altered or lost along the way.

Connection is established and a 3-way handshake is made. First, the source sends a SYN request packet to the server in order to start session establishment process. Then, the server sends a SYN-ACK packet to agree to the process. Lastly, the source sends an ACK packet to the target to confirm the process, after which the data can be sent.

Comparison of TCP and HTTP

  1. HTTP is a Hypertext Transfer Protocol, whereas TCP full form is Transmission Control Protocol.
  2. HTTP is utilized to access websites, while TCP is a session establishment protocol between client and server.
  3. HTTP uses port 80 and TCP uses no port.
  4. HTTP doesn’t need authentication, whereas, TCP uses the TCP-AO.
  5. HTTP is Stateless but not session less. In contrast, TCP is a Connection-Oriented Protocol.
  6. HTTP is a One-way communication system, while on the other hand, TCP is a 3-Way Handshake (SYN, SYN-ACK, ACK).
  7. In case you’re using HTTP, HTTP appears in the URL of the site, and if you’re using TCP, TCP appears in IP.
  8. HTTP establishes data link communication only but TCP establishes session connection.
  9. HTTP is useful for transfer of smaller documents like webpages, on the other hand, TCP is useful to setup connection for data transfer.
  10. HTTP is faster in comparison to TCP, which is slower.

Difference Table :  HTTP vs TCP

PARAMETER

TCP

HTTP

Acronym for Transmission Control Protocol Hypertext Transfer Protocol
OSI Layer Transport Layer (Layer 4) Application Layer (Layer 7)
Philosophy TCP protocol is used for session establishment between two machine. HTTP protocol is used for content access from web server.
TCP ports No Port number HTTP uses TCP’s port number 80.
Authentication TCP-AO (TCP Authentication Option) HTTP does not perform authentication.
Usage TCP is used extensively by many internet applications. HTTP is useful in transferring smaller files like web pages.
State Connection-Oriented Protocol Stateless but not session less
Type of Transfer Establishes Connection between Client and Server. Transfers records between the Web client and Web server.
URL No URL When you are managing HTTP, HTTP will appear in URL.
Communication 3-Way Handshake (SYN, SYN-ACK, ACK) One-way communication system.
Use HTTP, HTTPs, FTP, SMTP, Telnet Most widely used for web based applications
Download speed The speed for TCP is slower. HTTP is faster than TCP.

Conclusion

TCP stands in Transport Layer of OSI Model and is responsible for connection oriented communication between client and server. HTTP is an Application Layer protocol that is a request/response between client and server. TCP provides communication services between a sender and receiver. Client sends a request and the server sends a reply ACK back to the client after 3-way handshake they start data transmission. HTTP transfer web contetnt that user requested.

Download the difference table here.

Continue Reading:

TCP HEADER

Introduction to TCP/IP

 

]]>
https://networkinterview.com/http-vs-tcp-know-the-difference/feed/ 0 14340
What is HSRP (Hot Standby Router Protocol) ? https://networkinterview.com/what-is-hot-standby-router-protocol-hsrp/ https://networkinterview.com/what-is-hot-standby-router-protocol-hsrp/#respond Fri, 10 Jul 2020 14:34:51 +0000 https://networkinterview.com/?p=14188 Hot Standby Router Protocol (HSRP)

In this article, we will discuss on HSRP protocol, related terminologies, its operation and configuration. We will cover following points:-

Topic Content

  1. Understanding FHRP
  2. Definition of HSRP
  3. HSRP Packet
  4. Key Points
  5. Operation and Configuration of HSRP
  6. Conclusion


Understanding FHRP

Network resiliency is key component of network design. Modern network requires an important consideration to deal with the network failure. With this understanding, First Hop Redundancy Protocols was developed and employed in majority of network to provide resiliency, availability and redundancy. From the client’s perspective if the gateway goes down, then access to an entire network will go down. First Hop Redundancy protocols (FHRP) will allow default gateway redundancy, it means provision of having more than one default gateway.

In the event of a router failure, there’s a backup device that will kick in and transparent to their users, continue to forward traffic to remote networks, thus avoiding the situation of isolation. We implement a first hop redundancy protocol to deal with gateway redundancy. Below are the 3 types of FHRP technology:-

 

  1. Hot Standby Router Protocol (HSRP)
  2. Virtual Router Redundancy Protocol (VRRP)
  3. Gateway Load Balancing Protocol (GLBP)

Related – HSRP vs VRRP

Definition of HSRP

Hot Standby Router Protocol (HSRP) is a CISCO proprietary protocol, provides a mechanism which is designed to support non-disruptive failover of IP traffic in certain circumstances. UDP port is 1985. In this case, two or more routers give an illusion of a virtual router. HSRP allows you to configure routers as standby and only a single router as active at a time. All the routers in a HSRP group share a single MAC address and IP address, which acts as a default gateway to the local network. The Active router forwards the traffic. If active router fails, the Standby router takes up all the responsibilities of the active router and forwards the traffic.

Hot Standby Router Protocol (HSRP) Packet

Version Number is 8 bit HSRP version. Whether it is version 1 or 2.

Opcode is 8 bit.

  • Op Code 0 – Hello. The HSRP is running and is capable of becoming the active or standby router.
  • Op Code 1 – Coup. The router become the active router.
  • Op Code 2 – Resign. The router is no longer the active router.

HSRP States is 8 bit.

1. Active – This is the state of the device that is actively forwarding traffic.

2. Init or Disabled – This is the state of a device that is not yet ready or able to participate in HSRP.

3. Learn – This is the state of a device that has not yet determined the virtual IP address and has not yet seen a hello message from an active device.

4. Listen – This is the state of a device that is receiving hello messages.

5. Speak – This is the state of a device that is sending and receiving hello messages.

6. Standby –  This is the state of a device that is prepared to take over the traffic forwarding duties from the active device.

Hello time is 8 bits. The interval between successive HSRP hello messages from a given router is a 3 sec.

Hold time the interval between the receipt of a hello message and the presumption that the sending router has failed after 10 sec.

Priority is 8 bits.
Default priority is 100. Router with a higher priority wins. Priority field is used in election process the active and standby routers. In tie breaking situation, highest IP address wins.

Group is 8 bit.
This field identifies the standby group between 0 to 255.

Reserved is 8 bit.

Authentication Data is a 64 bit.
This field contains a clear text of 8 character reused password. If no authentication data is configured, the RECOMMENDED default value is 0x63 0x69 0x73 0x63 0x6F 0x00 0x00 0x00.

Virtual IP Address is 32 bits.
The virtual IP address used by this group. If the virtual IP address is not configured on a router, then it may be learned from the Hello message from the active router. An address should only be learned if no address was configured and the Hello message is authenticated.

 Key terminologies

  • Active router: Primary router.
  • Standby router: Backup router.
  • Standby group: Set of routers that participate in HSRP.
  • Virtual MAC address:MAC address is created by HSRP internal mechanism. The first 24 bits will be default i.e. 0000.0c. 16 bits are HSRP IDe. 07.ac. 8 bits is the group number.
  • Virtual IP: This IP used by group virtual IP to forward traffic from LAN.
  • Priority: Default priority is 100. Router with a higher priority wins. Priority field is used in election process of active and standby routers. In tie breaking situation highest IP address wins.
  • Version 1: Multicast address is0.0.2 and uses the UDP port 1985.Group number range from0–255.
  • Version 2: Multicast address is0.0.102 and uses the UDP port 1985. Group number range from 0 – 4095.
  • Preemption: HSRP Preemption enables the router with the highest priority to immediately become the Active router.
  • Interface Tracking: We can choose an interface tracking and if the link goes down it decrements the priority of active router in order for standby router to take over role of active router.
  • Load Balancing: Multiple HSRP groups for multiple subnets have both routers in active state for different subnets and passive for the other subnets. This way it is able to utilize all available resource.

Related – HSRP vs VRRP vs GLBP

Operation and Configuration of HSRP

  • User generates traffic from LAN towards WAN router.
  • It uses virtual IP and MAC as a default gateway, the virtual IP address is chosen by the administrator, and the MAC address is auto generated. For version 1, a MAC address is 0000.0c07.acXX where XX is the group number in hex format. For Version 2 MAC address is 0000.0c9f.fXXX, with the last 3 digits again representing group number in hex format.
  • HSRP configured in groups. In HSRP group consists of an active router and a standby router. Active router is responsible for ARP requests and handling packet forwarding. Hello messages are sent every 3 seconds to the standby router. HSRP multicast addresses are 224.0.0.2 for v1 and 224.0.0.102 for v2.

Configuring HSRP

Conclusion

In summary, HSRP provides layer 3 redundancy in network via virtual IP and MAC, interface tracking, and load balancing. A group of physical routers, acting as a single virtual router, advertise a single IP address and MAC address into network.

]]>
https://networkinterview.com/what-is-hot-standby-router-protocol-hsrp/feed/ 0 14188
Enabling and Configuring Network Configuration Protocol in a Managed Device https://networkinterview.com/enabling-and-configuring-network-configuration-protocol-in-a-managed-device/ https://networkinterview.com/enabling-and-configuring-network-configuration-protocol-in-a-managed-device/#respond Wed, 08 Jul 2020 07:39:35 +0000 https://networkinterview.com/?p=14144 Enabling and Configuring Network Configuration Protocol

NETCONF is a protocol that can manage, configure and install new configuration to network device. Its operations are realized on top of an easy Remote Procedure Call (RPC) layer. NETCONF uses Extensible Markup Language (XML) based on data encoding for protocol messages. The protocol messages are exchanged on the top of a secure transport protocol. Cisco IOS XE Release 12.X and above.

Background Information

Data models provides an alternate and centralized feature to configure Cisco devices instead of using the Cisco Command Line Interface (CLI).

Yet Another Next Generation (YANG) is a standards based data modelling language used to create device configuration requests or the requests for operational data. It has a structured format similar to a computer program that is human readable. It was develop by IETF. It is used for configuration data, state data, RPCs (Operations), and event notifications. YANG node types are Container, Leaf and list.

NETCONF is a based and Extensible Markup Language (XML). XML is both human and machine readable.  It was developed by IETF. It is replacement for SNMP, CLI and Scripts. It allows user to monitor the device. Uses remote procedure calls (RPCs) called Operations. Runs over SSH.

Configure the SSH username and password on the device for NETCONF communication access. NNMi requires only read-only access.

Related – OpenFlow vs NETCONF

In subsequent sections, we will run through some of key configuration scripting used in NETCONF like protocol configuration enabling YANG features etc.

Prerequisites for Network Configuration protocol (NETCONF) over SSHv2

NETCONF over SSHv2 requires a vty line for each session as specified in the netconf max-session command. To start working with NETCONF APIs requires privilege level 15.

Device#conf t

Device(config)#username name privilege level password password

Device(config)#aaa authentication login default local and aaa authorization exec default local

Device(config)#exit

Configuring NETCONF-YANG

Device#conf t

Device(config)#netconf-yang     >>>>> Enables the NETCONF interface on your network device.

Device(config)#netconf-yang feature candidate-datastore >>>>> Enables candidate datastore.

Device(config)#exit

Monitoring and Maintaining Network Configuration protocol (NETCONF) Session

Device#show netconf {counters | session| schema}  >>>>> Displays NETCONF information.

Device#debug netconf {all | error} >>>>> Enables debugging of NETCONF sessions.

Device#clear netconf {counters | sessions} >>>>> Clears NETCONF statistics counters and NETCONF sessions, and frees associated resources and locks.

Verifying the NETCONF Protocol Configuration

Device#show netconf-yang datastores >>>>> Displays information about NETCONF-YANG datastores.

Device#show netconf-yang sessions >>>>> Displays information about NETCONF-YANG sessions.

Device#show netconf-yang sessions detail >>>>> Displays detailed information about NETCONF-YANG sessions.

Device#show netconf-yang statistics >>>>> Displays information about NETCONF-YANG statistics.

Device#show platform software yang-management process >>>>> Displays the status of the software processes required to support NETCONF-YANG.

 

]]>
https://networkinterview.com/enabling-and-configuring-network-configuration-protocol-in-a-managed-device/feed/ 0 14144
What is NETCONF protocol? https://networkinterview.com/what-is-netconf-protocol/ https://networkinterview.com/what-is-netconf-protocol/#respond Tue, 07 Jul 2020 10:44:18 +0000 https://networkinterview.com/?p=14137 NETCONF Protocol – Network Configuration Protocol

Network monitoring systems are tasked with ensuring the availability and performance of computers and network services and can detect and report on failures of devices or connections by deploying NETCONF/SNMP in device. Content of this article will have following sub sections :-

  1. Definition
  2. Types
  3. Notification
  4. Operation
  5. Key points

Definition

NETCONF is a protocol that that can manage, configure and install new configuration of network device. Its operations are realized on top of an easy Remote Procedure Call (RPC) layer. NETCONF uses Extensible Markup Language (XML) based on data encoding for protocol messages. The protocol messages are exchanged on the top of a secure transport protocol.

NETCONF is primarily intended to be used as a device configuration mechanism, whereas SNMP is ordinarily used for monitoring, polling, and fault notification. Both protocols report management information that’s useful to NNMi. NETCONF is the (only) candidate to replace CLI for configuration management of programmable networks. In terms of SDN, NETCONF is usually referenced as a southbound API from an SDN controller to network agents like switches and routers due to its potential for supporting multi-vendor environments.

Types

The NETCONF protocol are often conceptually partitioned into four layers:

  1. The Content layer has a configuration data and notification data.
  2. The Operations layer defines a set of base protocol operations to retrieve and to edit the configuration data.
  3. The Messages layer is responsible for encoding remote procedure calls (RPCs) and notifications.
  4. The Secure Transport layer features a secure and reliable transport of messages between a client and a server.

Related – Openflow vs NETCONF

NETCONF Notification

It is an event indicating that a configuration change has occurred. The change can be a replacement configuration, deleted configuration, or changed configuration. The notifications are sent at the end of a successful configuration that shows the set of changes.

 Operations

NETCONF is an XML-formatted command and response protocol that runs primarily over Secure Shell (SSH) transport. The NETCONF protocol is analogous in some ways to traditional device console Command Line Interface (CLI), except that the XML-formatted commands and results are designed for management applications. Details of NETCONF communication between NNMi and therefore the managed device are transparent to the NNMi user. However, the subsequent overview could also be helpful for troubleshooting:

  • A NETCONF client establishes an SSH connection with the NETCONF server on the managed device. Valid SSH user name and password credentials must be specified by the client and authenticated by the device.
  • The client application and device exchange capabilities in the form of <hello> messages.
  • The client initiates requests to the device in the form of Remote Procedure Call (RPC) messages; including standard <get> or <get-config> operations, plus any vendor-specific operations that are defined for the device.
  • The device responds with results of the operations within the sort of RPC reply messages.
  • When the client application has finished sending requests and processing the responses, it sends a <close-session> RPC message to the device.
  • The device acknowledges with an <ok> RPC reply message.
  • Finally, both sides terminate the SSH connection.

Key Points

  • TCP port 830 assigned to NETCONF by IANA.
  • NETCONF develop by the IETF.
  • NETCONF is a Connection-Oriented protocol.
  • NETCONF must provide authentication, data integrity, confidentiality and replay protection.
  • NETCONF implementation support the SSH transport protocol mapping.
  • The NETCONF protocol has been implemented in network devices like routers and switches by some major equipment vendors.
  • NNMi uses NETCONF to gather information about the device during discovery or rediscovery. NNMi doesn’t use NETCONF to modify device configurations or to watch status or performance metrics.
  • NETCONF may be a relatively new management protocol therefore it’s not as widely available across device vendors as compared to SNMP.
]]>
https://networkinterview.com/what-is-netconf-protocol/feed/ 0 14137
Difference between AODV Routing Protocol and DSR Protocol : Detailed Comparison https://networkinterview.com/difference-between-aodv-and-dsr/ https://networkinterview.com/difference-between-aodv-and-dsr/#respond Mon, 29 Jun 2020 20:47:39 +0000 https://networkinterview.com/?p=14090 Difference between AODV Routing Protocol and DSR Protocol

An ad hoc network or Mobile ad hoc network refers to a network connection established for a single session and does not require a router or a wireless base station. It does not depend on a pre-existing infrastructure such as routers in wired networks or APs in managed wireless networks. This is divided into reactive and proactive routing protocols. This Reactive routing protocol or on-demand routing is further sub divided into two categories:

Introduction to AODV Routing Protocol

Ad-hoc On-Demand Distance Vector (AODV) is a reactive routing protocol where routes are created only when they are required. Main application of AODV is mobile network. It uses routing table setup follows one entry for each destination. Sequence numbers are used to determine an up-to-date path to a destination. Every entry in the routing table having a sequence number. The sequence number act as a route time stamp, ensuring freshness of the route. Upon receiving a RREQ packet, a node compares its sequence number with the sequence number in the RREQ packet. If the sequence number already greater than that in the packet, the existing route is more up-to-date.

Introduction to DSR Protocol (Dynamic Source Routing)

Dynamic Source Routing is an On-Demand routing protocol where the route is calculated only when it is required. Application of DSR is in multi hop ad hoc networks of mobile nodes. DSR’s main feature is self-organized and self-configured network without any central administration and network setup. It uses no periodic routing messages. Thus it reduces bandwidth overhead and conserved battery power and also huge routing updates.

 

Comparison : DSR vs AODV

  • Both are on demand routing protocols.
  • AODV works on Hop by Hop routing whereas DSR on source routing.
  • In DSR, route cache entries do not have lifetimes whereas AODV route table entries do have lifetimes.
  • DSR uses routing cache aggressively and maintains multiple route per destination where as AODV uses one route per destination.
  • In DSR, multiple route per destination requires high storage space where as AODV uses very less space because it uses one route per destination.
  • DSR does not have any of the mechanism to expire stale route in the cache whereas AODV is more conservative, the fresher route is always chosen.
  • Route discovery cycle is very frequent in AODV and less in DSR.
  • Both have scalability problem because of routing.
  • DSR uses source routing but AODV uses a table driven routing framework and destination sequence to prevent loop and determine route freshness.
  • DSR does not rely on any timer based activities but AODV based on timer activities.
  • Bandwidth usage is efficient in AODB but DSR does not have this capability.
  • In case of AODV, routes in routing table are deleted when not in use even they are valid routes. However, in scenario of DSR routes are still installed in routing table when they are not valid or staled.
  • From performance prospective in mobility scenario- AODV is very good, DSR is very poor.

DIFFERENCE BEWEEN AODV AND DSR SUMMARIZED:

TERMS

AODV

DSR

Protocol Type Hop by Hop routing Source routing
Route maintained in Routing table Routing Cache
Route Discovery On Demand On Demand
Multiple route discovery No Yes
Multicast Yes No
Broadcast Yes Yes
Reuse of routing information No No
Route reconfiguration Erase route, than source notification or local route repair Erase route the source information
Limited overhead No Concept of route cache
Advantage Reduced control overhead Multiple route reduced bandwidth overhead
Disadvantage Scalability problem, large delay caused by route discovery process Scalability problem due to source routing and flooding, large delay
Route Storage Space Low Storage Space High Storage Space
Routes in routing table Deletion of valid link Usage of invalid link
Bandwidth usage Efficient bandwidth usage Waste bandwidth
MAC Overhead AODV has less normalized MAC overhead DSR have MAC overhead
Performance in AD hoc network AODV has better performance in high mobility scenario DSR have poor performance in high mobility scenario
Route discovery frequency AODV have very frequent route discovery DSR have less frequent route discovery
Utilization Route discovery is on demand, which is more efficient in dynamic nature of mobile ad-hoc network. Route is only created when required and node utilizes the route cache information efficiently to reduce the overhead and collision.
Routing overhead AODV has complex routing DSR has less routing overhead

Download the difference table here.

Conclusion

Analysis on both protocols infers that Packet delivery ratio for AODV is better than DSR in high mobility. AODV has more end to end delay as compared to DSR. Additionally, AODV incurs more routing overhead in contrast to DSR. Finally, energy consumption in DSR is almost constant as we increase the number of nodes which is opposing to AODV which increases as no. of nodes increase.

]]>
https://networkinterview.com/difference-between-aodv-and-dsr/feed/ 0 14090
AODV Routing Protocol https://networkinterview.com/aodv-routing-protocol/ https://networkinterview.com/aodv-routing-protocol/#respond Sat, 27 Jun 2020 21:04:29 +0000 https://networkinterview.com/?p=14084 Hierarchy of Ad-hoc routing protocols

In this article, we will understand the concept of AODV Routing protocol, which is type of Reactive (On-Demand) protocol. So, before beginning let’s understand what is a reactive protocol.

Reactive Protocol

Reactive Routing Protocol is a bandwidth efficient on-demand routing protocol for Mobile Ad-Hoc Networks. Two key mechanism of reactive protocol are Route Discovery and Route Maintenance. Route Discovery mechanism is responsible for the discovery of new routes. Route Maintenance mechanism is for the detection of link breaks and repair of an existing route.

Ad-hoc On-Demand Distance Vector (AODV) is a reactive protocol where routes are created only when they are needed. Key application of AODV is in mobile network. It uses routing table with one entry for each destination. Sequence numbers are used to validate whether routing information is up-to-date and to prevent routing loops.

Ad-hoc Network Architecture

Operation of AODV Routing Protocol –

In scenario of AODV, when node initiates a packet toward destination, routing table lookup is performed and one of below action is performed –

  • If route is found, packet is forwarded to next hop toward the destination.
  • If no route is found, it initiate route discovery process.

Route discovery process starts with the creation of a Route Request (RREQ) packet. The packet contains

  • Source node’s IP address
  • Source node’s current sequence number
  • Destination IP address and
  • Destination sequence number.

Packet also contains broadcast ID number. Broadcast ID gets incremented by one each time a source node uses RREQ. Broadcast ID and source IP address form unique identifier for RREQ. Broadcasting is done via Flooding. Route discovery is supported on query and reply cycles, and route information is stored altogether with intermediate nodes along the route in the form of route table entries. Route maintenance is completed by means of route error (RERR) packets. When an intermediate node detects an outage or node unreachable, it generates a RERR packet. The RERR propagates towards all traffic sources which have a route via the failed link. It also erases all broken routes on the way.

The following Control Packets are used:

  • Routing request message (RREQ) is broadcasted by a node requiring a route to different node.
  • Routing reply message (RREP) is unicasted back to the sources of the RREQ.
  • Route error message (RERR) is sent to notify other nodes of loss of the link.
  • HELLO messages are used for the detecting and monitoring links to the neighbours status.

Key points about AODV Routing Protocol –

  • Uses bi-directional links.
  • Route discovery cycle like query and reply used for route finding.
  • Route Maintenance of active routes.
  • Sequence numbers are used for loop prevention and act as route freshness criteria.
  • Provides unicast and multicast communication.
  • Whenever routes are not used get expired and discarded.
  • Reduces stale routes.
  • Reduces need for route maintenance.
  • Minimizes number of active routes from an active source and destination.
  • AODV discovers and maintain routes as and when necessary.
  • Does not maintain routes from every node to node.
  • Sequence number gets incremented every time the node notices change in the neighbourhood topology.
  • AODV uses routing tables to store routing information.
  • A Routing table for unicast and multicast routes.
  • Life-time timer updated every time the route is used. If route not used with in its life time it will declare expire.
  • Reactive/On – demand protocol.

Merits of AODV Routing Protocol –

  • Reactive protocols like AODV tend to minimise the control traffic messages overhead.
  • AODV reacts relatively faster to the topological changes within the network and updates only the nodes suffering from these changes.
  • The AODV routing protocol saves storage place also as energy. They respond to destination node reply only once to the first request and ignores the rest.
  • The routing table maintains at the most one entry per destination.
  • AODV is loop free and scale to large number of mobile nodes.
  • AODV does not required any central administration to handle routing processing.

Demerits of AODV

  • A Large number of control packets are generated when a link breakage occurs. These packets increase the congestion in the active route.
  • AODV has a high processing demand.
  • AODV consumes large share of the bandwidth.
  • AODV takes long time to build routing table.
  • As size of the network grows, various performance metrics begin decreasing.

Related – Proactive Routing Protocol in Ad-hoc Network

 

]]>
https://networkinterview.com/aodv-routing-protocol/feed/ 0 14084
Proactive Routing Protocol in Ad-hoc Network https://networkinterview.com/proactive-routing-protocol-in-ad-hoc-network/ https://networkinterview.com/proactive-routing-protocol-in-ad-hoc-network/#respond Wed, 24 Jun 2020 11:36:18 +0000 https://networkinterview.com/?p=14076 Proactive Routing Protocol

Introduction

Ad-hoc network is a collection of mobile nodes forming an instant network without a fixed topology. In such a network each node acts as both router and host simultaneously and can join or move out in the network freely. In Ad-hoc routing protocol, nodes take decision of routing among all nodes connected in a mobile ad-hoc network.

There are two variations of mobile network:

  1. Infra-structured network
  2. Ad-hoc network.

Infra-structured network are connections with fixed and wired gateways. Infrastructure mode wireless networking bridges wireless network to wired Ethernet network. Infrastructure mode wireless also supports central connection points for WLAN clients.

An ad hoc network typically refers to any set of networks where all devices have equal status on a network and networks are liberal to associate with any other ad hoc network devices in link range. Wireless ad-hoc networks can be further classified by their application, as follows:

  1. Mobile ad hoc networks (MANET)
  2. Wireless mesh networks (WMN)
  3. Wireless sensor networks (WSN)

Proactive Routing Protocol

In this type of routing protocol, each node in a network maintains one or more routing tables that are updated regularly. Each node sends a broadcast message to the entire network if there is any change in the network topology. However, it incurs additional overhead cost which arises since it maintains up-to-date information. As a result, throughput of network may be affected, but it provides the actual information to availability of the network. Below is the list of Proactive Protocols –

  • Destination Sequenced Distance Vector (DSDV) protocol
  • Wireless Routing protocol (WRP)
  • Hierarchical State Routing (HSR) protocol
  • Source Tree Adaptive Routing Protocol (STAR)
  • Optimized Link State Routing (OLSR)
  • Global state routing protocol (GSR) are the examples of Proactive protocol.

Each node maintains up-to-date routing information to all the nodes in the network whereas in case of on-demand routing protocol, a node finds the route to a destination when it desires to send packets to the destination. GSR is a protocol that uses destination sequence number to keep routes loop-free and up-to-date.

HSR are hierarchical routing protocol. WRP is a distance vector routing protocol. Each node in OLSR discovers and maintains topology information of network. It builds shortest path tree to achieve preferred paths to destinations. DSDV updates its Routing table by time to time transmitted throughout the network in order to maintain table consistency. Routers in STAR communicate to its neighbours their source routing trees either incrementally or in atomic updates. Source routing trees are specified by affirming the link parameters of each link which belonging to the paths used to reach every destination.

Related – Proactive vs Reactive Routing Protocols

Key points of Proactive Routing Protocol

  • Low delay route setup process- all routes are immediately available.
  • High bandwidth requirement- updates due to link loss leads to high control overheads.
  • Low scalability- control overhead is proportional to the number of nodes.
  • Slow reaction on restructuring and failures.
  • High storage requirements- whole table must be in a memory.
  • Respective amount of data for maintenance.

Applications of Wireless Ad Hoc Networks

  1. Tactical Networks – Military operations.
  2. Emergency Services – Disaster recovery, Patient records retrieval.
  3. Sensor Networks – Weather forecast and monitoring, Earth movement capturing, Ocean engineering, Collection of real time data.
  4. Cellular Networks and Bluetooth.
  5. Educational applications – Video conferencing, Virtual classrooms.
  6. Entertainment – Video and music on demand.

 

]]>
https://networkinterview.com/proactive-routing-protocol-in-ad-hoc-network/feed/ 0 14076
Ways to find MAC Address of Remote Computers https://networkinterview.com/ways-to-find-mac-address-of-remote-computers/ https://networkinterview.com/ways-to-find-mac-address-of-remote-computers/#respond Sun, 26 Apr 2020 09:30:54 +0000 https://networkinterview.com/?p=13517 Ways to find MAC Address

Network and System administrators are many times caught is issue of finding MAC address of some remote device in network. Physical validation of each device may be time consuming and very tedious activity. In this post we will discuss 3 commands in “Command Prompt” which can help to find out MAC address of remote device in few seconds.

Commands to find MAC Address:

The 3 commands in discussion are stated below –

Command 1 – ARP

“ARP” is a Layer 3 protocol which is used by computers to resolve and track the TCP/IP and MAC address of the destination devices that you’re communicating to.

Steps to determine the MAC Address of a remote system –

  • Open MS-DOS using “CMD” command
  • Ping IP Address of device whose MAC address needs to be discovered.
  • Issue “ARP – a” to view the list of IP address and Physical (MAC) Address corresponding each IP –

Below is an example –

 

Command 2 – Nbtstat

“Nbtstat” command is another way to find out the MAC address of remote machine. NBTSTAT is a Windows built-in utility for NetBIOS over TCP/IP used in Windows system.

Below is One way of determining the MAC address of a remote system is to type nbtstat -A remoteaddress at a command prompt where remoteaddress is the IP address of the remote system

Steps to determine the MAC Address of a remote system –

  • Open MS-DOS using “CMD” command
  • Issue “nbtstat – a <remote  address> ” (where <remote  address>  refers to remote device IP Address) to view the Physical (MAC) Address of remote system

Below is an example –

 

Command 3 – Getmac

It’s the command line utility that returns the MAC address along with network protocols associated with each address for all network adapters from local or remote computers.

Steps to determine the MAC Address of a remote system using “Getmac” command –

  • Open MS-DOS using “CMD” command
  • Issue “getmac /s <remote  computer name> /u username /p password” to view the Physical (MAC) Address of remote system.

Below is an example –

 

 

 

 

 

 

 

 

Related – MAC Address vs IP Address

]]>
https://networkinterview.com/ways-to-find-mac-address-of-remote-computers/feed/ 0 13517
Proactive vs Reactive Routing Protocols https://networkinterview.com/proactive-vs-reactive-routing-protocols/ https://networkinterview.com/proactive-vs-reactive-routing-protocols/#respond Sun, 15 Mar 2020 12:42:50 +0000 https://networkinterview.com/?p=13388 Proactive vs Reactive Routing Protocols

Routing protocols are the routes that help to learn dynamic routes. These protocols are organized on routers in regards with exchanging the information related with routing. Using the routing protocols in your network has many benefits like router has the ability to advertise the failing of router. Also you did not need to configure manually every route in each router in the network.

Further these routing protocols can be categorized in six various forms but we are going to talk about only two of them – reactive and proactive protocols. These both protocols are utilized in mobile Ad hoc networks for sending data to the destination from the host. This information is sent through multiple ways from source to destination that are mobile and can be located on car, bus, ship or aeroplane.

Generally, this type of network is utilized in a military field, a disaster hit area or on in area where infrastructure is demolished or does not exist. The network’s node work as the routers and transmit data from one node to another until it reaches the destination. As the data has to covered the various nodes so the routing protocol in important to deliver the data at correct location.

Comparison: Proactive vs Reactive Routing Protocols

Reactive Protocols

Reactive protocol is divides in two types – Ad hoc On-Demand Distance Vector (AODV) and Temporary Ordering Routing Algorithms (TORA). In AODV routing protocol, the work of node is independent and does not carry the information of other nodes or adjacent node in the network. The process only when the data is transferred to them to maintain the route with the destination. These nodes comprise of the information of the route from which the data has to be transferred so the passing of information packet is followed by predetermined route. TORA is a very adaptive and efficient process as it works with all the shortest possible routes from source to destination. In this type of protocol, each and every node carries the information of its neighbouring nodes. It also has the ability to ensure the journey of the data, creation of route and erase the route if there is any partition within the network.

Related – AODV Routing Protocol

Proactive Protocols

Destination Sequence Vector or DSDV router is utilized in this type of protocol that was designed with the algorithm of Bellmann-Ford. All the information regarding with next node is maintained in this protocol. All the nodes that are mobile have to relay its entries with the adjacent nodes. The nodes that lies in the route deliver the data packet from one node to another after the mutual agreement. So, for this purpose all the nodes have to constantly update their position in DSDV protocol to avoid the interruption in the route.

Conclusion

  • Reactive protocol is a on demand process that means determine routes whenever needed while the proactive protocols traditional process but provides the shortest path.
  • The packet data is delivered in more efficiently in the reactive protocol than in proactive protocol.
  • Proactive protocols are much slower than the reactive protocols in terms of performance.
  • For the different topographies, reactive protocol is more efficient and adaptive than the proactive protocols.
  • For the reactive protocol, the time taken or average end to end delay by the data to reach the destination from the source is quite variable while in proactive it is constant for the a given Ad hoc network.
]]>
https://networkinterview.com/proactive-vs-reactive-routing-protocols/feed/ 0 13388