Top Banner
Basic Switch Concepts and Configuration LAN Switching and Wireless - Chapter 2 Dr. Naveen Chilamkurti
91
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Chapter 2 - Basic Switch Concepts.pptx

Basic Switch Concepts and Configuration

LAN Switching and Wireless - Chapter 2Dr. Naveen Chilamkurti

Page 2: Chapter 2 - Basic Switch Concepts.pptx

Topics

The operation of Ethernet as defined for 100/1000 Mbps LANs in the IEEE 802.3 standard.

The functions that enable a switch to forward Ethernet frames in a LAN.

Configure a switch for operation in a network designed to support voice, video, and data transmissions.

Configure basic security on a switch.

Page 3: Chapter 2 - Basic Switch Concepts.pptx

3

Media Access Control In Ethernet

Carrier Sense Multiple Access (CSMA) process Used to first detect if the media is carrying a signal If no carrier signal is detected, the device transmits its data If two devices transmit at the same time - data collision Jam Signal and Random Backoff time

Page 4: Chapter 2 - Basic Switch Concepts.pptx

4

CSMA/CD - The process

Step 2

Step 1

Page 5: Chapter 2 - Basic Switch Concepts.pptx

5

CSMA/CD - The process

Step 3

Step 4

Page 6: Chapter 2 - Basic Switch Concepts.pptx

6

CSMA/CD - The process

Step 5

Step 6

Page 7: Chapter 2 - Basic Switch Concepts.pptx

7

CSMA/CD - The process

Step 7

Step 8

Page 8: Chapter 2 - Basic Switch Concepts.pptx

8

CSMA/CD – Summary

Page 9: Chapter 2 - Basic Switch Concepts.pptx

No collisions

Fully switched network with full duplex operation = no collisions.

Higher bandwidth Ethernet does not define collisions – must be fully switched.

Cable length limited if CSMA/CD needed. Fibre optic – always fully switched, full duplex. (Shared medium must use half duplex in order to

detect collisions.)

Page 10: Chapter 2 - Basic Switch Concepts.pptx

Switch Port Settings

Auto (default for UTP) - negotiates half/full duplex with connected device.

Full – sets full-duplex mode Half - sets half-duplex mode Auto is fine if both devices are using it.

Potential problem if switch uses it and other device does not. Switch defaults to half.

Full one end and half the other – errors.

Page 11: Chapter 2 - Basic Switch Concepts.pptx

mdix auto

Command makes switch detect whether cable is straight through or crossover and compensate so you can use either.

Depends on IOS version Enabled by default from 12.2(18)SE on Disabled from 12.1(14)EA1 to 12.2(18)SE Not available in earlier versions

Page 12: Chapter 2 - Basic Switch Concepts.pptx

Communication types reminder

Unicast – to a single host address e.g. most user traffic: http, ftp, smtp etc.

Broadcast – addressed to all hosts on the network e.g. ARP requests.

Multicast – to a group of devices e.g. routers running EIGRP, group of hosts using videoconferencing. IP addresses have first octet in range 224 – 239.

Page 13: Chapter 2 - Basic Switch Concepts.pptx

13

Unicast MAC Address

Page 14: Chapter 2 - Basic Switch Concepts.pptx

14

Broadcast MAC Address

Page 15: Chapter 2 - Basic Switch Concepts.pptx

15

Multicast MAC Address

Multicast MAC address is a special value that begins with 01-00-5E in

hexadecimal

Range of IPV4 multicast addresses is 224.0.0.0 to 239.255.255.255

Page 16: Chapter 2 - Basic Switch Concepts.pptx

16

Ethernet Frame

The Ethernet frame structure adds headers and trailers around the Layer 3 PDU

There are two styles of Ethernet framing: IEEE 802.3 (original) and the revised IEEE 802.3 (Ethernet)

The differences between framing styles are minimal

Page 17: Chapter 2 - Basic Switch Concepts.pptx

17

IEEE 802.3 - original vs Ethernet

Page 18: Chapter 2 - Basic Switch Concepts.pptx

18

Ethernet Frame Fields

Preamble & Start Frame Delimiter: used for synchronization between the sending and receiving devices

Destination Address: Destination NIC interface MAC address. Why is the destination address is before the source address?

Source Address: Source NIC interface MAC address

Page 19: Chapter 2 - Basic Switch Concepts.pptx

19

Ethernet Frame Fields

Length/Type: Either a length or a type may be entered here. The length defines the exact length of the frame's data field. The Type field describes which protocol is implemented

