Networking, Security & Cloud Knowledge

Saturday, October 26, 2024

Wireless Networking Cheat Sheet

Wireless Networking Cheat Sheet


Wireless Standards


- 802.11a: 5 GHz, up to 54 Mbps, shorter range.
- 802.11b: 2.4 GHz, up to 11 Mbps, longer range.
- 802.11g: 2.4 GHz, up to 54 Mbps, backward compatible with 802.11b.
- 802.11n: 2.4/5 GHz, up to 600 Mbps, uses MIMO technology.
- 802.11ac: 5 GHz, up to 3.46 Gbps, wider channels and MU-MIMO.
- 802.11ax (Wi-Fi 6): 2.4/5 GHz, higher efficiency and capacity.

Common Wireless Terms

- SSID: Service Set Identifier, the name of the wireless network.
- BSSID: Basic Service Set Identifier, the MAC address of the access point.
- WPA/WPA2/WPA3: Security protocols for wireless networks.
- Channel: The frequency used for communication, often overlapping in the 2.4 GHz band.
- MIMO: Multiple Input Multiple Output, technology that uses multiple antennas to improve performance.

Wireless Security Protocols

- WEP: Wired Equivalent Privacy, outdated and insecure.
- WPA: Wi-Fi Protected Access, improved security over WEP.
- WPA2: Enhanced security, uses AES encryption.
- WPA3: Latest security protocol, offers stronger encryption and protection against brute-force attacks.

Wireless Configuration Commands (Windows)

- Show available Wi-Fi networks:
  netsh wlan show networks

- Connect to a Wi-Fi network:
  netsh wlan connect name=""

- Disconnect from a Wi-Fi network:
  netsh wlan disconnect

Wireless Troubleshooting Commands

- Ping the access point:
  ping 

- Check signal strength:
  netsh wlan show interfaces

- View wireless network properties:
  netsh wlan show profile "" key=clear

Common Wireless Issues

- Weak signal: Check distance from the access point, obstacles, and interference.
- Connection drops: Update drivers, check for interference, and signal strength.
- No internet access: Verify DHCP settings, check ISP connection, and router status.

Best Practices for Wireless Networking

- Use WPA3 for better security.
- Select less crowded channels (1, 6, 11 in 2.4 GHz).
- Position access points centrally to optimize coverage.
- Limit SSID broadcasting for sensitive networks.
- Regularly update firmware on access points and routers.

Friday, October 25, 2024

Windows Command for Network Engineer

Wireless Networking Cheat Sheet

Wireless Standards

- 802.11a: 5 GHz, up to 54 Mbps, shorter range.
- 802.11b: 2.4 GHz, up to 11 Mbps, longer range.
- 802.11g: 2.4 GHz, up to 54 Mbps, backward compatible with 802.11b.
- 802.11n: 2.4/5 GHz, up to 600 Mbps, uses MIMO technology.
- 802.11ac: 5 GHz, up to 3.46 Gbps, wider channels and MU-MIMO.
- 802.11ax (Wi-Fi 6): 2.4/5 GHz, higher efficiency and capacity.

Common Wireless Terms

- SSID: Service Set Identifier, the name of the wireless network.
- BSSID: Basic Service Set Identifier, the MAC address of the access point.
- WPA/WPA2/WPA3: Security protocols for wireless networks.
- Channel: The frequency used for communication, often overlapping in the 2.4 GHz band.
- MIMO: Multiple Input Multiple Output, technology that uses multiple antennas to improve performance.

Wireless Security Protocols

- WEP: Wired Equivalent Privacy, outdated and insecure.
- WPA: Wi-Fi Protected Access, improved security over WEP.
- WPA2: Enhanced security, uses AES encryption.
- WPA3: Latest security protocol, offers stronger encryption and protection against brute-force attacks.

Wireless Configuration Commands (Windows)

- Show available Wi-Fi networks:
  netsh wlan show networks

- Connect to a Wi-Fi network:
  netsh wlan connect name=""

- Disconnect from a Wi-Fi network:
  netsh wlan disconnect

Wireless Troubleshooting Commands

- Ping the access point:
  ping 

- Check signal strength:
  netsh wlan show interfaces

- View wireless network properties:
  netsh wlan show profile "" key=clear

Common Wireless Issues

- Weak signal: Check distance from the access point, obstacles, and interference.
- Connection drops: Update drivers, check for interference, and signal strength.
- No internet access: Verify DHCP settings, check ISP connection, and router status.

Best Practices for Wireless Networking

- Use WPA3 for better security.
- Select less crowded channels (1, 6, 11 in 2.4 GHz).
- Position access points centrally to optimize coverage.
- Limit SSID broadcasting for sensitive networks.
- Regularly update firmware on access points and routers.

Windows Command Cheat Sheet for Network Engineers

Windows Command Cheat Sheet for Network Engineers

