Thursday, March 5, 2015

Computer Networking 101 Part 3: Where should it go? - forwarding decision

In the previous 2 posts of this Computer Networking series, we have talked about the 7 Layers of the OSI Model and reaching the destination.

On the topic of reaching the destination, networking equipment has to deal with 3 types of traffic and one of their job is to make forwarding decisions.  Where should this frame/packet go?

Today, lets look at the networking equipment.  There are different kinds of networking equipment - switch, router, load balancer, firewall ... etc. We will concentrate on switch and router.  In layer 2 we switch and in layer 3 we route.  Layer 2 switches has become a commodity.  For layer 3 router, everyone knows about Cisco, Juniper and Arista.  Of course there is Alcatel-Lucent that makes core router and the enterprise division that I work for that makes switch/router.

Layer 2 Switch
Forwarding decision for layer 2 switch is relatively simple.  If the destination is unknown or if the destination MAC address is ff:ff:ff:ff:ff:ff, the packet is to be flood to all the ports of the same VLAN.  Layer 2 multicast frames are treated as broadcast traffic.  When a frame is seen on a port the source MAC address is being learned.  Next time when a packet with this MAC address as the destination MAC address, the layer 2 switch knows to switch directly to this port.  With Source MAC address learning (most people call this source learning), the layer 2 switch will create the Forwarding Information Base that provide the necessary information for forwarding decisions.

Most layer 2 switches has something call the TCAM to store the MAC address and they are able to use the hardware to perform the known destination switching.

Layer 3 Router
In the past there were different routable protocol such as AppleTalk, DECnet, IPX, SNA ... etc.  With the blooming of the internet, we hardly seen the use of these protocols since we have converged into a IP exclusive network.

The forwarding decision of a layer 3 router is relatively more complex. The decision is based on the routing table/Routing Information Base (RIB). From the routing table the Layer 3 router can create the forwarding table/Forwarding Information Base.

The content of the routing table varies by vendors but they contain similar information.  From a TechTarget article, routing table has the following elements: 
  • Destination: The IP address of the packet's final destination
  • Next hop: The IP address to which the packet is forwarded
  • Interface: The outgoing network interface the device should use when forwarding the packet to the next hop or final destination
  • Metric: Assigns a cost to each available route so that the most cost-effective path can be chosen
  • Routes: Includes directly-attached subnets, indirect subnets that are not attached to the device but can be accessed through one or more hops, and default routes to use for certain types of traffic or when information is lacking.
The routing table is created by various IP routing protocols.  Before we talk about routing protocol we need to know what an Autonomous System (AS) is. An Autonomous System is basically an administrative domain.  Each Autonomous System is assigned a globally unique number – Autonomous System Number (ASN). 

There are 3 major types of routing protocol:
  1. Interior Gateway Protocol (type 1): Link-State Routing Protocol
  2. Interior Gateway Protocol (type 2): Distance-vector Routing Protocol
  3. Exterior Gateway Protocol 
Within an Autonomous System, Interior Gateway Protocol is used and for route exchange between 2 Autonomous System the Exterior Gateway Protocol is used.

The basic idea is that routing protocol allow router to exchange route information so that the router can build the routing table which in tern based on efficiency or least number of hops to create the forwarding table. 

In this article we are to touch on the terms and basic concept only to give an overview of computer networking.  We are not going to go into the difference between these routing protocols.  (Note: if there is any concept that you want to know in a more in-depth manner, please let me know and I will use another post to explore that topic)

The different planes of a networking equipment

Networking equipment can also be divided into 3 functions:
  1. Data Plane
  2. Control Plane
  3. Management Plane
The separation of the data and control plane is often being used as a definition for the hot topic Software Defined Networking (SDN).  This is not a complete definition of SDN because there are different view of what SDN really is.  I will certainly blog about this subject within this year as I am going to take the VMware VCIX-NV (network virtualization) certification.



Reference:
"What Is Routing Table? - Definition from WhatIs.com." SearchNetworking. N.p., n.d. Web. 05 Mar. 2015.

2 comments:

  1. nice post… simple and useful :).... Plz visit my site...! Thanks
    Technical Support Engineering Services in Delhi,

    ReplyDelete
  2. Very helpful suggestions that help in the optimizing website.
    thank for sharing the link.
    goldenslot

    ReplyDelete