Showing posts with label Switching. Show all posts
Showing posts with label Switching. Show all posts

Wednesday, 8 March 2023

MAC Address Basics

Each of a hosts network interfaces has a link layer MAC address that distinguishes it from other machines on the physical network. IP addresses are assigned to network interfaces and not machines. A mac address is made up of 48 bits or 6 bytes and is split into two parts. The first 3 bytes identify the manufacturer and the last 3 bytes are a unique serial number, so in this example the green sections are the vendor id and the black section is the interfaces unique number 32-03-C8-73-DC-A1. This is important for network engineers in spotting devices or vendors that are causing havoc on the network. 

Broadcasting

Broadcasting is a send once to all method of communication. A MAC address needs to be assigned to a broadcast frame. This address is made up of all binary 1s and when converted to hexadecimal gives you FF:FF:FF:FF:FF:FF

Multicasting

Multicasting works similar to broadcasting, but instead of sending data to all it sends it to a targeted group, often called one to many transmission. Common applications that use multicasting are streaming channels like Twitch and Youtube live. To avoid collisions when an ethernet switch receives a multicast frame it floods it out of all ports except the incoming port.

MAC address tabling

A switch stores mac addresses in a table. This table is called a mac address table or a content addressable memory (CAM table).  A switch stores information about other ethernet interfaces which are connected on the network. When a switch receives a frame it correlates the device sending with interface where it was received. 

A MAC address table maps each and every port to a MAC address and it does this in two ways;

Static - Have higher priority than dynamic as they can be added, removed or changed by an administrator

Dynamic - Added to the table automatically by a process called MAC learning. Once a switch receives a frame it automatically updates it mac address information. There is a brief video below showing how a mac address table works in practice. 



Tuesday, 28 February 2023

Ether channels - Cisco Switching PAgP, LACP

Ether channels

The ability to configure multiple physical links into one logical link is called an ether channel. Ether channels are a link aggregation technology and are also referred to a as port channel architecture. Once the ether channel has been configured the resulting virtual interface is called a port channel. The benefits of this are we can combine physical links to combine bandwidth, logically speaking two 100Mbps links combine into a 200Mbps link. An ether channel provides redundancy, if one port fails the other one is still active. An ether channel must be between 2 and 8 physical links

Below we will configure an ether channel in Cisco Packet tracer;



Link Aggregation Control Protocol (LACP)

LACP is an open standard which can be used by most vendors. Switch ports can form an ether channel in different LACP modes following the below criteria; 

-A port in the active mode can form an Ether Channel with another port that is in the active or passive mode.
-A port in the passive mode cannot form an Ether Channel with another port that is also in the passive mode because neither port starts LACP negotiation.

A port in active mode negotiates with the other side to form the Ether channel. The interface in passive mode indicates using LACP, but responds to requests only and does not send any requests.

LACP negotiation modes for channel establishment


LACP configurations;



Here are the configurations for LACP notice the mode is set to active. On a second switch the command are the same just replace active with passive.



Manual On Ether Channel mode

When using manual on mode an ether channel will be created only when another interface is using manual on mode. They forcefully form an ether channel without negotiation. 


Port aggregation protocol (PAgP)

PAgP is a Cisco proprietary ether channel technology. Switch Ports can form an Ether Channel when they are in different PAgP modes as per below criteria;

-A port in the desirable mode can form an Ether Channel with another port that is in the desirable or auto mode.
-A port in the auto mode can form an Ether Channel with another port in the desirable mode.

The port in desirable mode is one which sends requests to the other side to see if it is also using PAgP. The port in auto mode defines using PAgP but does not send requests. 

PAgP negotiation modes for channel establishment






PAgp configurations

Notice here we don't need to specify the protocol as this is default on Cisco switches. On another switch the mode would be set to auto





Thursday, 9 February 2023

Switch basics

A network switch is a layer 2 device that uses mac address to forward data frames to the layer 3 routing device. These MAC addresses are stored in a MAC address table. A MAC address table can be configured statically and those MAC addresses take priority over the more common dynamic allocations. What a mac address table does is store information about connected devices so it can efficiently switch frames between interfaces. 


