CCNA Exp3 - Chapter02 - Basic Switch Concepts and Configurations - DPF
CCNA Exp3 - Chapter02 - Basic Switch Concepts and Configurations - DPF
Overview
MAC refers to protocols that determine which computer on a shared-medium h d di environment, or collision domain, is allowed to transmit the data data. MAC, with LLC, comprises the IEEE version of the OSI Layer 2 There are two broad categories of Media Access Control, deterministic (taking , ( g turns) and non-deterministic (first come, first served)
CSMA/CD
???
listen-before-transmit
???
CSMA/CD used with Ethernet performs three functions: f ti 1. Transmitting and receiving data packets 2. 2 Decoding data packets and checking them for valid addresses before passing them to the upper layers of the OSI model 3. Detecting errors within data packets or on the p network
???
CSMA/CD
Flow chart
Backoff
Randomly Backoff Time After a collision occurs and all stations allow the cable to become idle (each waits the full inter-frame spacing) The stations that collided must wait an additional and potentially progressively longer period of time before attempting to retransmit the p g collided frame The waiting period is intentionally designed to be random If the MAC layer is unable to send the frame after sixteen attempts, gives p attempts it gi es up and generates an error to the network layer
7
Ethernet Communications
Remind
Layer 1: 802.3 Layer 2: 802.2
Naming on Ethernet
MAC ADDRESS
Ethernet uses MAC addresses that are 48 bits in length and expressed as Ethernet 12 hexadecimal digits Sometimes referred to as burned-in addresses (BIA) because they are burned into read-only memory (ROM) and are copied into random-access memory (RAM) when the NIC initializes
Hc vin mng Bach Khoa - Website: www.bkacad.com 13
OUI
14
If the attached station is operating in full duplex then the station may send and receive simultaneously and collisions should not occur Full occur. Fullduplex operation also changes the timing considerations and eliminates the concept of slot time In half-duplex if no collision, the sending station will transmit 64 bits half-duplex, collision (timing synchronization) preamble, DA, SA, certain other header information, actual data payload, FCS
Hc vin mng Bach Khoa - Website: www.bkacad.com 15
16
17
Note
Fast Ethernet and 10/100/1000 ports: default is auto. 100BASE-FX ports: default is full. p 10/100/1000 ports operate in either half- or full-duplex mode when they are set to 10 or 100 Mb/s, but when set to 1,000 Mb/s, 1 000 Mb/s they operate only in full duplex mode full-duplex mode. Default: when autonegotiation fails Catalyst switch sets the corresponding switch port to half-duplex mode.
18
auto-MDIX
auto-MDIX is enabled switch auto detects cable type yp can use either a crossover or a straight-through The auto-MDIX feature is enabled by default on switches running Cisco IOS Release 12.2(18)SE or later. For releases between Cisco IOS Release 12.1(14)EA1 and ( ) 12.2(18)SE, the auto-MDIX feature is disabled by default.
19
20
21
22
23
24
25
26
Collision Domains
27
Collision Domains
28
Broadcast Domains
29
When a switch receives a broadcast frame, it forwards the frame to each of its ports, except the incoming port where the switch received the broadcast frame. Each attached device recognizes the broadcast frame and processes it. it
30
31
Network Latency
32
Network Congestion
Causes of network congestion: g Increasingly powerful computer and network technologies. Increasing volume of network traffic. High-bandwidth applications.
33
LAN Segmentation
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
Switch configuration
51
52
53
54
55
56
57
58
59
60
61
62
Step 1
63
Step 2
64
Step 3
65
66
67
68
69
70
71
72
73
Show Commands
74
Show running-config
75
Show interfaces
76
77
78
79
80
81
82
83
84
Before B f
85
86
Password Recovery
Step 1. Connect a terminal or PC with terminal-emulation software to the switch console port. Step 2. Set the line speed on the emulation software to 9600 baud. Step 3. Power off the switch. Reconnect the power cord to the switch and within 15 seconds, press the Mode button while the System LED is still flashing green. Continue pressing the Mode button until the System LED turns briefly amber and then solid green. Then release the Mode button. Step 4. Initialize the Flash file system using the flash_init command. Step 5. Load any helper files using the load helper command. load_helper
87
Password Recovery
Step 6. Display the contents of Flash memory using the dir flash command: The switch file system appears: Directory of flash: 13 drwx 192 Mar 01 1993 22:30:48 c2960-lanbase-mz.122-25.FX 11 -rwx 5825 Mar 01 1993 22:31:59 config.text 18 -rwx 720 Mar 01 1993 02:21:30 vlan.dat 16128000 b t t t l (10003456 b t f ) bytes total bytes free) Step 7. Rename the configuration file to config.text.old, which contains the password definition, using the rename flash:config.text flash:config.text.old command. Step 8. Boot the system with the boot command.
88
Password Recovery
Step 9. You are prompted to start the setup program. Enter N at the prompt, and then when the system prompts whether to continue with the configuration dialog, enter N. Step 10 At the switch prompt enter privileged EXEC mode using the enable command 10. prompt, command. Step 11. Rename the configuration file to its original name using the rename flash:config.text.old flash:config.text command. Step 12. Copy the configuration file into memory using the copy flash:config.text system:running-config command. After this command has been entered, the follow is displayed on the console: Source filename [config.text]? Destination filename [running-config]? Press Return in response to the confirmation prompts. The configuration file is now f f f reloaded, and you can change the password.
89
Password Recovery
Step 13. Enter global configuration mode using the configure terminal command. Step 14. Change the password using the enable secretpassword command. Step 15. Return to privileged EXEC mode using the exit command. Step 16 Write the running configuration to the startup configuration file 16. using the copy running-config startup-config command. Step 17. Reload the switch using the reload command. Note: The password recovery procedure can be different depending on , y p the Cisco switch series, so you should refer to the product documentation before you attempt a password recovery.
Hc vin mng Bach Khoa - Website: www.bkacad.com 90
91
92
93
Configuring Telnet
94
Configuring SSH
95
Configuring SSH
The switch supports SSHv1 or SSHv2 for the server component. The switch supports only SSHv1 for the client component. To implement SS you need to generate RSA keys. SSH, S Step 1. Enter global configuration mode using the configure terminal command. Step 2. Configure a hostname for y p g your switch using the g hostnamehostname command. Step 3. Configure a host domain for your switch using the ip domainnamedomain_name command. Step 4. Enable the SSH server for local and remote authentication on the p switch and generate an RSA key pair using the crypto key generate rsa command. Step 5. Return to privileged EXEC mode using the end command. Step 6. Show the status of the SSH server on the switch using the show ip p g p ssh or show ssh command. To delete the RSA key pair, use the crypto key zeroize rsa global configuration command. After the RSA key pair is deleted, the SSH server is automatically disabled.
96
Step 3. Configure the SSH control parameters: Specify the time-out value in seconds: default of 10 minutes. Specify the number of times that a client can re-authenticate to the server. The default is 3; the range is 0 to 5 Command: ip ssh {timeoutseconds | authentication-retriesnumber}.
Hc vin mng Bach Khoa - Website: www.bkacad.com 97
98
99
Types of Attacks
MAC Address Flooding
Media Access Control (MAC) Address Spoofing DHCP "starvation"
100
101
102
103
104
105
switch(config-if)#
switchport port-security
switch(config-if)#
106
switch(config-if)#
switch(config-if)# #
107
SWITCH PORT 1 2 3
A B C
B A MAC A A
AB C
B
Attacker
108
switch> (enable)
switch(config-if)#
ARP Spoofing
192.168.10.0/24
ARP for .1 1
.1 1
Im Im .1!
.2
.3
Attacker
111
ip dhcp snooping
113
Spoofing Attacks
114
Solution:
Cisco Catalyst DHCP Snooping Port Security Features (later in this module) y ( )
115
116
117
CDP Attacks
118
Solution
Disable the use of CDP on devices that do not need to use it.
119
Telnet Attacks
120
Security tools
121
122
123
s tc po t po t secu ty ac add ess switchport port-security mac-address switchport port-security mac-address sticky
124
Violation types
125
126
127
128
Verify
129
Verify
130
131
Chapter summary
132