Network Troubleshooting Commands

Finding LIMS Server Information on IIS

Understanding Different Server Names

Hostname = Actual computer name

FQDN = Hostname + domain

DNS Alias = What users actually type

IIS Site Name = Internal IIS configuration

Get Hostname


# Computer name only
hostname

# Computer name with domain
echo %COMPUTERNAME%.%USERDNSDOMAIN%

# Full system info
systeminfo | findstr "Host Name"

Get User Access URLs (What Users Actually Type)


# Show IIS site bindings (most important for troubleshooting)
%windir%\system32\inetsrv\appcmd list sites

# Get specific LIMS site bindings
%windir%\system32\inetsrv\appcmd list site "LIMS Site" /config

# Show all web applications
%windir%\system32\inetsrv\appcmd list apps

Get DNS Information


# Check what DNS name resolves to this server
nslookup %COMPUTERNAME%

# Check where lims.company.com points
nslookup lims.company.com

# Check all DNS aliases for this server
nslookup %COMPUTERNAME%.%USERDNSDOMAIN%

Find LIMS URL From IIS Server You're On

One command to see all URLs:


%windir%\system32\inetsrv\appcmd list sites

Output shows:


SITE "Default Web Site" (id:1,bindings:http/*:80:,state:Started)
SITE "LIMS Production" (id:2,bindings:https/*:443:lims.acme.com,state:Started)

The LIMS URL is: https://lims.acme.com

If that shows too much, filter for LIMS:


%windir%\system32\inetsrv\appcmd list sites | findstr -i lims

Get just the bindings:


%windir%\system32\inetsrv\appcmd list sites /text:bindings

That's it. Use whatever URL shows up in your commands instead of my examples.

Command Line Methods


# Get computer name
hostname

# Get full computer name with domain
echo %COMPUTERNAME%.%USERDNSDOMAIN%

# Show IIS site bindings
%windir%\system32\inetsrv\appcmd list sites
%windir%\system32\inetsrv\appcmd list site "LIMS Site"

# Show all IIS applications
%windir%\system32\inetsrv\appcmd list apps

# Get detailed site info
%windir%\system32\inetsrv\appcmd list site "LIMS Site" /config

PowerShell Methods


# Get computer info
Get-ComputerInfo | Select-Object WindowsProductName, TotalPhysicalMemory

# Get IIS sites and bindings
Get-IISSite
Get-IISSite | Select-Object Name, Bindings

# Get specific LIMS site
Get-IISSite -Name "*LIMS*"

# Get site bindings details
Get-WebBinding -Name "LIMS Site"

# Get all web applications
Get-WebApplication

Registry Locations


# Check computer name in registry
reg query "HKLM\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName"

# Check IIS configuration
reg query "HKLM\SOFTWARE\Microsoft\InetStp"

Configuration Files


# Check IIS applicationHost.config
type C:\Windows\System32\inetsrv\config\applicationHost.config | findstr "LIMS"

# Look for LIMS web.config
dir C:\inetpub\wwwroot\*web.config* /s
type "C:\inetpub\wwwroot\LIMS\web.config" | findstr "server"

Network Discovery


# Show network configuration
ipconfig /all

# Show DNS registration
nslookup %COMPUTERNAME%

# Show all network interfaces
wmic computersystem get name,domain

Windows Commands

Basic Connectivity


# Test if LIMS server is reachable
ping lims.company.com
ping -t lims.company.com

# Test specific port
telnet lims.company.com 80
telnet lims.company.com 443

# DNS lookup
nslookup lims.company.com
nslookup lims.company.com 8.8.8.8

# Trace route to server
tracert lims.company.com

HTTP/HTTPS Testing


# Test web server response
curl -I https://lims.company.com
curl -I http://lims.company.com

# Test with verbose output
curl -v https://lims.company.com

# Test specific endpoint
curl -I https://lims.company.com/api/health
curl -I https://lims.company.com/login

# Download response body
curl https://lims.company.com/api/status

PowerShell Commands


# Test connection
Test-NetConnection lims.company.com -Port 443
Test-NetConnection lims.company.com -Port 80

# Web request
Invoke-WebRequest -Uri https://lims.company.com -Method Head
Invoke-WebRequest -Uri https://lims.company.com

# DNS resolution
Resolve-DnsName lims.company.com

Network Information


# Show network configuration
ipconfig /all

# Show DNS cache
ipconfig /displaydns

# Flush DNS cache
ipconfig /flushdns

# Show network connections
netstat -an
netstat -an | findstr :80
netstat -an | findstr :443

# Show routing table
route print

# Show active connections
netstat -b

Certificate Testing


# Check SSL certificate
curl -vI https://lims.company.com 2>&1 | findstr "certificate"

# PowerShell certificate check
$cert = Invoke-WebRequest https://lims.company.com
$cert.BaseResponse.ServerCertificate

Linux Commands

Basic Connectivity


# Test if LIMS server is reachable
ping lims.company.com
ping -c 4 lims.company.com

# Test specific port
telnet lims.company.com 80
telnet lims.company.com 443

# Alternative port testing
nc -zv lims.company.com 80
nc -zv lims.company.com 443

# DNS lookup
nslookup lims.company.com
dig lims.company.com
dig @8.8.8.8 lims.company.com

# Trace route to server
traceroute lims.company.com

HTTP/HTTPS Testing


# Test web server response
curl -I https://lims.company.com
curl -I http://lims.company.com

# Test with verbose output
curl -v https://lims.company.com

# Test specific endpoint
curl -I https://lims.company.com/api/health
curl -I https://lims.company.com/login

# Download response body
curl https://lims.company.com/api/status

# Follow redirects
curl -L https://lims.company.com

# Save response to file
curl -o response.html https://lims.company.com

Advanced HTTP Testing


# Test with different User-Agent
curl -H "User-Agent: Mozilla/5.0" https://lims.company.com

# Test POST request
curl -X POST -d "test=data" https://lims.company.com/api/test

# Test with authentication
curl -u username:password https://lims.company.com/api/secure

# Test with custom headers
curl -H "Authorization: Bearer token123" https://lims.company.com/api/data

# Test with timeout
curl --connect-timeout 10 https://lims.company.com

Network Information


# Show network configuration
ifconfig
ip addr show

# Show DNS configuration
cat /etc/resolv.conf

# Show network connections
netstat -an
netstat -tulpn
ss -tulpn

# Show connections to specific port
netstat -an | grep :80
netstat -an | grep :443

# Show routing table
route -n
ip route show

# Show active processes using network
lsof -i
lsof -i :80
lsof -i :443

Certificate and SSL Testing


# Check SSL certificate details
openssl s_client -connect lims.company.com:443 -servername lims.company.com

# Check certificate expiry
echo | openssl s_client -connect lims.company.com:443 2>/dev/null | openssl x509 -dates -noout

# Test SSL/TLS versions
openssl s_client -connect lims.company.com:443 -tls1_2
openssl s_client -connect lims.company.com:443 -tls1_3

# Check certificate chain
curl -vI https://lims.company.com 2>&1 | grep -E "(certificate|SSL)"

Performance Testing


# Test response time
time curl -o /dev/null -s https://lims.company.com

# Continuous monitoring
while true; do
    curl -w "%{time_total}\n" -o /dev/null -s https://lims.company.com
    sleep 5
done

# Test multiple connections
ab -n 100 -c 10 https://lims.company.com/

# Monitor bandwidth
iftop
nethogs

Common Troubleshooting Scenarios

User can't reach LIMS


# Windows
ping lims.company.com
nslookup lims.company.com
telnet lims.company.com 443

# Linux
ping -c 4 lims.company.com
dig lims.company.com
nc -zv lims.company.com 443

LIMS loads slowly


# Windows
curl -w "%{time_total}" -o nul -s https://lims.company.com
tracert lims.company.com

# Linux  
curl -w "%{time_total}\n" -o /dev/null -s https://lims.company.com
traceroute lims.company.com

SSL/Certificate errors


# Windows
curl -vI https://lims.company.com 2>&1 | findstr "certificate"

# Linux
openssl s_client -connect lims.company.com:443 -servername lims.company.com
curl -vI https://lims.company.com 2>&1 | grep "certificate"

API endpoints not responding


# Windows
curl -I https://lims.company.com/api/health
curl -v https://lims.company.com/api/status

# Linux
curl -I https://lims.company.com/api/health
curl -v https://lims.company.com/api/status

DNS resolution issues


# Windows
nslookup lims.company.com
nslookup lims.company.com 8.8.8.8
ipconfig /flushdns

# Linux
dig lims.company.com
dig @8.8.8.8 lims.company.com
systemctl restart systemd-resolved