Every time i restart my pc my default gateway forgets itself.

HitmanReginald

Distinguished
Dec 19, 2014
99
0
18,630
Hi, i host minecraft and garry's mod servers and have a static Ipv4 address, however it was only a few days agow that everytime i restart my pc it says there is no internet access and when i go into control panel > Network and internet > network connections > adapter settings > local area connections > Ipv4 > properties And under dafault gateway is blank, everytime i set this via any way, cmd, router itself etc etc after restarting my pc there will be no default gateway there anymore and no internet connection.

The reason i don't use "obtain an ip adress automatically is because then i need to change the port forwarding info everytime my ip address changes.
 
Where are you setting the static? If on your PC, it's possible that the router is giving out the IP to another device. Set static IP on your router based on MAC address and leave your PC set to obtain automatically.
 




Im changing my Ipv4 address to static so everytime i want to launch a server to play with friends i don't have to go to the port forwarding tab and change ALL of the ports i have forwarded to my new ipv4 address.
 


Changing your PUBLIC address, or a private, internal address?
You can't just change your public IP address.
 



Im changing my internal/private ip address wich is 192.168.1.1/2/3/4 to 192.168.1.123 and then port forwarding that address and enabling it in the DMZ.
 


I'm not seeing the issue here.
Change the internal IP address of your router to static, and give it a number. Thereafter, you should not have to change it again.
That has NOTHING to do with the external IP address that your friends outside will see. That can and does change.
 


Ok let me start again and try and make it easier to understand the issue.




I have gone into my router's settings by typing in my browser 192.168.1.1 and gone to the port forwarding tab and forwarded the following port: 25565 (for instance minecraft's port) so now i can just give my friends (friends that live far away) my public ip while hosting a server and they can join me (for instance: 89.240.212.249:25565)

Now i go into control panel > Network and internet > network connections > adapter settings > local area connections > Ipv4 > properties and set the private ip to 192.168.1.123 and under port forwarding set the port thats forwarded to: 192.168.1.123 so this way i never have to touch any settings for my friends to join my game really easily.

but when you set a custom private ip you have to set a default gateway and all the other stuff aswell, just recently that default gateway clears itself everytime i restart my pc and therefor there is no internet connection unless i go all the way to Properties again and type the default gateway in again.
 
I dont think they understand what you are trying to say, exactly the same thing happens to me. Forget everything and just focus on the following:

The default gateway settings dissapears.
In my case the default gateway is set to 192.168.1.254

The the complete setting will be:
TCP/IPv4 :

IP address : 192.168.1.100
Subnet mask : 255.255.255.0
Default gateway : 192.168.1.254

After i restart my pc the following :

IP address : 192.168.1.100
Subnet mask : 255.255.255.0
Default gateway : . . . .

Why does it forget the default gateway?
 




That is my issue, however i have fixed it now.