IT131 · SESSION 11 · FIELD NOTES

Network Security & Building a Small Network

The OSI Company works now. Every floor can reach every other floor, and the Front Desk talks to the whole world. That's the problem: anything that can reach you can attack you. This week the NOC walks the building looking for unlocked doors, and then we step back and ask how you'd build, verify, and fix a small network like this from scratch.

Opens with Module Quiz — Network Application Communications (14–15) New material Module 16 — Network Security Fundamentals New material Module 17 — Build a Small Network Next week Module Quiz — Building and Securing a Small Network (16–17)

Modules 16 & 17

What Session 11 covers

We start with the module quiz on Modules 14–15. Then there are two new modules. Module 16 covers what attacks a network, and how you lock a router or switch down. Module 17 brings the whole course together: choosing devices for a small network, then verifying and troubleshooting it with ping, traceroute, show commands, and debug. Next week's module quiz covers both.

Cold open · The NOC, after hours

The NOC does a walk-through of the building with a clipboard. In the lobby, a "delivery driver" is asking the Front Desk which floor the servers are on and what time the guards change shifts. On Floor 3, someone is trying every badge reader with a ring of guessed codes. Out front, two hundred people have formed a line that goes nowhere, and real customers can't get through the door. In the mailroom, a parcel labelled "Free Office Snacks" is ticking. "Reconnaissance, access, denial of service, malware," the NOC says, writing it all down. "And the server-room door was propped open with a fire extinguisher. That one's on us."

Topology used on this page The same network as Session 10. R1's LAN is 192.168.10.0/24 (PC-A 192.168.10.10, gateway 192.168.10.1). The R1–R2 link is 10.0.0.0/30. R2's LAN is 192.168.20.0/24 (PC-B 192.168.20.10, and SRV1 192.168.20.100, the web and DNS server for it131.example). New this week: switches S1 on R1's LAN and S2 on R2's LAN, both Catalyst 2960s. The routers are Cisco 2911s.

Module Quiz — Network Application Communications

Quiz day: Modules 14–15

The quiz comes first. Everything on it is on the Session 10 page. Here's a last-minute pass.

The four most-missed points ACK = the next byte expected. SYN and FIN each use one sequence number. DHCP's first REQUEST is a broadcast. POP3 downloads and deletes; IMAP keeps mail on the server.

Module 16 · 16.1

Security threats and vulnerabilities

A threat is what could go wrong. A vulnerability is the weakness that lets it happen. An attack needs both.

Four types of threats

ThreatWhat happens
Information theftSomeone gets in and steals confidential data: customer lists, designs, research.
Data loss and manipulationData is destroyed or changed: a virus that wipes a drive, or someone editing a grade or a price.
Identity theftPersonal information is stolen to pretend to be someone else: to open accounts, file taxes, take loans.
Disruption of serviceLegitimate users can't get to the service. DoS attacks are the classic example.

Three types of vulnerabilities

TypeExamples
TechnologicalWeaknesses built into the technology itself: TCP/IP protocol weaknesses (HTTP, FTP, and Telnet send in plaintext), operating system flaws, and network equipment flaws.
ConfigurationWeaknesses we create: unsecured user accounts, system accounts with easy passwords, misconfigured internet services, unsecured default settings, and misconfigured network equipment.
Security policyNo written policy, office politics, no authentication continuity, logical access controls not applied, software and hardware changes made outside the policy, and no disaster recovery plan.
Which one is yours? You can't fix a protocol, but you can choose not to use it. Telnet's plaintext is a technological weakness. Leaving Telnet enabled on your router is a configuration weakness. Most of the device security in 16.4 is about closing configuration vulnerabilities.

Four types of physical threats

TypeExamples
HardwarePhysical damage to servers, routers, switches, cabling, and workstations.
EnvironmentalTemperature extremes (too hot or too cold) and humidity extremes (too wet or too dry).
ElectricalVoltage spikes, brownouts (insufficient supply voltage), unconditioned power (noise), and total power loss.
MaintenancePoor handling of key components (electrostatic discharge), no critical spare parts, poor cabling, and poor labeling.

A good physical plan locks wiring closets and equipment rooms, controls who has the key, and puts monitoring on the door. The fanciest firewall in the world doesn't help if anyone can walk in and plug into the console port.

Module 16 · 16.2

Network attacks

Malicious software, plus three families of attack: reconnaissance, access, and denial of service.

Malware

TypeHow it spreadsKey idea
VirusAttaches to a host program or file. Needs a human action (running the program, opening the file) to spread.Can't move on its own.
WormCopies itself across the network by exploiting vulnerabilities. No host program and no user action needed.Spreads very fast and eats bandwidth.
Trojan horseLooks like legitimate software, and the user installs it willingly.The damage is hidden inside the "gift".

Reconnaissance attacks: casing the building

Recon is information gathering: finding out what's there before attacking it. It usually comes first.

  1. Internet queries. Look up public information about the target: who owns the address block (whois), DNS records, the company website.
  2. Ping sweeps. Ping every address in a range to find out which hosts are alive.
  3. Port scans. Probe the live hosts to see which ports are open, so which services are running. Tools Cisco NetAcad names: Nmap, SuperScan, Angry IP Scanner, NetScanTools.
  4. Vulnerability scans. Ask the running services what version they are, and look up known weaknesses for those versions.
  5. Exploitation tools. Try to exploit what was found.

