My friend had an interview last week, and the first question he faced was about creating a LAN without a router or DHCP server.
He was not sure and asked me if it was possible. I told him it was possible and showed him it with two Windows laptops.
We can create a computer network without a router and DHCP server.
We connected two computers directly using a bridged USB cable and started communication between these two computers without the help of any external DHCP server.
A bridged USB cable is different from an ordinary USB cable.
If you read my previous tutorial, you might recall the need for a bridged USB cable.
Can I Create a Home Network Without a Router?
We can create a home network without a router. We use Automatic Private IP Addressing (APIPA) to establish a network if there is no DHCP server (Router) to issue IP addresses.
Windows supports APIPA.
APIPA helps start communication between Windows computers in a network without a DHCP server. However, it can create issues if there is an external DHCP server. I covered this topic in the following tutorial.
How to Use APIPA to Create a Home Network?
One of our readers, Thomas Cain, left a question in the comment section. He wanted to know if Windows 11 supports a wireless network without a router.
All Windows computers support the feature APIPA. So, we can connect multiple Windows PCs without a router, and the APIPA will automatically assign unique IP addresses to each computer.
APIPA (Automatic Private IP Addressing) eliminates the possibility of an IP address conflict.
The limitation I see with APIPA is the lack of support from Linux. I suggest you read my comment on Cameron's question in the comment section.
So, let us check how to build a home network without a DHCP server.
In this project, we avoid using the router or DHCP servers. We do not use Etehrnet cable in this connection.
So, no chance for static IP addresses. We use a bridged USB cable to connect the PCs. Both computers will get APIPA from the Windows Operating System.
APIPA will assign IP addresses in the 169.254.X.X range. All computers in the IP range 169.254.X.X can communicate with each other.
The IP address range for APIPA is 169.254.0.1-169.254.255.254.
All APIPA computers can communicate with each other as their subnet mask is 255.255.0.0 (Class B address). The subnet rules say the network address of APIPA is 169.254.0.1, and the broadcast address is 169.254.255.255. Any address that comes in between this range can communicate with each other.
An APIPA device cannot access the Internet.
Amrithraj Kaimal questioned his computer's inability to access the Internet with an APIPA. Let me answer this question now.
Because it is a private IP address, we cannot use APIPA to get the Internet connection to our computers. For Local networks and Intranet, APIPA is enough.
Reference
You have learned the procedure to create a home network without a router. CoreNetworkZ Tech Solutions is an expert firm in creating SOHO and corporate networks. If you want to learn more about this topic, I recommend you visit the following pages.
- My PCs Randomly Getting APIPA Instead Of DHCP IP Address
- https://learn.microsoft.com/en-us/windows-server/troubleshoot/how-to-use-automatic-tcpip-addressing-without-a-dh
- https://ubuntuforums.org/showthread.php?t=995061
The correct Network ID is 169.254.0.0 and the Broadcast ID is 169.254.255.255 the assignable addresses for this class B network are 169.254.0.1 to 169.254.255.254.
ReplyDeleteThank you Exipheas,
ReplyDeleteYou are absolutely right. The network id of APIPA is 169.254.0.0
While writing the network id on my post ,actually what was in my mind is the first valid IP address in APIPA. The first IP address is 169.254.0.1
I understand my second mistake (broadcast address). I don't know why did I made such an error while typing the post. I will edit that error soon. Once again my thanks to pin point the mistakes I made.
Do you know if there is a way to determine the IP's of all connected stations?
ReplyDeleteLet's say I have 5 computers in a LAN and they assign themselves an IP by APIPA.
Now I can only access one machine (because the others are embedded systems), how can I find out the other IP addresses?
Thanks,
Alex
@ Alex
ReplyDeleteAPIPA is assigned by the OS it self and there is no external DHCP server works for it. So I don't think there is any way to find the APIPA ip address of other computers in the LAN without checking each system manually.
yo... love this !
ReplyDeleteI feel strongly about information and love learning more on this. If possible, as you gain expertise, It is extremely helpful for me. would you mind updating your blog with more information?
ReplyDeletewww.oemcargps.com
guys can you help, my hp pavillion cannot change the Ip 169.254.x.x i have already ipconfig/release=ok renew=error im using win7 the laptop can communicate trough other computer in the network that has an ip of 192.168.x.x my other pc can access the net. but the laptop cannot access internet help plz im troubleshooting this for 3 days and i have no luck...
ReplyDeleteI recommend you to assign a static IP address in hp pavillion in 192.168.X.X range and check for the issue. To know more about this issue follow the link below.
ReplyDeleteHow to Resolve APIPA
Hi,the post is really good and informative.I have one doubt suppose there are five machines connected to a switch and 3 of them are getting ip address from DHCP server and 2 of them are getting the APIPA.So my question is will the 2 APIPA machines communicate with the other 3 machines? and will the 2 APIPA machines communicate each other please reply.
ReplyDelete1. Your APIPA machines cannot communicate with other 3 devices getting IP addresses from external DHCP server since they are in different network address.
ReplyDelete2. APIPA machines connected in the same network can communicate each other
Does Windows 11 support your method? If yes, how does Windows create an ad-hoc wireless network?
ReplyDeleteHello Thomas Cain,
DeleteWindows 11 supports it. I have explained the concept in the article.
Hello Alex,
ReplyDeleteThank you for this helpful tutorial. I have one doubt. Can I use the APIPA feature on my Ubuntu Linux PC?
Hello Cameron White,
DeleteAPIPA works in Windows only. But Linux has alternate options.
Hello Alex,
ReplyDeleteMy laptop has an APIPA IP address and cannot go online. Is it normal?
Hello Amrithraj Kaimal,
DeleteDevices with APIPA addresses cannot access the Internet. I explained it in the tutorial.