CIS 82 Routing Protocols and Concepts Chapter 2 Switching Concepts and Configuration
CIS 82 Routing Protocols and Concepts Chapter 2 Switching Concepts and Configuration
CIS 82 Routing Protocols and Concepts Chapter 2 Switching Concepts and Configuration
Spring 2016
Chapter 2: Objectives
2
Review: Layer 2 switch
Ethernet
Ethernet
Layer 2 – Data Link Layer
NIC (Source MAC address) to NIC (Destination
MAC address) communications in the same
network
Source MAC address – Address of the
sender’s NIC
Destination MAC address
Unicast: MAC address of destination NIC
on the same network
Broadcast: All 1 bits (F’s)
4
Hubs
Legacy
Layer 1 devices
Multi-port repeaters
Shared bandwidth Collision
Based on legacy
bus topology
CSMA/CD
Single collision
domain
Sending host
Receiving host 5
Switches
Layer 2 devices
Also operates at layer 1
Full duplex
Dedicated bandwidth
6
Mac Address Table
1.Learn – Examine Source MAC
Forwarding Frames address
In table: Reset 5 min timer
Unicast Not in table: Add Source MAC
address and port # to table
BBBB AAAA
2.Forward – Examine
Destination MAC address
In table: Forward out that port.
Mac Address Table Not in table: Flood out all ports
Port MAC Address except incoming port.
1 AAAA
Unknown Unicast
1 2
AAAA BBBB
7
Mac Address Table
1.Learn – Examine Source MAC
Forwarding Frames address
In table: Reset 5 min timer
Unicast Not in table: Add Source MAC
address and port # to table
AAAA BBBB
2.Forward – Examine
Destination MAC address
In table: Forward out that port.
Mac Address Table Not in table: Flood out all ports
Port MAC Address except incoming port.
1 AAAA
2 BBBB
1 2
AAAA BBBB
8
Mac Address Table
1.Learn – Examine Source MAC
Forwarding Frames address
In table: Reset 5 min timer
Unicast Not in table: Add Source MAC
address and port # to table
BBBB AAAA
2.Forward – Examine
Destination MAC address
In table: Forward out that port.
Mac Address Table Not in table: Flood out all ports
Port MAC Address except incoming port.
1 AAAA
2 BBBB
1 2
AAAA BBBB
9
Mac Address Table
1.Learn – Examine Source MAC
Forwarding Frames address
In table: Reset 5 min timer
Broadcast Not in table: Add Source MAC
address and port # to table
FFFF AAAA
2.Forward – Examine
Destination MAC address
In table: Forward out that port.
Mac Address Table Not in table: Flood out all ports
Port MAC Address except incoming port.
1 AAAA
2 BBBB
Broadcast
Domain
1 2
AAAA BBBB
10
5.2.1.4 - MAC
Address Tables
on Connected
Switches
S1 MAC Address Table S2 MAC Address Table
Port MAC Address Port MAC Address
Internet
S1 1 2 3 4 S2 1 2 3 4 1 Router
2
MAC
00-0D
A B C
S1 1 2 3 4 S2 1 2 3 4 1 Router
2
MAC
00-0D
A B C
S1 1 2 3 4 S2 1 2 3 4 1 Router
2
MAC
00-0D
A B C
S1 1 2 3 4 S2 1 2 3 4 1 Router
2
MAC
00-0D
A B C
S1 1 2 3 4 S2 1 2 3 4 1 Router
2
MAC
00-0D
A B C
S1 1 2 3 4 S2 1 2 3 4 1 Router
2
MAC
00-0D
A B C
S1 1 2 3 4 S2 1 2 3 4 1 Router
2
A B C
X MAC
00-0D
S1 1 2 3 4 S2 1 2 3 4 1 Router
2
MAC
00-0D
A B C
S1 1 2 3 4 S2 1 2 3 4 1 Router
2
MAC
00-0D
A B C
S1 1 2 3 4 S2 1 2 3 4 1 Router
2
MAC
00-0D
A B C
S1 1 2 3 4 S2 1 2 3 4 1 Router
2
MAC
00-0D
A B C
S1 1 2 3 4 S2 1 2 3 4 1 Router
2
MAC
00-0D
A B C
S1 1 2 3 4 S2 1 2 3 4 1 Router
2
MAC
00-0D
A B C
S1 1 2 3 4 S2 1 2 3 4 1 Router
2
MAC
00-0D
A B C
X
MAC MAC MAC
00-0A 00-0B 00-0C
S1 1 2 3 4 S2 1 2 3 4 1 Router
2
MAC
00-0D
A B C
X
MAC MAC MAC
00-0A 00-0B 00-0C
S1 1 2 3 4 S2 1 2 3 4 1 Router
2
MAC
00-0D
A B C
X
MAC MAC MAC
00-0A 00-0B 00-0C
S1 1 2 3 4 S2 1 2 3 4 1 Router
2
MAC
00-0D
A B C
X X
MAC MAC MAC
00-0A 00-0B 00-0C
S1 1 2 3 4 S2 1 2 3 4 1 Router
2
MAC
00-0D
A B C
S1 1 2 3 4 S2 1 2 3 4 1 Router
2
MAC
00-0D
A B C
S1 1 2 3 4 S2 1 2 3 4 1 Router
2
MAC
00-0D
A B C
S1 1 2 3 4 S2 1 2 3 4 1 Router
2
MAC
00-0D
A B C
S1 1 2 3 4 S2 1 2 3 4 1 Router
2
MAC
00-0D
A B C
A C
192.168.1.50
192.168.1.110
MAC 00-0C
MAC 00-0A 192.168.1.1
MAC 00-0D
Internet
R1
A C
192.168.1.50
192.168.1.110
MAC 00-0C
MAC 00-0A 192.168.1.1
MAC 00-0D
Internet
R1
A C
192.168.1.50
192.168.1.110
MAC 00-0C
MAC 00-0A 192.168.1.1
MAC 00-0D
Internet
R1
Ethernet Header ARP Request
Destination MAC Source MAC Target IPv4 Target MAC
FF-FF 00-0A 192.168.1.50 ???
Ethernet Header IP Packet
On Destination MAC Source MAC Source IP Destination IP
Hold ??? 00-0A 192.168.1.110 192.168.1.50
192.168.1.120
B MAC 00-0B
PC-A’s ARP Cache
IPv4 Address MAC Address
A C
192.168.1.50
192.168.1.110
MAC 00-0C
MAC 00-0A 192.168.1.1
MAC 00-0D
Internet
R1
Ethernet Header ARP Request
Destination MAC Source MAC Target IPv4 Target MAC
FF-FF 00-0A 192.168.1.50 ???
Ethernet Header IP Packet
On Destination MAC Source MAC Source IP Destination IP
Hold ??? 00-0A 192.168.1.110 192.168.1.50
The target IPv4 is not me.
192.168.1.120
B MAC 00-0B
PC-A’s ARP Cache
IPv4 Address MAC Address
A C
192.168.1.50
192.168.1.110
MAC 00-0C
MAC 00-0A 192.168.1.1
MAC 00-0D
Internet
R1
Ethernet Header ARP Request
Destination MAC Source MAC Target IPv4 Target MAC
FF-FF 00-0A 192.168.1.50 ???
Ethernet Header IP Packet
On Destination MAC Source MAC Source IP Destination IP
Hold ??? 00-0A 192.168.1.110 192.168.1.50
192.168.1.120
B MAC 00-0B
PC-A’s ARP Cache
IPv4 Address MAC Address
A C
192.168.1.50
192.168.1.110
MAC 00-0C
MAC 00-0A 192.168.1.1
MAC 00-0D
A C
192.168.1.50
192.168.1.110
MAC 00-0C
MAC 00-0A 192.168.1.1
MAC 00-0D
Internet
R1
Ethernet Header ARP Request
Destination MAC Source MAC Target IPv4 Target MAC
FF-FF 00-0A 192.168.1.50 ???
Ethernet Header IP Packet
On Destination MAC Source MAC Source IP Destination IP
Hold ??? 00-0A 192.168.1.110 192.168.1.50
5.3.2.4 - ARP
Operation - ARP
Reply
192.168.1.120
B MAC 00-0B
PC-A’s ARP Cache The target IPv4 is me!
IPv4 Address MAC Address
A C
192.168.1.50
192.168.1.110
MAC 00-0C
MAC 00-0A 192.168.1.1
MAC 00-0D
Internet
R1
Ethernet Header ARP Request
Destination MAC Source MAC Target IPv4 Target MAC
FF-FF 00-0A 192.168.1.50 ???
Ethernet Header IP Packet
On Destination MAC Source MAC Source IP Destination IP
Hold ??? 00-0A 192.168.1.110 192.168.1.50
192.168.1.120
Here is my MAC
B MAC 00-0B address for the IPv4
PC-A’s ARP Cache address you were
IPv4 Address MAC Address looking for!
A C
192.168.1.50
192.168.1.110
MAC 00-0C
MAC 00-0A 192.168.1.1
MAC 00-0D
Internet
R1
Ethernet Header ARP Reply
Destination MAC Source MAC Sender IPv4 Sender MAC
00-0A 00-0C 192.168.1.50 00-0C
Ethernet Header IP Packet
On Destination MAC Source MAC Source IP Destination IP
Hold ??? 00-0A 192.168.1.110 192.168.1.50
192.168.1.120
Here is my MAC
B MAC 00-0B address for the IPv4
PC-A’s ARP Cache address you were
IPv4 Address MAC Address looking for!
A C
192.168.1.50
192.168.1.110
MAC 00-0C
MAC 00-0A 192.168.1.1
MAC 00-0D
Internet
R1
Ethernet Header ARP Reply
Destination MAC Source MAC Sender IPv4 Sender MAC
00-0A 00-0C 192.168.1.50 00-0C
Ethernet Header IP Packet
On Destination MAC Source MAC Source IP Destination IP
Hold ??? 00-0A 192.168.1.110 192.168.1.50
192.168.1.120
B MAC 00-0B
PC-A’s ARP Cache
IPv4 Address MAC Address
192.168.1.50 00-0C
A C
192.168.1.50
192.168.1.110
MAC 00-0C
MAC 00-0A 192.168.1.1
MAC 00-0D
Internet
R1
Ethernet Header ARP Reply
Destination MAC Source MAC Sender IPv4 Sender MAC
00-0A 00-0C 192.168.1.50 00-0C
Ethernet Header IP Packet
On Destination MAC Source MAC Source IP Destination IP
Hold ??? 00-0A 192.168.1.110 192.168.1.50
192.168.1.120
B MAC 00-0B
PC-A’s ARP Cache
IPv4 Address MAC Address
192.168.1.50 00-0C
A C
192.168.1.50
192.168.1.110
MAC 00-0C
MAC 00-0A 192.168.1.1
MAC 00-0D
Internet
R1
A C
192.168.1.50
192.168.1.110
MAC 00-0C
MAC 00-0A 192.168.1.1
MAC 00-0D
Internet
R1
A C
192.168.1.50
192.168.1.110
MAC 00-0C
MAC 00-0A 192.168.1.1
Default Gateway: 192.168.1.1 MAC 00-0D
Internet
R1
A C
192.168.1.50
192.168.1.110
MAC 00-0C
MAC 00-0A 192.168.1.1
Default Gateway: 192.168.1.1 MAC 00-0D
Internet
R1
A C
192.168.1.50
192.168.1.110
MAC 00-0C
MAC 00-0A 192.168.1.1
Default Gateway: 192.168.1.1 MAC 00-0D
Internet
R1
Ethernet Header ARP Request
Destination MAC Source MAC Target IPv4 Target MAC
FF-FF 00-0A 192.168.1.1 ???
Ethernet Header IP Packet
On Destination MAC Source MAC Source IP Destination IP
Hold ??? 00-0A 192.168.1.110 10.1.1.10
192.168.1.120
B MAC 00-0B
PC-A’s ARP Cache
IPv4 Address MAC Address
A C
192.168.1.50
192.168.1.110
MAC 00-0C
MAC 00-0A 192.168.1.1
Default Gateway: 192.168.1.1 MAC 00-0D
Internet
R1
Ethernet Header ARP Request
Destination MAC Source MAC Target IPv4 Target MAC
FF-FF 00-0A 192.168.1.1 ???
Ethernet Header IP Packet
On Destination MAC Source MAC Source IP Destination IP
Hold ??? 00-0A 192.168.1.110 10.1.1.10
The target IPv4 is not me.
192.168.1.120
B MAC 00-0B
PC-A’s ARP Cache
IPv4 Address MAC Address
A C
192.168.1.50
192.168.1.110
MAC 00-0C
MAC 00-0A 192.168.1.1
Default Gateway: 192.168.1.1 MAC 00-0D
Internet
R1
Ethernet Header ARP Request
Destination MAC Source MAC Target IPv4 Target MAC
FF-FF 00-0A 192.168.1.1 ???
Ethernet Header IP Packet
On Destination MAC Source MAC Source IP Destination IP
Hold ??? 00-0A 192.168.1.110 10.1.1.10
192.168.1.120
B MAC 00-0B
PC-A’s ARP Cache
IPv4 Address MAC Address The target IPv4 is not me.
A C
192.168.1.50
192.168.1.110
MAC 00-0C
MAC 00-0A 192.168.1.1
Default Gateway: 192.168.1.1 MAC 00-0D
Internet
R1
Ethernet Header ARP Request
Destination MAC Source MAC Target IPv4 Target MAC
FF-FF 00-0A 192.168.1.1 ???
Ethernet Header IP Packet
On Destination MAC Source MAC Source IP Destination IP
Hold ??? 00-0A 192.168.1.110 10.1.1.10
192.168.1.120
B MAC 00-0B
PC-A’s ARP Cache
IPv4 Address MAC Address
A C
Internet
R1
Ethernet Header ARP Request
Destination MAC Source MAC Target IPv4 Target MAC
FF-FF 00-0A 192.168.1.1 ???
Ethernet Header IP Packet
On Destination MAC Source MAC Source IP Destination IP
Hold ??? 00-0A 192.168.1.110 10.1.1.10
192.168.1.120
B MAC 00-0B
PC-A’s ARP Cache
IPv4 Address MAC Address
A C
192.168.1.50
192.168.1.110
MAC 00-0C
MAC 00-0A 192.168.1.1
Here is my MAC address for
Default Gateway: 192.168.1.1 MAC 00-0D
the IPv4 address you were
looking for! Internet
R1
Ethernet Header ARP Reply
Destination MAC Source MAC Target IPv4 Target MAC
00-0A 00-0D 192.168.1.1 00-0D
Ethernet Header IP Packet
On Destination MAC Source MAC Source IP Destination IP
Hold ??? 00-0A 192.168.1.110 10.1.1.10
192.168.1.120
B MAC 00-0B
PC-A’s ARP Cache
IPv4 Address MAC Address
A C
192.168.1.50
192.168.1.110
MAC 00-0C
MAC 00-0A 192.168.1.1
Default Gateway: 192.168.1.1 MAC 00-0D
Internet
R1
Ethernet Header ARP Reply
Destination MAC Source MAC Target IPv4 Target MAC
00-0A 00-0D 192.168.1.1 00-0D
Ethernet Header IP Packet
On Destination MAC Source MAC Source IP Destination IP
Hold ??? 00-0A 192.168.1.110 10.1.1.10
192.168.1.120
B MAC 00-0B
PC-A’s ARP Cache
IPv4 Address MAC Address
192.168.1.1 00-0D
A C
192.168.1.50
192.168.1.110
MAC 00-0C
MAC 00-0A 192.168.1.1
Default Gateway: 192.168.1.1 MAC 00-0D
Internet
R1
Ethernet Header ARP Reply
Destination MAC Source MAC Target IPv4 Target MAC
00-00A 00-0D 192.168.1.1 00-0D
Ethernet Header IP Packet
On Destination MAC Source MAC Source IP Destination IP
Hold ??? 00-0A 192.168.1.110 10.1.1.10
192.168.1.120
B MAC 00-0B
PC-A’s ARP Cache
IPv4 Address MAC Address
192.168.1.1 00-0D
A C
192.168.1.50
192.168.1.110
MAC 00-0C
MAC 00-0A 192.168.1.1
Default Gateway: 192.168.1.1 MAC 00-0D
Internet
R1
A C
192.168.1.50
192.168.1.110
MAC 00-0C
MAC 00-0A 192.168.1.1
Default Gateway: 192.168.1.1 MAC 00-0D
Internet
R1
Emmalia
Lucia, I see by your Santa Cruz, Ca
address that you are
somewhere else. So I Rick
have to take your letter Santa Cruz, Ca
to the Post Office.
Lucia
Capitola, Ca
Emmalia
Santa Cruz, Ca
Even if two houses are on the same street, you only know the address
so must take it to the local post office 63
Understanding IP communications
192.168.10.0/24 A MAC MAC B 192.168.10.0/24
Subnet aa.aa bb.bb Subnet
192.168.10.10 192.168.10.11
255.255.255.0 255.255.255.0
Devices can only communicate with other devices on the same subnet
A knows that it is on the 192.168.10.0/24 subnet (AND operation with its IP address and
subnet mask). (Same subnet = Same subnet mask)
A knows that B (192.168.1.11) is on its same subnet (AND operation with B’s IP address
and A’s subnet mask)
192.168.10.10 192.168.20.12
255.255.255.0 255.255.255.0
192.168.10.10 192.168.10.11
255.255.255.0 255.255.255.0
A C
192.168.10.10 192.168.20.12
255.255.255.0 255.255.255.0
A C
69
Bootup Process
70
Switch Boot Sequence
By default, the the boot loader attempts to load and execute the first
executable file it can by searching the flash file system.
If boot system commands in startup-config
a. Run boot system commands in order they appear in startup-config to
locate the IOS
b. If boot system commands fail, use default fallback sequence to locate
the IOS (Flash, TFTP, ROM)
72
Switch LED Indicators
Each port on the Cisco Catalyst switches have status LED indicator
lights.
LED lights reflect port activity, but they can also provide other
information about the switch through the Mode button.
74
Status LEDs LED is … Description
Off System is not powered
System LED Green System is operating normally
Amber System is receiving power but is not functioning properly
Off RPS is off or not properly connected
Green RPS is connected and ready to provide back-up
Redundant
Blinking Green RPS providing power to another device
Power
Amber RPS is in standby mode or in a fault condition.
Blinking Amber Internal power supply has failed, and the RPS is providing power.
Green A link is present.
Off There is no link, or the port was administratively shut down
Blinking green Activity and the port is sending or receiving data.
Port Status LED
Alternating Green-Amber There is a link fault.
Amber Port is blocked to ensure there is no STP loop
Blinking amber Port is blocked to prevent a possible loop in the forwarding domain.
77
Assign a Default Gateway
Default Gateway
172.17.99.11
172.17.99.1
172.17.99.100
Def Gw 172.17.99.1
78
Assign a Default Gateway
Default Gateway
172.17.99.11
172.17.99.1
172.17.99.100
Def Gw 172.17.99.1
79
Configure Switch Ports
Configure Duplex and Speed
Internet
router Full Full
Duplex Full Duplex Duplex
A switch Port 8 Transmissions Port 1 W switch
B C D X Y Z
switch switch switch switch switch switch
86
Configure Duplex and Speed
Straight-through
Straight-through
Crossover
90
Configuring MDIX Setting
Note:
The auto-MDIX feature is enabled by default on Catalyst 2960 and
Catalyst 3560 switches, but is not available on the older Catalyst
2950 and Catalyst 3550 switches.
Don’t depend on auto-mdix – use the correct cable in the lab. 91
Verify MDIX Setting
92
Verifying Switch Port Configuration
Cisco Switch IOS Commands
93
Troubleshooting Access Layer Issues
S1# show interfaces fa 0/1
FastEthernet0/1 is up, line protocol is up (connected)
Hardware is Lance, address is 000d.bda1.5601 (bia 000d.bda1.5601)
BW 100000 Kbit, DLY 1000 usec,
Ifreliability 250/255,
the output is:txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
•up down:
Keepalive set (10 Encapsulation
sec) type mismatch, the interface on the other end
Full-duplex,
could be100Mb/s error-disabled, or there could be a hardware problem.
input flow-control is off, output flow-control is off
•down
ARP down:
type: ARPA, ARP ATimeout
cable 04:00:00
is not attached or some other interface problem exists.
Last input 00:00:08, output 00:00:05, output hang never
•administratively down: The shutdown command has been issued.
Last clearing of "show interface" counters never
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo
Output queue :0/40 (size/max)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
956 packets input, 193351 bytes, 0 no buffer
Received 956 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
0 watchdog, 0 multicast, 0 pause input
0 input packets with dribble condition detected
2357 packets output, 263570 bytes, 0 underruns
0 output errors, 0 collisions, 10 interface resets
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier
0 output buffer failures, 0 output buffers swapped out 94
S1#
Troubleshooting Access Layer Issues
S1# show interfaces fa 0/1
FastEthernet0/1 is up, line protocol is up (connected)
Hardware is Lance, address is 000d.bda1.5601 (bia 000d.bda1.5601)
BW 100000 Kbit, DLY 1000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Keepalive set (10 sec)
Full-duplex, 100Mb/s
Runt Framesis off,
input flow-control - Ethernet frames
output flow-control that are shorter than the 64-byte minimum
is off
ARP type: ARPA, ARP Timeout 04:00:00
allowed lengthoutput
Last input 00:00:08, are 00:00:05,
called output
runts. hang never
Last clearing
Giants of "show interface"
- Ethernet frames counters
thatnever
are longer than the maximum allowed length
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
are called
Queueing giants.
strategy: fifo (Bad NIC)
Output queue
CRC errors :0/40- (size/max)
On Ethernet and serial interfaces, CRC errors usually
5 minute input rate 0 bits/sec, 0 packets/sec
indicate a media
5 minute output or cable
rate 0 bits/sec, error.
0 packets/sec
956 packets input, 193351 bytes, 0 no buffer
Received 956 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
0 watchdog, 0 multicast, 0 pause input
0 input packets with dribble condition detected
2357 packets output, 263570 bytes, 0 underruns
0 output errors, 0 collisions, 10 interface resets
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier
0 output buffer failures, 0 output buffers swapped out 95
S1#
Troubleshooting Access Layer Issues
S1# show interfaces fa 0/1
FastEthernet0/1 is up, line protocol is up (connected)
Hardware is Lance, address is 000d.bda1.5601 (bia 000d.bda1.5601)
BW 100000 Kbit, DLY 1000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Keepalive set (10 sec)
Full-duplex, 100Mb/s
Collisions
input flow-control–isOnly part
off, output of normal
flow-control is off operations if interface is operating in
ARP type: ARPA, ARP Timeout 04:00:00
half duplex
Last input – connected
00:00:08, to a hang
output 00:00:05, output hub. never
Last clearing of "show interface" counters never
Late Collisions – Operating in half duplex and excessive cable length.
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Cause – Result
Queueing strategy: fifo of duplex mismatch
Output queue :0/40 (size/max)
One input
5 minute sideratehalf duplex
0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
956
Otherpacketsside
input,full duplex
193351 bytes, 0 no buffer
Received 956 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
0 watchdog, 0 multicast, 0 pause input
0 input packets with dribble condition detected
2357 packets output, 263570 bytes, 0 underruns
0 output errors, 0 collisions, 10 interface resets
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier
0 output buffer failures, 0 output buffers swapped out 96
S1#
Secure Remote Access
Wireshark Telnet Capture
98
Plaintext Username and Password Captured
99
Wireshark SSH Capture
100
Username and Password Encrypted
101
Secure Remote Access Using SSH
<output omitted>
106
Configuring SSH
S1(config)# ip domain-name cisco.com
S1(config)# crypto key generate rsa
The name for the keys will be: S1.cisco.com
Choose the size of the key modulus in the range of 360 to 2048 for your
General Purpose Keys. Choosing a key modulus greater than 512 may take
a few minutes.
2. Generate
*Mar 1 2:59:12.78:RSA key pairs using
%SSH-5-ENABLED: SSHthe
1.99crypto
has beenkey generate rsa global
enabled
S1(config)# username
configuration mode admin secret class
command.
S1(config)# line vty 0 15
Ciscotransport
S1(config-line)# recommendsinput ssha minimum modulus size of 1,024 bits.
A longer
S1(config-line)# loginmodulus
local length is more secure, but it takes longer to generate
S1(config-line)# exit
and to use.
S1(config)# ip ssh version 2
Generating an RSA key pair automatically enables SSH.
S1(config)#
107
Configuring SSH
S1(config)# ip domain-name cisco.com
S1(config)# crypto key generate rsa
The name for the keys will be: S1.cisco.com
Choose the size of the key modulus in the range of 360 to 2048 for your
General Purpose Keys. Choosing a key modulus greater than 512 may take
a few minutes.
108
Configuring SSH
S1(config)# ip domain-name cisco.com
S1(config)# crypto key generate rsa
The name for the keys will be: S1.cisco.com
Choose the size of the key modulus in the range of 360 to 2048 for your
General Purpose Keys. Choosing a key modulus greater than 512 may take
a few minutes.
110
111
112
Security Concerns in LANs
Switch Vulnerabilities
114
Disable Unused Ports and Assign to an
Unused (Garbage) VLAN
S1(config)#int range fa0/20 – 24
S1(config-if-range)# switchport access vlan 100
S1(config-if-range)# shutdown
%LINK-5-CHANGED: Interface FastEthernet0/20, changed state
to administratively down
%LINK-5-CHANGED: Interface FastEthernet0/21, changed state
to administratively down
%LINK-5-CHANGED: Interface FastEthernet0/22, changed state
to administratively down
%LINK-5-CHANGED: Interface FastEthernet0/23, changed state
to administratively down
%LINK-5-CHANGED: Interface FastEthernet0/24, changed state
to administratively down
S1(config-if-range)#
116
Leveraging the Cisco Discovery Protocol
118
Disabling CDP
S1(config)# no cdp run
S1(config)#
119
Mac Address Table
1.Learn – Examine Source MAC
Unicast Flooding address
In table: Reset 5 min timer
Unicast Not in table: Add Source MAC
address and port # to table
BBBB AAAA
2.Forward – Examine
Destination MAC address
In table: Forward out that port.
Mac Address Table Not in table: Flood out all ports
Port MAC Address except incoming port.
Not in table
Unknown Unicast
1 2
AAAA BBBB
123
MAC Flood Attack
If the attack is launched before the beginning
of the day, the CAM table would be full as
the majority of devices are powered on.
If the initial, malicious flood of invalid CAM
table entries is a one-time event:
Can generate 155,000 MAC entries per
minute
“Typical” switch can store 4,000 to 8,000
MAC entries
Eventually, the switch will age out older,
invalid CAM table entries
New, legitimate devices will be able to
create an entry in the CAM
Traffic flooding will cease
Intruder may never be detected (network
seems normal).
124
Mac Address Table
1.Learn – Examine Source MAC
Unicast Flooding address
In table: Reset 5 min timer
Unicast Not in table: Add Source MAC
address and port # to table
BBBB AAAA
2.Forward – Examine
Destination MAC address
In table: Forward out that port.
Mac Address Table Not in table: Flood out all ports
Port MAC Address except incoming port.
Unknown Unicast
1 2
AAAA BBBB
125
Configure Port Security
1 1 1 1
Port security allows an administrator to limit the number of MAC
addresses learned on a port.
If this is exceeded, a switch action can be configured.
Configure each access port to accept 1 MAC address only or a
small group of MAC addresses.
Frames from any 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. 126
Configuring Port Security
Use the switchport port-security interface command to
enable port security on a port.
Switch(config-if)#
switchport port-security [max value] [violation {protect |
restrict | shutdown}] [mac-address mac-address [sticky]]
[aging time value]
It is used to:
Set a maximum number of MAC addresses.
Define violation actions.
MAC address(es) can be learned dynamically, entered
manually, or learned and retained dynamically.
Set the aging time for dynamic and static secure address
entries.
To verify port security status: show port-security
127
Port Security: Secure MAC Addresses
The switch supports these types of secure MAC addresses:
Static
Configured using switchport port-security mac-address
mac-address
Stored in the address table
Added to running configuration.
Dynamic
These are dynamically configured
Stored only in the address table
Removed when the switch restarts
Sticky
These are dynamically configured
Stored in the address table
Added to the running configuration.
If running-config saved to startup-config, when the switch restarts, the
interface does not need to dynamically reconfigure them.
Note: When you enter this command, the interface converts all the
dynamic secure MAC addresses, including those that were dynamically
learned before sticky learning was enabled, to sticky secure MAC
addresses. The interface adds all the sticky secure MAC addresses to
the running configuration.
128
Port Security: Steps
129
Port Security Defaults
Feature Default setting
Port Security Disabled on a port
130
Dynamic Secure MAC address
Learned dynamically
S1(config-if)# switchport mode access
S1(config-if)# switchport port-security
132
Can be saved with the configuration.
Sticky Secure MAC address
134
X
Port Security: Static
Addresses
138
Port Security: Violation
Switch(config-if)#switchport port-security violation
{protect | restrict | shutdown}
141
DHCP Spoof Attacks
“Here you go, I
might be first!”
(Rouge) “I need an IP
address/mask, default
“I can now gateway, and DNS
forward these on server.”
to my leader.”
(Rouge) “Got it, thanks!”
142
Solution:
Configure
DHCP
Snooping
Fa0/0
144
DHCP Snooping
“Here you go, I
might be first!” “I need an IP
(Rouge) address/mask,
default gateway,
Switch: This is an and DNS server.”
untrusted port, I will
block this DHCP Offer”
“Thanks, got it.”
148
149
Managing Switch Configurations
TO CLEAR A SWITCH
ALWAYS DO THE FOLLOWING TO CLEAR A SWITCH!!
156
CIS 82 Routing Protocols and Concepts
Chapter 2 Switching Concepts and
Configuration
CIS 82 Routing Protocols and Concepts
Rick Graziani
Cabrillo College
[email protected]