Access attacks: getting in

AttackWhat the attacker does
Password attacksGuesses or cracks passwords: brute force, dictionary attacks, or sniffing them off the wire (which is why Telnet is a problem).
Trust exploitationCompromises a host that another system trusts, then uses that trust to get into the second system.
Port redirectionUses a compromised host as a stepping stone to pass traffic through to a target that would otherwise be filtered.
Man-in-the-middle (MITM)Sits between two parties, reading and possibly changing what they send, while both think they're talking directly.

Denial of service: blocking the door

Try it: name that attack

Module 16 · 16.3

Network attack mitigations

No single product stops everything. You layer defenses so that an attacker who gets past one still meets the next.

Defense-in-depth

Also called the layered approach. NetAcad's example network uses several security devices and services together:

Device or serviceJob
VPNAn encrypted tunnel across an untrusted network, for remote users and branch sites.
ASA firewallCisco's dedicated firewall. Allows outbound traffic and returning replies, and blocks unrequested traffic from outside.
IPSIntrusion prevention system. Watches traffic for known attack signatures and stops them in real time.
ESA / WSAEmail and web security appliances. Filter spam, phishing, and malicious websites.
AAA serverCentral place that checks who is logging in, what they may do, and records what they did.

Keep backups

Back up device configurations and IOS images as well as data. NetAcad's four backup considerations:

Upgrade, update, and patch

Most worms and many other attacks exploit holes that already have a fix. Keeping operating systems, applications, and device software current is one of the most effective defenses there is. In a large organization, patches are managed centrally so they can be tested and then pushed to every host.

AAA: authentication, authorization, accounting

Question it answersCredit-card version
AuthenticationWho are you?Is this your card?
AuthorizationWhat are you allowed to do?How much can you spend?
AccountingWhat did you do, and when?What did you spend it on? (the statement)
Preview, not configured in NetAcad In NetAcad, AAA is a concept. Configuring it with a RADIUS or TACACS+ server comes in later courses. The device security you do configure this term is in 16.4.

Firewalls

A firewall sits between networks and controls what crosses. It allows traffic from inside out, and only lets traffic in from outside if it's a reply or explicitly permitted. NetAcad's four filtering methods:

MethodFilters by
Packet filteringIP or MAC address
Application filteringApplication type, using port numbers
URL filteringSpecific URLs or keywords
Stateful packet inspection (SPI)Whether incoming packets are legitimate replies to requests from inside. Unsolicited packets are blocked.

Endpoint security: an endpoint is any host: laptop, desktop, server, smartphone. Protecting them means antivirus and anti-malware, host-based firewalls and intrusion prevention, and a company policy for what can be installed. Endpoints are often the weakest link, because people use them.

Module 16 · 16.4

Device security

This is the part you configure. Routers and switches ship with almost no security, so these steps go on every device you touch.

Cisco AutoSecure

One privileged EXEC command, auto secure, starts an interactive wizard that turns off risky services and prompts you for passwords, banners, and SSH settings. It's a quick way to lock down a new device, but you should still know what each individual command does, because that's what the exam (and the next section) asks about.

R1 · AutoSecure (first lines only)
R1# auto secure --- AutoSecure Configuration --- *** AutoSecure configuration enhances the security of the router, but it will not make it absolutely resistant to all security attacks *** ...

Strong passwords

Passphrases A sentence is longer and easier to remember than a random string: Ch@ngeTheW0rld! or IT131 makes 7 holy steps!. On Cisco devices, leading spaces in a password are ignored, but spaces after the first character count.

Additional password security

Four commands from NetAcad, plus the enable secret you already know. The passwords in these examples are 8 characters or longer, because once min-length 8 is on, cisco and class are rejected.

R1 · password hardening
R1(config)# security passwords min-length 8 R1(config)# enable secret cisco % Password too short - must be at least 8 characters. Password configuration failed R1(config)# enable secret En@ble2026 R1(config)# service password-encryption R1(config)# line console 0 R1(config-line)# password C0ns0le!26 R1(config-line)# login R1(config-line)# exec-timeout 5 0 R1(config-line)# exit R1(config)# login block-for 120 attempts 3 within 60 R1(config)# end R1# show running-config | include secret|password service password-encryption security passwords min-length 8 enable secret 5 $1$Xq7f$eKERTZ5T9/IQc26ztSdjI/ password 7 04785B081C71404B484B53 ! type 7 = scrambled, NOT hashed. Any online decoder reverses it.
CommandWhat it does
security passwords min-length 8Rejects any new password shorter than 8 characters. Passwords set before the command are not checked.
service password-encryptionScrambles the plaintext passwords in the config (console, vty, username … password) as type 7, so they can't be read over your shoulder.
exec-timeout 5 0Logs out an idle session after 5 minutes, 0 seconds. exec-timeout 0 0 means never, which is bad practice.
login block-for 120 attempts 3 within 60After 3 failed logins within 60 seconds, refuse all logins for 120 seconds. Slows down password guessing.
Type 7 is not real protection Decode that type 7 line and you get C0ns0le!26 back. service password-encryption only defeats someone reading the screen. The real protection is secret, which is a one-way hash (type 5 on this router; newer IOS uses type 9). Use enable secret and username … secret, never enable password.

