LAYER2 – Network Interview https://networkinterview.com Online Networking Interview Preparations Sat, 13 Jun 2020 19:04:46 +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 LAYER2 – Network Interview https://networkinterview.com 32 32 162715532 What is a Network Bridge? https://networkinterview.com/what-is-a-network-bridge/ https://networkinterview.com/what-is-a-network-bridge/#respond Mon, 08 Jul 2019 07:01:35 +0000 https://networkinterview.com/?p=12304 A network bridge is a device that can create a single network from different and multiple network segments. In other words, it can connect the two or more networks. The function used here is called Network Bridging.

There is a difference between bridging and routing. In routing, there are more than one networks which run independently but they can communicate with one another. However, in the bridging, the concept is totally different. Here, the two networks are bridged together in order to work s  a single network. Here the two networks can’t operate and function as a different network.

When talking about the OSI model, the bridging is performed in the data link layer, i.e layer 2.

The bridge can be done either using the cables or you can also do it without cables via wireless. If the computers are connected via wireless, it is called a wireless bridge.

Data in the Network bridge

The bridge is used to transfer the frame from one to another. The bridge maintains MAC where the addresses are stored.  This is the a major feature which is not present in the repeaters and hubs.  Some people also call bridge as Layer 2 switches.

Working of a Network Bridge

A Bridge is generally used in a local area network. This is because they can eventually flood and clog into a large network. Also, it is far easy to transfer the data to all the nodes just in case they don’t know about the MAC address of the destination node.

A bridge is used for the connection of one or more device where the network is passed. Using the bridge, one or more network can behave as a single network.

The working of the bridge is simple; the frame is directly sent to all the different nodes that are connected using it.

If there are any problems occurred in the bridge, and the frame received is meant for the segments that are on the same network then the node is then discarded. In this way, the conflict that occurs is solved easily.

On the same hand, if the bridge received any frame where the MAC address is correct and the frame is meant to be sent to the connected network then in such cases, the frame is transferred without any issues.

Related – Bridge vs Router

Types of Network bridges

There are various kinds of bridges where the bridging is done. In each of the working is almost the same. However, there is a small difference seen.

  • Transparent bridging: Here, when the bridging is being done and the frame is about to be transferred. If the table shows empty and there is no MAC address found, the bridge will send the frame to each and every node present.
  • Simple Bridge: It is the regular bridging where the two network segments are connected to each other. The transfer is done a frame by frame to decide whether the selected frame has to be transferred to the other network or not.
  • Multi-port Bridging: Here, the process is almost the same as a simple bridge, It stores the frame, decides and then forwards it. The only difference here is that there is an additional Bridge that will decide where the traffic is forwarded.

Shortest path bridging

SPB known as Shortest Path Bridging is a standard that is stated in IEEE 802.1. Here, computer network technology decides the shortest path to send any frame. This also enables multipath routing. There are various techniques used to decide the shortest path for the bridge mechanism. This replaces the older spanning tree protocols and making it faster to choose the paths.

]]>
https://networkinterview.com/what-is-a-network-bridge/feed/ 0 12304
What is GRE (Generic Routing Encapsulation)? https://networkinterview.com/what-is-gre-generic-routing-encapsulation/ https://networkinterview.com/what-is-gre-generic-routing-encapsulation/#respond Wed, 03 Jul 2019 06:53:47 +0000 https://networkinterview.com/?p=12279 Generic Routing Encapsulation (GRE) is the IP encapsulation protocol that is used to transport IP packets over the network. Generic routing encapsulation was initially developed by Cisco, but later become industry standard (RFC 1701, RFC 2784, RFC 2890). GRE can tunnel any Layer 3 protocol including the IP. In GRE an IP datagram is encapsulated within another IP datagram.

One great advantage of GRE is that it allows routing of IP packets between private IPv4 networks which are separated over public IPv4 internet. GRE also supports encapsulating IPv4 broadcast and multicast traffic. GRE tunnels are not secure because Generic routing encapsulation does not encrypt its Data payload. In mealtime, GRE used together with other secure tunneling protocols like IPsec provides network security.

Following are key fields of the GRE Header.

Flag C (Checksum Present): Used to indicate that the Checksum field is present and contains valid information, when set to 1.

Flag R (Routing Present): Used to indicate that the Routing fields are present and contain valid information, when set to 1.

Flag K (Key Present): Used to indicate that the Key field is present in the GRE header, when set to 1.

Flag S (Sequence Number Present): Used to indicate that the Sequence Number field is present, when set to 1.

Flag s (Strict Source Route): Set to 1 the routing information consists of Strict Source Routes.

Recursion Control and Version Number are normally set to 0

Protocol Type: Protocol Type field is used to mention the protocol payload of the GRE packet. For IP, this field is set to 0x800

Checksum: Checksum field value is used to check the integrity of the GRE header and the payload.

Key: Key field value is used to authenticate the GRE packets encapsulate.

Sequence Number: Sequence Number filed value is used to track the sequence of GRE packets.

Below is a diagram shows Wireshark capture image of a GRE Encapsulation and GRE Header fields.

Generic routing encapsulation provides a private, secure path for transporting packets through an otherwise public network by encapsulating or tunneling the packets. GRE encapsulates data packets and redirects them to a device that de-encapsulates them and routes them to their final destination. It allows source and destination switches to operate as if they have a virtual point-to-point connection with each other because the outer header applied by GRE is transparent to the encapsulated payload packet.

]]>
https://networkinterview.com/what-is-gre-generic-routing-encapsulation/feed/ 0 12279