Switching Basiccs

SWITCHING BASICS

INFT 3019 – Network Architecture

Ms. Ellie Parker – Ellie.Parker@unisa.edu.au

Objectives

• Understand how switches forward and what different

types of forwarding are available.

• Know the different types of switches available.

• Know the advantages of SSH over Telnet.

Frame Forwarding Process

Switching in Networking

• A Switch receives frames into an interface (ingress). A switch then sends the

frames to another interface and exits the interface (egress).

• A switch will never allow traffic to be forwarded out the interface it received the

traffic on.

• A switch knows where to forward a frame based on the ingress interface and the

destination MAC address.

• A switch uses its MAC address table to determine where to send frames.

Switch MAC Address Table

• A Switch must learn what the MAC addresses

are on its interfaces.

• It does this by looking at the frames travelling

through it to identify what source MAC address is

at what interface.

• These MAC addresses are stored in the Content

Addressable Memory (CAM) table (also known

as the MAC address table).

Two Step Process

• Step 1: Learn – Examine Source Address

• Add to table if not already present.

• Reset the time out setting back to 5 minutes

if in the table.

• Step 2: Forward – Examine Destination Address

• If destination MAC is in the table send

directly to the specified port.

• Otherwise; flood frame out all interfaces

except the one it was received.

Switch Forwarding Methods

• Switches use software on application-specific-integrated circuits (ASICs) to

make forwarding decisions.

• Switches will use one of two methods: store-and-forward or cut-through

switching when forwarding frames.

• Store-and-forward switching

• Receives the entire frame and checks the frame check sequence (FCS)

matches before forwarding. Preferred by Cisco.

• Cut-through switching

• Receives up to the end of the destination MAC address before forwarding.

Store-and-Forward

• Checks for errors – FCS will

be checked and bad frames

discarded.

• Allows for buffering –

important when the ingress

and egress port speeds differ.

Cut-Through

• Fast-forward: forwards frame

immediately after reading

destination MAC address.

• Fragment (frag) Free: will check

destination and ensure that the

frame is at least 64 bytes

(eliminating runts).

• Use when:

• <10 microsec latency required

• Port speeds are same

• Does not check FCS, leading to

propagation of errors, consuming

bandwidth.

Switch Basics

Collision Domains

• A network segment where devices must compete to send/receive data.

• Hubs suffer from issues with collision domains because the entire hub is a

single collision domain.

• Switches mitigate this by placing each port in its own collision domain.

• Switches are preferred because they break the segment into smaller collision

domains, easing competition to communicate.

Broadcast Domains

• A broadcast domain is the extent of the network where a broadcast frame can

be heard.

• Are processed by all devices in the broadcast domain.

• Switches forward broadcast frames to all ports, except the incoming port.

• Switches do not, by default, break broadcast domains.

• Routers do not forward broadcast frames.

Duplex Communication

• Full-duplex: both devices can send and receive at the same time.

• Half-duplex: one device can send or receive at a time.

• Duplex mismatch is a very common issue. Ensure both are the same duplex.

Auto-MDIX

• Automatic Medium-Dependent Interface Crossover (auto-MDIX).

• Eliminates the need to use crossover or straight-through cables depending on

the interconnecting devices.

• Most switch devices support auto-MDIX and configure the interface

appropriately when a cable is connected.

• Enabled by default on switches running IOS 12.2(18)SE or later. The feature

could be disabled so using the correct cable is always a wise choice.

• Can re-enable with the use of the mdix auto interface config command.

• You will still require a crossover connection between a router and a host.

Switch Boot Sequence

• Step 1: Switch loads a power-on self-test (POST) program stored in ROM,

POST checks the CPU, DRAM and the portion of the flash device that makes up

the flash file system structure.

• Step 2: Loads boot loader software. The boot loader is stored in ROM that is

run immediately after a successful POST.

• Step 3: Boot loader performs low-level CPU initialisation (registers) which

control where physical memory is mapped and the quantity and speed of

memory.

• Step 4: Boot loader initialises the flash file system on the system board.

• Step 5: Boot loader locates (from the BOOT variable) and loads a default IOS

operating system software image into memory and gives control of the switch to

the IOS.

Switch Boot Sequence

