DHCP without router?

HeTiCu13

New Member
Hello all.

I am trying to figure out how my home LAN is being successfully managed, even though I don't have a router. I live in my RV full time.

My internet is wi-fi via hotspots over cellular. I have a tablet that has it's own SIM card (phone number), and I use it and my phone as hotspots; double the monthly Gb data speed that way. I also have access to a public access point in the RV park.

Each PC and Laptop is Win10 and has it's own wi-fi card, which I can connect to my choice of wi-fi access points. Each PC is also connected to each other with Ethernet cables and switches. I did this so that I have Gb file transfer speed between PCs.

So when I check the network connections on each PC, they all tell me the same thing: I am connected to 2 networks. First the Internet via wi-fi, and then an "Unidentified network" with no internet; the wired network. This has all been working fine for 2 years.

Each PC also tells me that the IP assignments for both networks are Automatic (DHCP).

My question is:
Who is assigning the IP assignments for both networks? I don't have a router, and I thought one had to have a router to manage DHCP and make those unique subnet assignments. Is there a built-in DHCP software in Win10? Or do the hotspots have built-in DHCP software? And even when a particular PC is connected to the public access point in the RV park, it also says Automatic (DHCP).

And, if I disconnect from wi-fi, the wired network still says Automatic (DHCP).

Could someone explain all this please? Thanks!
 

johnb35

Administrator
Staff member
Any wifi network will have its own dhcp, if it didn't then devices wouldn't be able to connect to it correctly. And since you have all your devices attached by ethernet cable then that itself is acting as a network. Each device has to have an individual ip address to be able to talk to one another.
Thats the easiest way to explain it but @beers or @voyagerfan99 might be able to explain further.
 

HeTiCu13

New Member
Any wifi network will have its own dhcp, if it didn't then devices wouldn't be able to connect to it correctly. And since you have all your devices attached by ethernet cable then that itself is acting as a network. Each device has to have an individual ip address to be able to talk to one another.
Thats the easiest way to explain it but @beers or @voyagerfan99 might be able to explain further.

Thanks! I think you just cleared some things up. So the reason my wired network shows as being Automatic DHCP on each PC is because the wi-fi networks, my hotspots, have been assigning their IDs.

So that also means that if I were to disable wi-fi on every PC and reboot the whole LAN to clear memory, then when the system came back up, the wired network would no longer function, since there would be no wi-fi network assigning the individual IDs. Right? Or would each PC retain its previous assignment even with wi-fi disabled?
 

beers

Moderator
Staff member
Hotspot features like sharing from a tablet/phone have their own DHCP service. Internet connection sharing also sets up a DHCP service.

You can still be 'automatic' and have a 169.254.x.x address assign itself to your local adapters between computers, that's known as APIPA and doesn't rely on a DHCP daemon, but in fact will assign once a DHCP request is not answered for a certain amount of time.

If you're really curious you can install Wireshark and then see what MAC address the DHCPOFFER packets are coming from, which would tell you where DHCP responses are originating on that network segment. It sounds like from your setup that things would rely on autodiscovery on the local LAN segment. A lot of people have issues with multiple DHCP legs that offer a default gateway as it's easy to get tripped up as to which gateway to forward traffic towards. APIPA assignments do not specify a default gateway.

One preferred solution would be to statically define the wired network into its own unique range, such as like 10.199.199.0/24 and either statically assign addresses to each device on the wired network segment or install a DHCP service somewhere that dishes out addresses. But if the services you're using function okay with autodiscovery like mDNS then I wouldn't worry about it.
 

HeTiCu13

New Member
Hotspot features like sharing from a tablet/phone have their own DHCP service. Internet connection sharing also sets up a DHCP service.

You can still be 'automatic' and have a 169.254.x.x address assign itself to your local adapters between computers, that's known as APIPA and doesn't rely on a DHCP daemon, but in fact will assign once a DHCP request is not answered for a certain amount of time.

