Learn / Stage 3: Networking and CCNA / Lesson 3.1

$ lesson 3.1 --track ccna --domain fundamentals

Network Building Blocks: OSI, TCP/IP, Devices, Cabling, Interfaces

Before VLANs, routing and security, you need a clear picture of what a network is made of: the layers every packet passes through, the job of each box, the cables between them, and how to read an interface when something feels slow.

  • Stage 3 Networking and CCNA
  • Level Beginner
  • 55 min
  • 5 sections, quiz, lab

Start the lesson Jump to the lab

By the end of this lesson you can

  • Map the OSI layers to the TCP/IP model and name the unit of data at each
  • Explain the job of routers, switches, Layer 3 switches, APs, WLCs, firewalls and IPS
  • Choose copper, multimode or single-mode fibre for a run
  • Compare TCP and UDP and recall the well known ports
  • Diagnose duplex and cabling problems from show interfaces
3.1.01

Layers and encapsulation: how data gets wrapped

Lesson 1.4 introduced the layers. The CCNA expects you to use them as a tool: when something breaks, you work out which layer is failing and test that layer. Two models describe the same idea.

OSI's seven layers beside the TCP/IP model, with the name of the unit of data at each layer7 Application6 Presentation5 Session4 Transport3 Network2 Data link1 PhysicalApplicationHTTP, DNS, SSH, DHCPTransportTCP, UDPInternetIPv4, IPv6, ICMPLink (network access)Ethernet, Wi-Fidatawhat the app sendssegment / datagramTCP / UDP header addedpacketIP header addedframe, then bitsMAC header and trailer, then signalOSI: 7 layer teaching modelTCP/IP: what actually runs
The seven OSI layers are a teaching and troubleshooting vocabulary. The TCP/IP model (often drawn with four layers, sometimes five with physical split out) describes the protocols that actually run.

As data goes down the stack, each layer adds its own header: the application's data gets a TCP or UDP header (now a segment or datagram), then an IP header (a packet), then an Ethernet header and trailer (a frame), and finally the physical layer turns it into electrical, light or radio signals (bits). The receiver strips the headers in reverse. That is encapsulation and de-encapsulation.

  • A switch normally reads up to Layer 2 (MAC addresses in the frame).
  • A router reads up to Layer 3 (IP addresses in the packet), and rebuilds a new Layer 2 frame for every hop.
  • Firewalls read Layers 3 and 4 (addresses and ports), and next generation firewalls look into Layer 7 (which application, which URL).
3.1.02

What each device does

Network device roles
DeviceWorks atJob
Layer 2 switchL2Forwards frames by MAC address inside one network (one VLAN). Learns which MAC lives on which port.
RouterL3Forwards packets by IP address between networks. Chooses the path using its routing table.
Layer 3 (multilayer) switchL2 and L3Switches and routes in hardware. Common as the core or distribution layer inside a campus.
Access point (AP)L1 and L2Bridges Wi-Fi clients onto the wired network.
Wireless LAN controller (WLC)managementConfigures and manages many lightweight APs centrally (lesson 3.13).
Firewall / NGFW and IPSL3 to L7Stateful filtering; next generation firewalls add application awareness and intrusion prevention, which blocks known attack patterns inline.
Endpoints and serversall layersLaptops, phones, cameras and printers; servers provide services like DNS, DHCP, web and file sharing.
PoE switchL1 and L2Power over Ethernet: powers phones, cameras and APs over the data cable.

You will also meet the classic designs. A two tier (collapsed core) campus has access switches connected to a pair of core and distribution switches. A three tier campus separates access, distribution and core. Data centres use spine and leaf, where every leaf switch connects to every spine, so any two servers are the same number of hops apart. A SOHO (small office, home office) network often has one box that is router, switch, AP and firewall at once, and the WAN connects sites to each other and to the cloud.

3.1.03

Cabling, duplex and the physical layer

