IT131 · Session 2

Switch Config & Network Models

From plugging in a switch to understanding the models that make it all interoperate.

Covers Modules 2 & 3

Overview

What Session 2 covers

Module 2 teaches you how to configure a switch from scratch. Module 3 explains why all those settings exist — the protocol suites and layered models that make devices from different manufacturers talk to each other.

Module 2

Switch bootup process

Before you can configure anything, the switch has to boot. Understanding the boot sequence tells you where the config lives and what happens if something goes wrong.

1. POST Power-On Self-Test Run from ROM (CPU, RAM, ports) 2. Load IOS From flash memory IOS = the operating system 3. Config startup-config From NVRAM → RAM Where configs (and code) live ROM Bootstrap, POST, ROMMON Fixed — not writable Flash IOS image file Persistent (survives reboot) NVRAM startup-config Persistent (survives reboot) RAM running-config Volatile (lost on reboot)
The switch boots by running the bootstrap program from ROM, testing hardware (POST), loading the IOS from flash, then loading the saved config from NVRAM into RAM. If no saved config exists, it enters setup mode.

Key memory types

running-config vs. startup-config
! running-config = what the switch is using RIGHT NOW (in RAM) ! startup-config = what the switch WILL use on next boot (in NVRAM) ! If you make changes but don't save, they vanish on reboot. Switch# show running-config ! current active config Switch# show startup-config ! saved config (what boots next time) Switch# copy running-config startup-config ! SAVE IT

Module 2

IOS CLI access & modes

Cisco IOS uses a hierarchical mode structure. You must be in the right mode to run a given command — this trips up every beginner.

IOS Mode Hierarchy User EXEC mode Prompt: Switch> Limited commands (view only) Privileged EXEC mode Prompt: Switch# All show commands, debug, save Global Configuration mode Prompt: Switch(config)# Hostname, passwords, banners, etc. (config-if)# (config-line)#
You move down the hierarchy with enable → configure terminal, and back with exit. Each mode has its own set of available commands.

Access methods

Three ways to reach the CLI
Console — physical cable, direct access Always works. No network needed. The "break glass" method. SSH — encrypted remote access over the network Requires: management IP + hostname + domain name + RSA keys + a local username + "login local" on the vty lines. Preferred for day-to-day management. Telnet — unencrypted remote access Mentioned only to say "don't use it." Exists in the curriculum to contrast with SSH.

Module 2

Basic switch configuration

A complete initial switch configuration — hostname, security, management IP, SSH. This is the sequence you'll follow every time you touch a new switch.