• In the case when the BOOT environment variable is not set, the switch will

attempt to load the first executable file it can find on the flash.

• The IOS operating system will initialise the interfaces using the commands

found in the startup-config. The startup-config file is named differently on the

flash: config.text.

• You can change the boot environment variable using the boot system

command. This is useful when booting a specific IOS version, or booting from

an alternative device (USB).

• boot system path_to_file is the global configuration command to change the

environment variable. An example is displayed below.

Switch LED Indicators

• Switches have a variety of indicators on both the ports and on the side

near the mode button.

• System (SYST): Whether the system is receiving power and

functioning properly.

• Redundant Power Supply (RPS): Shows the RPS status.

• Port Status (STAT): Green indicates port status mode is selected,

which is the default. Status can then be understood by the light

associated with each port.

• Port Duplex (DUPLX): Green indicates port duplex mode is selected.

Duplex can then be understood by the light associated with each port.

• Port Speed (SPEED): Exactly the same as DUPLX except for speed

instead.

• Power over Ethernet (PoE): Present if the switch supports PoE.

Indicates the PoE status of ports on the switch.

• The Mode button is used to move between STAT, DUPLX, SPEED

and PoE, changing the port LED meaning.

Accessing the Boot Loader CLI (After a System Crash)

• The boot loader CLI provides access to the files stored on the flash memory and

has many useful commands to format, reinstall an operating system, recover

passwords and more.

• Step 1: Connect a computer to the switch console port. Ensure terminal

emulation software (PuTTy, TeraTerm) is ready.

• Step 2: Unplug the switch power cord (most switches do not have power

switches on them).

• Step 3: Reconnect the power cord to the switch and within 15 seconds press

and hold down the Mode button while the SYS LED is still flashing green.

• Step 4: Continue pressing the Mode button until the SYS LED turns briefly

amber and then solid green. Release the Mode button.

• Step 5: In your terminal emulation software you should see the switch: prompt.

Switch Form Factors

Fixed Platform

• Features and options are

limited to how it is

manufactured.

• No additional changes can be

made to the switch.

Modular Platform

• Line cards are used to

increase the amount of ports.

• Same concept as PCIe slots

on a PC motherboard.

Stackable Platform

• Connected together using a

special cable.

• Appear as one switch

logically.

• Improves fault tolerance and

bandwidth availability.

• Utilise Cisco StackWise

technology.

Business Considerations for Switch Selection

Consideration Description

Cost The cost of a switch will depend on the number and speed of the interfaces,

supported features, and expansion capability.

Port density Network switches must support the appropriate number of devices on the

network.

Power

It is now common to power access points, IP phones, and compact switches

user Power over Ethernet (PoE).

In addition to PoE considerations, some chassis-based switches support

redundant power supplies.

Reliability The switch should provide continuous access to the network.

Port speed The speed of the network connection is of primary concern to end users.

Frame buffers The ability of the switch to store frames is important in a network where there

may be congested ports to servers or other areas of the network.

Scalability The number of users on a network typically grows over time; therefore, the

switch should provide the opportunity for growth.

Multilayer Switches

• Deployed in the core/distribution layers of network.

• Support some routing protocols and forward IP packets similar to a router.

• Does not use CPU to forward IP packets, instead uses ASICs.

• Allows for a more available, scalable and fault tolerant network through the use

of First Hop Redundancy Protocols (FHRP).

Switch Management

Preparing for Basic Switch Management

• Remote management of a switch must be manually configured.

• IP address and subnet mask must be configured on the SVI.

• If management occurs from a remote network (the Internet), a default gateway

must be configured.

• Layer 2 switches can have an IP address and default gateway but will not route

Layer 3 packets.

Managing Devices via Secure Shell

• Secure Shell (SSH) provides a secure (encrypted), command-line based

connection a remote device.

• Very common on UNIX-based systems.

• Certain IOS software features (cryptography) are required to enable SSH on

switches.

• SSH uses TCP port 22 by default. Telnet uses TCP port 23.

• Telnet should never be used for management connections. It is not secure or

encrypted.

Managing Devices via Secure Shell

• Requires the following to be configured for it to work correctly:

• An IP domain name set,

• A user account created,

• An RSA cryptography key generated,

• Input method set to S