Cable types
MediumTypical reachUse it for
Copper UTP (Cat5e, Cat6, Cat6A)Up to 100 m per run for common EthernetDesks, phones, APs, PoE devices
Multimode fibre (MMF)Hundreds of metres, depending on speed and fibre gradeInside a building, between floors and racks
Single-mode fibre (SMF)KilometresBetween buildings, campuses and service providers

Fibre does not make a single link magically faster; its advantages are distance and immunity to electrical noise. Old Ethernet needed crossover cables between similar devices, but modern ports use Auto-MDIX and work with either cable. In Packet Tracer you still pick the cable type, so the copper straight-through cable is the normal choice between a PC and a switch.

Half and full duplex

Hubs created one shared medium where only one device could talk at a time (half duplex), and collisions were normal. Switch ports are point to point, so both sides talk at once (full duplex) and you should see zero collisions. When one side is set to full and the other falls back to half, you get a duplex mismatch: the link works but is slow, the half duplex side counts collisions and late collisions, and the full duplex side counts CRC and input errors. The fix is to leave both ends on auto, or set both ends the same.

3.1.04

TCP, UDP and the ports you must know

TCP is connection oriented. It sets up a session with a three way handshake, numbers every byte, acknowledges what arrived, resends what was lost and uses a window to control speed. UDP just sends: no handshake, no recovery, very little overhead. That makes UDP right for voice, video, DNS queries and anything where a late packet is useless anyway.

The TCP three way handshake: SYN, SYN-ACK, ACK, after which data can flowClientServer :4431. SYN, seq=x2. SYN-ACK, seq=y, ack=x+13. ACK, ack=y+1, then data
Every TCP connection starts like this. A port that answers SYN with SYN-ACK is open; that is exactly what a port scanner looks for.
Well known ports
PortProtocolTransportNote
20, 21FTPTCPCleartext; prefer SFTP
22SSHTCPEncrypted remote admin
23TelnetTCPCleartext passwords: disable it
25SMTPTCPMail between servers
53DNSUDP and TCPTCP for large answers and zone transfers
67, 68DHCPUDPServer 67, client 68
69TFTPUDPNo authentication, used for config and image copies
80, 443HTTP, HTTPSTCP (HTTP/3 uses UDP 443)Web
123NTPUDPTime sync, vital for log correlation
161, 162SNMPUDPMonitoring; traps on 162
514SyslogUDPLog messages
3.1.05

Reading interfaces like an engineer

Two commands answer most physical layer questions. show ip interface brief gives one line per interface with its IP and two status words: Status is Layer 1 (is there a working link?) and Protocol is Layer 2 (is the data link working?). show interfaces adds duplex, speed and the error counters.

Interface status
Status / ProtocolMeansCheck
up / upWorkingNothing to fix at L1 and L2
administratively down / downSomeone typed shutdownno shutdown
down / downNo physical linkCable, the other end, wrong port
up / downLink is there but L2 failsEncapsulation or keepalive mismatch, a problem at the far end

In the counters, CRC and input errors rising usually means a bad cable, interference or a duplex mismatch; late collisions on a switched link almost always mean a duplex mismatch. Practise reading them on R1 below. One of its interfaces has a problem.

console: Router (R1 interfaces)