Enable SSH

Telnet sends everything, including your password, in plaintext. SSH encrypts the session. NetAcad's steps, in order:

R1 · enabling SSH
! 1. a unique hostname Router(config)# hostname R1 ! 2. a domain name R1(config)# ip domain-name it131.example ! 3. RSA keys R1(config)# crypto key generate rsa The name for the keys will be: R1.it131.example Choose the size of the key modulus in the range of 360 to 4096 for your General Purpose Keys. Choosing a key modulus greater than 512 may take a few minutes. How many bits in the modulus [512]: 1024 % Generating 1024 bit RSA keys, keys will be non-exportable... [OK] (elapsed time was 1 seconds) *Oct 7 14:02:11.482: %SSH-5-ENABLED: SSH 1.99 has been enabled ! NetAcad's one-line form: crypto key generate rsa general-keys modulus 1024 ! 4. a local user R1(config)# username admin secret Adm1n!2026 ! 5. vty lines: SSH only, and check the local user list R1(config)# line vty 0 4 R1(config-line)# transport input ssh R1(config-line)# login local R1(config-line)# exit ! 6. version 2 only R1(config)# ip ssh version 2 R1(config)# end R1# show ip ssh SSH Enabled - version 2.0 ... Authentication timeout: 120 secs; Authentication retries: 3
LineWhy
Hostname + domain nameThe RSA key is named hostname.domain. The router won't generate keys while it's still called Router or has no domain name.
crypto key generate rsaCreates the key pair that encrypts the session. Generating it is what turns the SSH server on. NetAcad uses 1024 bits; in real life use 2048 or more.
SSH 1.99Means versions 1 and 2 are both accepted. ip ssh version 2 turns off the old, weak version 1.
login localChecks the username list. With no username configured, nobody can log in.
transport input sshThe vty lines accept SSH and refuse Telnet.
Enrichment: real ISR 4000-series routers (IOS-XE) show ip ssh is from CCNA 2 (SRWE 1). Packet Tracer's 2911 doesn't model any of the following, but a real ISR 4000-series router on IOS-XE 16.9 does. Its SSH server only offers older SHA-1 methods (key exchange and the ssh-rsa host key), which current OpenSSH clients refuse with no matching key exchange method found or no matching host key type found. Their offer: ssh-rsa. A bigger RSA key doesn't fix it; a newer IOS-XE release does, or allow the old methods for this one connection:
ssh -o KexAlgorithms=+diffie-hellman-group14-sha1 -o HostKeyAlgorithms=+ssh-rsa admin@192.168.10.1
These routers also ship with the web interface on (HTTP 80 and HTTPS 443), list open ports with show control-plane host open-ports, and show the domain command as ip domain name (no hyphen); both forms are accepted.

Disable unused services

Every service that's running is something that can be attacked. Turn off what you don't use. The web interface (HTTP 80 and HTTPS 443) is a common one, and no ip http server is still good practice on IOS 15. Packet Tracer's 2911 doesn't model the web server or these commands, so this output is from real gear:

R1 · find the open ports, close the web server
R1# show ip ports all Proto Local Address Foreign Address State PID/Name TCP 0.0.0.0:22 0.0.0.0:0 LISTEN [IOS]SSH-Process TCP 0.0.0.0:80 0.0.0.0:0 LISTEN [IOS]HTTP CORE TCP 0.0.0.0:443 0.0.0.0:0 LISTEN [IOS]HTTP CORE ... R1# configure terminal R1(config)# no ip http server R1(config)# no ip http secure-server R1(config)# end R1# show ip ports all Proto Local Address Foreign Address State PID/Name TCP 0.0.0.0:22 0.0.0.0:0 LISTEN [IOS]SSH-Process
Your output may look different The column layout of show ip ports all varies between IOS versions, so read it for the idea: each line is a port the router is listening on. Port 22 stays, because we just turned SSH on.

Module 17 · 17.1–17.3

Designing and growing a small network

A small network is a few to a few dozen users, usually one internet connection, and one person (maybe you) who looks after all of it.

Choosing devices

FactorWhat to think about
CostThe device, plus redundancy, plus support and maintenance contracts.
Speed and types of ports/interfacesEnough ports, at the right speeds, of the right types (copper, fiber), with room to grow.
ExpandabilityFixed-configuration devices are cheaper. Modular devices take expansion cards when you need more.
Operating system features and servicesDoes the IOS version support what you need: security, QoS, VoIP, NAT, DHCP?

Planning the addressing

Plan the IP addressing before you install anything. Give each kind of device its own range in the subnet, so you can tell what something is from its address:

Device typeAddressingOur LAN-A, for example
Network devices (routers, switches, APs)Static, low or high in the range.1 – .9
Servers and peripherals (printers, cameras)Static, so their address never changes.100 – .199
End devices (PCs, phones, laptops)DHCP pool.20 – .99, .200 – .254
Hosts reachable from the internet (a public web server)Static—

The exact ranges are your choice. The rule is to pick a scheme, write it down, and stick to it. (PC-A is static at .10 for this page's examples, which is why the pool starts at .20.) (Picking subnet sizes is the Subnetting Field Manual's job.)

Redundancy and traffic management

Applications and protocols

Growing the network

Networks grow, so plan for it. NetAcad lists four things you need before you can scale:

ElementWhat it means
Network documentationPhysical and logical topology diagrams.
Device inventoryA list of every device that uses or makes up the network.
BudgetAn itemized IT budget, including the yearly equipment purchasing budget.
Traffic analysisWhich protocols, applications, and services are on the network, and how much traffic each uses.

Protocol analysis (a tool like Wireshark) shows what the traffic actually is. Capture during peak times, and on different segments, because traffic isn't the same everywhere. Employee network utilization looks at each user's OS and versions, applications (network and non-network), and CPU, drive, and RAM utilization. Over time these records add up to a baseline.

Module 17 · 17.4

Verify connectivity: ping and traceroute

Ping asks "can I reach it?" Traceroute asks "which way did it go, and where did it stop?"

Ping

Ping sends ICMP echo requests and waits for echo replies (Module 13). On a Cisco device, each probe prints one symbol:

R1 · three pings, three results
R1# ping 192.168.20.10 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 192.168.20.10, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/2 ms ! Same ping right after R2 reloads (empty ARP cache): R1# ping 192.168.20.10 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 192.168.20.10, timeout is 2 seconds: .!!!! Success rate is 80 percent (4/5), round-trip min/avg/max = 1/1/1 ms ! A router on the path sends back "unreachable": R1# ping 192.168.20.10 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 192.168.20.10, timeout is 2 seconds: U.U.U Success rate is 0 percent (0/5)
SymbolMeaning
!Echo reply received. The path works in both directions.
.Timed out waiting for a reply. The packet was lost or blocked, or there's no route back.
UA router on the path sent back an ICMP Destination Unreachable.
Why .!!!! is normal R2 had no ARP entry for PC-B yet. While it ARPs, IOS drops the packet that triggered the request instead of holding it, so the first echo times out. Once ARP finishes, the rest succeed. A . on the very first ping after a reboot is not a fault. (U.U.U alternates because routers rate-limit the unreachables they send; that detail is enrichment.)
Silence isn't always a broken network Windows Defender Firewall drops incoming pings by default, so ..... to a Windows PC can just mean the firewall is doing its job. Test against the router interfaces first. To stop a long ping on IOS, press Ctrl+Shift+6.

Extended ping

A plain ping from R1 to PC-B leaves from R1's outgoing interface, 10.0.0.1. That proves R1 can reach PC-B, but not that LAN-B can route back to LAN-A, which is what PC-A actually needs. Type ping with no address to get the extended prompts, and pick the source interface:

R1 · extended ping, sourced from LAN-A
R1# ping Protocol [ip]: Target IP address: 192.168.20.10 Repeat count [5]: Datagram size [100]: Timeout in seconds [2]: Extended commands [n]: y Ingress ping [n]: Source address or interface: g0/1 DSCP Value [0]: Type of service [0]: Set DF bit in IP header? [no]: Validate reply data? [no]: Data pattern [0x0000ABCD]: Loose, Strict, Record, Timestamp, Verbose[none]: Sweep range of sizes [n]: Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 192.168.20.10, timeout is 2 seconds: Packet sent with a source address of 192.168.10.1 !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/2 ms

Press Enter to accept any [default]. You can type the interface name or its address. Prompts like Ingress ping and DSCP Value depend on the IOS version; the ones that matter are Target, Repeat count, Extended commands, and Source. The one-line form is ping 192.168.20.10 source g0/1.

Traceroute

Traceroute sends probes with TTL 1, 2, 3, and so on. Each router that drops a probe when its TTL runs out sends back an ICMP Time Exceeded, which reveals that hop. Windows calls it tracert; IOS and Linux call it traceroute.

PC-A · tracert to the web server
C:\Users\student> tracert www.it131.example Tracing route to www.it131.example [192.168.20.100] over a maximum of 30 hops: 1 <1 ms <1 ms <1 ms 192.168.10.1 2 <1 ms <1 ms 1 ms 10.0.0.2 3 1 ms <1 ms <1 ms 192.168.20.100 Trace complete.
What you seeWhat it means
Three times per hopThree probes are sent to each hop.
Hop 2 is 10.0.0.2R2 answers from the interface the probe arrived on, its link to R1, not its LAN-B gateway address 192.168.20.1.
Bare IP addressestracert tries to look up a name for each hop. With no reverse DNS, you get IPs, sometimes after a pause. tracert -d skips the lookups.
R1 · IOS traceroute, working and then failing
R1# traceroute 192.168.20.100 Type escape sequence to abort. Tracing the route to 192.168.20.100 VRF info: (vrf in name/id, vrf out name/id) 1 10.0.0.2 1 msec 0 msec 1 msec 2 192.168.20.100 1 msec 1 msec 1 msec ! Later, after something breaks: R1# traceroute 192.168.20.100 Type escape sequence to abort. Tracing the route to 192.168.20.100 VRF info: (vrf in name/id, vrf out name/id) 1 10.0.0.2 1 msec 0 msec 1 msec 2 * * * 3 * * * ... ! Ctrl+Shift+6 to stop early
Reading a failed trace The rule: the problem is at or beyond the last hop that answered. Here R2 answered, so the problem is between R2 and SRV1, or SRV1 itself. From R1, hop 2 is SRV1, so the likely causes are: SRV1 is off or unplugged (or its S2 port is down), SRV1 has a wrong default gateway so its replies can't get back, or a firewall is dropping the probes. A trace that dies at the far end is often a return-path problem.
Enrichment: why IOS and Windows can disagree Windows tracert sends ICMP echo requests. IOS traceroute sends UDP probes to high ports (33434 and up), and the destination ends the trace by answering Port Unreachable. A host firewall can drop one kind and not the other, so stars on the last hop alone can be normal.

