Jeremy's IT Lab CCNA Notes

My Signature Avatar

Nicholas Njoki

Continuous

Networking

No description.

Day 1

What is a network?

A computer network is a digital telecommunications network which allows nodes to share resources.

Nodes can consist of the following devices:

  • Routers
  • Switches
  • Firewalls
  • Servers
  • Clients

Clients

Clients are devices that can access a service made available by a server.


Servers

A server is a device that provides services or resources to a client.

The same device can be a client in some situations, and a server in other situations.


Switches

Switches provide connectivity to hosts within the same LAN (Local Area Network).


Routers

Routers are used to provide connectivity between LANs.


Firewalls

  • They are hardware devices that filter traffic between networks.
  • They monitor and control network traffic based on configured rules.
  • Can either be placed inside or outside the network.

Host based firewalls are software based applications that run on individual devices.

Cisco Packet Tracer iconDownload Cisco Packet Tracer LabDay 01 Lab - Packet Tracer Introduction

Two hosts sit on separate LANs and need to communicate with each other. Which device provides the connectivity between those LANs?

Day 2

Ethernet

Ethernet is a collection of network protocols/standards.


Ethernet Standards

  • Ethernet standards are defined in the IEEE 802.3 standard in 1983.
  • IEE stands for Institute of Electrical and Electronics Engineers.

Ethernet Standards (Copper)

SpeedCommon NameIEEE StandardInformal NameMaximum Length
10 MbpsEthernet802.3i10BASE-T100 m
100 MbpsFast Ethernet802.3u100BASE-T100 m
1 GbpsGigabit Ethernet802.3ab1000BASE-T100 m
10 Gbps10 Gig Ethernet802.3an10GBASE-T100 m

UTP Cables

UTP = Unshielded Twisted Pair

They're limited to 100 meters.

  • Unshielded
    • Means that the wires have no metallic shield, which makes them vulnerable to electromagnetic magnetic interferences.

The twisted wires helps protect against electromagnetic magnetic interferences.

StandardPairs Used
10BASE-T / 100BASE-T2 pairs (4 wires)
1000BASE-T / 10GBASE-T4 pairs (8 wires)

UTP Cables (10BASE-T, 100BASE-T)

Device TypeTransmit (Tx) PinsReceive (Rx) Pins
Router1 and 23 and 6
Firewall1 and 23 and 6
PC1 and 23 and 6
Switch3 and 61 and 2

Fiber-Optic Connections

There are two types of fiber cables:

  • Single-mode (SMF)
  • Multimode (MMF)

Multimode Fiber

  • Core diameter is wider than single-mode fiber.
  • Allows multiple angles (modes) of light waves to enter the fiberglass core.
  • Allows longer cables than UTP, but shorter cables than single-mode fiber.
  • Cheaper than single-mode fiber.

Single-Mode Fiber

  • Core diameter is narrower than multimode fiber.
  • Light enters at a single angle (mode) from a laser-based transmitter.
  • Allows longer cable lengths than both UTP and multimode fiber.
  • More expensive then single-mode fiber.

Fiber-Optic Cable Standards

Informal NameIEEE StandardSpeedCable TypeMaximum Length
1000BASE-LX802.3z1 GbpsMultimode or Single-Mode550 m (MM) / 5 km (SM)
10GBASE-SR802.3ae10 GbpsMultimode400 m
10GBASE-LR802.3ae10 GbpsSingle-Mode10 km
10GBASE-ER802.3ae10 GbpsSingle-Mode30 km

UTP vs Fiber-Optic Cabling

UTPFiber-Optic
Lower cost than fiber-optic.Higher cost than UTP.
Shorter maximum distance than fiber-optic (~100m).Longer maximum distance than UTP.
Can be vulnerable to EMI (Electromagnetic Interference).No vulnerability to EMI.
RJ45 ports used with UTP are cheaper than SFP ports.SFP ports are more expensive than RJ45 ports (single-mode is more expensive than multimode).
Emit (leak) a faint signal outside of the cable, which can be copied (= security risk).Does not emit any signal outside of the cable (= no security risk).
Cisco Packet Tracer iconDownload Cisco Packet Tracer LabDay 02 Lab - Connecting Devices

On a 10BASE-T or 100BASE-T link, which device transmits on pins 3 and 6 and receives on pins 1 and 2?

Day 3

Protocols and Standards

A protocol is a set of rules defining how data should be communicated between devices over a network.


Who defines the standards?

Most networking standards are developed by independent standards organizations, not a single vendor, with participation from engineers at many companies.

OrganizationRoleExamples
IEEE (Institute of Electrical and Electronics Engineers)Develops many of the technologies used on local area networksEthernet (802.3), Wi-Fi (802.11)
IETF (Internet Engineering Task Force)Open community that defines protocols used on the InternetTCP, IP, UDP, HTTP, DNS, etc.

The TCP/IP Model


Layer 1: The Physical Layer

  • Responsible for sending and receiving bits as electrical, optical, or radio signals over the medium.
  • Defines things like cables, connectors, signal levels, and link speeds.
  • Examples: copper UTP cables, fiber-optic cables, Wi-Fi radios and antennas, network interface cards (NICs).

