Question about WAN IP not matching Gateway IP
-
A difficult 24 hours with Midco, currently working but the WAN has a IPv4 Address xx.xxx.107.26 but a Gateway IPv4 xx.xxx.106.1. Are these not two different subnets? should the gateway be in the 107 subnet?
-
@The-Party-of-Hell-No said in Question about WAN IP not matching Gateway IP:
the WAN has a IPv4 Address xx.xxx.107.26 but a Gateway IPv4 xx.xxx.106.1. Are these not two different subnets?
A subnet is defined by an IP and the network mask. Without knowing the mask nobody can tell you.
-
@viragomann the first five digits match - actually define "network mask"
-
@The-Party-of-Hell-No said in Question about WAN IP not matching Gateway IP:
@viragomann the first five digits match
If you don't post enough information here (including the provided subnet mask), no one can answer your question.
However, you can use a subnet calculator tool such as this one: https://www.calculator.net/ip-subnet-calculator.html to test things and answer your question.
Or this one: https://www.subnet-calculator.com/
-
@The-Party-of-Hell-No
Subnet mask IPv4 255.255.254.0 -
@The-Party-of-Hell-No said in Question about WAN IP not matching Gateway IP:
@The-Party-of-Hell-No
Subnet mask IPv4 255.255.254.0That will be the same as a /23 CIDR mask. It's likely the gateway is in the same subnet as the IP you provided. Would be quite incorrect if the ISP provided a gateway that is not in the same subnet.
-
@The-Party-of-Hell-No
Usable Host IP Range: xx.xxx.106.1 - xx,xxx.107.254106.1 fall within the same subnet /23
-
@The-Party-of-Hell-No
So they are within the same subnet. It goes from x.x.106.0 to x.x.107.255. -
@viragomann is correct.
x.x.106.0
is the network,x.x.107.255
is the broadcast address, and assignable address space ranges fromx.x.106.1
tox.x.107.254
(for a /23 subnet mask, or 255.255.254.0) -
Thank you for the info and the link to the calculator. So for my Dynamic DNS Status - NO-IP which is set to 107.26, do I need to correct it to the gateway 106.1?
-
@The-Party-of-Hell-No said in Question about WAN IP not matching Gateway IP:
Thank you for the info and the link to the calculator. So for my Dynamic DNS Status - NO-IP which is set to 107.26, do I need to correct it to the gateway 106.1?
No, your Dynamic DNS should register your actual assigned WAN public IP address. The gateway is out of the picture for that. The gateway is simply the IP address where your firewall sends any traffic that does not match an IP range assigned to local firewall interfaces.
If you are new to networking, this may help clear some things up: https://www.cbtnuggets.com/blog/technology/networking/what-is-default-gateway.
-
@bmeeks
So in my simple minded explanation the WAN public IP address is the outward (Public) IP for the modem/router - incoming. The gateway is the internal (Private) IP the firewall uses sending any traffic that does not match an IP range assigned to local firewall interfaces - outgoing?They do not need to match, but must belong in the same subnet.
-
@The-Party-of-Hell-No said in Question about WAN IP not matching Gateway IP:
@bmeeks
So in my simple minded explanation the WAN public IP address is the outward (Public) IP for the modem/router - incoming. The gateway is the internal (Private) IP the firewall uses sending any traffic that does not match an IP range assigned to local firewall interfaces - outgoing?They do not need to match, but must belong in the same subnet.
The gateway is not necessarily "private", but it is the IP address where your firewall will send any traffic that is not local to a network defined on the firewall (local means IP ranges specified for your firewall interfaces).
Think of the default gateway on the WAN as the Post Office. That's where you send all of your outbound mail. The Post Office takes it from there and physically gets the mail to the destination. You simply provide a destination address and a return address. The Post Office decides which truck route to put the mail on so that it eventually reaches the intended recipient. Same analogy for network traffic. A packet leaving your firewall WAN interface directed at the default gateway IP contains a destination IP address and a "return address" which is the firewall's WAN IP. The default gateway handles getting the packet to the correct destination and also routing any returned packets back to you.
Every network will have a gateway. That's where packets are sent when the destination IP is not local within the network's subnet. There are gateways and a default gateway. In a large network it is possible for a router to have a table of many gateway IPs representing "known routes" to particular subnets. But there will always be a default gateway which will get any packets whose destination IP range is unknown to the router (meaning the destination IP is not local nor does the router have any defined gateway matching that subnet).
-
@bmeeks
Thank you sir! You have educated me, and I am a better person for it. Your analogy of the Post Office is excellent.