Data and Pad Fields: contains the encapsulated data from a higher layer. All frames must be at least 64 bytes long. If a small packet is encapsulated, the Pad is used to increase the size of the frame to this minimum size

Page 20: Chapter 2 - Basic Switch Concepts.pptx

20

Ethernet Frame Fields

Frame Check Sequence Field: used to detect errors in a frame. It uses a cyclic redundancy check (CRC) The receiving device receives the frame and generates a

CRC If the calculations match, no error occurred.

Calculations that do not match are an indication that the data has changed; therefore, the frame is dropped

Page 21: Chapter 2 - Basic Switch Concepts.pptx

MAC address

48-bits written as 12 hexadecimal digits. Format varies:00-05-9A-3C-78-00, 00:05:9A:3C:78:00, or 0005.9A3C.7800.

MAC address can be permanently encoded into a ROM chip on a NIC - burned in address (BIA).

Some manufacturers allow the MAC address to be modified locally.

Page 22: Chapter 2 - Basic Switch Concepts.pptx

MAC address

Two parts: Organizational Unique Identifier (OUI) and number assigned by manufacturer.

MAC address

OUI Vendor number

1 bit 1 bit 22 bits 24 bits

Broadcast Local OUI number Vendor assigns

Set if broadcast or multicast

Page 23: Chapter 2 - Basic Switch Concepts.pptx

MAC address

Two parts: Organizational Unique Identifier (OUI) and number assigned by manufacturer.

MAC address

OUI Vendor number

1 bit 1 bit 22 bits 24 bits

Broadcast Local OUI number Vendor assigns

Set if vendor number can be changed

Page 24: Chapter 2 - Basic Switch Concepts.pptx

MAC address

Two parts: Organizational Unique Identifier (OUI) and number assigned by manufacturer.

MAC address

OUI Vendor number

1 bit 1 bit 22 bits 24 bits

Broadcast Local OUI number Vendor assigns

Allocated to vendor by IEEE

Page 25: Chapter 2 - Basic Switch Concepts.pptx

MAC address

Two parts: Organizational Unique Identifier (OUI) and number assigned by manufacturer.

MAC address

OUI Vendor number

1 bit 1 bit 22 bits 24 bits

Broadcast Local OUI number Vendor assigns

Unique identifier for port on device

Page 26: Chapter 2 - Basic Switch Concepts.pptx

Switch MAC Address Table

Table matches switch port with MAC address of attached device

Built by inspecting source MAC address of incoming frames

Destination MAC address checked against table, frame sent through correct port

If not in table, frame flooded Broadcasts flooded

Page 27: Chapter 2 - Basic Switch Concepts.pptx

Switch MAC Address Table

Page 28: Chapter 2 - Basic Switch Concepts.pptx

Switch MAC Address Table

Page 29: Chapter 2 - Basic Switch Concepts.pptx

Switch MAC Address Table

Page 30: Chapter 2 - Basic Switch Concepts.pptx

Switch MAC Address Table

Page 31: Chapter 2 - Basic Switch Concepts.pptx

Switch MAC Address Table

Page 32: Chapter 2 - Basic Switch Concepts.pptx

Switch MAC Address Table

Page 33: Chapter 2 - Basic Switch Concepts.pptx

33

Hubs and Switches

Page 34: Chapter 2 - Basic Switch Concepts.pptx

Collision domain

Shared medium – same collision domain. Collisions reduce throughput The more devices – the more collisions Hub – maybe 60% of bandwidth available Switch (+ full duplex) dedicated link each

way100% bandwidth in each directionLink regarded as an individual collision domain if you are asked to count them.

Page 35: Chapter 2 - Basic Switch Concepts.pptx

35

Hubs Limitations

Lack Of Scalability In a hub network, there is a limit to the amount of bandwidth that devices can

share. With each device added to the shared media, the average bandwidth available to each device decreases. With each increase in the number of devices on the media, performance is degraded.

Page 36: Chapter 2 - Basic Switch Concepts.pptx

36

Hubs Limitations (cont.) Increased Latency

Network latency is the amount of time it takes a signal to reach all destinations on the media. Each node in a hub-based network has to wait for an opportunity to transmit in order to avoid collisions. Latency can increase significantly as the distance between nodes is extended.

Page 37: Chapter 2 - Basic Switch Concepts.pptx

37

Hubs Limitations (cont.)

More Collisions According to CSMA/CD, A network with a larger number of nodes on the same

segment has a larger collision domain and typically has more traffic. As the amount of traffic in the network increases, the likelihood of collisions increases.

