This repository provides resources and examples for preparing for the CCST Networking exam. It includes study notes, practice questions, Packet Tracer files, and network performance testing examples using iperf3
.
(click on them to expand)
Network Performance Testing with iperf3
iperf3
is a tool for measuring network bandwidth. Below are some examples of how to useiperf3
for various network performance tests.Situation: You want to measure the maximum bandwidth between a client and a server on a local network.
On the server:
iperf3 -s
On the client:
iperf3 -c <server_ip>
Situation: You need to measure bandwidth over a specific period.
On the server:
iperf3 -s
On the client:
iperf3 -c <server_ip> -t 60
Situation: You want to simulate network conditions by limiting bandwidth.
On the server:
iperf3 -s
On the client:
iperf3 -c <server_ip> -b 10M
Situation: You need to measure TCP bandwidth on a specific port.
On the server:
iperf3 -s
On the client:
iperf3 -c <server_ip> -p 5001
Situation: You need to measure UDP bandwidth and observe packet loss.
On the server:
iperf3 -s -u
On the client:
iperf3 -c <server_ip> -u -p 5201
On the server:
iperf3 -s -p 5001 -t 30 -i 10 --sctp
On the client:
iperf3 -c <server_ip> -p 5001 -t 30 -i 10 --sctp
Situation: You want to test performance using the zero-copy mode for potentially improved throughput.
On the server:
iperf3 -s -Z
On the client:
iperf3 -c <server_ip> -Z
Situation: You want to test how changing the TCP window size affects performance.
On the server:
iperf3 -s
On the client:
iperf3 -c <server_ip> -w 64K
Situation: You want to test bandwidth from multiple clients simultaneously to see how the server handles concurrent connections.
On the server:
iperf3 -s
On the client:
iperf3 -c <server_ip> -P 5
Situation: You want the server to act as the client and the client to act as the server, often used to test the reverse path bandwidth.
On the server:
iperf3 -s
On the client:
iperf3 -c <server_ip> -R
Situation: You need to test how different packet sizes affect performance.
On the server:
iperf3 -s -u
On the client:
iperf3 -c <server_ip> -u -l 1024
Network Protocols: FTP, SFTP, TFTP, NTP and ICMP
Overview: FTP is a standard network protocol used to transfer files between a client and a server over a network. It operates on TCP/IP and typically uses port 21 for control commands and port 20 for data transfer.
Basic Commands and Examples:
-
Starting the FTP Server:
- On Linux:
sudo apt-get install vsftpd sudo systemctl start vsftpd
- On Windows: Install and configure FileZilla Server.
- On Linux:
-
Connecting to an FTP Server:
-
From a command-line client:
ftp <server_ip>
Enter username and password when prompted.
-
Using FileZilla Client:
- Open FileZilla.
- Enter the server IP, port 21, username, and password in the Quickconnect bar.
-
-
Common Commands:
- List Files:
ls
- Upload File:
put <local_file>
- Download File:
get <remote_file>
- List Files:
Configuration Example: Ensure your server settings disallow anonymous logins and only allow authenticated users.
Overview: SFTP is a secure protocol for transferring files over a network, using SSH (Secure Shell) to encrypt data and commands. It operates on port 22.
Basic Commands and Examples:
-
Setting Up SFTP on Linux:
- Install OpenSSH server:
sudo apt-get install openssh-server
- Start the SSH service:
sudo systemctl start ssh
- Install OpenSSH server:
-
Connecting to an SFTP Server:
-
From a command-line client:
sftp <username>@<server_ip>
Enter the password when prompted.
-
Using WinSCP (Windows):
- Open WinSCP.
- Enter the server IP, port 22, username, and password.
-
-
Common Commands:
- Upload File:
put <local_file>
- Download File:
get <remote_file>
- Upload File:
Configuration Example: Ensure your
sshd_config
file allows SFTP and restricts users to their home directories for security.
Overview: TFTP is a simpler version of FTP used for transferring files with minimal overhead. It operates on UDP port 69 and is typically used for tasks like network booting.
Basic Commands and Examples:
-
Installing and Starting TFTP Server on Linux:
- Install
tftpd-hpa
:sudo apt-get install tftpd-hpa
- Edit the configuration file
/etc/default/tftpd-hpa
to set the directory and options. - Start the TFTP service:
sudo systemctl start tftpd-hpa
- Install
-
Connecting to a TFTP Server:
- From a command-line client:
tftp <server_ip>
- From a command-line client:
-
Common Commands:
- Upload File:
put <local_file>
- Download File:
get <remote_file>
- Upload File:
Configuration Example: Configure the TFTP server to restrict access to a specific directory and ensure that it has read/write permissions.
Overview: NTP is used to synchronize the clocks of computers over a network. It operates on UDP port 123 and ensures that time is consistent across all devices.
Basic Commands and Examples:
-
Installing and Configuring NTP Server on Linux:
- Install
ntp
:sudo apt-get install ntp
- Configure
/etc/ntp.conf
to set up NTP servers and access restrictions. - Start the NTP service:
sudo systemctl start ntp
- Install
-
Synchronizing Time with an NTP Server:
- On a Linux client:
sudo ntpdate <server_ip>
- On a Windows client:
- Go to Date and Time Settings.
- Select Add clocks for different time zones and Internet Time tab to synchronize.
- On a Linux client:
Configuration Example: Ensure that your NTP server configuration allows for accurate time synchronization and restricts access to trusted clients only.
Overview: ICMP is used for sending error messages and operational information about network conditions. It operates alongside IP and is crucial for network diagnostics and troubleshooting.
Basic Commands and Examples:
The
ping
command checks the reachability of a host on a network and measures round-trip time.-
Basic Usage:
- Linux/Windows:
ping <host_or_ip>
- Example:
ping google.com
- Linux/Windows:
-
Specify Number of Packets (Linux):
- Linux:
ping -c 5 <host_or_ip>
- Example:
ping -c 5 google.com
- This sends 5 packets and then stops.
- Linux:
-
Specify Packet Size (Linux/Windows):
- Linux:
ping -s 1000 <host_or_ip>
- Windows:
ping -l 1000 <host_or_ip>
- Example:
ping -s 1000 google.com
- Linux:
-
Specify Time To Live (TTL) (Linux):
- Linux:
ping -t 64 <host_or_ip>
- Example:
ping -t 64 google.com
- Linux:
-
Flood Ping (Linux):
- Linux:
ping -f <host_or_ip>
- Example:
ping -f google.com
- This sends packets as fast as possible (use with caution).
- Linux:
The
traceroute
command (Linux) andtracert
command (Windows) trace the path packets take to a destination, showing each hop along the way.-
Basic Usage:
- Linux:
traceroute <host_or_ip>
- Windows:
tracert <host_or_ip>
- Example:
traceroute google.com
- Example:
tracert google.com
- Linux:
-
Specify Maximum Number of Hops:
- Linux:
traceroute -m 20 <host_or_ip>
- Windows:
tracert -h 20 <host_or_ip>
- Example:
traceroute -m 20 google.com
- Example:
tracert -h 20 google.com
- Linux:
-
Show Numeric IP Addresses Only:
- Linux:
traceroute -n <host_or_ip>
- Windows:
tracert -d <host_or_ip>
- Example:
traceroute -n google.com
- Example:
tracert -d google.com
- Linux:
-
Use a Specific Network Interface (Linux):
- Linux:
traceroute -i <interface> <host_or_ip>
- Example:
traceroute -i eth0 google.com
- Linux:
-
Change the Default Packet Size (Linux):
-
Linux:
traceroute -s 1000 <host_or_ip>
-
Example:
traceroute -s 1000 google.com
-
-