Switch Initial Configuration (full walkthrough)
! === Step 1: Enter privileged EXEC mode === Switch> enable Switch# ! === Step 2: Enter global config mode === Switch# configure terminal Switch(config)# ! === Step 3: Set hostname === Switch(config)# hostname Floor1-SW Floor1-SW(config)# ! prompt changes immediately ! === Step 4: Secure privileged EXEC mode === Floor1-SW(config)# enable secret Cisco123 ! NEVER use "enable password" — it stores in plaintext ! === Step 5: Secure console port === Floor1-SW(config)# line console 0 Floor1-SW(config-line)# password ConP@ss Floor1-SW(config-line)# login Floor1-SW(config-line)# exit ! === Step 6: Secure remote access (SSH) === ! SSH won't start without a domain name and an RSA key pair — ! and a line password alone can't authenticate an SSH session. Floor1-SW(config)# ip domain-name it131.local Floor1-SW(config)# crypto key generate rsa modulus 1024 Floor1-SW(config)# ip ssh version 2 Floor1-SW(config)# username admin secret Cisco123 Floor1-SW(config)# line vty 0 4 ! login local = authenticate against the local username database Floor1-SW(config-line)# login local ! transport input ssh = SSH only, refuse Telnet Floor1-SW(config-line)# transport input ssh Floor1-SW(config-line)# exit Floor1-SW(config)# service password-encryption ! Weakly obscures the line passwords set above (type 7 — trivially ! reversible). Contrast with "enable secret", which is a real hash. ! === Step 7: Set a legal warning banner === Floor1-SW(config)# banner motd # Enter TEXT message. End with the character '#'. Authorized access only. All activity is monitored.# ! === Step 8: Configure management IP on VLAN 1 === Floor1-SW(config)# interface vlan 1 Floor1-SW(config-if)# ip address 192.168.1.10 255.255.255.0 Floor1-SW(config-if)# no shutdown ! VLAN 1 is up by default for data, but the SVI needs "no shutdown" ! === Step 9: Set default gateway (so switch is reachable from other subnets) === Floor1-SW(config)# ip default-gateway 192.168.1.1 ! === Step 10: SAVE the config === Floor1-SW(config)# end Floor1-SW# copy running-config startup-config ! Without this step, everything above is lost on reboot!
Connecting from a real PC Packet Tracer's PC has its own SSH client and connects fine: ssh -l admin 192.168.1.10. A real 2960 on IOS 15 only offers older SHA-1 methods, for both the key exchange and the ssh-rsa host key signature. Current OpenSSH clients turn both off by default: up-to-date Windows 11, macOS, and Linux. The first error is usually no matching key exchange method found. Their offer: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1. Once that's fixed, the next one is no matching host key type found. Their offer: ssh-rsa. A bigger RSA key doesn't fix either one. For a lab device, allow the old methods for this one connection:
ssh -o KexAlgorithms=+diffie-hellman-group14-sha1 -o HostKeyAlgorithms=+ssh-rsa admin@192.168.1.10
If it then complains about ciphers, also add -o Ciphers=+aes128-cbc. Older Windows 10 machines may connect with plain ssh admin@192.168.1.10, and PuTTY also works. Keep the switch key at 1024 bits or more: current clients reject smaller RSA keys.
Verification commands
! full current config Floor1-SW# show running-config ! IP addresses on all interfaces Floor1-SW# show ip interface brief ! MAC-to-port mapping Floor1-SW# show mac address-table ! detailed interface status Floor1-SW# show interfaces ! IOS version, uptime, config register Floor1-SW# show version ! SSH status and version Floor1-SW# show ip ssh
End-device verification — every lab starts here
! Everything above is switch-side. You need the host-side commands ! just as often — this ladder is the single most useful troubleshooting ! habit you can install this early. ! IP, mask, gateway, MAC, DNS — all in one place C:\> ipconfig /all ! loopback — tests the local TCP/IP stack, not the NIC C:\> ping 127.0.0.1 ! L3 reachability to the switch's own SVI C:\> ping 192.168.1.10 ! hop-by-hop path (previews Module 13's TTL trick) C:\> tracert 8.8.8.8

Module 3

OSI vs. TCP/IP models

Two models describe how networking works in layers. The OSI model is the reference vocabulary; the TCP/IP model is what the internet actually runs on.

OSI Model (7 layers) TCP/IP Model (4 layers) 7. Application 6. Presentation 5. Session 4. Transport 3. Network 2. Data Link 1. Physical Application (combines OSI 7, 6, 5) Transport Internet Network Access (combines OSI 2, 1) PDU names (top → bottom): Data → Segment → Packet → Frame → Bits
The OSI model has 7 layers (reference vocabulary); the TCP/IP model has 4 layers (what the internet actually uses). Both describe the same process — they just group layers differently.

Layer-by-layer reference

LayerJobPDUExamples
7 ApplicationNetwork services to appsDataHTTP, DNS, SMTP, DHCP
6 PresentationEncoding, encryptionDataJPEG, ASCII, SSL/TLS
5 SessionManage dialoguesDataNetBIOS, RPC
4 TransportEnd-to-end deliverySegment (TCP) / Datagram (UDP)TCP, UDP
3 NetworkRouting across networksPacketIP, ICMP, OSPF
2 Data LinkMAC addressing, error detectionFrameEthernet 802.3, Wi-Fi 802.11
1 PhysicalBits on the wireBitsCables, connectors, signaling

Memory aid (top → bottom): "All People Seem To Need Data Processing"
Memory aid (bottom → top): "Please Do Not Throw Sausage Pizza Away"

Module 3

Encapsulation & decapsulation

As data moves down the protocol stack, each layer wraps it with its own header (and sometimes a trailer). This wrapping is encapsulation. At the receiving end, each layer strips its header — decapsulation.

Encapsulation (sending) → Decapsulation (receiving) Sending host Data (HTTP request) TCP Data Segment IP TCP Data Packet MAC IP TCP Data FCS Frame 01101001 11010010 01110101 ... Bits network Receiving host 01101001 11010010 01110101 ... Bits Frame → strip MAC + FCS → Packet Packet → strip IP → Segment Segment → strip TCP → Data Data delivered to app
Sending (left): each layer adds its header as data moves down. Receiving (right): each layer strips its header as data moves up. The PDU name changes at each layer.