Page 38: Chapter 2 - Basic Switch Concepts.pptx

38

Ethernet – Using Switches

Page 39: Chapter 2 - Basic Switch Concepts.pptx

39

Hubs Limitations (cont.)

Network Failure Because classic Ethernet shares the media, any device in the

network could potentially cause problems for other devices. If any device connected to the hub generates detrimental traffic, the communication for all devices on the media could be impeded. This harmful traffic could be due to incorrect speed or full-duplex settings on a NIC.

Page 40: Chapter 2 - Basic Switch Concepts.pptx

40

Ethernet – Using Switches

In the last few years, switches have quickly become a fundamental part of most networks. Switches allow the segmentation of the LAN into separate collision domains. Each port of the switch represents a separate collision domain and provides the full media bandwidth to the node or nodes connected on that port.

Page 41: Chapter 2 - Basic Switch Concepts.pptx

41

Features of Switch-based LANs

In a LAN where all nodes are connected directly to the switch, the throughput of the network increases dramatically. The three primary reasons for this increase are:

Dedicated bandwidth to each port Collision-free environment Full-duplex operation

Page 42: Chapter 2 - Basic Switch Concepts.pptx

42

Features of Switch-based LANs

Dedicated bandwidth Each node has the full media bandwidth available in the

connection between the node and the switch. Because a hub replicates the signals it receives and sends them to all other ports, classic Ethernet hubs form a logical bus. This means that all the nodes have to share the same bandwidth of this bus. With switches, each device effectively has a dedicated point-to-point connection between the device and the switch, without media contention.

Page 43: Chapter 2 - Basic Switch Concepts.pptx

43

Features of Switch-based LANs

Dedicated Bandwidth

Page 44: Chapter 2 - Basic Switch Concepts.pptx

44

Features of Switch-based LANs

Collision-Free Environment A dedicated point-to-point connection to a switch also

removes any media contention between devices, allowing a node to operate with few or no collisions. This provides the switched network with significantly better throughput rates.

Page 45: Chapter 2 - Basic Switch Concepts.pptx

Collision domain

Collision-Free

Page 46: Chapter 2 - Basic Switch Concepts.pptx

46

Features of Switch-based LANs

Collision-Free

Page 47: Chapter 2 - Basic Switch Concepts.pptx

47

Features of Switch-based LANs

Full-Duplex Operation Switching also allows a network to operate as a full-duplex Ethernet

environment. Before switching existed, Ethernet was half-duplex only. This meant that at any given time, a node could either transmit or receive. With full-duplex enabled in a switched Ethernet network, the devices connected directly to the switch ports can transmit and receive simultaneously, at the full media bandwidth.

Page 48: Chapter 2 - Basic Switch Concepts.pptx

48

Features of Switch-based LANs

Full-Duplex

Page 49: Chapter 2 - Basic Switch Concepts.pptx

Uncontrolled Collision and Broadcast Domain

Page 50: Chapter 2 - Basic Switch Concepts.pptx

Uncontrolled Collision and Broadcast Domain

Page 51: Chapter 2 - Basic Switch Concepts.pptx

Controlled Collision and Broadcast Domain

Page 52: Chapter 2 - Basic Switch Concepts.pptx

Controlled Collision and Broadcast Domain

Page 53: Chapter 2 - Basic Switch Concepts.pptx

How many collision domains?

Page 54: Chapter 2 - Basic Switch Concepts.pptx

How many collision domains?

11

Page 55: Chapter 2 - Basic Switch Concepts.pptx

Broadcast domains

Layer 2 switches flood broadcasts. Devices linked by switches are in the same

broadcast domain. (We ignore VLANs here – they come later.) A layer 3 device (router) splits up broadcast

domains, does not forward broadcasts Destination MAC address for broadcast is

all 1s, that is FF:FF:FF:FF:FF:FF

Page 56: Chapter 2 - Basic Switch Concepts.pptx

How many broadcast domains?

No VLANs

Page 57: Chapter 2 - Basic Switch Concepts.pptx

How many broadcast domains?

Page 58: Chapter 2 - Basic Switch Concepts.pptx

Network Latency

NIC delay – time taken to put signal on medium and to interpret it on receipt.

Propagation delay – time spent travelling on medium

Latency from intermediate devices e.g. switch or router. Depends on number and type of devices. Routers add more latency than switches.

Page 59: Chapter 2 - Basic Switch Concepts.pptx

Network congestion

More powerful PCs can send and process more data at higher rates.

Increasing use of remote resources (servers, Internet) generates more traffic.