One preferred solution would be to statically define the wired network into its own unique range, such as like 10.199.199.0/24 and either statically assign addresses to each device on the wired network segment or install a DHCP service somewhere that dishes out addresses. But if the services you're using function okay with autodiscovery like mDNS then I wouldn't worry about it.

Thanks for all of this. I had to look up APIPA, but found out that it's a Windows service. So to my original question of whether its Windows or the hotspots assigning IDs: the answer is both, when necessary. Windows would provide if I disabled all my wi-fi cards and had only a wired network, but since I have hotspots, they are providing.

You may also have solved another puzzle with that last part about a preferred solution. I recently got into a thread on steam about a Linux user "never going back to Windows" because he had successfully been able to get all of his games and apps working on Linux. I spent 2 days discussing Linux distros and where Linux is today (compared to 3 years ago) and finally decided to sacrifice one of my older gaming PCs and replace Win10 with Kubuntu distro, and play around with it.

All went well with the installation, but it had network connection failures right from the start. In my limited understanding, I assumed it was because I had no router with DHCP, so the Linux box could not get established on the LAN. I did some research and learned how to find out the subnet that all of the Windows machines are on (ipconfig) and gave the Linux box a unique static ID on that subnet. That made it happy.

However, it still has problems seeing the Windows shares on the LAN. Firstly, it shows me some of my PCs, but not all. Also, if I click on Network, it goes out discovering, and returns with some PCs with their Window's name, and some with only their MAC address. Or at least it looks like a MAC address.

Then, when I click on a particular PC, it shows me all of the shared drives, which I can then open up and see files, etc. But if I go back out to the network, and click on that same PC again, it gives me an error message: "The file or folder smb://<pc name>.local/ does not exist."

In light of your last paragraph, it sounds like the Linux box adapter is getting confused because I have some PCs on one hotspot, and others on the other hotspot, to share my monthly Gb data speed allowances between devices.

So now I am thinking that I need to assign a static ID to every PC on the LAN. Perhaps that will solve the discovery issue? Do you agree with that?
And if so, should I shut down the whole network, switches included, and bring them all back up one by one, assigning each static ID as I go?

Thanks!

UPDATE:
I just ran ipconfig on my main PC, and it is showing different IPv4 IDs for the Ethernet adapter and the wi-fi adapter. Is this causing extra confusion on the LAN? If so, should I assign the same static address to both adapters?
 
Last edited:

beers

Moderator
Staff member
but since I have hotspots, they are providing.
That's not really how it works, a Windows box won't bridge interfaces unless you specifically bridge them yourself. That means traffic won't pipe through both networks unless you configured it that way.
So now I am thinking that I need to assign a static ID to every PC on the LAN
That was a portion of the suggestion for static IPs for your hosts, then you'd know what addresses they're always on.
should I shut down the whole network, switches included, and bring them all back up one by one, assigning each static ID as I go?
There's no point to shut everything down and bring it back up.
I just ran ipconfig on my main PC, and it is showing different IPv4 IDs for the Ethernet adapter and the wi-fi adapter. Is this causing extra confusion on the LAN? If so, should I assign the same static address to both adapters?
No, they're separate networks and need to be separate. You'll generate confusion by trying to make them the same and break your connectivity.
find out the subnet that all of the Windows machines are on
Which subnet value, specifically?
 

HeTiCu13

New Member
Which subnet value, specifically?

I just ran ipconfig on my main Win 10 PC again, and it says the Ethernet adapter Autoconfiguration IPv4 Address is: 169.254.145.41
So the other day I just picked a random number for the last segment for the Linux box, and it worked: 169.254.145.77

That seemed to stabilize the Linux connection to the LAN.
 
Last edited:

beers

Moderator
Staff member
That's the APIPA range which we were talking about. It's not DHCP, but it's still an 'actual' address and mask that gets assigned to the adapter, so manually placing other hosts in that range would still work. Your wifi adapter has nothing to do with that segment.