See also: OSI Company Kit — Episode 01, "One Request, Seven Desks" (full walkthrough of this same down-trip/up-trip, department by department, with a live Wireshark capture)

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 checkpoint exams.

Applied

Worked examples

Think it through before you expand the answer.

IOS Modes

Which mode am I in?

You type configure terminal and the prompt changes to Switch(config)#. You then type interface fastethernet 0/1 and the prompt changes again. What mode are you in now, and what does the prompt tell you?

Show answer

Answer: You're in interface configuration mode — (config-if)#. The prompt encodes your position in the hierarchy: (config) means global config, (config-if) means you're inside a specific interface's config. You can only configure that interface's settings (speed, duplex, description) while in this mode.

Config save

The reboot surprise

You spend 20 minutes configuring a switch — hostname, passwords, management IP, SSH. You can ping the switch from a PC. The next morning, the switch reboots overnight and all your config is gone. What happened?

Show answer

Answer: You forgot to save. The changes you made were in running-config (RAM, volatile). When the switch rebooted, it loaded startup-config (NVRAM), which was never updated. The fix: always run copy running-config startup-config (or write memory) after finishing configuration.

Diagnosis

Find the three problems

A classmate pastes you this fragment of a switch's running-config and asks why they can't reach it over SSH:

hostname Switch
enable password cisco
!
line vty 0 4
 login
 transport input telnet

Find three problems with this fragment.

Show answer

1. enable password, not enable secret. Stores the privileged-EXEC password in plaintext in the config instead of hashing it.

2. transport input telnet — not SSH. Even if it were ssh, there's no ip domain-name and no crypto key generate rsa anywhere, so the SSH server has nothing to start with.

3. Hostname is still the default (Switch). RSA key generation requires a non-default hostname and a domain name — so even fixing #2 in isolation would still fail until this is set too.

Diagnosing a broken config from the artifact itself — not just transcribing a correct one — is a different, more durable skill than following the walkthrough above.

SSH vs Telnet

Why SSH?

A student asks: "If both SSH and Telnet let me configure a switch remotely, why does it matter which one I use?"

Show answer

Answer: Telnet sends everything — including passwords — in plaintext. Anyone sniffing the network can read your credentials. SSH encrypts the entire session. On any production network, SSH is the only acceptable choice for remote management. Telnet exists in the curriculum so you understand why SSH replaced it.

OSI mapping

Which layer is it?

A switch forwards traffic using MAC addresses. A router forwards traffic using IP addresses. A firewall inspects traffic based on security rules. At which OSI layer does each device primarily operate?

Show answer

Switch → Layer 2 (Data Link) — it uses MAC addresses to make forwarding decisions.

Router → Layer 3 (Network) — it uses IP addresses to route packets between networks.

Firewall → Layers 3–7 — it can filter based on IP addresses (L3), port numbers (L4), or application content (L7), depending on its capabilities.

Encapsulation

What's the PDU?

A web browser sends an HTTP request to a server on another network. Starting from the application layer, what is the PDU called at each layer as the data moves down the stack?

Show answer

Layer 7 (Application): Data — the HTTP request itself.

Layer 4 (Transport): Segment — TCP wraps the data with source and destination port numbers (e.g., port 443 for HTTPS).

Layer 3 (Network): Packet — IP wraps the segment with source and destination IP addresses.

Layer 2 (Data Link): Frame — Ethernet wraps the packet with source and destination MAC addresses plus an error-check trailer (FCS).

Layer 1 (Physical): Bits — the frame is converted to electrical/optical signals on the wire.

Management IP

Why VLAN 1?

Why do we configure the switch's management IP on interface vlan 1 instead of on a physical port like fastethernet 0/1?

Show answer

Answer: A physical port (like Fa0/1) is a Layer 2 port — it forwards frames, not packets. It doesn't have (or need) an IP address. The management IP needs to sit on a Layer 3 interface so the switch can be reached via IP for remote management. interface vlan 1 is a Switch Virtual Interface (SVI) — a virtual Layer 3 interface associated with VLAN 1. By default, all access ports are in VLAN 1, so any port on the switch can reach this management IP.

Reference

Glossary & index

Every term from this session, searchable and indexed A–Z.