Going from DHCP to Static IP
-
Hi.
I had some issues with port forwarding in pfSense, I mean pfSense did what it should and if I tested it within pfSense nothing was wrong. So the problem was that I didn't had a static IP, that was what my ISP said, so now I have a static IP from my ISP and I would like to have a little help to set it up.IP is: a.b.c.154
GW is: a.b.c.129
NM is: 255.255.255.192
DNS1 is: a.b.130.1
DNS2 is: a.b.131.1I tried to set it up, but I get these errors:
The following input errors were detected:
The gateway address a.b.c.129 does not lie within one of the chosen interface's subnets.
The gateway IP address "a.b.c.129" already exists.I tried to use 30 as my interface's subnet
-
@valnurat said in Going from DHCP to Static IP:
255.255.255.192
That is /26. If you use that the .129 will be inside your subnet.
Steve
-
@valnurat said in Going from DHCP to Static IP:
a.b.c.129
255.255.255.192Yeah that is a /26 and the network would be
x.x.x.128/26So yeah a .129 would be the first IP in that range.
You sure you set your mask right when setting static - Why would you use /30 if they told you /26? (255.255.255.192)
BTW you do not need a static public IP to do port forwarding.. Not sure where you would of gotten that idea?
-
@johnpoz said in Going from DHCP to Static IP:
BTW you do not need a static public IP to do port forwarding
It doesn't hurt though.
Avoids using DynDNS with potential update failures/delays.
Steve
-
Sure it doesn't hurt.. I feel for some of these users with isp that change their IPs when the wind blows. I have had same public IP for years at a time, via dhcp.. Since why should it ever change if your connection is never off for longer than the lease time, etc.
But it for sure is not a requirement by any means to have a static to do a port forward.. If he thinks is problem with port forward was related to no having static public IP.. He is prob going to run be a bit ticked when he has static and still runs into the same issue he was having before ;)
-
@johnpoz said in Going from DHCP to Static IP:
@valnurat said in Going from DHCP to Static IP:
a.b.c.129
255.255.255.192Yeah that is a /26 and the network would be
x.x.x.128/26So yeah a .129 would be the first IP in that range.
You sure you set your mask right when setting static - Why would you use /30 if they told you /26? (255.255.255.192)
BTW you do not need a static public IP to do port forwarding.. Not sure where you would of gotten that idea?
How did you came to 26? How did they told me that it is 26? Sorry for asking. :)
I talked to my ISP and the reason is that I'm behind a firewall they have. When I get my own they will open for all ports that's available. I saw it to on my webpage on the ISP.
-
Because 255.255.255.192 is /26 that is how
-
So I just count all the 1's in subnet?
-
Yup, that's how it works:
Netmask: 255.255.255.192 = 26 11111111.11111111.11111111.11 000000https://en.wikipedia.org/wiki/Subnetwork#Subnetting
Steve
-
Yeah you could do that - or you could do this for living and just now that .192 is /26
Just like
.248 is /29
and
255.255.255.252 is /30
etc. etc.