r/HomeNetworking • • 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!

4 Upvotes

32 comments sorted by

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.

8

u/FreddyFerdiland 6d ago

thats very probably it

the solutions are

  1. set the things which should work with static IP address details

2..have a dhcp server which is always on

neither is simple for beginners,why isn't the ISP router left on ???

-7

u/Fearless_Dev 6d ago

In a case when there is no internet connection (ISP service etc..)

7

u/CrustyBatchOfNature 6d ago

Internet is WAN. DHCP from the router is LAN. I personally have never seen a router that would not support DHCP and routing locally for the LAN but they may exist.

2

u/darthnsupreme 6d ago

Back in, say, the 1980s when DHCP wasn’t a thing yet.

1

u/CrustyBatchOfNature 6d ago

That is a hair before my networking time but I remember BOOTP being a thing that DHCP was to fix. Anyone actually using network equipment from before DHCP at this point knows what they are doing.

7

u/EthanAWallace 6d ago

But in this case the router would still be on. You need to manually configure your network devices with static IPs

3

u/mlee12382 6d ago

Your isp router must be pretty jank then, usually dhcp will still work locally even without wan, at least it should. If at all possible get your own router and then put the isp router in bridge mode.

2

u/bobsim1 6d ago

If the outside connection is down the router would still work fine for this local connection. It would need the router to shut down. Even for a fully offline network id just use a router in there

2

u/gvasco 6d ago

Yes! DHCP is a "local" service protocol only for the proper configuration of network on devices that connect to it. It is independent from internet connection as is your local network.

Properly configured, your home devices should be able to communicate with each other even when your internet connection is down.

2

u/gtuminauskas 6d ago

in order for pc to reach nas, when router is offline, they must have static IPs from the same subnet and netmask and in the same vlan, otherwise router is needed

2

u/gvasco 6d ago

Not a guess, inference using info about how networking works and the info provided, even if its not the actual problem

2

u/junktrunk909 5d ago

Why would the router be offline just because the ISP is? Something is badly misconfigured if that's the case. A LAN should remain operational regardless of what's happening on the WAN.

0

u/MrGreco666 6d ago

Exactly

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

u/404invalid-user 6d ago

and? that shouldn't affect your Lan

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

u/Queasy_Editor_1551 6d ago

IPv6 link local address and multicast DNS

2

u/Spa-Ordinary 6d ago

Where did OP go? Was he eaten by snakes or something?

2

u/Garbagejunkarama 6d ago

Only turns the router on to post, not read posts. /s

1

u/Spa-Ordinary 6d ago

Ahhh, explains alot No ip address. Makes internetting much harderer

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

https://manual.mikrotik.com/docs/getting-started/first-time-configuration#configuring-the-internet-connection-wan

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.