Extended traceroute

Like extended ping: type traceroute with no address and answer the prompts. The useful ones are Target, Source address, and Numeric display (skip the slow name lookups).

R1 · extended traceroute
R1# traceroute Protocol [ip]: Target IP address: 192.168.20.100 Ingress traceroute [n]: Source address: 192.168.10.1 DSCP Value [0]: Numeric display [n]: y Timeout in seconds [3]: Probe count [3]: Minimum Time to Live [1]: Maximum Time to Live [30]: Port Number [33434]: Loose, Strict, Record, Timestamp, Verbose[none]: Type escape sequence to abort. Tracing the route to 192.168.20.100 VRF info: (vrf in name/id, vrf out name/id) 1 10.0.0.2 1 msec 0 msec 1 msec 2 192.168.20.100 1 msec 1 msec 1 msec

Ingress traceroute and DSCP Value only appear on newer IOS versions.

Network baseline

A baseline is a record of what "normal" looks like: ping and traceroute times, interface statistics, and utilization, taken at regular times while the network is healthy. When users say "the network is slow", you compare against the baseline to tell whether it actually is. Ping output is an easy start: save it, with the date and time, and compare later. Cisco devices can timestamp it for you.

Module 17 · 17.5

Host and IOS commands

Before you troubleshoot anything, find out how it's actually configured. Don't trust what it's supposed to be.

IP configuration on a Windows host

PC-A · ipconfig /all (trimmed)
C:\Users\student> ipconfig /all Windows IP Configuration Host Name . . . . . . . . . . . . : PC-A ... Ethernet adapter Ethernet: Connection-specific DNS Suffix . : Description . . . . . . . . . . . : Intel(R) Ethernet Connection I219-LM Physical Address. . . . . . . . . : 50-9A-4C-1A-2B-3C DHCP Enabled. . . . . . . . . . . : No Autoconfiguration Enabled . . . . : Yes Link-local IPv6 Address . . . . . : fe80::4a1c:9e2f:7b3d:12a4%12(Preferred) IPv4 Address. . . . . . . . . . . : 192.168.10.10(Preferred) Subnet Mask . . . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . . . . : 192.168.10.1 DNS Servers . . . . . . . . . . . : 192.168.20.100 NetBIOS over Tcpip. . . . . . . . : Enabled

Plain ipconfig shows the address, mask, and gateway. You need /all for the MAC address, whether DHCP is on, and the DNS servers. "DHCP Enabled: No" means PC-A has a static address. ipconfig /displaydns shows the DNS cache (Session 10).

Linux and macOS

A Linux host on LAN-B · ip address and ip route
student@lab-linux:~$ ip address 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN ... inet 127.0.0.1/8 scope host lo ... 2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP ... link/ether 00:0c:29:4f:8a:21 brd ff:ff:ff:ff:ff:ff inet 192.168.20.50/24 brd 192.168.20.255 scope global noprefixroute ens33 valid_lft forever preferred_lft forever inet6 fe80::20c:29ff:fe4f:8a21/64 scope link noprefixroute valid_lft forever preferred_lft forever student@lab-linux:~$ ip route default via 192.168.20.1 dev ens33 proto static metric 100 192.168.20.0/24 dev ens33 proto kernel scope link src 192.168.20.50 metric 100
A Mac on LAN-B · ifconfig en0
student@MacBook ~ % ifconfig en0 en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500 ether a4:83:e7:2c:91:5e inet6 fe80::1c2b:3d4e:5f60:7a8b%en0 prefixlen 64 secured scopeid 0xb inet 192.168.20.60 netmask 0xffffff00 broadcast 192.168.20.255 media: autoselect status: active
Address and maskGateway
Windowsipconfig: dotted decimal, 255.255.255.0In the same output
Linuxip address: prefix, /24ip route (the default via line)
macOSifconfig: hex, 0xffffff00 = 255.255.255.0netstat -rn

The ARP cache

PC-A · arp -a after pinging the gateway and a neighbor
C:\Users\student> arp -a Interface: 192.168.10.10 --- 0xc Internet Address Physical Address Type 192.168.10.1 70-ea-1a-5c-3e-81 dynamic 192.168.10.20 50-9a-4c-77-88-99 dynamic 192.168.10.255 ff-ff-ff-ff-ff-ff static 224.0.0.22 01-00-5e-00-00-16 static 224.0.0.251 01-00-5e-00-00-fb static 224.0.0.252 01-00-5e-00-00-fc static 239.255.255.250 01-00-5e-7f-ff-fa static 255.255.255.255 ff-ff-ff-ff-ff-ff static