Layer 2: The Local Network Layer

  • Provides hop-to-hop delivery of messages on a local network.
    • A hop is a one step along the path between two devices: from one router or host, to the next router or host in the path.
  • Uses MAC (Media Access Control) addresses to identify interfaces.
    • Each device connected to a LAN has a unique MAC address assigned to it.
  • Protocols at this layer include:
    • Ethernet (IEEE 802.3)
    • Wi-Fi (IEEE 802.11)

Layer 3: The Internet Layer

  • Provides end-to-end delivery between hosts across multiple networks.
  • Uses IP addresses to identify hosts on a network.
  • Routers operate at this layer, using the message's destination IP address to forward the message toward its final destination host.
  • Protocols at this layer include:
    • IP (IPv4, IPv6)
    • ICMP (Internet Control Message Protocol)

Layer 4: The Transport Layer

  • Provides end-to-end communication between application processes.
  • Uses port numbers to identify the processes on each host.
  • Runs mainly on the communicating hosts.
  • Protocols at this layer include:
    • UDP (User Datagram Protocol)
    • TCP (Transmission Control Protocol)

Layer 5: The Application Layer

  • The Application layer (layer 5) is where network communications meet applications.
  • Defines how application processes format, send, and interpret data.
  • Protocols at this layer define message formats and rules for specific tasks, such as:
    • Browsing web pages (HTTP/HTTPS)
    • Transferring files (FTP/TFTP)
    • Sending/Receiving email (SMTP, POP3, IMAP)
  • Network infrastructure devices (routers, switches) don't care about application-layer details.

Encapsulation & Decapsulation


Protocol Data Units

  • The combination of data and a L4 header is called a segment (TCP) or datagram (UDP).
  • The combination of a segment/datagram and a L3 header is called a packet.
  • The combination of a packet and a L2 header/trailer is called a frame. - The frame is what gets sent over the physical medium.

The OSI Model


Other Versions

Cisco Packet Tracer iconDownload Cisco Packet Tracer LabDay 03 Lab - OSI Model

What do you call a packet once a Layer 2 header and trailer have been added to it?

Day 4

User EXEC Mode

Router>
  • The > symbol indicates that you're in user EXEC mode.
  • Router is the hostname of the device.
  • User EXEC mode is very limited.
  • Not able to make changes to the configuration.

Privileged EXEC Mode

To enter privileged EXEC mode from user EXEC mode you must run the enable command.

Router>enable
Router#
  • The # symbol indicates that you're in privileged EXEC mode.
  • Provides complete access to view the device's configuration, restart the device, etc.
  • Cannot change the configuration, but can change the time on the device, save the configuration file, etc.

Global Configuration Mode

To make changes to any of the configurations on the device you must enter global configuration mode.

Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#

The configure terminal command enters global configuration mode.


Enable Password

You don't want just anyone to have the ability to make changes to the network configuration for security purposes, so must protect privileged EXEC mode with a password.

Router(config)#enable password CCNA

CCNA is the password.

  • Passwords are case-sensitive.

Running-Config / Startup-Config

  • There are two separate configuration files kept on the device at once.
  • running-config is the current, active configuration file on the device. As you enter commands in the CLI, you edit the active configuration.

To look at the configuration file:

Router#show running-config
Building configuration...

Current configuration : 714 bytes
!
version 15.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Router
!
!
!
enable password CCNA
!

To run the startup-config file:

Router#show startup-config
startup-config is not present

startup-config is not present this is because we haven't have saved the running config.


Saving The Configuration

Router#write
Building configuration...
 [OK]
Router# copy running-config startup-config
Destination filename [startup-config]?
Building configuration...
 [OK]
Router#

Service Password-Encryption

Router#configure terminal
Enter configuration commands, one per line. Ed with CNTL/Z.
Router(config)#service password-encryption

service password-encryption will encrypt all passwords.

service password-encryption is not very secure.


Enable Secret

The more secure version to encrypt passwords is the enable secret command.

Router(config)#enable secret Cisco

Cisco is the password.

enable secret uses the MD5 hashing algorithm.

If both the enable secret and enable password are configured, then the whatever password you had setup for enable password will be ignored.

enable secret is always encrypted by default.


Cancelling Commands

Router(config)#no service password-encryption
  • The no keyword disable encryption for future passwords.
  • Passwords that were already encrypted will not be decrypted.

Service Password-Encryption Summary

