Showing posts with label troubleshoot. Show all posts
Showing posts with label troubleshoot. Show all posts

Understanding the Double NAT in residential networking environments, its Impact on Network Performance and the Resolution Strategies

 


The Mechanics of Network Address Translation (NAT)

To understand Double NAT, one must first understand standard NAT. In modern IPv4 networking, public IP addresses are scarce. NAT (defined primarily in RFC 2663 and RFC 3022) allows multiple devices on a Local Area Network (LAN) to share a single public IP address provided by an Internet Service Provider (ISP).
In a Single NAT environment, a home router translates private, non-routable IP addresses (RFC 1918 addresses like 192.168.1.x) into the single public IP address when traffic goes out to the internet, and reverses the process for incoming traffic.

What is Double NAT?

Double NAT occurs when a network packet must pass through two separate NAT gateways before reaching the public internet. This typically happens when a user connects their own personal Wi-Fi router to an ISP-provided gateway (which is usually a modem/router combo unit) using standard Ethernet cables, without altering the default configuration of either device.

The Double NAT Topology

In a cascaded dual-router scenario, the topology looks like this:
  • The ISP Gateway (Router 1): Receives the public IP from the ISP. Creates Subnet A (e.g., 192.168.1.x).
  • The Personal Router (Router 2): Plugs its WAN/Internet port into a LAN port on Router 1. Router 1 assigns a Subnet A IP (e.g., 192.168.1.50) to Router 2's WAN port. Router 2 then creates Subnet B (e.g., 192.168.2.x).
  • The End Device: A PC or console on Subnet B sends traffic to Router 2. Router 2 translates the traffic to its Subnet A IP and sends it to Router 1. Router 1 translates it again to the Public IP.





Troubleshoot high network latency issues with Traceroot commandline tool in Windows OS

Tutorial on how to use traceroot (tracert) commandline tool to solve high latency issue in Microsoft Windows OS.

tracert diagnostic tool can help you determine the IP address of routers between your computer and the IP address of destination/target.

High network latency can be an issue if the network is being used for services like online gaming or VoIP. Online games will experience high lag.

When data is sent or received between your computer and a destination host, the data goes through several routers also called hops. Any of these router could cause high latency issue. tracert command line tool can be used to find out which router is causing high network latency issue.

Network latency is the measure of time taken by the data packet to go from a source IP address to the destination IP address and return a Acknowledge packet to the source IP address. Network latency is measured in the unit millisecond(ms). It is also called Round-trip time (RTT).

 

Syntax 

 tracert [/d] [/h <maximumhops>] [/j <hostlist>] [/w <timeout>] [/R] [/S <srcaddr>] [/4][/6] <targetname>


It is recommended to go through the official documentation of Microsoft traceroot command.

Official tracert docs : https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/tracert


Tracert command example

Using tracert command to find the IP address of intermediate router between your computer and the target URL. It also show the network latency for those intermediate routers.

Destination/target website URL :  www.live.con

Destination/target IP address : 204.79.197.212

Traceroute command : tracert /d www.live.com

You can see IP address of intermediate router between your computer and the target website IP addresss (204.79.197.212) in the image below. There number of  intermediate routers is nine.

You can also see the three network latency data for each IP address. This gives you good idea about the network latency between your computer and the shown IP address.



Target/Destination IP address and their respective network latency.


tracert command can also be executed if you know the target IP address.

Traget ip address : 116.119.52.112

Traceroot command : tracert -d 116.119.52.112





tracert command in IPv6 network.





tracert command can also help determine the IP address of home routers

The IP address of local router would be between 192.168.0.0 – 192.168.255.255 or
172.16.0.0 – 172.31.255.255.


Finding the IP address of the router causing high network latency issue

  1. Just use tracert command with target IP address ( online gaming website URL/IP address) which is going through high latency issue.
  2. Use tracert command with target website www.yahoo.com, www.microsoft.com.


You can see below that the third router with IP address 117.200.88.1 is causing the high network latency issue. Since the router is very close to the computer this is likely to be the ISP router.

You can see that the high network latency issue is caused by the router of ISP (Internet service provider). It could be resolved by disconnecting and reconnecting to the ISP or contacting the ISP.



High network latency issue solved by disconnecting and then reconnecting to the ISP.


Solve High network latency issue caused by home router devices

1. You could just restart the home router devices. This could solve latency issue if it is a temporary issue.

2. The high latency issue could arise if


High network latency issue caused by a distant router devices

If the high network latency is caused by a router which is you don't control then you can't do anything about it.