More broadcasts, more congestion. Applications make more use of advanced

graphics, video etc. Need more bandwidth. Splitting collision and broadcast domains helps.

Page 60: Chapter 2 - Basic Switch Concepts.pptx

Control latency

Choose switches that can process data fast enough for all ports to work simultaneously at full bandwidth.

Use switches rather than routers where possible.

But – balance this against need to split up broadcast domains.

Page 61: Chapter 2 - Basic Switch Concepts.pptx

Remove bottlenecks

Use a faster link. Have several links and use link aggregation so that they

act as one link with the combined bandwidth.

Page 62: Chapter 2 - Basic Switch Concepts.pptx

Layer 2 and Layer 3 Switching

Traditional Ethernet switches work at layer 2.

They use MAC addresses to make

forwarding decisions.

They do not look at layer 3 information.

Page 63: Chapter 2 - Basic Switch Concepts.pptx

Layer 2 and Layer 3 Switching

Layer 3 switches can carry out the same functions as layer 2

switches.

They can also use layer 3 IP addresses to route

between networks.

The can control the spread of broadcasts.

Page 64: Chapter 2 - Basic Switch Concepts.pptx

Switch CLI is similar to router

Switch>enable Switch#config t Switch(config)#int fa 0/1 Switch(config-if)#exit Switch(config)#line con 0 Switch(config-line)#end Switch#disable Switch>

Page 65: Chapter 2 - Basic Switch Concepts.pptx

Cisco Device manager

Built in web based GUI for managing switch.

Access via browser on PC.

Other GUI options available but need to be downloaded/bought.

Page 66: Chapter 2 - Basic Switch Concepts.pptx

Help, history etc.

Help with ? Is similar to router. Error messages for bad commands – same. Command history – as for router. Up arrow or Ctrl + P for previous Down arrow or Ctrl + N for next Each mode has its own buffer holding 10

commands by default.

Page 67: Chapter 2 - Basic Switch Concepts.pptx

Storage and start-up

ROM, Flash, NVRAM, RAM generally similar to router.

Boot loader, POST, load IOS from flash, load configuration file.

Similar idea to router. Some difference in detail.

Boot loader lets you re-install IOS or recover from password loss.

Page 68: Chapter 2 - Basic Switch Concepts.pptx

Password recovery (2950)

Hold down mode switch during start-up flash_init load_helper dir flash: rename flash:config.text flash:config.old boot Continue with the configuration dialog? [yes/no] : N rename flash:config.old flash:config.text copy flash:config.text system:running-config Configure new passwords

Page 69: Chapter 2 - Basic Switch Concepts.pptx

IP address

A switch works without an IP address or any other configuration that you give it.

IP address lets you access the switch remotely by Telnet, SSH or browser.

Switch needs only one IP address. It goes on a virtual (VLAN) interface. VLAN 1 is the default but is not very secure

for management.

Page 70: Chapter 2 - Basic Switch Concepts.pptx

IP address

S1(config)#int vlan 99 ( or another VLAN) S1(config-if)#ip address 192.168.1.2

255.255.255.0 S1(config-if)#no shutdown S1(config-if)#exit All very well, but by default all the ports are

associated with VLAN 1. VLAN 99 needs to have a port to use.

Page 71: Chapter 2 - Basic Switch Concepts.pptx

IP address

S1(config)#int fa 0/18 (or other interface) S1(config-if)#switchport mode access S1(config-if)#switchport access vlan 99 S1(config-if)#exit S1(config)# Messages to and from the switch IP address

can pass via port fa 0/18. Other ports could be added if necessary.

Page 72: Chapter 2 - Basic Switch Concepts.pptx

Default gateway

S1(config)#ip default-gateway 192.168.1.1

Just like a PC, the switch needs to know the address of its local router to exchange messages with other networks.

Note global configuration mode.

Page 73: Chapter 2 - Basic Switch Concepts.pptx

Web based GUI

SW1(config)#ip http server SW1(config)#ip http authentication enable (uses enable secret/password for access) SW1(config)#ip http authentication local SW1(config)#username admin password

cisco (log in using this username and password)

Page 74: Chapter 2 - Basic Switch Concepts.pptx

MAC address table (CAM)

Static:Inbuilt or configured, do not time out.

Dynamic:Learned,Time out300 sec.

Note that VLAN is included in table.

Page 75: Chapter 2 - Basic Switch Concepts.pptx

Set a static address

SW1(config)#mac-address-table static 000c.7671.10b4 vlan 2 interface fa0/6