Basic Networking Commands

- Check IP configuration:
  ipconfig

- Release IP address:
  ipconfig /release

- Renew IP address:
  ipconfig /renew

- Display current TCP/IP connections:
  netstat -a

- Show routing table:
  route print

Network Diagnostics

- Ping a host:
  ping 

- Trace the route to a host:
  tracert 

- Check DNS resolution:
  nslookup 

- Check network statistics:
  netstat -s

Network Share and File Commands

- List shared folders:
  net share

- Map a network drive:
  net use : \\\

- Disconnect a network drive:
  net use : /delete

Firewall Configuration

- Check firewall status:
  netsh advfirewall show allprofiles

- Allow a program through the firewall:
  netsh advfirewall firewall add rule name="" dir=in action=allow program=""

- Block a program:
  netsh advfirewall firewall add rule name="" dir=in action=block program=""

Wi-Fi Commands

- Show Wi-Fi profiles:
  netsh wlan show profiles

- Connect to a Wi-Fi network:
  netsh wlan connect name=""

- Disconnect from a Wi-Fi network:
  netsh wlan disconnect

Network Adapter Management

- Show network adapters:
  getmac

- Disable a network adapter:
  netsh interface set interface "" admin=disabled

- Enable a network adapter:
  netsh interface set interface "" admin=enabled

Viewing and Managing Services

- List all services:
  services.msc

- Start a service:
  net start 

- Stop a service:
  net stop 

PowerShell Networking Commands

- Check IP configuration:
  Get-NetIPConfiguration

- Get DNS settings:
  Get-DnsClientServerAddress

- Get active network connections:
  Get-NetTCPConnection

Remote Connection

- Remote Desktop connection:
  mstsc /v:

- Establish a remote PowerShell session:
  Enter-PSSession -ComputerName 

Linux bash command cheat sheet

Linux Bash Command Cheat Sheet

File and Directory Commands

- List files:
  ls
- Change directory:
  cd 
- Print working directory:
  pwd
- Create a directory:
  mkdir 
- Remove a directory:
  rmdir 
- Remove a file:
  rm 
- Copy a file:
  cp  
- Move or rename a file:
  mv  
- Display file contents:
  cat 
- Display file contents page by page:
  less 

File Permissions

- Change file permissions:
  chmod  
- Change file owner:
  chown : 

Text Processing

- Search for a string in a file:
  grep  
- Count lines, words, and characters:
  wc 
- Sort lines in a file:
  sort 
- Display unique lines:
  uniq 
- Replace text in a file:
  sed 's/old_text/new_text/g' 

Networking

- Check network configuration:
  ifconfig
- Display current IP address:
  hostname -I
- Ping a host:
  ping 
- Check open ports:
  netstat -tuln
- Trace the route to a host:
  traceroute 

Process Management

- List running processes:
  ps aux
- Find a process by name:
  pgrep 
- Kill a process:
  kill 
- Kill a process by name:
  pkill 
- View system resource usage:
  top

System Information

- Show disk usage:
  df -h
- Show memory usage:
  free -h
- Show system uptime:
  uptime
- Show current users:
  who

Package Management (Debian/Ubuntu)

- Update package list:
  sudo apt update
- Upgrade installed packages:
  sudo apt upgrade
- Install a package:
  sudo apt install 
- Remove a package:
  sudo apt remove 

Miscellaneous

- Clear terminal screen:
  clear
- Display current date and time:
  date
- Get help for a command:
  man 
- Exit the terminal:
  exit
Bash Command Cheat Sheet

Bash Command Cheat Sheet

File and Directory Commands

- List files:
  ls
- Change directory:
  cd 
- Print working directory:
  pwd
- Create a directory:
  mkdir 
- Remove a directory:
  rmdir 
- Remove a file:
  rm 
- Copy a file:
  cp  
- Move or rename a file:
  mv  
- Display file contents:
  cat 
- Display file contents page by page:
  less 

File Permissions

- Change file permissions:
  chmod  
- Change file owner:
  chown : 

Text Processing

- Search for a string in a file:
  grep  
- Count lines, words, and characters:
  wc 
- Sort lines in a file:
  sort 
- Display unique lines:
  uniq 
- Replace text in a file:
  sed 's/old_text/new_text/g' 

Networking

- Check network configuration:
  ifconfig
- Display current IP address:
  hostname -I
- Ping a host:
  ping 
- Check open ports:
  netstat -tuln
- Trace the route to a host:
  traceroute 

Process Management

- List running processes:
  ps aux
- Find a process by name:
  pgrep 
- Kill a process:
  kill 
- Kill a process by name:
  pkill 
- View system resource usage:
  top

System Information

- Show disk usage:
  df -h
- Show memory usage:
  free -h
- Show system uptime:
  uptime
- Show current users:
  who

