Notes
Notes
What is a node
- Router - Server
- Switch - Clients End host
- Firewall
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.
Network protocol
It is a set of rules outlining how connected devices communicate across a network to exchange info
easily and safely
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 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)
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 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.
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
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.
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.
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.
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
(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.
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 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.
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.
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
Speed/Duplex Autonegotiation
Class A: 12.128.251.23/8
Switch Interfaces