Store and Forward Switching vs Cut through switching

When it comes to networking, switches play a crucial role in ensuring the smooth flow of data and efficient communication between devices. Two of the most commonly used switching techniques are Store and Forward and Cut-Through. Both techniques have their pros and cons, and it's essential to understand the differences between them to make informed decisions about the most appropriate method to use in a given scenario.

Store and Forward Switching

In Store and Forward switching, the entire frame of data is received by the switch before it's forwarded to its intended destination. The switch waits until it has received the entire frame before it begins to analyze and verify the frame's header information, including the checksum, error detection, and correction. Once the switch verifies that the frame is error-free, it forwards the frame to its intended destination. This approach to switching is called "store and forward" because the switch stores the entire frame before forwarding it.

Pros:

  • Improved error detection: The Store and Forward technique is known for its ability to detect errors in data frames, including corrupted or damaged frames. Since the switch waits until it has received the entire frame before analyzing it, it can effectively detect errors and prevent them from being forwarded to their intended destinations.

  • Reduced latency: By verifying the frame's header information before forwarding it, the switch can ensure that only error-free frames are forwarded, reducing the latency of data transmission.

Cons:

  • Increased latency: Although the Store and Forward technique reduces latency by preventing error-prone frames from being transmitted, it also increases latency as the switch waits to receive the entire frame before forwarding it. This increase in latency can be significant in high-speed networks, where the speed of data transmission is critical.

  • Reduced throughput: The Store and Forward technique can also reduce network throughput as the switch waits to receive the entire frame before forwarding it. This reduction in throughput can be particularly problematic in high-speed networks where a large amount of data is being transmitted.

Cut-Through Switching

Cut-Through switching, on the other hand, is a switching technique where the switch starts forwarding the data frame as soon as it receives the destination address. The switch does not wait to receive the entire frame or verify its header information before forwarding it.

Pros:

  • Reduced latency: Cut-Through switching reduces latency by forwarding the data frame as soon as the switch receives the destination address, eliminating the wait time required by the Store and Forward technique.

  • Improved throughput: Cut-Through switching also improves network throughput by forwarding the data frame as soon as the switch receives the destination address, reducing the wait time required by the Store and Forward technique.

Cons:

  • Poor error detection: Cut-Through switching is not as effective as Store and Forward in detecting errors in data frames, including corrupted or damaged frames. Since the switch does not wait to receive the entire frame before forwarding it, it cannot effectively detect errors, leading to the potential for errors to be transmitted to their intended destinations.

  • Increased errors: Since the Cut-Through technique does not verify the header information of the frame before forwarding it, it increases the likelihood of errors in the transmitted data.

Initial Switch Configuration


When a switch is powered on it will run a POST much like any other computer. It will attempt to boot using information in the boot environment variable. If this is not set it will boot the first executable it can find. In Cisco IOS, it will initialise the configurations found in the startup-config-file ; config.text

As we have previously learned the running configuration needs to be saved to the NVRam or all changes made will be lost. To do this and save our configuration to the config.text file we follow the commands below and press enter after the ? ; 


You can enter the show boot command to see what the current ios boot file is set too;





If you wanted to boot the system from a pre determined file you can use the boot system command within global configuration mode follow by flash and the file name for example;  (FOC.bin is a predetermined boot file)



Cisco Switch LED Indicators

System LED (SYST): Shows whether the system is receiving power and functioning properly. 
Redundant Power Supply LED (RPS): Shows the RPS status. Port Status LED (STAT): When green, indicates port status mode is selected, which is the default. Port status can then be understood by the light associated with each port. 
Port Duplex LED (DUPLX): When green, indicates port duplex mode is selected. Port duplex can then be understood by the light associated with each port. 
Port Speed LED (SPEED): When green, indicates port speed mode is selected. Port speed can then be understood by the light associated with each port. 
Power over Ethernet LED (PoE): Present if the switch supports PoE. Indicates the PoE status of ports on the switch. 
The Mode button is used to move between the different modes – STAT, DUPLX, SPEED, and PoE 

Fast switching vs Process switching

Process Switching: Process switching is the traditional method of packet forwarding used in early routers. When a packet arrives at a router...