Make sure you use a /16 (255.255.0.0) mask for statically assigning that to your Linux host as APIPA will randomly pick something in the full 169.254.x.x range. If you used a normal /24 (255.255.255.0) mask then you could only communicate on 169.254.145.x and would fail if another host picked a different third octet like 169.254.173.x or similar.
 
Last edited:

HeTiCu13

New Member
I just checked ipconfig again, and it is already using the 255.255.0.0 mask. Maybe APIPA automatically does that as well? I will ensure that also when I set each host. Thanks for all the info and advice!
 

beers

Moderator
Staff member
Correct, 169.254/16 is the official APIPA address range. It's not routed on the internet. I was just indicating if you're statically assigning IPs to Linux hosts to match the mask, otherwise you'd exhibit variable/random behavior. Any address assigned by APIPA will prefix with 169.254 and have the 255.255.0.0 mask to match that subnet.

And no worries at all about info/advice, there's a couple network nerds around here but we've been doing it professionally for over a decade :p
 

HeTiCu13

New Member
And no worries at all about info/advice, there's a couple network nerds around here but we've been doing it professionally for over a decade :p

I really appreciate that comment. I have been using the steam hardware and operating systems forum for some time now, and I am constantly having to ignore or bite my tongue on some of the responses I get. Some responders just go off on a tangent with endless techno-babble and expect me to understand them at their level. And if I question what they said, they get indignant, and sometimes abusive. So I have developed this thick skin that I put on whenever I go into that steam forum. Actually, now that I think about it, I have to wear that armor when I go into the game forums as well.

So, since you are being so generous and gracious, I would appreciate some more confirmation on what I think I have learned.

I had to do a search online to learn how to set static IPs and found this link:
How to set a static IP address on Windows 10 - Pureinfotech

I first used method 4: Windows Settings. But I didn't understand about the 16 or 24 input then, so I tried to put the 255.255.0.0 into the subnet prefix length field, and of course I got error messages. Ipconfig does not provide that specific info.

So I tried method 2: Control Panel. When I got to the Default gateway, I remembered that a Linux user on another forum had told me to leave the Default Gateway blank when setting the static IP on the Linux box. So I did that in Control Panel as well. But when I closed the window, and ran ipconfig, I saw that nothing had changed.

Then I read your replies today, and reread the whole link above, and went back to method 4 again, and this time input the Default Gateway as 10.1.2.1, as well as 16 as the subnet prefix length. This worked great. I also went back to method 2 again, and input the Default Gateway info as required. That was saved as well.

So one thing I have learned is that while Linux wants the Default Gateway left blank, Windows does not, regardless of what method I use. Correct?

UPDATE:
Well, I am still learning this. I tried to input the Default gateway as 10.1.2.1 on another PC and this time got the error message:
"Warning - the default gateway is not on the same network segment (subnet) that is defined by the IP address and subnet mask."

So I went back to the link above, and reread again, and it says:
"Specify a Default gateway. (Usually, your router’s IP address. For example, 10.1.2.1."
But I don't have a router.
So maybe my Default gateway is: 169.254.145.1 ?
 
Last edited:

beers

Moderator
Staff member
Leave the default gateway blank on your hosts for that internal LAN subnet, there's not an address available that allows that network to go 'out', and adding a default gateway reference will insert a default route into your routing table. You don't want that, you want to inherit the default gateway for your computer that goes out of the hotspot. DHCP such as you would receive from a hotspot provides a default gateway and that's what you use to reach the rest of the internet.

/16 and /24 are just CIDR notiations for 255.255.0.0 and 255.255.255.0. It just indicates how many bits are used in the subnet mask.
 

HeTiCu13

New Member
Well, I cleared the Default gateway by using the Control Panel method, but when I checked via the task bar Settings method, it had changed back to automatic. When I tried to set it manual again, with only the IP Address and Subnet prefix length filled in, it says: "Can't save IP settings. Check one or more settings and try again." So I cancelled. When I ran ipconfig, it reports my manual settings with no Default gateway now. But the task bar settings still reports Automatic. I guess I'll just trust that the Control Panel settings overrides the task bar settings.
 
Top