Package Management (Debian/Ubuntu)

- Update package list:
  sudo apt update
- Upgrade installed packages:
  sudo apt upgrade
- Install a package:
  sudo apt install 
- Remove a package:
  sudo apt remove 

Miscellaneous

- Clear terminal screen:
  clear
- Display current date and time:
  date
- Get help for a command:
  man 
- Exit the terminal:
  exit

BGP (Border Gateway Protocol) Cheat Sheet

BGP (Border Gateway Protocol)

 Cheat Sheet

Basic Concepts

- BGP (Border Gateway Protocol): The protocol used to exchange routing information between different autonomous systems (AS).
- Autonomous System (AS): A collection of IP networks and routers under a single organization's control.
- BGP Peers: Routers that exchange BGP routing information.
- BGP Session: TCP connection between BGP peers (port 179).

BGP States

1. Idle
2. Connect
3. Active
4. OpenSent
5. OpenConfirm
6. Established

BGP Attributes

- AS_PATH: List of ASs a route has traversed.
- NEXT_HOP: Next hop IP address for the route.
- LOCAL_PREF: Indicates the preferred exit point from the AS.
- MED (Multi-Exit Discriminator): Suggests preferred entry point to an AS.
- COMMUNITY: A way to group routes for routing decisions.

BGP Configuration Commands (Cisco)

Basic Configuration:
router bgp 
  neighbor  remote-as 
  neighbor  description 

Example:
router bgp 65001
  neighbor 192.168.1.1 remote-as 65002
  neighbor 192.168.1.1 description "Peer Router"

Advertise a Network:
network  mask 

Example:
network 10.0.0.0 mask 255.255.255.0

Viewing BGP Information (Cisco)

- Show BGP Summary:
show ip bgp summary

- Show BGP Routes:
show ip bgp

- Show BGP Neighbor Details:
show ip bgp neighbors 

BGP Route Filtering

- Disallow Specific Routes:
neighbor  filter-list  in

- Using Route Maps:
route-map  permit 
  match 
  set 

BGP Timers

Adjust BGP Keepalive and Hold Timers:
neighbor  timers  

Example:
neighbor 192.168.1.1 timers 30 90

BGP Best Path Selection Criteria

1. Highest Weight (Cisco-specific)
2. Highest Local Preference
3. Shortest AS Path
4. Lowest Origin Type (IGP < EGP < Incomplete)
5. Lowest MED
6. EBGP over IBGP
7. Lowest IGP metric to NEXT_HOP
8. Oldest route (if all else is equal)
9. Lowest BGP router ID (if all else is equal)

Common BGP Commands for Troubleshooting

- Check BGP Neighbors:
show ip bgp neighbors

- BGP Route Information:
show ip bgp 

- Check BGP Updates:
show ip bgp updates
BGP Cheat Sheet

BGP Cheat Sheet

Basic Concepts

- BGP (Border Gateway Protocol): The protocol used to exchange routing information between different autonomous systems (AS).
- Autonomous System (AS): A collection of IP networks and routers under a single organization's control.
- BGP Peers: Routers that exchange BGP routing information.
- BGP Session: TCP connection between BGP peers (port 179).

BGP States

1. Idle
2. Connect
3. Active
4. OpenSent
5. OpenConfirm
6. Established

BGP Attributes

- AS_PATH: List of ASs a route has traversed.
- NEXT_HOP: Next hop IP address for the route.
- LOCAL_PREF: Indicates the preferred exit point from the AS.
- MED (Multi-Exit Discriminator): Suggests preferred entry point to an AS.
- COMMUNITY: A way to group routes for routing decisions.

BGP Configuration Commands (Cisco)

Basic Configuration:
router bgp 
  neighbor  remote-as 
  neighbor  description 

Example:
router bgp 65001
  neighbor 192.168.1.1 remote-as 65002
  neighbor 192.168.1.1 description "Peer Router"

Advertise a Network:
network  mask 

Example:
network 10.0.0.0 mask 255.255.255.0

Viewing BGP Information (Cisco)

- Show BGP Summary:
show ip bgp summary

- Show BGP Routes:
show ip bgp

- Show BGP Neighbor Details:
show ip bgp neighbors 

BGP Route Filtering

- Disallow Specific Routes:
neighbor  filter-list  in

- Using Route Maps:
route-map  permit 
  match 
  set 

BGP Timers

Adjust BGP Keepalive and Hold Timers:
neighbor  timers  

Example:
neighbor 192.168.1.1 timers 30 90

BGP Best Path Selection Criteria

1. Highest Weight (Cisco-specific)
2. Highest Local Preference
3. Shortest AS Path
4. Lowest Origin Type (IGP < EGP < Incomplete)
5. Lowest MED
6. EBGP over IBGP
7. Lowest IGP metric to NEXT_HOP
8. Oldest route (if all else is equal)
9. Lowest BGP router ID (if all else is equal)

