Network Devices
What is a computer network?
A) computer network is a digital telecommunications network which allows nodes to shar
resources.
What is a node
- Router - Server
- Switch - Clients End host
- Firewall
How to build a network?
Two PC’s connected together actually makes a network
Now that these two nodes are connected, they can share
resources and essentially have a converstation With each
PC 1 PC 2
other
Clients and Server
A Client is a device that accesses a service made available by a server. Example: Phone,
Computer,Laptop etc
A server is a device that provides services for clients
Internet
Clients Server
Give me the video please
Here’s the video
Switches
Their role is to provide connectivity to hosts within the same LAN
To have many network interfaces/ports for the end hosts to connect to.
Routers
They have fewer network interfaces than switches
They are used to provide connectivity between LANs
Firewalls
It can monitor and control network traffic based on configured rules
It can be placed inside the network, or ‘outside the network’
They are known as ‘Nest-Generation Firewalls’ when they include more modern and advanced
filtering capabilities.
Interfaces and Cables
What is Ethernet
Ethernet is a collection of network protocols/standards. So really Ethernet isnt one single thing
Network protocol
It is a set of rules outlining how connected devices communicate across a network to exchange info
easily and safely
Bits and Bytes
Connections between devices in a network operate at a set speed. These speeds are measured in
bits per second.
A bit is a value represented by either a 0 or 1
8bits = 1byte
1 kilobit = 1,000 bits
1 megabit = 1,000,000bits
1 gigbit = 1,000,000,000bits
1 terabit = 1,000,000,000,000bits
Ethernet Standards (copper)
Speed Common Name IEEE Standard Informal Name Max. Length
10 Mbps Ethernet 802.3i 10BASE-T 100m
100 Mbps Fast Ethernet 802.3u 100BASE-T 100m
1 Gbps Gigabit Ethernet 802.3ab 1000BASE-T 100m
10 Gbps 10 Gig Ethernet 802.3an 10GBASE-T 100m
UTP cables
The copper cables used in Ethernet standards are UTP cables. It stands for Unshielded
Twisted Pair.
Unshielded: means they have no shield making them vulnerable to electrical
interference
Twisted pair: four pairs of cables twisted together. The twist help protect against
electromagnetic interferences or EMI
Types of Transmission mode
Full Duplex: is when it allows data to be sent and received at the same time
Half Duplex: is when data is sent and received separately and not at the same time.
Simplex: is when data flows in only one direction
Types of cable
Straight-through cable: It is used to connect different types of devices, like a computer to
switch. It is where wires are arranged in the same order.
Crossover cables: It is used to connect similar devices, like switch to switch. It is a cable
where some wires are “crossed” or swapped at one end.
Auto MDI-X: It helps automatically detects and adjusts to use the correct cable type,
whether its straight-through or crossover
Fiber-optic cables
This cable sends light over glass rather than an electrical signal over copper wiring. There are
two connectors on each end
(One connector to transmit data and one to receive data on each end)
Structure of the cable
1) The fiberglass core itself
2) cladding that reflects light
3) a protective buffer
4) the outer hacket of the cable
Types of cable
Single Mode Fiber: It carries light in a single, straight path and its ideal for long distance. The
core is small.
Multi Mode Fiber: It carries light in multiple paths and is best for shorter distance. The core
diameter is wider than single-mode fiber
Speed IEEE Standard Informal Name Max. Length Cable Type
1Gbps 802.3z 1000BASE-LX 550m(MM)/5km(SM) Multimode or Singlemode
10Gbps 802.3ae 10GBASE-SR 400m Multimode
10Gbps 802.3ae 10GBASE-LR 10km Singlemode
10Gbps 802.3ae 10GBASE-ER 30km Singlemode
UTP vs Fiber-Optic
UTP (copper) Fiber-optic
Lower cost than fiber-optic Higher cost than UTP
Shorter max distance than fiber optic Longer distance than copper
Can be vulnerable to EMI No vulnerability to EMI
(Electromagnetic Interference) SFP ports are more expensive than RJ45
RJ45 ports used with UTP are cheaper ports (single-mode is expensive than
than SFP ports multi-mode)
Emit (leak) a faint signal outside of the Does not emit any signal outside of the
cable, which can be copied cable (no security risk)
OSI and TCP/IP Suite
What is a networking model?
Networking model categorize and provide a structure for networking protocols and standards.
Protocols: A set of rules defining how network devices and software should work
OSI Model
Open System Interconnection model is created by the ISO in the early 1980s
It is a conceptual model that categorizes and standardizes the diff function in a network. These
layer work together to make the network work
Layer 7: Application
Layer 6: Presentation
Layer 5: Session
Layer 4: Transport
Layer 3: Network
Layer 2: Data Link
Layer 1: Physical
Layer 7: Application
This layer is closest to the end user
It Interacts with software applications, for example your web browser
HTTP and HTTPS are Layer 7 protocols
Function of Layer 7 include:
Identifying communication partners
Synchronizing communication.
Both the encapsulation and de-encapsulation processes are examples of ‘Adjacent-layer’
Adjacent layer interaction refers to interaction between diff layers of the OSI model
Same-layer interaction refers to interaction between the same layer on diff hosts.
Layer 6: Presentation
The presentation layer prepares data for the application layer. It encode, encrypt, and compress
data so it is received correctly on the other end.
It takes any data transmitted by the application layer and prepares it for transmission over the
session layer.
Layer 5: Session
It controls the dialogues (connections) between computers. It establishes, manages and terminates
connections between the local application and the remote application.
Layer 4: Transport
Encapsulation
It manages network traffic between hosts and end systems to ensure complete data transfers.
The protocols such as TCP, UDP , DCCP and SCTP
It does this by breaking large pieces of data into smaller segments which can be more easily sent
De-encapsulation
over the network and are less likely to cause transmission problems if errors occur.
Layer 3: Network
It is involved in the forwarding of incoming data packets of variable length.
It provides connectivity between end hosts on diff networks
It provides logical addressing (IP addresses and aswell as path selection between source and
destination.
Routers operate at Layer 3
Layer 2: Data Link
It provides node-to-node connectivity and data transfer (for example, PC to switch to router,
router-to-router)
It defines how data is formatted for transmission over a physical medium (for example UDP cables)
Detects and (possibly) corrects Physical Layer errors.
Uses Layer 2 addressing, separate from layer 3 addressing.
Layer 1: Physical Layer
This defines the physical characteristics of the medium used to transfer data between devices.
For example; voltage levels, ma transmission distances, physical connectors, cable specifications,
etc.
TCP/IP Suite
It is a conceptual model and set of communications protocols used in the Internet and other
Networks.
It has a similar structure to the OSI Model, but with fewer layers.
This is the model actually in use on modern networks.
Data flow
For example: An skype application on Host A wants to communicate with the skype application on
Host B
Skype interacts with the application layer, and the data is encapsulated via the transport,
Internet and Link Layers.
Then it is forwarded to the router, probably via Ethernet UTP copper cabling (Router are
layer 3 devices, so they want to know Layer 3 IP address to know where to forward the data
next.
Then the de-encapsulation occurs at the Link layer and then at the Internet layer the router
The Internet layer, the router looks at the destination IP address to know where to send the
packet.
Then the packet is ones again encapsulated to make a Frame.
From here, it sent to another router, perhaps over long-distance fiber cabling
At the Link layer of the second router, decapsulation occurs again and this router also checks
the destination IP address
Once it knows where to send the packet, it is once again encapsulated, and sent over some
medium, Ethernet cabling in this case to Host B.
Now de-encapsulation takes place once more
Here at the link layer, it is a frame.
The header and trailer are removed so it becomes a packet. (internet layer)
The header is removed, and it becomes a segment. (transport layer)
Finally, the transport layer header is removed and the application layer on Host B receives
the data and interacts with the application on Host B.
Intro to the CLI
What is CLI
CLI stands for Command-line interface. Its the interface that is used to configure Cisco devices like
routers, switches and firewalls
What is GUI
GUI stands for Graphical user interface. It allows users to interact with electronic devices using
graphical icons visual indicators instead of text-based commands.
Diff between rollover cable and crossover cable
Rollover Cable Crossover Cable
It is used to connect a computer serial It is used to connect similar network
port to a network device console port device directly to switch, router-to-
for configuration and management. router, without the need for an
Only for console connections, not for intermediary device like switch.
data transfer between network For data transfer between like
devices devices, useful for creating small
peer-to-peer networks.
To access the CLI, we need to use a terminal emulator, PuTTy.
Cisco default in Serial: Speed: 9600
8 Data bits
1 Stop bits
Parity: None
Flow control: None
Primary Command Modes
User Exec Mode: This mode allows access to only to only a limited number of basic monitoring
commands. It is referred to as “view-only” mode. (Router>)
Privileged Exec Mode: This mode allows access to all commands and features. User can use any
monitoring commands and execute configuration and management
commands. To enable Privileged Exec Mode the user should type
‘Router>enable’. (Router#)
Global configuration mode: is used to making configuration changes that affect the entire device.
such as modifying settings, control how it operates etc. To enter global
configuration mode, the user must type ‘Router#configure terminal’
(Router(config)#)
Enable Password
Running-config/ Startup-config
Running-config = the current, active configuration file on the device. As you enter commands in the
CLI, you edit the active configuration.
Startup-config = the configuration file that will be loaded upon restart of the device.
Show Running-config and Startup-config
Saving configuration
Service password-encryption
The service password-encryption command will encrypt all password in a jumble of numbers and
letters, so that they cannot be easily read
Enable secret password
The most secure method is to use the enable secret command, instead of the enable password
Cancelling commands
You can cancel or delete any commands by typing ‘no’ infront of it
However, passwords that are already encrypted cannot be removed.
Ethernet LAN Switching (Part 1)
What is LAN
Lan is a collection of devices connected together in one physical location, such as a building, office
or home. In other words, it is a network contained within a relatively small area.
Eth header Packet Eth trailer
Preamble SFD Destination Source Type FCS
(or Length)
Start Frame Delimiter
Frame Check Sequence
Preamble SFD
Length: 7 byte (56 bits) Start Frame Delimiter
Alternating 1’s and 0’s Length: 1 byte (8bits)
10101010 * 7 10101011
Allows devices to synchronize their Marks the end of the preamble, and
receiver clocks the beginning of the rest of the frame
Destination &Source
Indicate the devices sending and receiving the frame
Consist of the destination and source ‘MAC address’
MAC = Media Access Control
6 byte (48-bit) address of the physical device
Type/ Length
2 byte (16-bit) field
A value of 1500 or less in this field indicates the Length of the encapsulated packet (in bytes)
Frame flooding:
MAC addresses are used in local network communication and are transported within
Unicast frame
Ethernet
flooding
frames.
happens
Here's how
whenthey
a switch
are used
forwards
in theaprocess:
unicast frame (a frame intended for a
specific
1. destination
Source and MAC
Destination
address)
MAC
to all
Addresses:
ports instead
In a of
local
justnetwork,
the one when
that connects
a deviceto(the
the
destination
source)
device.
wants to send data to another device (the destination), the source includes
This flooding
its own
occurs
MACwhen
address
the(source
switch does
MAC)notandhave
the destination
the destination
MACMAC address
address
in the
in Ethernet
its MAC
address frame.
table, which is used to map MAC addresses to specific switch ports.
1. Ethernet Frame: This frame contains data and has fields for both source and
destination MAC addresses. It is created at the Data Link layer (Layer 2) of the OSI
model.
1. Switching: When the frame is sent, switches within the network read the destination
MAC address to forward the frame to the correct port, where the destination device
is connected.
1. Delivery: Once the frame reaches the correct destination device (the one with the
matching MAC address), the device processes the frame and extracts the data.
The first bytes are the OUI, which is assigned to the company making the device and the last
3 bytes are unique to the device itself.
Hexadecimal and Decimal
Unicast frame: A frame destined for a single target
Ethernet LAN Switching (Part 2)
The Preamble+SFD is usually not considered part of the Ethernet header
Therefore the size of the Ethernet header+trailer is 18 bytes. (6+6+2+4)
The minimum size for an Ethernet frame (Header+Payload [Packet] +Trailer0 is 64 bytes
64 bytes -18 bytes (header +trailer) = 46 bytes
Therefore the minimum payload (packet) size is 46 bytes
If the payload is less than 46 bytes, padding bytes are added
i.e. 34-byte packet + 12-byte padding = 46 bytes
ARP (Address resolution protocol0
ARP 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
It is a broadcast address= sent to all hosts on the network. When a device wants to communicate
with another devices on the same network, it needs the target device’s MAC address.
ARP
ARP reply
It is a unicast address which is sent only to one host (the host that sent the request). The device
with the matching IP address receives the ARP request and sends back an ARP reply. The ARP reply
is a unicast message directly to the requester, providing its MAC address so that communication
can proceed.
ARP table
The ARP table is a database stored in a device’s memory that maps IP addresses to their
corresponding MAC addresses.
Use ‘arp -a’ to view the ARP table (Windows, masOS, Linux)
Internet address = IP address (layer3)
Physical address = MAC address (layer2)
Type static = default entry (it wasnt actually learned by sending an ARP request)
Type dynamic = learned via ARP (it was actually learned by sending an ARP request and receiving
an ARP reply)
Ping
A network utility that is used to test reachability and measures the round trip time. It uses ICMP
Echo Request and ICMP Echo Reply
ICMP Echo Request: A message asking if a device is reachable
ICMP Echo Reply: The response confirming that the device is reachable.
= You are sending a ICMP Echo request to PC3
= By default, a ping in Cisco IOD sends 5 ICMP echo
Ipv4 Addressing
Show 3ipNetworking
Layer interface brief
Provides connectivity between end hosts on diff networks (ie.outside of the LAN)
Provides logical
Addressing (IP addresses)
Provides path selection between source and destination
Routers operate at layer 3
Router interfaces have the shutdown command applied by default = will be in the
administratively down/down state by default
Switch interfaces do not have the ‘shutdown’ command applied by default = will be in the
up/up state if connected to another device OR in the down/down state if not connected
to another device.
Port field: simply list each interfaces
Name: is the interface description
Status: shows whether the interface are connected or not.
VLAN: They are used to divide LANs into smaller LAN
Duplex: In default its auto, this means that it will negotiate with the neighboring device and use
full-duplex if possible. A-full means that it automatically negotiated a duplex of auto with
the neighboring device
Speed: They are auto in default, Ports are capable of operating at 10 megabits per second. Auto
means they are able to negotiate with the device they are connected to and use the fastest
speed both device is capable of
Type: The 10/100 refers to the speed at which these interfaces can operate.
Configuring interface speed and duplex
Full/Half Duplex
Half duplex: The device cannot send and receive data at the same time. If it is receiving a frame, it
must wait before sending a frame.
Full duplex: The device can send and receive data at the same time. It does not have to wait.
CSMA/CD
Ipv4 Address (Hub/half-duplex)
Classes
Carrier Sense Multiple Access with Collision Detection
Before sending frames, devices ‘listen’ to the collision domain until detect that other devices are
not sending
If a collision does occur, the device sends a jamming signal to inform the other devices that a
collision happened. Then each device will wait a random period of time before sending frames
again.
Then the process repeat again
Switch (Full duplex)
Each device has its own dedicated communication path and this eliminates collisions, as data can
flow in both directions simultaneously without interference. Therefore switch do not need to use
CSMA/CA
Speed/Duplex Autonegotiation
Class A: 12.128.251.23/8
Switch Interfaces