Page 76: Chapter 2 - Basic Switch Concepts.pptx

Save configuration

Copy run start Copy running-config startup-config This assumes that running-config is coming

from RAM and startup-config is going in NVRAM (file is actually in flash).

Full version gives path. Copy system:running-config flash:startup-

config

Page 77: Chapter 2 - Basic Switch Concepts.pptx

Back up

copy startup-config flash:backupJan08 You could go back to this version later if

necessary. copy system:running-config

tftp://192.168.1.8/sw1config copy nvram:startup-config

tftp://192.168.1.8/sw1config (or try copy run tftp and wait for prompts)

Page 78: Chapter 2 - Basic Switch Concepts.pptx

Login Passwords

Line con 0Password ciscoLoginLine vty 0 15Password ciscoLogin

Service password-encryptionLine con 0

Password 7 030752180500Login

Line vty 0 15Password 7 1511021f0725

Login

Page 79: Chapter 2 - Basic Switch Concepts.pptx

Banners

banner motd “Shut down 5pm Friday” banner login “No unauthorised access” Motd will show first. Delimiter can be “ or # or any character not in

message.

Page 80: Chapter 2 - Basic Switch Concepts.pptx

Secure Shell SSH

Similar interface to Telnet. Encrypts data for transmission. SW1(config)#line vty 0 15 SW1(config-line)#transport input SSH Use SSH or telnet or all if you want both. Default is telnet. For SSH you must configure host domain and

generate RSA key pair.

Page 81: Chapter 2 - Basic Switch Concepts.pptx

Common security attacks

MAC Address Flooding: send huge numbers of frames with fake source MAC addresses and fill up MAC address table. Switch then floods all frames.

DHCP spoofing: rogue server allocates fake IP address and default gateway, all remote traffic sent to attacker. (Use DHCP snooping feature to mark ports as trustworthy or not.)

Page 82: Chapter 2 - Basic Switch Concepts.pptx

Cisco Discovery Protocol

CDP is enabled by default. Switch it off unless it is really needed. It is a security risk. Frames could be captured

using Wireshark (or the older Ethereal).

Page 83: Chapter 2 - Basic Switch Concepts.pptx

More security

Use strong passwords. Even these can be found in time so change

them regularly. Using access control lists (semester 4) you can

control which devices are able to access vty lines.

Network security tools for audits and penetration testing.

Page 84: Chapter 2 - Basic Switch Concepts.pptx

Port security

Configure each port to accept One MAC address only A small group of MAC addresses

Frames from other MAC addresses are not forwarded.

By default, the port will shut down if the wrong device connects. It has to be brought up again manually.

Page 85: Chapter 2 - Basic Switch Concepts.pptx

Static secure MAC address

Static secure MAC addresses: Manually configured in interface config mode switchport port-security mac-address

000c.7259.0a63 interface fa 0/4 Stored in MAC address table In running configuration Can be saved with the rest of the

configuration.

Page 86: Chapter 2 - Basic Switch Concepts.pptx

Dynamic secure MAC address

Learned dynamically Default – learn one address. Put in MAC address table Not in running configuration Not saved, not there when switch restarts. SW1(config-if)#switchport mode access SW1(config-if)#switchport port-security

Page 87: Chapter 2 - Basic Switch Concepts.pptx

Sticky secure MAC address

Dynamically learned Choose how many can be learned, default 1. Put in running configuration Saved if you save running configuration and

still there when switch restarts. Existing dynamic address(es) will convert to

sticky if you enable sticky learning.

Page 88: Chapter 2 - Basic Switch Concepts.pptx

Sticky secure MAC address

SW1(config-if)#switchport mode access SW1(config-if)#switchport port-security SW1(config-if)#switchport port-security

maximum 4 SW1(config-if)#switchport port-security

mac-address sticky

Page 89: Chapter 2 - Basic Switch Concepts.pptx

Violation modes

Violation occurs if a device with the wrong MAC address attempts to connect.

Shutdown mode is default. Protect mode just prevents traffic. Restrict mode sends error message to network

management software. (I think these last two are the right way

round…)

Page 90: Chapter 2 - Basic Switch Concepts.pptx

Check port security

show port-security int fa 0/4to see settings on a particular port

Show port-security addressto see the table of secure MAC addresses

If you don’t need to use a port:shutdown

Page 91: Chapter 2 - Basic Switch Concepts.pptx

Interface range

Switch(config)#interface range fa0/1 - 20 Switch(config-if-range)#

A useful command if you want to put the same configuration on several interfaces.