Only addresses on PC-A's own subnet appear. PC-B and SRV1 never show up, because frames to them go to the gateway's MAC (70-ea-1a-5c-3e-81, R1's G0/1). Dynamic entries were learned by ARP and age out. The static entries are broadcast and multicast mappings Windows builds itself. arp -d * clears the cache (from an administrator prompt).

Common show commands

CommandShows
show running-configThe current configuration in RAM
show interfacesStatus and statistics for every interface: errors, collisions, speed, duplex
show ip interfaceThe IPv4 settings and status of each interface (in detail)
show ip interface briefOne line per interface: address, status, protocol
show arpThe router's ARP table
show ip routeThe routing table
show protocolsWhich routed protocols are configured, and the interface status
show versionIOS version, uptime, image file, memory, interfaces, config register
show cdp neighborsDirectly connected Cisco devices
R1 · show ip interface brief
R1# show ip interface brief Interface IP-Address OK? Method Status Protocol GigabitEthernet0/0 10.0.0.1 YES manual up up GigabitEthernet0/1 192.168.10.1 YES manual up up GigabitEthernet0/2 unassigned YES unset administratively down down Serial0/0/0 unassigned YES unset administratively down down Serial0/0/1 unassigned YES unset administratively down down Vlan1 unassigned YES unset administratively down down

up / up means Layer 1 (Status) and Layer 2 (Protocol) are both working. administratively down means the interface is shut down: either no shutdown was never entered, or someone entered shutdown. The serial ports only appear if the router has a serial card. In Packet Tracer, a 2911 with no modules lists only G0/0, G0/1, G0/2, and a Vlan1 line, so don't worry if yours is shorter.

R1 · show version (trimmed)
R1# show version Cisco IOS Software, C2900 Software (C2900-UNIVERSALK9-M), Version 15.1(4)M4, RELEASE SOFTWARE (fc2) ... R1 uptime is 2 hours, 14 minutes System returned to ROM by Reload Command System image file is "flash0:c2900-universalk9-mz.SPA.151-4.M4.bin" ... Cisco CISCO2911/K9 (revision 1.0) with 491520K/32768K bytes of memory. ... 3 Gigabit Ethernet interfaces DRAM configuration is 64 bits wide with parity disabled. 255K bytes of non-volatile configuration memory. 249856K bytes of ATA System CompactFlash 0 (Read/Write) ... Configuration register is 0x2102

Config register 0x2102 is a normal boot: load IOS from flash and read the startup config. (0x2142 skips the startup config, which is how password recovery works; that's enrichment.)

CDP: who's plugged into me?

R1 · show cdp neighbors
R1# show cdp neighbors Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge S - Switch, H - Host, I - IGMP, r - Repeater, P - Phone, D - Remote, C - CVTA, M - Two-port Mac Relay Device ID Local Intrfce Holdtme Capability Platform Port ID S1 Gig 0/1 163 S I WS-C2960- Gig 0/1 R2 Gig 0/0 151 R B S I C2900 Gig 0/0 Total cdp entries displayed : 2 R1# show cdp neighbors detail ------------------------- Device ID: R2 Entry address(es): IP address: 10.0.0.2 Platform: cisco C2900, Capabilities: Router Source-Route-Bridge Switch IGMP Interface: GigabitEthernet0/0, Port ID (outgoing port): GigabitEthernet0/0 Holdtime : 151 sec Version : Cisco IOS Software, C2900 Software (C2900-UNIVERSALK9-M), Version 15.1(4)M4, RELEASE SOFTWARE (fc2) ...

Local Intrfce is R1's own port. Port ID is the neighbor's port. CDP runs at Layer 2, so it works even if IP isn't configured, which makes it great for drawing a map of a network you didn't build. detail adds each neighbor's IP address and IOS version.

CDP is a gift to attackers too Everything CDP tells you, it tells anyone plugged into that port: device names, models, addresses, and IOS versions to look up vulnerabilities for. Turn it off where it isn't needed: no cdp run for the whole device, or no cdp enable on a single interface (for example, one facing users or the internet).

Module 17 · 17.6

Troubleshooting methodology

Guessing works on easy problems. A method works on all of them.

The six steps

  1. Identify the problem. Talk to users, gather symptoms, and find out what changed. You can't fix what you haven't defined.
  2. Establish a theory of probable causes. List the likely causes, starting with the obvious.
  3. Test the theory to determine the cause. If the theory is wrong, go back to step 2 with a new one, or escalate.
  4. Establish a plan of action and implement the solution. Think about what the fix might break before you make it.
  5. Verify the solution and implement preventive measures. Check that it's fixed for the user, and stop it from coming back.
  6. Document findings, actions, and outcomes. The next person to see this problem might be you.
Escalation Some problems are beyond your knowledge or your access. Escalating is not failing: company policy should say when and to whom (a senior technician, or the vendor). Document what you tried before you hand it on.
The OSI Company version When something breaks, the NOC starts at the bottom and works up: is the cable in (Infrastructure Crew, L1)? Is the link up and the duplex right (Local Dispatch, L2)? Are the address, mask, and gateway right (Logistics, L3)? Then the port and service (Shipping, L4), then the name (Front Desk, L7). Most "the internet is down" tickets end at L1 or L3.

debug and terminal monitor

show commands are a snapshot. debug shows events as they happen. By default, debug and log messages appear only on the console. If you're connected over SSH, you see nothing until you type terminal monitor.

R1 · debug ip icmp over SSH
! Logged in to R1 over SSH from PC-A R1# terminal monitor R1# debug ip icmp ICMP packet debugging is on ! PC-A runs: ping 192.168.10.1 *Oct 7 14:30:01.512: ICMP: echo reply sent, src 192.168.10.1, dst 192.168.10.10, topology BASE, dscp 0 topoid 0 *Oct 7 14:30:02.519: ICMP: echo reply sent, src 192.168.10.1, dst 192.168.10.10, topology BASE, dscp 0 topoid 0 *Oct 7 14:30:03.527: ICMP: echo reply sent, src 192.168.10.1, dst 192.168.10.10, topology BASE, dscp 0 topoid 0 *Oct 7 14:30:04.534: ICMP: echo reply sent, src 192.168.10.1, dst 192.168.10.10, topology BASE, dscp 0 topoid 0 R1# undebug all All possible debugging has been turned off R1# terminal no monitor
debug can take a router down Debug output gets high priority on the CPU. On a busy router, a broad debug (like debug all) can overload it. Use the narrowest debug that answers your question, and turn it off as soon as you have the answer: undebug all (or no debug all). Four lines appear here because a Windows ping sends four echoes; the exact line format varies a little between IOS versions.

Module 17 · 17.7

Troubleshooting scenarios

The four problems NetAcad walks through, in the order you'd usually hit them.

1 · Duplex mismatch

If one end of a link runs full duplex and the other half duplex, the link stays up/up. Nothing alarms. It just gets slow and racks up errors, which is why this one is hard to spot. It usually happens when one end is hard-set and the other is left on auto: the auto end can't negotiate and falls back to half duplex. To force it in a lab on Gigabit copper, set both ends to 100 Mbps and only one to half:

S1 and R1 · duplex mismatch
! R1 G0/1 forced to speed 100 / duplex half ! S1 G0/1 forced to speed 100 / duplex full ! Console log on S1: *Mar 1 00:41:17.204: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on GigabitEthernet0/1 (not half duplex), with R1 GigabitEthernet0/1 (half duplex). R1# show interfaces g0/1 GigabitEthernet0/1 is up, line protocol is up Hardware is CN Gigabit Ethernet, address is 70ea.1a5c.3e81 (bia 70ea.1a5c.3e81) Internet address is 192.168.10.1/24 ... Half-duplex, 100Mb/s, media type is RJ45 ... 0 output errors, 1832 collisions, 0 interface resets ... 0 babbles, 147 late collision, 0 deferred S1# show interfaces g0/1 GigabitEthernet0/1 is up, line protocol is up (connected) ... Full-duplex, 100Mb/s, media type is 10/100/1000BaseTX ... 231 runts, 0 giants, 0 throttles 489 input errors, 258 CRC, 0 frame, 0 overrun, 0 ignored

The half-duplex side (R1) sees collisions and late collisions. The full-duplex side (S1) sees runts and CRC errors. CDP spots the mismatch between two Cisco devices; between a switch and a PC, you find it from those counters. Fix: set both ends to auto, or hard-set both ends to the same speed and duplex.

2 · IP addressing problems

On IOS devices: a wrong address or mask on a router interface, or two devices with the same address. Check with show ip interface brief and show running-config. On end devices: the most common sign is a Windows PC that gave itself an address because DHCP didn't answer.

PC-A · switched to DHCP, and DHCP failed
! PC-A was changed to "Obtain an IP address automatically" C:\Users\student> ipconfig Windows IP Configuration Ethernet adapter Ethernet: Connection-specific DNS Suffix . : Link-local IPv6 Address . . . . . : fe80::4a1c:9e2f:7b3d:12a4%12 Autoconfiguration IPv4 Address. . : 169.254.87.211 Subnet Mask . . . . . . . . . . . : 255.255.0.0 Default Gateway . . . . . . . . . :

169.254.0.0/16 is APIPA (Automatic Private IP Addressing). The label changes to "Autoconfiguration IPv4 Address", and there's no gateway. The PC can only talk to other APIPA hosts. Look for: no DHCP server on the segment, a bad cable or switch port, or a DHCP server on another subnet with no relay configured (relay is CCNA 2). After the fix, ipconfig /release then ipconfig /renew.

3 · Default gateway problems

Without a correct default gateway, a host can talk to its own subnet and nothing else. Here PC-A's gateway was typed as .254, which doesn't exist:

PC-A · wrong default gateway
C:\Users\student> ipconfig ... IPv4 Address. . . . . . . . . . . : 192.168.10.10 Subnet Mask . . . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . . . . : 192.168.10.254 C:\Users\student> 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 ... C:\Users\student> ping 192.168.20.10 Pinging 192.168.20.10 with 32 bytes of data: Reply from 192.168.10.10: Destination host unreachable. Reply from 192.168.10.10: Destination host unreachable. Reply from 192.168.10.10: Destination host unreachable. Reply from 192.168.10.10: Destination host unreachable. Ping statistics for 192.168.20.10: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
What you seeWhat it means
Ping to 192.168.10.1 worksSame subnet, so no gateway is needed. The router itself is fine.
"Reply from 192.168.10.10"The reply comes from PC-A itself. It ARPed for .254, got no answer, and gave up. No router said anything.
0% lossWindows counts those self-generated replies as received. The ping failed anyway. Read the reply lines, not the summary.
TTL=255The reply from .1 came from a Cisco router (it starts at 255). Windows hosts start at 128.

The same thing happens to a Layer 2 switch: with no ip default-gateway it can be managed from its own subnet but not from anywhere else.

4 · DNS problems

The test that tells you it's DNS: ping by IP works, ping by name fails.

PC-A · pointed at the wrong DNS server
C:\Users\student> ping 192.168.20.100 Reply from 192.168.20.100: bytes=32 time=1ms TTL=126 ... C:\Users\student> ping www.it131.example Ping request could not find host www.it131.example. Please check the name and try again. C:\Users\student> nslookup www.it131.example DNS request timed out. timeout was 2 seconds. Server: UnKnown Address: 192.168.20.200 DNS request timed out. timeout was 2 seconds. ... *** Request to UnKnown timed-out

Routing works (TTL=126: a Windows host two router hops away). The name fails. nslookup shows which DNS server PC-A is using: 192.168.20.200, which doesn't exist. It should be SRV1, 192.168.20.100. Fix the DNS server setting, then ipconfig /flushdns to clear any cached bad answers.

"UnKnown" on its own is not the problem As in Session 10, Server: UnKnown also appears when a working DNS server just has no reverse record for itself. The clue here is the timeouts and the wrong address. Read the result lines, not the server name.

Try it: symptom → first check

Watch for this

Common Module 16–17 mistakes

These come up every semester.

Module Quiz — Building and Securing a Small Network

Checkpoint: Modules 16–17

This quiz opens Session 12. If you can do these cold, you're ready.

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 quiz.

Applied

Worked examples

Think it through before you expand the answer.

Threats & vulnerabilities

Sort the audit findings

An audit of a small office finds: (a) the router still has the default admin account, (b) there's no written security policy, (c) the server closet is next to a leaky water heater, (d) the switches are managed with Telnet. Classify each.

Show answer

(a) Configuration vulnerability: unsecured default settings. (b) Security policy vulnerability. (c) Environmental physical threat (humidity and water). (d) Telnet's plaintext is a technological weakness of the protocol, and choosing to leave it on is a configuration vulnerability. The fix is SSH with transport input ssh.

Malware

Which kind?

(1) A spreadsheet macro that infects other spreadsheets when someone opens them. (2) A "free PDF converter" that also installs a keylogger. (3) Code that scans the network for unpatched hosts and copies itself to each one overnight while nobody is logged in.

Show answer

(1) Virus: attached to a host file, and spreads when a user opens it. (2) Trojan horse: looks legitimate, installed willingly. (3) Worm: exploits a vulnerability and spreads with no user action. Patching (16.3) is the main defense against worms.

AAA

Which A?

(1) A help-desk tech can run show commands on R1 but not configure terminal. (2) R1 asks for a username and password at login. (3) A log shows that user admin changed the G0/1 address at 14:02.

Show answer

(1) Authorization: what you may do. (2) Authentication: who you are. (3) Accounting: a record of what you did.

SSH

"SSH just doesn't work"

A classmate types this on a new router, then tries to SSH in from PC-A and fails. Find three problems.

Router
Router(config)# hostname R1 R1(config)# crypto key generate rsa general-keys modulus 1024 % Please define a domain-name first. R1(config)# line vty 0 4 R1(config-line)# transport input telnet R1(config-line)# login local
Show answer

1. No ip domain-name, so the RSA keys were never generated and the SSH server never started. The router said so. 2. transport input telnet refuses SSH; it should be transport input ssh. 3. login local with no username … secret … means there's no account to log in with. Also worth adding: ip ssh version 2.

Ping symbols

Read the dots

From R1, four pings to four places give: (1) !!!!! (2) .!!!! (3) ..... (4) U.U.U. What does each tell you?

Show answer

(1) Every echo got a reply: the path works both ways. (2) The first one timed out while ARP resolved; normal. (3) Every echo timed out: lost, blocked, or no route back. Check the target is up, its gateway is right, and whether a firewall drops ping. (4) A router on the path is sending back Destination Unreachable, so it has no route or is filtering. The Us tell you where to look.

Traceroute

Where did it stop?

From PC-A, tracert 192.168.20.10 shows hop 1 192.168.10.1, then * * * Request timed out. for every hop after that. PC-A can ping its gateway. Where is the problem?

Show answer

At or beyond the last hop that answered: R1. Nothing past R1 replies, so suspect the R1–R2 link (show ip interface brief on both routers, CDP to see if they're even neighbors), R1's routing to 192.168.20.0/24 (show ip route), or R2. PC-A's own settings are probably fine, because hop 1 worked.

Scenarios

Name the problem

(a) A PC shows 169.254.3.9, mask 255.255.0.0. (b) A PC pings everything by IP, but browsers say "server not found". (c) A link is up/up but slow, and show interfaces shows late collisions. (d) A PC can ping every host on its LAN but nothing beyond.

Show answer

(a) DHCP failed: APIPA. (b) DNS. (c) Duplex mismatch; you're looking at the half-duplex side. (d) Default gateway: missing or wrong.

Methodology

Put the steps in order

A tech: (a) writes up the fix in the ticket, (b) asks the user what changed and when, (c) replaces the patch cable, (d) suspects a bad patch cable, (e) has the user open three websites, (f) swaps in a known-good cable to see if the link comes up. Put them in the six-step order.

Show answer

b identify the problem → d theory of probable cause → f test the theory → c plan and implement → e verify → a document.

Reference

Glossary & index

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