Sunday, July 22, 2018

Switching Basics


It took a year and a half to start writing again !! Time just flies :)

I will follow OSI reference model and will start with data link layer(Layer 2). What comes to mind when we talk about layer 2 ? Switches, hubs bridges, frames etc.

Let us first  try understanding what is a collision domain and broadcast domain.

Collision Domain: Anywhere within a network where a Collision can occur. When more than one host tries to talk at one time a collision occurs and everyone should backoff, wait to talk again.This forces every host to operate in half duplex(either send or receive). 

Broadcast Domain: All devices that a Broadcast message reaches at the Data Link layer within a network is called a Broadcast domain


Hub : Every single port on a hub belongs to same collision domain and broadcast domain.
Bridge : Bridge breaks up collision domain/per port and is in same broadcast domain.
Switches : Each port of the switch is in different collision domain and same broadcast domain, you add another switch it is also in same broadcast domain.
Router : Each port belongs to different collision and broadcast domain.

A Media Access Control (MAC) address is a 48-bit address that is used for communication between two hosts in an Ethernet environment. MAC address actually has two parts, first half is OUI - Organizationally unique identifier assigned to hardware vendores by IEEE.The address is written in the form of 12 hexadecimal digits.

                


                             Ethernet switch operates at layer 2 of OSI reference model making decisions about forwarding frames based on destination MAC address found within the frame.Each port can operate in full duplex switches have per port collision domain, hence bandwidth is not shared. A switch either should e told explicitly where hosts are located or must learn information itself. You can configure MAC address statically but this gets out of control when more number of hosts are added to network.

Switch dynamically learns MAC address listening to incoming frames and keeps a table of information.When a frame is received on switch port, switch inspects the source MAC address and adds to the table if it does not have an entry. Incoming frames also include the destination MAC address and switch looksup for a entry. If address is not found in the table, switch  floods to all the switchports assigned to VLAN. This is known as unknown unicast flooding. 


Further reading :
https://learningnetwork.cisco.com/docs/DOC-30227



No comments:

Post a Comment