IT141 · SESSION 1 · FIELD NOTES

Basic Device Configuration & Switching Concepts

Welcome back to the OSI Company. Same building, same network, same people you met in CCNA 1, with one surprise: over the break, Infrastructure swapped out both routers. This session is the warm-up lap. You'll set up a switch and a router from scratch, lock them down with SSH, prove every link works, and take one more careful look at how Local Dispatch decides where a frame goes. Most of it is familiar on purpose. CCNA 2 moves fast after today, and today is where you get your speed back.

New material Module 1 — Basic Device Configuration New material Module 2 — Switching Concepts Next session Module 3 — VLANs

Modules 1 & 2

What Session 1 covers

Two modules, both built on CCNA 1. Module 1 is the hands-on one: switch boot and recovery, switch management, port settings, SSH, basic router setup, and the show commands that prove a network works. Module 2 is short and conceptual: how a switch learns and forwards frames, and the difference between a collision domain and a broadcast domain. Module 2 also sets up next session, when the broadcast domain finally gets broken up.

Cold open · Local Dispatch, first day back

The Rookie comes back from break to find a new badge on the desk: Dispatcher-in-Training. Down the hall, the Infrastructure Crew is wheeling out the two old routers on a dolly. "Upgraded," the crew chief says. "Same jobs, new boxes, new port labels. Somebody has to set them up and make sure every hallway still connects." The Surveyor hands the Rookie a clipboard with one line on it: Configure, secure, verify. "You did all of this in CCNA 1," the Surveyor says. "Now do it like you'll have to do it under a clock. Because you will."

Topology used on this page The network you finished CCNA 1 with, on new routers. R1 and R2 are Cisco ISR4321s, joined by 10.0.0.0/30 on G0/0/0. R1's LAN is 192.168.10.0/24: switch S1 (Catalyst 2960, management address 192.168.10.2) and PC-A 192.168.10.10, gateway 192.168.10.1. R2's LAN is 192.168.20.0/24: switch S2 (192.168.20.2), PC-B, and SRV1 192.168.20.100. IPv6 uses 2001:db8:acad:10::/64 and 2001:db8:acad:20::/64. The domain is it141.example. See the lab network for what carries over and what's new.
CCNA 1 callback Today leans on four CCNA 1 sessions. Keep them handy if anything feels rusty: Session 2 (switch bootup and basic switch configuration), Session 5 (MAC tables, forwarding methods, switching domains), Session 7 (initial router configuration), and Session 11 (device security and SSH).

What changed over the break

R1 and R2 got replaced

CCNA 1 ended on Cisco 2911 routers. This course uses the ISR4321, the router Cisco NetAcad's own Packet Tracer activities use in this course. The commands you know still work. What changes is the interface names.

CCNA 1 (2911)This course (ISR4321)Cabled to
G0/0G0/0/0The other router
G0/1G0/0/1The LAN switch (S1 G0/1 at R1, S2 G0/1 at R2)
G0/2noneThe ISR4321 has only two built-in Gigabit ports. A third link needs an add-in module; Session 11 adds a serial card.

The ISR4321 runs IOS XE, a newer relative of the IOS on the 2911. Nearly every command you learned is the same. You can still type the short form, g0/0/1, anywhere; IOS XE shows the full name, GigabitEthernet0/0/1, in its output, including the routing table.

