Network Diagnostics
Comprehensive network diagnostic tools, procedures, and troubleshooting methodologies for identifying, analyzing, and resolving connectivity, performance, and reliability issues across SOLVEFORCE telecommunications and IT services.
π― Network Diagnostics Overview
Network diagnostics are essential for maintaining optimal performance, identifying issues before they impact business operations, and ensuring reliable telecommunications and IT services. Our diagnostic toolkit provides comprehensive analysis capabilities for all network layers.
π Diagnostic Capabilities
Comprehensive Network Analysis:
- Real-time performance monitoring and analysis
- Connectivity testing and validation
- Bandwidth utilization and capacity planning
- Latency, jitter, and packet loss measurement
- Quality of Service (QoS) analysis and optimization
Multi-Layer Diagnostics:
- Physical Layer: Cable testing, signal strength analysis
- Data Link Layer: Switch port analysis, VLAN configuration
- Network Layer: Routing table analysis, IP connectivity
- Transport Layer: TCP/UDP port testing, session analysis
- Application Layer: Service-specific testing and validation
Proactive Monitoring:
- Continuous network health monitoring
- Automated alert generation and escalation
- Performance baseline establishment and trending
- Predictive analysis and capacity forecasting
- Scheduled diagnostic reporting and analysis
π Basic Network Connectivity Tests
π Ping Tests
Basic Connectivity Verification:
# Test basic connectivity to SOLVEFORCE gateway
ping 8.8.8.8
# Continuous ping with statistics
ping -t 8.8.8.8 # Windows
ping 8.8.8.8 # Linux/Mac (Ctrl+C to stop)
# Ping with specific packet size
ping -l 1472 8.8.8.8 # Windows
ping -s 1472 8.8.8.8 # Linux/Mac
# IPv6 connectivity test
ping -6 2001:4860:4860::8888
Advanced Ping Analysis:
# Ping with timestamp and extended output
ping -D -O 8.8.8.8 # Linux timestamp
ping -T tsonly 8.8.8.8 # Linux with precise timestamps
# Flood ping for stress testing (use carefully)
ping -f -c 100 8.8.8.8 # Linux - requires root
ping -l 0 -t 8.8.8.8 # Windows - continuous fast ping
# MTU discovery
ping -M do -s 1472 8.8.8.8 # Linux
ping -f -l 1472 8.8.8.8 # Windows
# Ping sweep for network discovery
for i in {1..254}; do ping -c 1 -W 1 192.168.1.$i; done
Interpreting Ping Results:
- Reply time < 10ms: Excellent local connectivity
- Reply time 10-50ms: Good regional connectivity
- Reply time 50-150ms: Acceptable long-distance connectivity
- Reply time > 150ms: Potential performance issues
- Request timeout: Packet loss or filtering
- Destination unreachable: Routing issues
π€οΈ Traceroute Analysis
Path Discovery and Analysis:
# Basic traceroute
tracert google.com # Windows
traceroute google.com # Linux/Mac
# Enhanced traceroute with additional info
traceroute -I google.com # ICMP instead of UDP
traceroute -T -p 80 google.com # TCP SYN to port 80
traceroute -n google.com # Numeric output only
# IPv6 traceroute
tracert -6 google.com # Windows
traceroute6 google.com # Linux/Mac
# MTR (My TraceRoute) - continuous traceroute
mtr google.com # Linux/Mac
mtr --report --report-cycles 100 google.com
Traceroute Interpretation:
Hop RTT1 RTT2 RTT3 Address/Hostname
1 1ms 1ms 1ms 192.168.1.1 (gateway)
2 5ms 4ms 6ms 10.0.0.1 (ISP edge)
3 12ms 11ms 13ms core1.isp.com
4 15ms 14ms 16ms border.isp.com
5 25ms 24ms 26ms peer-gateway.net
6 28ms 27ms 29ms destination.com
Analysis Points:
- Hop 1-2: Local network and ISP connection
- High latency jumps: Potential bottlenecks
- Timeouts (*): Firewalls or router configuration
- Inconsistent timing: Network congestion
- Routing loops: Circular routing paths
π Advanced Network Testing
π Bandwidth and Throughput Testing
SOLVEFORCE Speed Test Portal:
# Access SOLVEFORCE network speed test
https://speedtest.solveforce.com
# Command-line speed test
curl -s https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py | python
# iPerf3 testing between SOLVEFORCE test servers
iperf3 -c test-server.solveforce.com -t 30 -i 5
Comprehensive Bandwidth Analysis:
# iPerf3 bidirectional testing
iperf3 -c server.solveforce.com -d -t 60
# Multiple parallel streams
iperf3 -c server.solveforce.com -P 4 -t 30
# UDP bandwidth testing
iperf3 -c server.solveforce.com -u -b 100M -t 30
# JSON output for analysis
iperf3 -c server.solveforce.com -J -t 30 > bandwidth-test.json
Performance Baseline Establishment:
# Python script for automated bandwidth testing
import subprocess
import json
import datetime
def run_bandwidth_test():
"""Run comprehensive bandwidth test"""
results = {
'timestamp': datetime.datetime.now().isoformat(),
'tests': {}
}
# TCP throughput test
tcp_result = subprocess.run([
'iperf3', '-c', 'test-server.solveforce.com',
'-t', '30', '-J'
], capture_output=True, text=True)
results['tests']['tcp_throughput'] = json.loads(tcp_result.stdout)
# UDP packet loss test
udp_result = subprocess.run([
'iperf3', '-c', 'test-server.solveforce.com',
'-u', '-b', '50M', '-t', '30', '-J'
], capture_output=True, text=True)
results['tests']['udp_loss'] = json.loads(udp_result.stdout)
return results
# Run test and save results
test_results = run_bandwidth_test()
with open(f'bandwidth-test-{datetime.datetime.now().strftime("%Y%m%d-%H%M%S")}.json', 'w') as f:
json.dump(test_results, f, indent=2)
π‘ Quality of Service (QoS) Testing
Voice Quality Testing:
# RTP stream testing for voice quality
iperf3 -c voice-test.solveforce.com -u -b 64k -t 60 --dscp 46
# Jitter and packet loss measurement
ping -i 0.02 -c 1000 voice-gateway.solveforce.com | \
awk '/time=/ {print $7}' | sed 's/time=//' > latency-data.txt
# Voice quality simulation
rtptools -s voice-test.solveforce.com -p 5004 -d 20 -j 2
Application Performance Testing:
# Python script for application-specific testing
import socket
import time
import statistics
def test_application_latency(host, port, iterations=100):
"""Test application response time"""
latencies = []
for i in range(iterations):
start_time = time.time()
try:
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.settimeout(5)
result = sock.connect_ex((host, port))
sock.close()
if result == 0:
latency = (time.time() - start_time) * 1000
latencies.append(latency)
except Exception as e:
print(f"Connection failed: {e}")
if latencies:
return {
'min': min(latencies),
'max': max(latencies),
'avg': statistics.mean(latencies),
'median': statistics.median(latencies),
'std_dev': statistics.stdev(latencies) if len(latencies) > 1 else 0
}
return None
# Test various services
services = [
('voice.solveforce.com', 5060), # SIP
('api.solveforce.com', 443), # HTTPS API
('portal.solveforce.com', 443), # Web Portal
]
for host, port in services:
result = test_application_latency(host, port)
print(f"{host}:{port} - {result}")
π§ Network Configuration Diagnostics
βοΈ Interface and Configuration Analysis
Network Interface Diagnostics:
# Display network interface configuration
ipconfig /all # Windows - detailed configuration
ifconfig -a # Linux/Mac - all interfaces
ip addr show # Linux - modern interface info
# Interface statistics
netstat -i # Interface packet statistics
ip -s link show # Detailed interface statistics
# Network adapter properties
wmic path win32_networkadapter get name,speed,adaptertype # Windows
ethtool eth0 # Linux - interface details
# Wireless diagnostics (if applicable)
netsh wlan show profiles # Windows - WiFi profiles
iwconfig # Linux - wireless configuration
DNS Configuration Verification:
# DNS server configuration
nslookup # Interactive DNS lookup
dig @8.8.8.8 solveforce.com # Specific DNS server query
host -v solveforce.com # Verbose DNS lookup
# DNS resolution testing
nslookup solveforce.com
dig +trace solveforce.com # Full DNS resolution path
dig +short solveforce.com # Simple A record lookup
# Reverse DNS lookup
nslookup 8.8.8.8
dig -x 8.8.8.8
# DNS performance testing
dig @1.1.1.1 solveforce.com | grep "Query time"
Routing Table Analysis:
# Display routing table
route print # Windows
netstat -rn # Cross-platform
ip route show # Linux - modern routing
# Default gateway verification
route print 0.0.0.0 # Windows - default route
ip route show default # Linux - default route
# Add temporary test route
route add 192.168.100.0 mask 255.255.255.0 192.168.1.1 # Windows
ip route add 192.168.100.0/24 via 192.168.1.1 # Linux
π Security and Firewall Diagnostics
Port Connectivity Testing:
# Test specific ports
telnet solveforce.com 80 # Basic port test
nc -v solveforce.com 443 # Netcat port test
nmap -p 80,443,5060 solveforce.com # Port scan
# Comprehensive port scanning
nmap -sS -O solveforce.com # SYN scan with OS detection
nmap -sU -p 53,123,161 solveforce.com # UDP port scan
# Service detection
nmap -sV -p 1-1000 solveforce.com # Version detection
Firewall Rule Testing:
# Windows firewall status
netsh advfirewall show allprofiles
# Linux iptables rules
iptables -L -v -n # List all rules
iptables -L INPUT -v -n # Input chain rules
# Connection testing through firewall
hping3 -S -p 80 -c 5 solveforce.com # SYN packet test
π Performance Monitoring and Analysis
π Real-Time Network Monitoring
Continuous Performance Monitoring:
# Real-time network statistics
iftop # Interface bandwidth usage
netstat -i 1 # Interface statistics per second
iostat -n 1 # Network I/O statistics
# Bandwidth monitoring
vnstat -i eth0 # Interface usage history
sar -n DEV 1 10 # Network device statistics
# Connection monitoring
ss -tuln # Socket statistics
netstat -an | grep ESTABLISHED # Active connections
Network Traffic Analysis:
# Python script for traffic pattern analysis
import psutil
import time
import json
def monitor_network_traffic(duration=60, interval=1):
"""Monitor network traffic patterns"""
stats = []
initial_stats = psutil.net_io_counters()
for i in range(duration):
time.sleep(interval)
current_stats = psutil.net_io_counters()
bytes_sent = current_stats.bytes_sent - initial_stats.bytes_sent
bytes_recv = current_stats.bytes_recv - initial_stats.bytes_recv
stats.append({
'timestamp': time.time(),
'bytes_sent_per_sec': bytes_sent / (i + 1),
'bytes_recv_per_sec': bytes_recv / (i + 1),
'packets_sent': current_stats.packets_sent,
'packets_recv': current_stats.packets_recv,
'errors_in': current_stats.errin,
'errors_out': current_stats.errout,
'drops_in': current_stats.dropin,
'drops_out': current_stats.dropout
})
return stats
# Run monitoring and save results
traffic_data = monitor_network_traffic(300, 1) # 5 minutes
with open('network-traffic-analysis.json', 'w') as f:
json.dump(traffic_data, f, indent=2)
π Performance Bottleneck Identification
System Resource Impact Analysis:
# CPU usage by network processes
top -p $(pgrep -d',' networkd) # Linux
tasklist | findstr network # Windows
# Memory usage analysis
free -h # Linux memory usage
systeminfo | findstr Memory # Windows memory info
# Disk I/O impact on network
iotop # Linux I/O monitoring
perfmon # Windows performance monitor
Network Buffer and Queue Analysis:
# Buffer and queue statistics
cat /proc/net/dev # Linux network device stats
ss -i # Socket information with internals
# Network buffer tuning verification
sysctl net.core.rmem_max # Receive buffer max
sysctl net.core.wmem_max # Send buffer max
sysctl net.ipv4.tcp_rmem # TCP receive memory
π Packet Capture and Analysis
π¦ Packet Capture Tools
Wireshark Network Analysis:
# Command-line packet capture
tshark -i eth0 -w capture.pcap # Capture to file
tshark -i eth0 -c 1000 # Capture 1000 packets
# Filtered packet capture
tshark -i eth0 -f "host solveforce.com" # Host filter
tshark -i eth0 -f "port 80 or port 443" # Port filter
# Real-time analysis
tshark -i eth0 -Y "tcp.flags.syn==1" # SYN packets only
tshark -i eth0 -Y "dns" # DNS traffic only
tcpdump Packet Analysis:
# Basic packet capture
tcpdump -i eth0 -w network-capture.pcap
# Specific protocol capture
tcpdump -i eth0 udp port 53 # DNS queries
tcpdump -i eth0 tcp port 80 # HTTP traffic
tcpdump -i eth0 icmp # ICMP packets
# Advanced filtering
tcpdump -i eth0 'net 192.168.1.0/24' # Subnet filter
tcpdump -i eth0 'src host 192.168.1.100' # Source host
Packet Analysis Scripts:
# Python packet analysis with scapy
from scapy.all import *
import collections
def analyze_packet_capture(pcap_file):
"""Analyze captured packets for insights"""
packets = rdpcap(pcap_file)
analysis = {
'total_packets': len(packets),
'protocols': collections.Counter(),
'hosts': collections.Counter(),
'ports': collections.Counter(),
'packet_sizes': []
}
for packet in packets:
# Protocol analysis
if packet.haslayer(TCP):
analysis['protocols']['TCP'] += 1
analysis['ports'][packet[TCP].dport] += 1
elif packet.haslayer(UDP):
analysis['protocols']['UDP'] += 1
analysis['ports'][packet[UDP].dport] += 1
elif packet.haslayer(ICMP):
analysis['protocols']['ICMP'] += 1
# Host analysis
if packet.haslayer(IP):
analysis['hosts'][packet[IP].src] += 1
analysis['hosts'][packet[IP].dst] += 1
analysis['packet_sizes'].append(len(packet))
# Calculate statistics
if analysis['packet_sizes']:
analysis['avg_packet_size'] = sum(analysis['packet_sizes']) / len(analysis['packet_sizes'])
analysis['min_packet_size'] = min(analysis['packet_sizes'])
analysis['max_packet_size'] = max(analysis['packet_sizes'])
return analysis
# Example usage
capture_analysis = analyze_packet_capture('network-capture.pcap')
print(json.dumps(capture_analysis, indent=2, default=str))
π¨ Automated Diagnostic Scripts
π€ Comprehensive Network Health Check
All-in-One Diagnostic Script:
#!/bin/bash
# SOLVEFORCE Network Diagnostic Script
echo "=== SOLVEFORCE Network Diagnostics ==="
echo "Timestamp: $(date)"
echo
# Basic connectivity tests
echo "=== Connectivity Tests ==="
for host in "8.8.8.8" "portal.solveforce.com" "api.solveforce.com"; do
echo -n "Testing $host: "
if ping -c 3 -W 3 $host >/dev/null 2>&1; then
echo "OK"
else
echo "FAILED"
fi
done
echo
# DNS resolution tests
echo "=== DNS Resolution Tests ==="
for domain in "solveforce.com" "portal.solveforce.com" "api.solveforce.com"; do
echo -n "Resolving $domain: "
if nslookup $domain >/dev/null 2>&1; then
echo "OK"
else
echo "FAILED"
fi
done
echo
# Interface status
echo "=== Network Interface Status ==="
ip addr show | grep -E "^[0-9]+:|inet "
echo
# Routing table
echo "=== Default Routes ==="
ip route show default
echo
# DNS configuration
echo "=== DNS Configuration ==="
cat /etc/resolv.conf 2>/dev/null || echo "DNS config not accessible"
echo
# Performance test
echo "=== Performance Test ==="
echo "Running bandwidth test to SOLVEFORCE servers..."
if command -v iperf3 >/dev/null 2>&1; then
iperf3 -c test-server.solveforce.com -t 10 -f M 2>/dev/null || echo "Performance test unavailable"
else
echo "iperf3 not installed - skipping performance test"
fi
echo "=== Diagnostic Complete ==="
Windows PowerShell Diagnostic Script:
# SOLVEFORCE Network Diagnostics - PowerShell
Write-Host "=== SOLVEFORCE Network Diagnostics ===" -ForegroundColor Cyan
Write-Host "Timestamp: $(Get-Date)" -ForegroundColor Gray
Write-Host
# Network adapter information
Write-Host "=== Network Adapters ===" -ForegroundColor Yellow
Get-NetAdapter | Where-Object {$_.Status -eq "Up"} | Select-Object Name, InterfaceDescription, LinkSpeed
# IP configuration
Write-Host "`n=== IP Configuration ===" -ForegroundColor Yellow
Get-NetIPAddress | Where-Object {$_.AddressFamily -eq "IPv4" -and $_.IPAddress -ne "127.0.0.1"} |
Select-Object InterfaceAlias, IPAddress, PrefixLength
# DNS servers
Write-Host "`n=== DNS Servers ===" -ForegroundColor Yellow
Get-DnsClientServerAddress | Where-Object {$_.AddressFamily -eq 2} |
Select-Object InterfaceAlias, ServerAddresses
# Connectivity tests
Write-Host "`n=== Connectivity Tests ===" -ForegroundColor Yellow
$testHosts = @("8.8.8.8", "portal.solveforce.com", "api.solveforce.com")
foreach ($host in $testHosts) {
$result = Test-NetConnection -ComputerName $host -Port 80 -WarningAction SilentlyContinue
$status = if ($result.TcpTestSucceeded) { "OK" } else { "FAILED" }
Write-Host "Testing $host : $status" -ForegroundColor $(if ($result.TcpTestSucceeded) { "Green" } else { "Red" })
}
# Route table
Write-Host "`n=== Default Routes ===" -ForegroundColor Yellow
Get-NetRoute | Where-Object {$_.DestinationPrefix -eq "0.0.0.0/0"} |
Select-Object InterfaceAlias, NextHop, RouteMetric
Write-Host "`n=== Diagnostic Complete ===" -ForegroundColor Cyan
π Automated Monitoring and Alerting
Continuous Monitoring Script:
# Python continuous network monitoring
import time
import subprocess
import smtplib
import json
from email.mime.text import MIMEText
from datetime import datetime
class NetworkMonitor:
def __init__(self, config_file='monitor_config.json'):
with open(config_file, 'r') as f:
self.config = json.load(f)
self.alert_thresholds = {
'packet_loss': 5, # 5% packet loss
'latency': 150, # 150ms latency
'bandwidth': 0.8 # 80% of expected bandwidth
}
def test_connectivity(self, host):
"""Test connectivity with packet loss calculation"""
try:
result = subprocess.run([
'ping', '-c', '10', host
], capture_output=True, text=True, timeout=30)
# Parse ping results
lines = result.stdout.split('\n')
stats_line = [line for line in lines if 'packet loss' in line][0]
loss_percent = float(stats_line.split('%')[0].split()[-1])
# Extract average latency
time_line = [line for line in lines if 'avg' in line]
if time_line:
avg_time = float(time_line[0].split('/')[1])
else:
avg_time = None
return {
'host': host,
'packet_loss': loss_percent,
'avg_latency': avg_time,
'status': 'ok' if loss_percent < self.alert_thresholds['packet_loss'] else 'alert'
}
except Exception as e:
return {
'host': host,
'error': str(e),
'status': 'error'
}
def run_monitoring_cycle(self):
"""Run complete monitoring cycle"""
results = {
'timestamp': datetime.now().isoformat(),
'tests': []
}
for host in self.config['monitored_hosts']:
test_result = self.test_connectivity(host)
results['tests'].append(test_result)
# Check for alerts
if test_result['status'] in ['alert', 'error']:
self.send_alert(test_result)
return results
def send_alert(self, test_result):
"""Send email alert for network issues"""
subject = f"Network Alert: {test_result['host']}"
body = f"""
Network monitoring alert:
Host: {test_result['host']}
Status: {test_result['status']}
Packet Loss: {test_result.get('packet_loss', 'N/A')}%
Latency: {test_result.get('avg_latency', 'N/A')}ms
Error: {test_result.get('error', 'None')}
Timestamp: {datetime.now()}
"""
# Send email (configure SMTP settings)
# Implementation depends on your email configuration
print(f"ALERT: {subject}")
print(body)
# Usage example
if __name__ == "__main__":
monitor = NetworkMonitor()
while True:
results = monitor.run_monitoring_cycle()
print(f"Monitoring cycle completed: {results['timestamp']}")
# Log results
with open(f"monitor-{datetime.now().strftime('%Y%m%d')}.log", 'a') as f:
f.write(json.dumps(results) + '\n')
time.sleep(300) # Wait 5 minutes between cycles
π Support and Escalation
π When to Contact SOLVEFORCE Support
Immediate Escalation Scenarios:
- Complete connectivity loss for more than 5 minutes
- Packet loss > 10% sustained for more than 15 minutes
- Latency > 300ms consistently for critical applications
- Security alerts or suspected network intrusion
- Application failures related to network connectivity
Information to Provide to Support:
- Network diagnostic results from automated scripts
- Error messages and symptoms observed
- Timeline of when issues started
- Affected services and user impact
- Troubleshooting steps already performed
π SOLVEFORCE Diagnostic Support
Support Contact Information:
- Network Operations Center: 1-888-SOLVE-NOC
- Emergency Support: 1-888-SOLVE-911
- Technical Support: support@solveforce.com
- Network Engineering: network-support@solveforce.com
Remote Diagnostic Assistance:
- Screen sharing for guided troubleshooting
- Remote network analysis with customer permission
- Collaborative diagnostic sessions with engineering team
- Escalation to senior network engineers and specialists
Your Network Health Partner β SOLVEFORCE Network Diagnostics.
Comprehensive diagnostic platform designed to provide rapid network issue identification, detailed performance analysis, and expert troubleshooting support for optimal telecommunications and IT service reliability.