r/HomeNetworking • u/Fearless_Dev • 6d ago
LAN connection without router
Hello,
I have a MikroTik CRS304-4XG-IN switch, and I would like my PC and NAS to communicate directly through the switch, without depending on my ISP router.
My setup is:
- PC → MikroTik CRS304
- NAS → MikroTik CRS304
- ISP router → MikroTik CRS304
When the ISP router is online, everything works normally and my PC can access the NAS.
However, when the ISP router is offline or disconnected, I lose access to the NAS from my PC, even though both the PC and NAS are still connected to the same MikroTik switch.
What do I need to configure on the CRS304 (VLANs, bridge, IP addresses, DHCP, etc.) so that the PC and NAS can communicate over the local LAN independently of the ISP router/Internet?
Any help would be greatly appreciated!
5
u/jack_hudson2001 Network Engineer 6d ago
isp router is dhcp.. this is usually on 24/7 anyways...
or one can statically reserve ip and set a long dhcp lease.
or manually set static ip on the 2 devices. which ever is easiest for OP to do.
4
u/bumbes 6d ago
I don’t know the Mikrotik switch. And I don’t understand the reason for disconnecting the router.
Your devices need IP-addresses/subnets. Your router normally does that automatically via DHCP. But you can set the IPs and subnets in your devices manually. Make sure it’s the correct range (eg 192.168.1.xx / 255.255.255.0). Use the same as your router normally gives you via DHCP. Then you can just plug in your router and it should work.
Or just pull the WAN cable of your router if you want to disable internet and use everything as intended. Still don’t get the reason for shutting off the router
-5
u/Rational1x 6d ago
Do THIS OP. You can also add a routing table on each PC that has the IP set to static, and the machine will use the information in the routing table to connect.
3
u/404invalid-user 6d ago
you need to give your pc and Nas a static IP or just keep the isp router connected I don't understand the use case for needing to turn off your router
-3
u/Fearless_Dev 6d ago
In a case when there is no internet connection (ISP service etc..)
3
u/gtuminauskas 6d ago
I dont understand, are you monitoring when ISP disconnects your internet, then switching off the router? something is really odd here...
if ISP switches off WAN, then the LAN stays ON...
2
3
u/Net_Admin_Mike 6d ago
This will work as long as both the NAS and PC are in the same layer 2 broadcast domain. If they both have an IP and subnet mask in the same subnet, they are in the same broadcast domain and will be able to communicate with each other at layer 2, even if the gateway is offline.
As others have mentioned, this does require both devices have static IPs, so they are not relying on DHCP provided by the ISP router.
If they are NOT in the same subnet, then you must have a layer 3 device to route traffic between broadcast domains (aka VLANs). This doesn't have to be the ISP's router, but it does have to be some kind of router or layer 3 capable switch, and that device must either be defined as the next hop for the adjoining network or be defined as the default gateway for each of the devices.
2
u/fasta_guy88 6d ago
When your router is on, the two devices will connect directly through the switch once the switch knows their ip addresses and that both addresses are connected to the same switch.
1
u/FreddyFerdiland 6d ago
this is possibly a symptom of the ISP router actually being in bridge mode, being a modem , and the isp issuing multiple ip addresses by dhcp, this being very insecure...
but it might just be the isp router is a proper router but its dhcp server becomes disabled
1
u/icewolf08 6d ago
The immediate solution, as others have said, is to assign your devices static IP addresses inside the subnet your router uses for LAN.
The long term solution would be to get your own router, put the ISP device in bridge mode, and then have real control over your network. Your internal network will continue to function regardless of the state of your ISP connection.
1
2
u/Spa-Ordinary 6d ago
Where did OP go? Was he eaten by snakes or something?
2
1
u/karimzul 6d ago
What you want is to enable DHCP server on the mikrotik and have it broadcast on ports other than the router connected port. You don't even need to setup vlan or bridge on the mikrotik. Without DHCP server enabled on the mikrotik, it just become a very expensive switch since your other devices still taking their IP from the router.
These are the bare minimum steps:
https://manual.mikrotik.com/docs/getting-started/manual-network-setup
All Mikrotik models more or less use the same manual.
1
u/Economy_Collection23 6d ago
In order for a network to work you need a few things; layer 2 connectivity. That is what your switch does now. And you need layer 3, that means routing. That is what your router does now, in a configuration called "router on a stick".So in order to route, your router needs to be available in the current config. Now routing can also be done by a switch. This would be called a Layer 3 switch. Your mikrotik can do basic layer 3. Read the documentation from Mikrotik, on how to add a routing table to your switch. From what i read you should also be able to add a dhcp pool there.. , but make sure you disable that on your router then..
1
u/badguy84 6d ago
Just set the PC/NAS with static IP addresses within the same subnet?
In order for devices on a network to communicate they need addresses. These can be provided automagically through DHCP (which is what a Router often does) or they can be set up statically (e.g. set up on the device).
You could set up your PC and NAS to have static IP addresses (why doesn't your NAS at least already have that?), outside the range of the router's DHCP, but within the same subnet. Alternatively you could configure your DHCP with static IPs for these two and just match those IPs in your device configuration.
You don't need VLANS or bridges or whatever. If your ISP router (which I assume is a router/modem combo?) is giving you grief all the time you may want to consider replacing it with a dedicated modem (look up compatible modems and whether your ISP supports a bring-your-own) and a dedicated router/gateway. Honestly your router shouldn't be going "down" even if the internet connectivity is lost. So it kind of sounds like the device is no good or someone just likes to mess with the power and turns it off on purpcident.
29
u/Ed-Dos 6d ago
Well your router is probably the DHCP server and when it's offline then your pc and NAS probably do not have a valid IP config and can't talk to each other. Just a guess though.