Missions 0/8

    Simplified IOS simulator in your browser. It teaches the commands; Packet Tracer and real gear have many more.

    Flashcards: do you remember?

    Tap a card to flip it. Try to answer in your head first; recalling is what makes it stick.

    Quick quiz

    Instant feedback on every answer. Score 70% or more to pass this lesson's quiz.

    Q1Which device forwards traffic between different IP networks?

    Q2A PC's data gets an IP header. What is it called now?

    Q3Which link should you choose between two buildings 3 km apart?

    Q4Which application is best suited to UDP?

    Q5An interface shows administratively down. Fix?

    Q6You see rising CRC errors on one side and late collisions on the other. Most likely cause?

    0 / 6

    Hands-on lab

    Cisco Packet Tracer lab30 minutessimulated network

    Packet Tracer lab 3.1: build, cable and read interfaces

    You need: Cisco Packet Tracer (free with a Cisco Networking Academy account; version 9.0.1 was the current download on the NetAcad Resource Hub when this lesson was written). Devices: 1 x 2960-24TT switch, 1 x ISR4331 router, 2 x PC-PT, copper straight-through cables.

    Topology and addressing

    Lab 3.1 topology: two PCs on switch SW1, which connects to router R1Fa0Fa0/1Fa0Fa0/2Gi0/1Gi0/0/0PC1192.168.10.11PC2192.168.10.12SW12960-24TTR1ISR4331
    PC1 and PC2 connect to SW1 on Fa0/1 and Fa0/2; SW1 Gi0/1 connects to R1 Gi0/0/0.
    Addressing table
    DeviceInterfaceIPv4 address / prefixDefault gateway or note
    R1Gi0/0/0192.168.10.1/24n/a
    PC1Fa0192.168.10.11/24192.168.10.1
    PC2Fa0192.168.10.12/24192.168.10.1
    1. Place and cable

      Add the devices and cable them as in the diagram. Watch the link lights: switch ports often show orange for a short time before turning green, because they pass through spanning tree states first (lesson 3.5).

    2. Configure R1

      Router>enable
      Router#configure terminal
      Router(config)#hostname R1
      R1(config)#interface GigabitEthernet0/0/0
      R1(config-if)#ip address 192.168.10.1 255.255.255.0
      R1(config-if)#no shutdown
      R1(config-if)#end
    3. Address the PCs

      On each PC open Desktop, then IP Configuration, and enter the address, mask and gateway from the table.

    4. Test and watch the layers

      From PC1's Command Prompt run ping 192.168.10.1 and ping 192.168.10.12. Then switch to Simulation mode, filter for ICMP and ARP, and step through one ping. Open a PDU and match each part to a layer: Ethernet header (L2), IP header (L3), ICMP (the payload).

    5. Verify

      R1#show ip interface brief
      R1#show interfaces GigabitEthernet0/0/0
      SW1#show interfaces status

      On PC1: ipconfig and arp -a. The first ping may lose one reply while ARP finds R1's MAC address; that is normal.

    6. Force a mismatch and look

      SW1(config)#interface FastEthernet0/1
      SW1(config-if)#duplex half
      SW1(config-if)#speed 10
      SW1(config-if)#end
      SW1#show interfaces FastEthernet0/1

      Read the duplex and speed lines, then set the port back with duplex auto and speed auto.

    You are done when: R1 Gi0/0/0 is up/up with 192.168.10.1, both PCs ping R1 and each other, and you can point to the L2, L3 and ICMP parts of a PDU in Simulation mode.

    Packet Tracer limits and notes

    • Packet Tracer does not reliably produce realistic CRC errors or late collisions from a duplex mismatch, so treat step 6 as a where to look exercise, not proof of real error behaviour. UNVERIFIED how the counters react in your version.
    • Fibre cables exist in Packet Tracer, but the device needs a fibre capable port or module, and module names vary by model. UNVERIFIED per device.
    • Packet Tracer simulates a subset of IOS. If a command here is rejected in your version, note it, skip that step and carry on; the concept still applies to real Cisco gear.

    Download the lab checklist (.txt) Print it or keep it open beside Packet Tracer.

    Key takeaways

    • Each layer adds a header; switches read L2, routers L3, NGFWs up to L7.
    • Copper to 100 m, multimode in buildings, single-mode for kilometres.
    • Switched links are full duplex with zero collisions; late collisions mean a duplex mismatch.
    • TCP is reliable and ordered, UDP is fast and light.
    • show ip interface brief first, show interfaces for the details.

    Finished the sections, quiz and lab? Mark the lesson complete. Progress is saved only in this browser.