Reading the new names An ISR4321 interface name has three numbers: slot / subslot / port. G0/0/0 means slot 0, subslot 0, port 0. The two built-in Gigabit ports are G0/0/0 and G0/0/1. Add-in modules show up in other subslots (later this course you'll see a serial card at S0/1/0). The last digit still matches the 2911, so the same cables plug into the same-numbered ports.

Module 1.1

Switch boot, LEDs, and recovery

You saw the boot process in CCNA 1. Module 1 adds the details: which program runs when, where the switch looks for its operating system, and how to get in when that operating system is broken.

CCNA 1 callback Session 2: Switch bootup process covered POST and loading the IOS. This is the same story with every step named.

The five-step boot sequence

  1. POST. The switch runs the power-on self-test from ROM. It checks the CPU, DRAM, and the flash file system.
  2. Boot loader. The switch loads the boot loader, a small program also stored in ROM.
  3. CPU setup. The boot loader does low-level CPU initialization: it sets up the CPU registers that control where physical memory is mapped, how much memory there is, and its speed.
  4. Flash setup. The boot loader initializes the flash file system on the system board.
  5. Load the IOS. The boot loader finds and loads a default IOS image into memory and hands control to it. The IOS then applies the startup configuration, stored in flash as config.text.

Which IOS? The BOOT variable

The boot loader looks at the BOOT environment variable. If it's set, the switch loads that image. If it isn't, the switch tries to load the first executable file it can find in flash. You set the variable with boot system in global configuration mode.

S1 · set and check the boot image
S1(config)# boot system flash:/c2960-lanbasek9-mz.150-2.SE4.bin S1(config)# end S1# show boot BOOT path-list : flash:/c2960-lanbasek9-mz.150-2.SE4.bin Config file : flash:/config.text Private Config file : flash:/private-config.text Enable Break : no Manual Boot : no
Image names differ Image names differ between switches and IOS versions. show flash: lists the .bin file name, and boot system needs it exactly. boot system only matters when flash holds more than one image.

Reading the LEDs

A Catalyst 2960 has a column of system LEDs and a Mode button. Pressing Mode cycles the port LEDs between showing status, duplex, speed, and PoE.

LEDWhat it tells you
SYSTSystem power and health. Off = no power. Green = running normally. Amber = powered but not working properly.
RPSRedundant power supply status. Off = no RPS. Green = RPS ready.
STATWhen lit, the port LEDs show status (the default mode). Port off = no link; green = link up; blinking green = activity; amber = port blocked to prevent a loop.
DUPLXWhen lit, the port LEDs show duplex. Port off = half duplex; green = full duplex.
SPEEDWhen lit, the port LEDs show speed. Off = 10 Mb/s; green = 100 Mb/s; blinking green = 1000 Mb/s.
PoEShown on PoE models. When lit, the port LEDs show Power over Ethernet status.
Coming up in Session 4 "Amber = port blocked to prevent a loop" is Spanning Tree at work. You'll see why a switch would ever block its own port in Module 5.

Recovering from a system crash

If the IOS is missing or damaged, the boot loader's own command line can still reach the files in flash:

  1. Connect a PC to the switch's console port and open a terminal emulator.
  2. Unplug the switch's power cord.
  3. Plug it back in and, within 15 seconds, press and hold the Mode button while the System LED is still flashing green.
  4. Keep holding until the System LED turns briefly amber and then solid green, then let go.
  5. The switch: prompt appears. You're in the boot loader.
S1 · boot loader (real switch only)
switch: flash_init Initializing Flash... switch: dir flash: Directory of flash:/ 2 -rwx 4670455 c2960-lanbasek9-mz.150-2.SE4.bin 3 -rwx 1919 config.text 4 -rwx 616 vlan.dat switch: boot flash:/c2960-lanbasek9-mz.150-2.SE4.bin
Packet Tracer can't do this one Packet Tracer doesn't simulate the boot loader or the Mode button. Know the steps; you'd practice them on a real switch. flash_init starts the flash file system, dir flash: lists what's there, and boot loads an image by hand. (The same prompt is where password recovery starts, which is beyond this course.)

Module 1.1

Switch management access

A Layer 2 switch doesn't need an IP address to forward frames. You give it one so you can reach it over the network instead of standing next to it with a console cable.

That address goes on a switch virtual interface (SVI): a virtual interface tied to a VLAN, not to any physical port. Two things make remote management work:

S1 · initial settings and management SVI
Switch> enable Switch# configure terminal Switch(config)# hostname S1 S1(config)# no ip domain-lookup S1(config)# enable secret class12345 S1(config)# line console 0 S1(config-line)# password cisco12345 S1(config-line)# login S1(config-line)# exit S1(config)# service password-encryption S1(config)# banner motd #Authorized access only. Violators will be prosecuted.# ! ! Management SVI: VLAN 1 for now, on purpose. Session 2 moves it to VLAN 99. S1(config)# interface vlan 1 S1(config-if)# ip address 192.168.10.2 255.255.255.0 S1(config-if)# no shutdown %LINK-5-CHANGED: Interface Vlan1, changed state to up %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to up S1(config-if)# exit ! ! Only needed to reach (or be managed from) other networks. S1(config)# ip default-gateway 192.168.10.1 S1(config)# end S1# copy running-config startup-config Destination filename [startup-config]? Building configuration... [OK]

S2 gets the same settings with its own values: hostname S2, ip address 192.168.20.2 255.255.255.0 on interface vlan 1, and ip default-gateway 192.168.20.1. S2 is still on R2's LAN this session.

When does the SVI come up? An SVI comes up only when at least one port in its VLAN is up. Here that's F0/1 (PC-A) or G0/1 (R1). If nothing in VLAN 1 is connected, show ip interface brief shows Vlan1 … up down. Remember that symptom: it comes back in Session 2, when ports leave VLAN 1. The two %LINK messages print only if a VLAN 1 port is already up when you type no shutdown.
Two things the SVI address does not do It doesn't let the switch route. The address is for managing the switch, and a 2960 still forwards frames only at Layer 2. And if you later give the SVI an IPv6 address (a 2960 first needs the dual-ipv4-and-ipv6 SDM template and a reload), there's no IPv6 version of ip default-gateway: the switch learns its IPv6 gateway from the router's Router Advertisements.
Coming up in Session 2: why VLAN 1, for now Every switch ships with all its ports in VLAN 1, and so far that's where the management address lives too. NetAcad's advice is to manage switches from a VLAN other than 1, and it's right. We're leaving S1 on VLAN 1 one more session on purpose, the same choice CCNA 1 made. Next session, Module 3 builds real VLANs, and S1's management address moves to its own management VLAN.

Module 1.2

Switch ports: duplex, speed, and errors

Most of the time a switch port just works, because both ends negotiate. This section is about the times it doesn't.

CCNA 1 callback Session 5: Switch port settings introduced duplex, auto-negotiation, and auto-MDIX. Module 1 adds the commands and the error counters.
TermWhat it means
Full duplexBoth ends send and receive at the same time. A switch port with one device on it, running full duplex, is microsegmented: it has no collision domain at all.
Half duplexOnly one side sends at a time. Collisions are possible, so performance suffers. It's mostly a legacy (hub-era) mode.
Auto-negotiationThe default for speed and duplex on Catalyst 2960 and 3560 switches. Both ends agree on the best shared setting. At 1000 Mb/s the port runs full duplex only.
Auto-MDIXThe port detects whether it needs a straight-through or a crossover cable and adjusts, so either cable works. Without it: straight-through to PCs, servers, and routers; crossover to other switches.
S1 · force a port, then put it back
S1(config)# interface f0/1 S1(config-if)# duplex full S1(config-if)# speed 100 ! ! Put it back. Forcing one end while the other negotiates causes a duplex mismatch. S1(config-if)# duplex auto S1(config-if)# speed auto S1(config-if)# mdix auto S1(config-if)# end
Auto-MDIX needs auto on both settings Auto-MDIX is on by default on a 2960, and it works only when speed and duplex are both auto. On a real switch, show controllers ethernet-controller fa0/1 phy | include MDIX shows whether it's on (Packet Tracer may not accept it). Packet Tracer doesn't really model cable tolerance either, so in Packet Tracer, still pick the right cable.
S1 · show interfaces f0/1 (trimmed)
S1# show interfaces f0/1 FastEthernet0/1 is up, line protocol is up (connected) Hardware is Lance, address is 0001.c7a3.5e01 (bia 0001.c7a3.5e01) ... Full-duplex, 100Mb/s ... 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 2357 packets output, 263570 bytes, 0 underruns 0 output errors, 0 collisions, 10 interface resets 0 babbles, 0 late collision, 0 deferred
"Hardware is Lance"? That line is a Packet Tracer quirk. A real 2960 says Hardware is Fast Ethernet. The lines that matter are the highlighted ones: status, duplex and speed, and the error counters in the table below.

Reading the error counters

show interfaces first tells you whether the link is up (Layer 1: is there a carrier?) and whether the line protocol is up (Layer 2: are keepalives getting through?). Further down are counters that point at media problems:

CounterWhat it meansUsual cause
Input errorsThe total of all receive errors: runts, giants, CRC, no buffer, frame, overrun, and ignoredLook at the individual counters
RuntsFrames smaller than the 64-byte minimumA bad NIC, or collisions
GiantsFrames larger than the maximum allowed sizeA bad NIC, or a size mismatch between the ends
CRCThe frame's checksum doesn't match: it was damaged on the wayElectrical interference, a bad or damaged cable, or a loose connection
Output errorsThe total of errors that stopped a frame from going outLook at collisions
CollisionsNormal in half duplex. Never normal in full duplex.Half duplex, or a duplex mismatch
Late collisionsA collision after the first 512 bits of the frame were sentA duplex mismatch, or a cable longer than the standard allows
The troubleshooting order Link down? Check the cable and the far end. Link up but errors climbing? Check for noise, a bad cable, or a duplex mismatch. Line protocol down? Look at the configuration on both ends.

Module 1.3

Secure remote access: SSH

SSH isn't new from CCNA 1, and it comes back in almost every session from here on. The skill now is doing it quickly and getting every step right the first time.

CCNA 1 callback You configured SSH in Session 11: Device security. Same steps here, now on a switch as well as a router.
TelnetSSH
PortTCP 23TCP 22
Login and session dataPlaintext. Anyone capturing the traffic with Wireshark can read the username and password.Encrypted. A capture shows the addresses, but not the contents.
Use it?NoYes. Prefer version 2.

Does the switch support SSH? Only if its IOS image includes encryption features. show version shows the image name; look for k9 in it. If show ip ssh isn't recognized, the image doesn't support SSH.

The SSH recipe

  1. Give the device a unique hostname and working IP connectivity.
  2. Set a domain name: ip domain-name.
  3. Generate RSA keys: crypto key generate rsa. This also turns SSH on.
  4. Create a local user: username … secret ….
  5. On the vty lines, use the local user database (login local) and allow only SSH (transport input ssh).
  6. Turn on version 2: ip ssh version 2.
S1 · SSH, in order
S1# configure terminal S1(config)# ip domain-name it141.example S1(config)# crypto key generate rsa general-keys modulus 1024 The name for the keys will be: S1.it141.example % The key modulus size is 1024 bits % Generating 1024 bit RSA keys, keys will be non-exportable...[OK] %SSH-5-ENABLED: SSH 1.99 has been enabled S1(config)# ip ssh version 2 S1(config)# username admin secret admin12345 S1(config)# line vty 0 15 S1(config-line)# login local S1(config-line)# transport input ssh S1(config-line)# exit S1(config)# end S1# copy running-config startup-config S1# show ip ssh SSH Enabled - version 2.0 Authentication timeout: 120 secs; Authentication retries: 3

Do this after R1's basic setup in the next section: the hostname must already be R1.

R1 · SSH (same recipe, router vty lines 0–4)
R1(config)# ip domain-name it141.example R1(config)# crypto key generate rsa general-keys modulus 1024 R1(config)# ip ssh version 2 R1(config)# username admin secret admin12345 R1(config)# line vty 0 4 R1(config-line)# login local R1(config-line)# transport input ssh R1(config-line)# exit
PC-A · Desktop › Command Prompt
C:\> ssh -l admin 192.168.10.2 Password: Authorized access only. Violators will be prosecuted. S1> enable Password: S1#

Test all three from PC-A: ssh -l admin 192.168.10.1 (R1), ssh -l admin 192.168.10.2 (S1), and ssh -l admin 192.168.20.2 (S2, across both routers). The password doesn't echo. You land in user EXEC; enable takes you to privileged EXEC.

On real gear Packet Tracer's SSH client accepts any key. A modern Windows or Linux SSH client may refuse an older IOS XE router's SHA-1 key exchange and ssh-rsa host key (a bigger RSA key doesn't fix it). CCNA 1 Session 11 has the workaround.

Module 1.4

Basic router configuration

Routers and switches share the same IOS modes and most of the same starting commands. The difference is the interfaces: a router's job is to connect different networks, so every routed interface needs its own address and has to be turned on.

CCNA 1 callback Session 7: Initial router configuration, on the new ISR4321. The one trap that hasn't changed: router interfaces are shut down by default. Switch ports aren't.

For an interface to be available it needs an address (IPv4, IPv6, or both), it needs to be turned on with no shutdown, and, for a LAN or WAN link, something has to be connected at the other end. A description is optional but good practice.

R1 · basic settings, dual-stack interfaces, loopback
Router> enable Router# configure terminal Router(config)# hostname R1 R1(config)# no ip domain-lookup R1(config)# enable secret class12345 R1(config)# line console 0 R1(config-line)# password cisco12345 R1(config-line)# login R1(config-line)# exit R1(config)# service password-encryption R1(config)# banner motd #Authorized access only. Violators will be prosecuted.# ! ! Without this the router won't forward IPv6 or send Router Advertisements. R1(config)# ipv6 unicast-routing ! R1(config)# interface g0/0/0 R1(config-if)# description Link to R2 G0/0/0 R1(config-if)# ip address 10.0.0.1 255.255.255.252 R1(config-if)# ipv6 address fe80::1 link-local R1(config-if)# ipv6 address 2001:db8:acad:ff01::1/64 R1(config-if)# no shutdown R1(config-if)# interface g0/0/1 R1(config-if)# description LAN to S1 G0/1 R1(config-if)# ip address 192.168.10.1 255.255.255.0 R1(config-if)# ipv6 address fe80::1 link-local R1(config-if)# ipv6 address 2001:db8:acad:10::1/64 R1(config-if)# no shutdown ! ! The Cloud: a stand-in for the Internet. It stays on R1 all course. R1(config-if)# interface loopback0 R1(config-if)# description The Cloud (Internet stand-in) R1(config-if)# ip address 209.165.200.225 255.255.255.224 R1(config-if)# ipv6 address fe80::1 link-local R1(config-if)# ipv6 address 2001:db8:cafe::1/64 R1(config-if)# exit ! ! Provided routes: type them exactly. Explained in Module 15. R1(config)# ip route 192.168.20.0 255.255.255.0 10.0.0.2 R1(config)# ipv6 route 2001:db8:acad:20::/64 2001:db8:acad:ff01::2 R1(config)# end R1# copy running-config startup-config
Provided routes R2 has default routes pointing back at R1. The two route lines on R1 are provided, the same way CCNA 1's Session 12 lab provided them. Static routes are Module 15 (Session 11), where every route on this network gets explained.
No no shutdown on the loopback? Right: a loopback is up the moment you create it. The physical interfaces each needed no shutdown.
Why a loopback? A loopback interface is a logical interface inside the router. It isn't a physical port, can't be cabled to anything, and stays up as long as the router is running. That makes it a dependable address for testing and management, and later for routing protocols.

Module 1.5

Verify directly connected networks

Configuration is half the job. The other half is proving it works, and doing it fast.

CommandUse it to…
show ip interface brief
show ipv6 interface brief
See every interface, its address, and its status in one screen. Your first command, every time.
show running-config interface idSee exactly what's configured on one interface
show interfacesSee status, counters, and errors for every interface
show ip interface
show ipv6 interface
See the detailed IPv4 or IPv6 settings of an interface
show ip route
show ipv6 route
See the routing table: connected networks (C) and local addresses (L)
Your screen may differ Output on this page is written to match Packet Tracer as closely as we can, but MAC addresses, counters, byte counts, and timestamps will be different on your screen. Packet Tracer sometimes adds or leaves out a line, too. Read for the lines this page highlights.
R1 · show ip interface brief
R1# show ip interface brief Interface IP-Address OK? Method Status Protocol GigabitEthernet0/0/0 10.0.0.1 YES manual up up GigabitEthernet0/0/1 192.168.10.1 YES manual up up Loopback0 209.165.200.225 YES manual up up
R1 · show ipv6 interface brief
R1# show ipv6 interface brief GigabitEthernet0/0/0 [up/up] FE80::1 2001:DB8:ACAD:FF01::1 GigabitEthernet0/0/1 [up/up] FE80::1 2001:DB8:ACAD:10::1 Loopback0 [up/up] FE80::1 2001:DB8:CAFE::1
R1 · show ip route (codes trimmed)
R1# show ip route Codes: L - local, C - connected, S - static, ... Gateway of last resort is not set 10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks C 10.0.0.0/30 is directly connected, GigabitEthernet0/0/0 L 10.0.0.1/32 is directly connected, GigabitEthernet0/0/0 192.168.10.0/24 is variably subnetted, 2 subnets, 2 masks C 192.168.10.0/24 is directly connected, GigabitEthernet0/0/1 L 192.168.10.1/32 is directly connected, GigabitEthernet0/0/1 S 192.168.20.0/24 [1/0] via 10.0.0.2 209.165.200.0/24 is variably subnetted, 2 subnets, 2 masks C 209.165.200.224/27 is directly connected, Loopback0 L 209.165.200.225/32 is directly connected, Loopback0
R1 · show ipv6 route (codes trimmed)
R1# show ipv6 route IPv6 Routing Table - default - 8 entries C 2001:DB8:ACAD:10::/64 [0/0] via GigabitEthernet0/0/1, directly connected L 2001:DB8:ACAD:10::1/128 [0/0] via GigabitEthernet0/0/1, receive S 2001:DB8:ACAD:20::/64 [1/0] via 2001:DB8:ACAD:FF01::2 C 2001:DB8:ACAD:FF01::/64 [0/0] via GigabitEthernet0/0/0, directly connected L 2001:DB8:ACAD:FF01::1/128 [0/0] via GigabitEthernet0/0/0, receive C 2001:DB8:CAFE::/64 [0/0] via Loopback0, directly connected L 2001:DB8:CAFE::1/128 [0/0] via Loopback0, receive L FF00::/8 [0/0] via Null0, receive

Eight entries: three C, three L, the provided S, and L FF00::/8, the multicast route IOS always adds. Link-local addresses never appear in the IPv6 routing table. IOS shows IPv6 addresses in uppercase, whatever case you typed.

R1 · show running-config interface g0/0/1
R1# show running-config interface g0/0/1 Building configuration... Current configuration : 182 bytes ! interface GigabitEthernet0/0/1 description LAN to S1 G0/1 ip address 192.168.10.1 255.255.255.0 ipv6 address FE80::1 link-local ipv6 address 2001:DB8:ACAD:10::1/64 end
Small differences you may see Packet Tracer may also list a Vlan1 line in show ip interface brief (ignore it), and IOS XE may add a negotiation auto line under the interface. Neither is something you configured.
C and L, again For every interface that's up with an address, the router adds two routes. C is the connected network (for example 192.168.10.0/24). L is the local route: the router's own address on it, with a /32 mask for IPv4 or /128 for IPv6. The local route tells the router "this packet is for me."

Filtering show output

Long output pauses after 24 lines with --More--. Press Enter for one more line or the spacebar for the next page. terminal length 0 turns the pausing off. To see only what you need, pipe the output through a filter:

FilterShows…
| section textThe whole section that starts with the matching line (for example, everything under line vty)
| include textOnly lines that contain the text
| exclude textEvery line except the ones that contain the text
| begin textEverything from the first matching line onward
S1 · filters
S1# show running-config | include ip default ip default-gateway 192.168.10.1 S1# show running-config | section line vty line vty 0 4 login local transport input ssh line vty 5 15 login local transport input ssh S1# show running-config | begin line con line con 0 password 7 0822455D0A16544541 login line vty 0 4 ... S1# terminal length 0 S1# terminal history size 50 S1# show history show running-config | include ip default show running-config | section line vty show running-config | begin line con terminal length 0 terminal history size 50 show history

Command history

IOS remembers your recent commands. Ctrl+P or the Up arrow recalls older commands; Ctrl+N or the Down arrow goes back toward newer ones. By default the history holds the last 10 commands. terminal history size changes that for your current session, and show history lists what's stored.

Module 2.1

How Local Dispatch forwards a frame

Every frame that enters a switch port (ingress) gets one decision: which port it leaves by (egress). The switch makes that decision from the destination MAC address and its MAC address table.

CCNA 1 callback Session 5: How the address book gets built is this exact topic. Module 2 repeats it because everything in the next four sessions (VLANs, trunks, STP, EtherChannel) changes how this table gets used.

Learn, then forward

  1. Learn from the source. The switch reads the frame's source MAC address. If it's not in the table, the switch adds it with the port it came in on. If it's already there, the switch resets its timer (5 minutes by default).
  2. Forward by the destination. The switch looks up the destination MAC. Known unicast: send it out that one port. Unknown unicast, broadcast, or multicast: flood it out every port except the one it came in on. A switch never sends a frame back out the port it arrived on.

The MAC address table is also called the CAM table (content addressable memory), after the kind of memory that holds it.

S1 · empty the table
S1# clear mac address-table dynamic S1# show mac address-table Mac Address Table ------------------------------------------- Vlan Mac Address Type Ports ---- ----------- -------- -----
PC-A · ping the gateway
C:\> ping 192.168.10.1 Pinging 192.168.10.1 with 32 bytes of data: Reply from 192.168.10.1: bytes=32 time<1ms TTL=255 Reply from 192.168.10.1: bytes=32 time<1ms TTL=255 Reply from 192.168.10.1: bytes=32 time<1ms TTL=255 Reply from 192.168.10.1: bytes=32 time<1ms TTL=255
S1 · the table now
S1# show mac address-table Mac Address Table ------------------------------------------- Vlan Mac Address Type Ports ---- ----------- -------- ----- 1 0002.4a6c.1e02 DYNAMIC Gi0/1 1 0060.5c3b.a801 DYNAMIC Fa0/1
  1. PC-A's ARP request (a broadcast) arrives on Fa0/1. S1 learns PC-A's MAC on Fa0/1 and floods the broadcast.
  2. R1's ARP reply arrives on Gi0/1. S1 learns R1's MAC on Gi0/1 and forwards the reply out Fa0/1 only.
  3. Every ping after that is forwarded port to port. No more flooding.

TTL=255 in the ping reply is the router replying; a Windows PC would reply with 128.

Drill · You are the switch

A four-port switch, hosts A–D, one host per port. The table starts empty. For each frame, decide what the switch does. Then watch the table update.

MAC address tablePort

Store-and-forward vs. cut-through

Store-and-forwardCut-through
When it forwardsAfter receiving the whole frameAs soon as it has read the destination MAC
Error checkingChecks the FCS (CRC) and drops bad framesNo FCS check, so it can pass damaged frames along
Different port speedsYes: it buffers the frame (automatic buffering), so a 1 Gb/s port can feed a 100 Mb/s portNo
LatencyHigherVery low. Used where latency must stay under about 10 microseconds.
NotesCisco's preferred methodFragment-free is a variant: it waits for the first 64 bytes, which filters out runts (most collision fragments) before forwarding

Module 2.2

Collision domains and broadcast domains

Two kinds of "who gets affected." Switches fixed the first one years ago. The second one is next session's whole story.

CCNA 1 callback Session 5: Collision domains vs. broadcast domains. And if you read The Zoning Office: the villain called The Sprawl was one giant broadcast domain. It's still out there.
Collision domainBroadcast domain
Who's in itDevices that share a half-duplex segment and can collide with each otherEvery device that receives a broadcast frame from any of the others
What ends itA switch port running full duplex. Each full-duplex port has no collision domain at all.Only a Layer 3 device, such as a router. Switches flood broadcasts out every port.
When it comes backIf a link falls back to half duplex (for example, a failed auto-negotiation)It grows every time you add a switch or hosts to the LAN
Why it mattersCollisions mean retransmissions and wasted bandwidthToo many broadcasts congest the network and make every host stop to process frames that weren't for it

How switches reduce congestion

Coming up in Session 2: The Sprawl is back Right now S1 has one broadcast domain. Every PC you plug into it hears every ARP request and every DHCP broadcast from every other PC. In CCNA 1 the only way to split a broadcast domain was a router. Next session, Module 3 shows a second way: VLANs, which split one switch into several separate broadcast domains.

Watch for this

Common Module 1–2 mistakes

Each one has a symptom you can spot.

1 · Keys before a domain name

S1
S1(config)# crypto key generate rsa general-keys modulus 1024 % Please define a domain-name first.

Fix: ip domain-name it141.example, then generate the keys. The hostname must not be the default, either.

2 · ip ssh version 2 before the keys

S1
S1(config)# ip ssh version 2 Please create RSA keys to enable SSH (and of atleast 768 bits for SSH v2).

Fix: generate a key of 768 bits or more, then repeat the command. ("atleast" really is spelled that way in IOS.)

3 · login instead of login local

With plain login, the vty lines want a line password, not your username, so SSH logins fail. With login local but no username command, every login fails because the user list is empty. The symptom in the PC is the Password: prompt repeating until the connection closes.

4 · The SVI is down: two different reasons

S1
S1# show ip interface brief | include Vlan1 Vlan1 192.168.10.2 YES manual administratively down down

administratively down: you forgot no shutdown on interface vlan 1.

S1
S1# show ip interface brief | include Vlan1 Vlan1 192.168.10.2 YES manual up down

up / down: the SVI is enabled, but no port in VLAN 1 is up. Check that PC-A or R1 is connected and on.

5 · No default gateway on S2

PC-A
C:\> ssh -l admin 192.168.20.2 % Connection timed out; remote host not responding

The clue: from PC-B, on S2's own LAN, SSH to S2 works. S2 can answer its own subnet but can't send replies anywhere else. show running-config | include default on S2 shows nothing. Fix: ip default-gateway 192.168.20.1. Compare: if SSH weren't set up at all, you'd see connection refused. Refused means the device answered and said no; timed out means no answer ever came back.

6 · An IP address on a switch port

S1
S1(config)# interface f0/1 S1(config-if)# ip address 192.168.10.2 255.255.255.0 ^ % Invalid input detected at '^' marker.

A 2960 is a Layer 2 switch: IP addresses go on SVIs (interface vlan 1), never on physical ports.

Recurring segment

The Ticket

Real work orders don't come as step-by-step lists. Each session ends with a ticket. Turn it into steps before you open the answer.

Ticket #141-01 · Priority: normal · From: the NOC

New routers are in. Need to manage R1 and both switches from my desk (PC-A). No Telnet. Make sure everything still pings. Leave a warning banner. Thanks.

One way to break it down
  1. "Manage from my desk": every device needs a reachable address. S1 and S2 need an SVI address and a default gateway (S2 is on R2's network, so without a gateway it can't answer PC-A).
  2. "No Telnet": SSH on R1, S1, and S2. Domain name, RSA keys, local user, login local, transport input ssh, version 2.
  3. "Still pings": show ip interface brief on each device, then ping each management address from PC-A, then actually SSH to each one.
  4. "Warning banner": banner motd on all three.
  5. Unstated but expected: secret (not plain) enable password, service password-encryption, and copy running-config startup-config on every device.

Before Session 2

Checkpoint: Modules 1–2

If you can do these cold, you're ready for VLANs.

Study

Flashcards

Click to flip. Double-click to mark as known.

Check yourself

Sample questions

Pick an answer to see if you're right. Same style as the module-group exam.

Applied

Worked examples

Think it through before you expand the answer.

Error counters

Late collisions on a full-duplex PC

A user on S1 F0/5 says the network is slow. show interfaces f0/5 on S1 shows the port at half duplex, 100 Mb/s, with late collisions climbing. The user's PC is hard-set to 100 Mb/s full duplex. What's going on, and what's the fix?

Show answer

A duplex mismatch. The PC is hard-set, so it doesn't take part in auto-negotiation. The switch port can still sense the speed, but it can't learn the duplex, so it falls back to half duplex. The PC sends whenever it likes (full duplex), and the switch sees that as collisions. Because the collisions come late in the frame, they show up as late collisions. Fix: set both ends to auto (best), or hard-set both to the same speed and duplex.

Switch management

Pings from S1's LAN work, but not from across the router

S2 (192.168.20.2, on R2's LAN) answers pings from PC-B, which is on the same LAN. From PC-A, across R1 and R2, pings to S2 fail, even though PC-A can ping PC-B. What's missing on S2?

Show answer

S2's default gateway. The ping reaches S2 fine, but S2 has no idea how to send the reply to 192.168.10.10, which isn't on its own subnet. Fix: ip default-gateway 192.168.20.1 on S2. PC-B works because it's on the same subnet, so no gateway is needed. It's also a classic reason "SSH to S2" fails.

SSH

"SSH Disabled - version 1.99"?

You type transport input ssh and login local on S1's vty lines and create a user, but PC-A's SSH attempt is refused, and show ip ssh says SSH is disabled. Which step did you skip, and what does it depend on?

Show answer

The RSA keys. SSH turns on only when crypto key generate rsa runs, and that command needs a hostname other than the default and an ip domain-name first. The key is named after both (for example S1.it141.example). Run ip domain-name it141.example, then crypto key generate rsa, then ip ssh version 2.

Frame forwarding

Who gets the frame?

S1's MAC table has PC-A on F0/1 and R1 on G0/1, and nothing else. A brand-new PC on F0/7 sends a frame to PC-A. Then PC-A replies. What does S1 do with each frame, and what's in the table afterward?

Show answer

Frame 1 (new PC → PC-A): S1 learns the new PC's MAC on F0/7. PC-A's MAC is known, so S1 forwards out F0/1 only. No flooding. Frame 2 (PC-A → new PC): S1 refreshes PC-A's timer on F0/1. The new PC's MAC was just learned, so S1 forwards out F0/7 only. The table now holds three entries: F0/1, F0/7, G0/1.

Switching domains

Count the domains

R1's G0/0/1 connects to S1. Six PCs plug into S1, all full duplex. R1's G0/0/0 connects to R2, and R2's LAN has S2 with four PCs, also full duplex. How many broadcast domains are there? How many collision domains?

Show answer

Broadcast domains: 3. R1's LAN, the R1–R2 link, and R2's LAN. Each router interface ends one. Collision domains: 0. Every link is full duplex, so none of them has a collision domain. (Exam-style counting questions usually count every switch port and router link as its own collision domain anyway. Counted that way, this network has 13: R1–S1, six PCs, R1–R2, R2–S2, and four PCs.)

Reference

Glossary & index

Every term from this session. Search, or jump by letter.