Archive | Switch RSS feed for this section

Layer-2 Switch

16 Jul

-> A switch uses layer two of the OSI model.
-> switch uses MAC addresses to send the packet to the correct device.
-> Rather than sending it to all ports a switch only sends the packet out one port, if it has the MAC address in its MAC address table. If not the switch will send the packet on all ports except for the port in which the packet was received on.
-> it uses switch table.
-> it segments collision domains.
-> it is faster than router in LAN

-> Switches provide separate collision domains on each port. This provides dedicated bandwidth to that device.
This also allows simultaneous conversations between devices on different ports. Each port can be operated at full-duplex so the device can send and receive information at the same time.
-> switches can operate in full duplex.
-> Each individual port on a switch belongs to its own collision domain. Thus, switches create more collision domains, which results in fewer collisions.

-> Layer-2 devices build hardware address tables, which will contain the following at a minimum:
• Hardware addresses for host devices
• The port each hardware address is associated with
-> The switch will build the MAC-address table by examining the source MAC address of each frame.

[H1]—-[SW]—-[H2]

Learning:
-> learning MAC address of LAN segment hosts.

Forwarding:
-> Relaying frames from one LAN segment to another segment.

Filtering:
-> sending frame which is sent from one LAN host to another LAN host on the same segment.

Aging:
-> If any LAN host is not in active, those entries will be deleted from database.

 

L2 switches Forwarding Methods:
—————————————-
-> LAN switches are characterized by the forwarding method that they support,
*store-and-forward switch
*cut-through switch :  no error checking is performed against the frame, which makes forwarding the frame through the switch faster than store-and-forward switches.
*fragment-free switch

Store-and-forward:
———————–
-> error checking is performed against the frame, and any frame with errors is discarded.
-> switch copies each complete frame into the switch memory buffers and computes a cyclic redundancy check (CRC) for errors to determine whether the received frame is errored before forwarding the frame to its destination. If a CRC error is found, the frame is discarded. If the frame is error free, the switch forwards the frame.
-> An Ethernet frame is discarded if it is smaller than 64 bytes in length, a runt, or if the frame is larger than 1518 bytes in length, a giant
-> Store-and-forward switch operation ensures a high level of error-free network traffic,because bad data frames are discarded rather than forwarded across the network
->  is best at the network access layer where most network problems and users are located.

-> This error checking results in high switch latency (delay). If multiple switches are connected, with the data being checked at each switch point, total network performance can suffer as a result.
-> requires more memory and processor (central processing unit, CPU) cycles to perform the detailed inspection of each frame.

cut-through switch:
———————–
-> no error checking is performed against the frame, which makes forwarding the frame through the switch faster than store-and-forward switches.
->  A cut-through switch reduces delay
->  copies into its memory only the destination MAC address.
-> looks up the destination MAC address in its switching table, determines the outgoing interface port, and forwards the frame on to its destination through the designated switch port.
->  leaving the error detection of the frame to the intended recipient
-> The switch pulls the frame header into its port buffer. When the destination MAC address is determined by the switch, the switch forwards the frame out the correct interface port to the frame’s intended destination.
-> it is best for the network core where errors are fewer, and speed is of utmost importance.

-> The destination receives this bad frame, checks the frame’s CRC, and discards it, forcing the source to resend the frame. This process wastes bandwidth and, if it occurs too often, network users experience a significant slowdown on the network.

Fragment-free switch
————————-
-> it is also known as runtless switching and is a hybrid of cut-through and store-and-forward switching.
-> it was developed to solve the late-collision problem.
-> fragment-free switching stores only the first 64 bytes of the frame is that most network errors and collisions occur during the first 64 bytes of a frame.

Term- Late collision:
————————
A late collision indicates that another system attempted to transmit after a host has transmitted at least the first 60 bytes of its frame. Late collisions are often caused by an Ethernet LAN being too large and therefore needing to be segmented. Late collisions can also be caused by faulty network devices on the segment and duplex (for example, half-duplex/full-duplex) mismatches between connected devices.