Switching
Switching means
to actually send the packet over the predefined route. There are 3 types of
switching:
1. Packet
switching
2. Circuit
switching
3. Message
switching
Switches will forward frame
(protocol data unit at layer 2) in the same broadcast domain that is the reason
why switch can’t communicate with switch or devices in other VLAN, it need
router or layer 3 switches.
While router will route the packet (protocol data unit at layer 3) to different network if the other network is known to the router.
Difference between switching and routing:-
While router will route the packet (protocol data unit at layer 3) to different network if the other network is known to the router.
Difference between switching and routing:-
1) Switching will be faster as
switch uses ASIC technology.
Routing will be slower as it is software based.
2) Switching is done at layer 2.
Routing is done at layer 3.
3) If the destination is not known to switch it will broadcast the frame.
If the destination is not known to router it will drop the packet.
4) Switching is done in same broadcast domain.
Routing is done in different networks.
5) Switching is done by using MAC address.
Routing is done by using IP address.
Routing will be slower as it is software based.
2) Switching is done at layer 2.
Routing is done at layer 3.
3) If the destination is not known to switch it will broadcast the frame.
If the destination is not known to router it will drop the packet.
4) Switching is done in same broadcast domain.
Routing is done in different networks.
5) Switching is done by using MAC address.
Routing is done by using IP address.
---->>>>>Protocol data unit at layer 2 is frame
---->>>>> Protocol data unit at layer 3 is packet
---->>>>> Protocol data unit at layer 3 is packet
As
a switch doesnt know the network it just forwards the packet/frame based on the
MAC and hence it is possible for multiple networks to exists on the same L2
switch eventhough this is not suggested.
Different types of switching
techniques are employed to provide communication between two computers. These
are : Circuit switching, message switching and packet switching.
Circuit Switching
In this technique, first the complete physical connection between two computers is established and then data are transmitted from the source computer to the destination computer. That is, when a computer places a telephone call, the switching equipment within the telephone system seeks out a physical copper path all the way from sender telephone to the receiver’s telephone. The important property of this switching technique is to setup an end-to-end path (connection) between computer before any data can be sent.
Message Switching
In this technique, the source computer sends data or the message to the switching office first, which stores the data in its buffer. It then looks for a free link to another switching office and then sends the data to this office. This process is continued until the data are delivered to the destination computers. Owing to its working principle, it is also known as store and forward. That is, store first (in switching office), forward later, one jump at a time.
Packet Switching
With message switching, there is no limit on block size, in contrast, packet switching places a tight upper limit on block size. A fixed size of packet which can be transmitted across the network is specified. Another point of its difference from message switching is that data packets are stored on the disk in message switching whereas in packet switching, all the packets of fixed size are stored in main memory. This improves the performance as the access time (time taken to access a data packet) is reduced, thus, the throughput (measure of performance) of the network is improved
Circuit Switching
In this technique, first the complete physical connection between two computers is established and then data are transmitted from the source computer to the destination computer. That is, when a computer places a telephone call, the switching equipment within the telephone system seeks out a physical copper path all the way from sender telephone to the receiver’s telephone. The important property of this switching technique is to setup an end-to-end path (connection) between computer before any data can be sent.
Message Switching
In this technique, the source computer sends data or the message to the switching office first, which stores the data in its buffer. It then looks for a free link to another switching office and then sends the data to this office. This process is continued until the data are delivered to the destination computers. Owing to its working principle, it is also known as store and forward. That is, store first (in switching office), forward later, one jump at a time.
Packet Switching
With message switching, there is no limit on block size, in contrast, packet switching places a tight upper limit on block size. A fixed size of packet which can be transmitted across the network is specified. Another point of its difference from message switching is that data packets are stored on the disk in message switching whereas in packet switching, all the packets of fixed size are stored in main memory. This improves the performance as the access time (time taken to access a data packet) is reduced, thus, the throughput (measure of performance) of the network is improved
Switch is a
networking device which generally works on layer2. have 2MB ram, 24ports and
cannot stop broadcasting. Switch have single broadcasting domain and multiple
collision domains. There are 2 types of switch :
1. Non-managable
switch
2. Managable
switch
Managable switch
have 2 categories:
i)Layer 2 switch
ii)Layer 3
switch
There are 3
functions of switch:
1. It maintain
MAC table
2. It create
multiple collision domains and stop broadcasting at layer 2.
3. It flood
broadcast, multicast and unicast frames out of all ports except the one it was
received.
Switch has 3
modes or there are 3 types of switch on the basis of their working:
1. Store and
forward switch It will receive the full
frame and passes CRC (Cyclic Redundancy Check) and then send to the
destination. It work in full duplex and latency never remain constant. Latency
means time to receive the frame bits, join them and passes CRC.
2. Cut
through It only looks at the
destination MAC address in an ethernet frame and forward it. It is use in half
duplex , only receiving and sending , there is no CRC.
3. Fragment
free It is combination of store and
forward switch and cut through switch, it checks the first 64bytes for frame
fragmentation before forwarding the frame to the destination.
STP (Spanning
Tree Protocol)
STP is a layer 2
protocol use for loop avoidance in the switching process. STP select root
bridge by determining which switch has the bridge ID learn from sending and receiving BPDUs.
Bridge Protocol Data Unit is a STP initializing packet that is send at
different intervals for the purpose of exchanging information between the
different switches/bridges.
NOTE: MAC
address with minimum value will become Root bridge.
Functions of
STP:
1. Blocking
2. Listening
3. Learning
4. Forwarding
5. Loop
Avoidance
RSTP (Rapid STP)
RSTP is Cisco
enhancement to STP wihch ensures safe and quick transition to a forwarding
state and topology convergence by removing the overdependence of STP timers.
Functions of
RSTP:
1. Blocking
2. Learning
3. Forwarding
Etherchannel
It is a Cisco method
of bundling redundant links between switches to act as a single aggregated
link. this allows utilization of all the bandwidth because STP will treat the
link as a single interface in the case of link failure. . Etherchannel
automatically distributes the traffic load over the remaining links in
milliseconds.
VLAN (Virtual
LAN)
VLAN logically
divide a switch into multiple broadcast domains at layer 2. Each VLAN
represents a logical grouping of users by their function or departmentwise.
User from a VLAN cannot communicate with users of another VLAN without using
the Inter VLAN routing or without using Layer 3 device.
Inter VLAN
routing
It requires a
layer 3 device, the connection between the layer 3 device and the switch must
be atleast fastethernet speed and must be a trunk. The router interface
consists of subinterfaces to assign an IP Gateway for each VLAN. The VLAN is
associated with a subinterface using
dot1q encapsulation types.
Voice VLAN
Voice VLAN is
use to separate VOIP traffic from data on an access port for QOS and to manage
traffic.
Trunk
VLAN can span
multiple switches using trunk. Trunk
multiplex traffic from all VLANs over a
single connection. The VLAN identifier is tagged over the trunk using one of the following
tagging method:
1. IEEE802. 1q
It is standard based VLAN tagging that insert 4byte tag in the original
ethernet frame. Traffic originating from the native VLAN (by default VLAN 1) is
not tagged over the trunk. If native VLAN configuration does not match on both
sides , then this could cause VLAN leakage.
2. ISL (Inter
Switch Link) It is a Cisco proprietory trunk that encapsulates the original
ethernet frame with a 26byte header and
4 byte CRC. ISL is a single ethernet switch which can participate in multiple
VLANs.ISL also available on ethernet card, it allows a single ethernet card to have multiple logical
addresses that reflects the VLAN which it belongs.
VLAN process:
VLAN is a group
of switch ports which act as separate isolated LAN. Their can be several VLAN
on a single switch. VLAN can also have multiple switches. VLAN will never
encounter traffic or share bandwidth
from other VLAN unless the data is routed. Each port represent a single
collision domain and divide share bandwidth only with other device on the same
switch port unless the switch is segmented into VLANs. However, all the devices
in a switch re still in the single broadcast domain. All broadcast are sent to
each port through the switching. When we create VLAN, we are just creating
boundary for broadcast traffic.
Frame Tagging
It is possible
for a device to participate more than oneVLAN by using a special network card
which perform ISL.
Frame Tagging
Process
A frame enter
the switch, switch encapsulate the frame with a header that tags the frame with
VLAN ID. Any time a frame need to leave the switch for another, the tag frame
send throughout switching. When frame arrive to the destination switch, the tag
is stripped off from the frame and send to the destination device.
VTP (VLAN
Trunking Protocol)
Cisco created
VTP to minimize the amount of VLAN administration in switches by enabling a VTP serverto multicast VTP advertisements
to other switches in the same VTP domain. Switches receving the advertisements
syncronize their VLAN database with the VLAN information advertised from the
server assuming that the revision number is higher.
VTP has 4 modes:
1. VTP server
mode It is default VTP mode that enables
to create, modify and delete VLANs. These VLANs are advertised to other
switches and saved in the VLAN database.
2. VTP client
mode It cannot create , modify and delete VLANs, it forward advertisements
received from the VTP server but does not save the VLAN configuration in the
VLAN database.
3. VTP
transparent mode It create, modify and
delete VLAN only on local switch, it does not participate in VTP but forwards
VTP advertisements received from the VTPserver. It also save the VLAN
configuration in the
VLAN database.
VLAN database.
VTP pruning It increase available bandwidth by
restricting flooded traffic to those trunk links which traffic must use to access the appropriate
network devices.
NOTE:VTP is a
layer 2 messaging protocol which maintain VLAN configuration consistency
throughout a common administrative domain. VTP accomplishes this goal by managing
the addition, deletion and name change of VLAN accross network. VTP
advertisements are flooded throughout the management domain every 5 minutes or
whenever there is change in VLAN configuration.
Step to
configure VLAN:
Step1 Create VLAN
Step2 Give name to VLAN
Step3 Add desire interface in VLAN
Example of VLAN:
No comments:
Post a Comment