Common BGP Commands for Troubleshooting

- Check BGP Neighbors:
show ip bgp neighbors

- BGP Route Information:
show ip bgp 

- Check BGP Updates:
show ip bgp updates

Python Cheat Sheet

Python Cheat Sheet

Python Cheat Sheet

Basic Syntax

# Comments 
# This is a comment

# Variables 
x = 5
name = "Alice"

# Data Types 
integer = 10
float_num = 10.5
string = "Hello"
boolean = True
list_example = [1, 2, 3]
tuple_example = (1, 2, 3)
dict_example = {"key": "value"}

Control Structures

# If Statements
if x > 0:
    print("Positive")
elif x < 0:
    print("Negative")
else:
    print("Zero")

# Loops
# For Loop
for i in range(5):
    print(i)

# While Loop
while x < 5:
    x += 1

Functions

# Defining Functions
def my_function(param1, param2):
    return param1 + param2

# Lambda Functions
square = lambda x: x ** 2

Data Structures

# Lists
my_list = [1, 2, 3]
my_list.append(4)

# Dictionaries
my_dict = {"name": "Alice", "age": 25}
age = my_dict["age"]

# Sets
my_set = {1, 2, 3}
my_set.add(4)

# Tuples
my_tuple = (1, 2, 3)

List Comprehensions

squares = [x ** 2 for x in range(10)]

String Methods

# Common Methods
my_string = "Hello, World!"
my_string.lower()
my_string.upper()
my_string.split(", ")

File Handling

# Reading a File
with open('file.txt', 'r') as file:
    content = file.read()

# Writing to a File
with open('file.txt', 'w') as file:
    file.write("Hello, World!")

Exception Handling

try:
    # Code that may raise an exception
    result = 10 / 0
except ZeroDivisionError:
    print("You can't divide by zero!")
finally:
    print("This will always execute.")

Modules and Packages

# Importing Modules
import math
from datetime import datetime

Decorators

def my_decorator(func):
    def wrapper():
        print("Before the function.")
        func()
        print("After the function.")
    return wrapper

@my_decorator
def say_hello():
    print("Hello!")

Generators

def countdown(n):
    while n > 0:
        yield n
        n -= 1

for number in countdown(5):
    print(number)

Common Built-in Functions

# len(), sum(), max(), min(), sorted(), enumerate()

Useful Libraries

# NumPy, Pandas, Matplotlib, Requests, Flask/Django

Common Commands

# Install a Package
pip install package_name

# Run a Python Script
python script.py

Python Cheat Sheet

Python Cheat Sheet

Basic Syntax

# Comments 
# This is a comment

# Variables 
x = 5
name = "Alice"

# Data Types 
integer = 10
float_num = 10.5
string = "Hello"
boolean = True
list_example = [1, 2, 3]
tuple_example = (1, 2, 3)
dict_example = {"key": "value"}

Control Structures

# If Statements
if x > 0:
    print("Positive")
elif x < 0:
    print("Negative")
else:
    print("Zero")

# Loops
# For Loop
for i in range(5):
    print(i)

# While Loop
while x < 5:
    x += 1

Functions

# Defining Functions
def my_function(param1, param2):
    return param1 + param2

# Lambda Functions
square = lambda x: x ** 2

Data Structures

# Lists
my_list = [1, 2, 3]
my_list.append(4)

# Dictionaries
my_dict = {"name": "Alice", "age": 25}
age = my_dict["age"]

# Sets
my_set = {1, 2, 3}
my_set.add(4)

# Tuples
my_tuple = (1, 2, 3)

List Comprehensions

squares = [x ** 2 for x in range(10)]

String Methods

# Common Methods
my_string = "Hello, World!"
my_string.lower()
my_string.upper()
my_string.split(", ")

File Handling

# Reading a File
with open('file.txt', 'r') as file:
    content = file.read()

# Writing to a File
with open('file.txt', 'w') as file:
    file.write("Hello, World!")

Exception Handling

try:
    # Code that may raise an exception
    result = 10 / 0
except ZeroDivisionError:
    print("You can't divide by zero!")
finally:
    print("This will always execute.")

Modules and Packages

# Importing Modules
import math
from datetime import datetime

Decorators

def my_decorator(func):
    def wrapper():
        print("Before the function.")
        func()
        print("After the function.")
    return wrapper

@my_decorator
def say_hello():
    print("Hello!")

Generators

def countdown(n):
    while n > 0:
        yield n
        n -= 1

for number in countdown(5):
    print(number)

Common Built-in Functions

# len(), sum(), max(), min(), sorted(), enumerate()

Useful Libraries

# NumPy, Pandas, Matplotlib, Requests, Flask/Django

Common Commands

# Install a Package
pip install package_name

# Run a Python Script
python script.py