If you enable service password-encryption:

  • Current passwords will be encrypted.
  • Future passwords will be encrypted.
  • The enable secret will not be affected (it's always encrypted).

If you disable service password encryption:

  • Current passwords will not be decrypted.
  • Future passwords will not be encrypted.
  • enable secret will not be affected.
Cisco Packet Tracer iconDownload Cisco Packet Tracer LabDay 04 Lab - Basic Device Security

A router has both an enable password and an enable secret configured. Which one do you need to enter to reach privileged EXEC mode?

Day 5 (Part 1)

Local Area Networks (LANs)

Local area networks are networks confined to a small area like a home or small office.

  • Routers are use to connect separate LANs.

OSI Model - PDUs

The different stages of preparing data to be forwarded are Protocol Data Units (PDUs).


Ethernet Frame

There are 5 fields in the ethernet frame header:

  • Preamble
  • SFD (Start Frame Delimiter)
  • Destination
  • Source
  • Type (or Length)

There is only 1 field in the ethernet frame trailer:

  • FCS (Frame Check Sequence)
    • Used by the receiving device to check if any errors occurred during the transmission.

Key points:

  • The header and trailer are 26 bytes in length.
  • The minimum size for an Ethernet frame is 64 bytes.
  • The minimum payload for the Ethernet frame is 46 bytes.
  • If the payload is less than 46 bytes, padding bytes are added.

Preamble & SFD

Preamble:

  • Length: 7 bytes (56 bits).
  • Alternating 1's and 0's.
  • Allows devices to synchronize their receiver clocks.

SFD:

  • Stands for 'Start Frame Delimiter'.
  • Length: 1 byte (8 bits).
  • Marks the end of the preamble, and the beginning of the rest of the frame.

The Preamble & SFD is usually not considered part of the Ethernet header. Therefore the size of the Ethernet header + trailer is 18 bytes.


Destination & Source

  • Indicate the devices sending and receiving the frame.
  • Mainly consist of the destination and source MAC address.
  • MAC = Media Access Control.
  • 6 byte (48 bit) address of the physical device.

Type / Length

  • 2 bytes (16 bits).
  • A value of 1500 or less in this field indicates the length of the encapsulated packet.
  • A value of 1536 or greater in this field indicates the type of encapsulated packet, and the length is determined via other methods.

Frame Check Sequence (FCS)

  • Stands for 'Frame Check Sequence'.
  • 4 bytes (32 bits).
  • Detects corrupted data by running a 'CRC' algorithm over the received data.
  • CRC = 'Cyclic Redundancy Check'.

MAC Address

  • Is globally unique.
  • The first 3 bytes are the OUI (Organizationally Unique Identifier), which is assigned to the company making the device.
  • The last 3 bytes are unique to the device itself.
  • Written as 12 hexadecimal characters.

A switch receives an Ethernet frame whose Type/Length field holds the value 1500. What does that value tell the receiving device?

Day 6 (Part 2)

ARP

  • ARP stands for 'Address Resolution Protocol'.
  • APR is used to discover the Layer 2 address (MAC address) of a known Layer 3 address (IP address).
  • Consists of two messages:
    • ARP Request
    • ARP Reply
  • ARP Request is broadcast (sent to all hosts on the network).
  • ARP Reply is unicast (the host that sent the request).

Ping

  • A network utility that is used to test reachability.
  • Measures round-trip time.
  • Uses two messages:
    • ICMP Echo Request
    • ICMP Echo Reply

MAC Address Table

The command to view the MAC address table on a Cisco switch:

SW1#show mac address-table
          Mac Address Table
-------------------------------------------

Vlan    Mac Address       Type        Ports
----    -----------       --------    -----
   1    0c2f.b011.9d00    DYNAMIC     Gi0/0
   1    0c2f.b06a.3900    DYNAMIC     Gi0/2
Total Mac Addresses for this criterion: 2
SW1#

Clearing the MAC Address Table

This command will remove all dynamic MAC addresses from the table:

Total Mac Addresses for this criterion: 2
SW1#clear mac address-table dynamic
SW1#show mac address-table
          Mac Address Table
-------------------------------------------

Vlan    Mac Address       Type        Ports
----    -----------       --------    -----
SW1#
clear mac address-table dynamic

If the switch doesn't get any traffic from a certain MAC address for 5 minutes, it will remove the entry from the MAC address table, this process is called aging.

To remove a certain MAC address from the table:

SW1#clear mac address-table dynamic address 0c2f.b011.9d00
SW1#show mac address-table
          Mac Address Table
-------------------------------------------

Vlan    Mac Address       Type        Ports
----    -----------       --------    -----
   1    0c2f.b06a.3900    DYNAMIC     Gi0/2
Total Mac Addresses for this criterion: 1
SW1#
clear mac address-table dynamic address mac-address

You can clear a MAC address from the table by specifying the interface/port:

SW1#clear mac address-table dynamic interface Gi0/0
SW1#show mac address-table
          Mac Address Table
-------------------------------------------

Vlan    Mac Address       Type        Ports
----    -----------       --------    -----
   1    0c2f.b06a.3900    DYNAMIC     Gi0/2
Total Mac Addresses for this criterion: 1
SW1#
clear mac address-table dynamic interface interface-id

A host knows the IP address of another host on its LAN, but not its MAC address. How are the two ARP messages that follow addressed?

Day 7

Enjoyed the post?

Subscribe if you're interested in networking.

0  subscribers • View all issues  • 
My Signature Avatar
Edit this page on GitHub

Last Updated: 

Go back to note