Showing posts with label destination address. Show all posts
Showing posts with label destination address. Show all posts

Thursday, 23 August 2018

Switching Concept in Networking and Telecommunications

The switch frame forwarding is common in networking and telecommunication. Different types of switches are used in networking(LAN, WAN, and PSTN). The basic concept of switching decision is based on the following two criteria.



  • Ingress port

  • Destination address


The traffic forwarding decision is completed in relation to the traffic flow. The term ingress is used to explain where a frame enters to the device on a particular port. The term egress is used to describe the frames leaving the device from the particular port. When a switch makes a frame forwarding decision, it is based on the ingress port and the address of the destination host.  The networking switch maintains a MAC address table. The table is used to decide how to forward traffic through the switch. The figure below illustrates the switch MAC address table.



  • If a data enters to switch port 1 and the message has a destination address of DB-CD-AC-3D-26-25, then the switch forwards the data out to port 7.

  • If a data enters to switch port 6 and the message has a destination address of C3-A3-A2-35-A6-66, then the switch forwards the data out port 8.

  • If a data enters switch port 2 and has a destination address of EE-01-A1-AF-00-01, then the switch forwards the data out port 1.


The network switch has only one intelligence, the ability to maintain MAC address and table make a decision to forward traffic based on the ingress port and the destination address of the message. Every switch has only one master table that describes an association between address and port. The Cisco switches forward Ethernet frames based on the destination MAC address of the frames.



The concept of Dynamically Populating a MAC Address Table


Network Switches use MAC address table to forward network traffic towards destination through the proper port. It is necessary for a switch to know which port to use to transmit data. The switch must first learn which devices exist on each port. When the switch learns the devices connected to each port, its prepare MAC address. The table also called content addressable memory (CAM) table. The CAM is a memory which is used in high-speed searching applications. The switches decide how to handle incoming data frames by maintaining the table of MAC addresses. The switch builds MAC address table by reading the MAC address of each device connected to the port of a switch and then uses MAC address table to send frames destined for a particular out the specific port which has been assigned to that device. The switch populates the table of the MAC address based on the source MAC addresses.


When a switch receives an incoming frame with a destination MAC address, if the destination MAC address not available in the table, the switch forwards the frame out of all ports except for the ingress port of the frame, this technique called flooding of data.  When destination device responds, the switch adds the source MAC address of the frame and the port where the just received to the MAC address table. Network, where multiple switches are interconnected, The MAC address table contains multiple addresses for a single port. The switch kept MAC address for a specific time, the aging time is five minutes for a single host entry. The steps below describe the process of the building MAC address table.   


The following steps describe the process of building the MAC address table:



  • The switch receives a frame from Host 1 on Port 1, the MAC address table is empty (Figure 1).




  • The switch examines the MAC address of the source (Host 1) and compares it to the MAC address table.

  • If the address is not found in the MAC address table, it associates the MAC address of host 1 with port 1 (ingress port) in the MAC address table. (Figure 2)




  • If the MAC address already exists in the table, it resets the aging timer for an entry.

  • when the switch has recorded the source address information in the MAC table then switch examines the destination MAC address.

  • If the destination address is not already recorded in the MAC table or if it’s a broadcast MAC address containing all Fs, the switch floods the data frame to all ports, except the ingress port (Figure 3).




  • The destination Host (Host 4) will reply to the frame with a unicast frame addressed to Host 1 (Figure 4). The switch enters the source MAC address of Host 4 and the port number of the ingress port into the address table. The destination address (Host 1) of the frame and its associated egress ports found in the MAC address table.




  • The switch now complete entries for host 1 and host 4 and they can now forward frames between these source and destination devices without flooding. 

Friday, 14 October 2016

Device communication on a remote network

Here we will discuss the role of the network layer and data link layer when devices communicating on a remote network. Here is the example of PC1 which is communicating with a web server on a different network.


remote network


Role of the Network Layer Addresses


When the sender of the packet is on a different network from the receiver, the source and destination IP addresses will represent hosts on different networks. This will be indicated by the network portion of the IP address of the destination host.


Source IP address


The IP address of the sending device, the client computer PC1: 192.168.5.100.


Destination IP address


The IP address of the receiving device, the server, Web Server: 172.17.5.254.
Important is that the network of both sending and receiving end is different.


Role of the Data Link Layer Addresses


When the sender and receiver of the IP packet are on different networks, the Ethernet data link frame cannot be sent directly to the destination host because the host is not directly reachable in the network of the sender. In that case, the Ethernet frame must be sent to another device known as the router or default gateway. In the present example, the default gateway is R1. R1 has an Ethernet data link address that is on the same network as PC1. This allows PC1 to reach the router directly.


Source MAC address


Sending device MAC address which is PC1 - 22-22-22-22-22-22


Destination MAC address


When the receiving device, the destination IP address, is on a different network from the sending device, the sending device uses the Ethernet MAC address of the default gateway or router. In this example, the destination MAC address is the MAC address of R1's Ethernet interface, BB-BB-BB-BB-BB-BB. This is the interface that is attached to the same network as PC1.
The Ethernet frame with the encapsulated IP packet can now be transmitted to R1. R1 forwards the packet to the destination, Web Server. This may mean that R1 forwards the packet to another router or directly to Web Server if the destination is on a network connected to R1.
It is important that the IP address of the default gateway be configured on each host on the local network. All packets to a destination on remote networks are sent to the default gateway.