Jump to content
 

Help with connecting Z21 Router to my Home Router


PaulM381
 Share

Recommended Posts

Hi

Could someone please help with some information on connecting the supplied TP-Link router that comes with the Z21 to my home Talktalk router. I have tried connecting them through power line adaptors, connecting from my Talktalk Lan port through the power line adaptors to the Lan port of the TP-Link router. All I would like to do is still have an internet connection when I'm connected to the TP-Link router.

Any help would be most appreciated.

Link to post
Share on other sites

You will firstly need to ensure that they are both on the same network with either both being on 192.168.0.x (the Z21 default network) or 192.168.x.y

 

if they are both only 192.168.0.x then you will need to switch off DHCP on the Z21 router then connect from your home router to one of the yellow ports on the Z21 router.

 

if they are on a different network (192.168.x.y) then you will need to don’t above AND change the Z21 address to be on the same network also. 

Edited by WIMorrison
Link to post
Share on other sites

This gets into lots of different things....  

 

IP addressing - the numbers 192.168.x.y  -  How those are used is really important.  Iain talks a bit about it above.  

 

Roco's Z21 FAQ says the "WAN" socket on the router is available for onward connection.  This is probably the simplest place to make the connection to outside (the blue socket).   The question is then what network addresses are in use - ie. does the TPLink get an address for the WAN socket from the upstream DHCP server on the TalkTalk router ?   (And are their different IP address ranges).    The simplest with the WAN socket will be different IP address ranges.  eg. 192.168.0.x for downstream of the TPLink and 192.168.1.x for the TalkTalk (or any other value for the third number except for that used by the TPLink).  

 

https://www.z21.eu/en/faqs-support/questions-answers

Question 5.13,   

 

 

Link to post
Share on other sites

If I read the FAQs correctly, their question 6.7 is saying that the only way to do what you want is by running an ethernet cable between the blue LAN port of the TP-Link and one of the spare ports on your internet router.  

 

I read their question 6.11 as essentially saying you CAN run it both the Z21 and your internet off of your normal internet router, but that's too complicated to explain and don't expect us to dig you out of the hole when you screw up your settings.  This would be where all those IP settings and DHCP are involved.  There were two leaflets that came with the TP-link.  One is by Roco on how you use it with Z21.  The other is the manufacturer's standard leaflet that does say you can use the router to extend your wifi. 

Link to post
Share on other sites

Do  you have a laptop,

  If you do then turn off the wifi on it temporarily, Leaving the Wi-Fi on can invalidate the following tests.

  Connect it to the cable that you are using to connect to the Powerline adapter adjacent to the Talktalk router

  Go to the command prompt (Run CMD)

  Type IPCONFIG

  note down the IP address or IPv4 address, we are only interested in the 4 numbers separated by 3 dots, not the long strings of numbers, letters and colons.

  Also note down the Subnet mask, this will be something like 255.255.255.0, also note down the Default Gateway,

  Now type PING followed by the Default Gateway address. e.g. 192.168.1.254.

 The Default Gateway address should be the IP address of the TalkTalk router.

  You should get responses with lots of numbers.

  Now plug the cable into the Powerline adapter adjacent to the Talktalk Router. 

  Take the Laptop to the other Power line Adapter (the one adjacent to the Z21/TPLink router), Plug a cable from the Powerline adapter into the Laptop 

  Now repeat the IPCONFIG and PING commands, you should get similar results to the previous one (Possible they will be identical).

  If there are no addresses returned by the IPCONFIG command then you need to check the powerline adapter setup and/or that they are using the same mains circuit.

  If you do get an IPaddress indicated by the IPCONFIG command then Take the cable that is plugged into the Laptop and plug it into the WAN port on the TPLINK (Blue socket as indicated 

  in previous response).

  Now connect the Laptop to a LAN port on the TPLINK  and repeat the IPCONFIG and PING commands

 If you get a response to the PING command then the networks are joined. If that is the case then you should be able to Browse the Internet from the Laptop.

 

   Post the response to the various commands so that we may be able to help further.

 

  don't forget to re-enable the Wi-Fi on the laptop.

 

NB  you will have two Wi-Fi networks, one provided by the TPLINK and one by the Talktalk router. You should be able to access the Internet from either BUT you will not be able to access the Z21 when connected to  the Talktalk Wi-Fi.

 

Please note that if the network address used by both the TPLINK and the Talktalk router are the same then it will still not work. (See NigelCliffes response).

 

Anyway post the responses that you get to the IPCONFIG command so we can help further.

 

NB if you laptop is running Linux the use ifconfig instead of IPCONFIG If your Laptop is running MACos then I am sure that someone else can help. 

 

If you cannot get the powerline adapters to work then try the tests with them plugged into adjacent wall sockets. Do not use a 4 way power socket to connect the powerline adapters but if you do need to then DO not use one with (surge) filtering, these may stop the powerline from  communicating. Be aware that powerline may not work between the house and a shed but should work within a house.

 

You could also try moving the TPLINK router to be adjacent to the Talktalk router while running the tests.

 

 

Link to post
Share on other sites

  • 9 months later...

Hi there,

 

I recently dealt with this and found the information online a bit confusing, and so I thought I'd write out how I got my WiFi sorted in simple English so anyone else googling this issue may find some value.

 

First, my home network is an Eero Pro 6 Mesh network, with 4 routers.   I have gigabit WiFi coverage in my home and garage, and really did not want to add a second slow network just for the train room and have to swap mobile devices to it whenever I want to use the train.  (I think it's rather poor of Roco to have not build a reset switch into the back of the Z21 which would have allowed them to expose the Z21's setup without all the obfuscation they have now in an effort to protect the user from making mistakes.   Actually, they just should have included WIFI in the Z21, it's very obviously missing.  Anyhow, not the point of this post.

 

To get my Z21 working on my network, I used an old router that I had in the junk box in my closet and set set it up as a bridge.  How you do this will vary by brand and not every router gives you this option but most do.  You can find an old router online for $20.  In the junk routers' options, look for "Bridge Mode" or "Media Bridge"- select this, follow the prompts, tell it how to join your home WIFI and press go.  Now, this old junk router has become a bridge.  This means it connects to your home WiFi and the ports on the back of it are now network port for your home network.  Once we are setup, you'll plug your Z21 into this and so it will be wirelessly connected to your network.  However, more to do first.

 

The next step is to look at your home network.  All your machines will have an IP address.  Something like 192.168.0.101 or 192.168.1.12 or if you have some fancy network like me, that third number will be a 4 or 7 or whatever.  If it's a 0, your Z21 will just plug in and work, as it's setup to be 192.168.0.111 by default.  So, if you have that 0, just try plugging it into your bridge and it will just work, you're devices will see it, you're already done.   If however, that third number is not a 0, then we need to write new settings to your Z21.  

 

So, what settings do you want?  To find out go plug a PC into a network port on your bridge.  Press the windows key and type "command" and press enter.   You will get an old style dos command prompt.  Now type IPCONFIG and press enter.   Here you will see your PC's IP, the subnet and gateway.  Use your phone and snap a picture of this.   Don't use a scrap of paper, you might get it wrong, or lose it, use your phone.

 

Now, plug your TPLink router that came with your Z21 into your bridge, using a crossover cable.   (This is a yellow CAT 5 cable that you have in a dusty bin in your closet, it came with some modem or router years ago.  They are almost always yellow, and about 2-3 feet long.  If you don't have one, they are very cheap on Amazon, but if you dig in your closet I bet you'll find one).   Connect LAN port to LAN port.  Now plug your PC into the TP Link router and make sure it works- if you have internet on it, then you did indeed use a crossover cable and all is well.  If you don't have internet, and your home network, go sort out that cable and try again.  Also, if you are using a laptop be sure to disable it's WiFi or you might fool yourself into thinking it's all working when in fact you're just seeing the wireless connection continue to work as always.

 

Next, you need to download the Z21 maintenance tool from the Z21 site.  This program looks a little scary, when you make changes you'll get a bunch of poorly translated scary warnings that basically tell you that if you set your Z21 to an address you can't access you're on your own.  (The good news is it's still recoverable, but you'll need to setup a network to match the address you entered, and if you're reading this you likely do not know how.  Anyhow, worst case, it's recoverable if you know what to do, so you won't brick your unit).  So, now go plug your Z21 into the TPLink router and from the Z21 tool on the PC that is connected to the TPLink router you can now connect to the Z21.  Go to the IP tab and here you set the new values.   So, when you checked your PC you took that pic of the values when you ran IP config- now you look at it.  If your home network was "1" or "4" or "7" (as in 192.168.(the number I'm talking about).xxx that's the number we need to shift in the new IP for the Z21.  In my case, I used 192.168.7.111 since my mesh network used 7 as the third number.   1 will be more common, it's probably what yours is.   You also need use enter the gateway and subnet from your picture if the IPCONFIG output to match your home network.  Now grab your phone and take a picture of the values you are writing to it, before you do it.   Do not use a scrap of paper, take a real picture.  Keep this one forever.  If you made a mistake, it's this image that will save you and prevent your Z21 from becoming a $400 shiny black plastic brick.   Now, click go, and brave the scary warnings.

 

Now, you're done! Unplug this mess and throw nasty little TPLink router into a bin in a closet and never use it again.  Take your Z21 and plug it into your bridge.  Take your PC/Laptop and put it back to however it's normally setup.  Grab your phone and revel in your achievement as you use your home network to connect to your Z21 just like every other modern device you own. 

 

I hope this helps.  If you find this confusing, or you are leery of doing this, my advice is don't do it.  Live with the crummy Roco WiFi implementation till you can have a tech savvy friend help you out. 

 

James

 

 

Edited by Jaggy
Link to post
Share on other sites

  • 2 weeks later...

I tried all this when I first got my Z21. Basically Roco messed people up by saying router (implying internet connectivity) but they should have called it a wi-fi system, which it is and other than being dog ugly does the job. It is true, though, that Roco should have paid the extra tuppence and put a wi-fi in the black box just for the railway.

Link to post
Share on other sites

On 25/05/2021 at 15:09, Jaggy said:

Actually, they just should have included WIFI in the Z21, it's very obviously missing.  Anyhow, not the point of this post.

That would probably have significantly increased the cost because, although WiFi components are cheap as chips, getting the various RF certifications on the Z21 would have cost a significant amount of money.

 

Using a pre-certified router that is manufactured in the 10's of thousand's was probably the best way to go, the fact that it's slow isn't really relevant, as all you are doing is controlling trains over an even slower DCC interface. (5KHz).

 

Better instructions on how to use a home router would have been the best compromise I think.

 

Regards,

 

John P

  • Like 1
  • Agree 1
Link to post
Share on other sites

  • 2 years later...

Just to resurrect this topic... Apologies if many people already know this, but I'm hoping it might be useful to someone and save them a bit of time.

 

I was recently trying to connect my Z21's tp-link router to my home wifi hub so that I could have internet access while using the Z21. Initially I used an Ethernet cable end-to-end for simplicity and for testing.

 

I noticed that whenever I plugged the Ethernet cable from the hub into the tp-link router's WAN port (blue on my router), the Z21 stopped working. A bit of investigation showed that the LAN IP address on the tp-link router was changing from 192.168.0.1 to 192.168.1.1 and consequently the tp-link router was no longer able to communicate with the Z21, which is expecting 192.168.0.1

 

A bit more investigation showed that my home wifi hub's IP address was also 192.168.0.1 - presumably this was causing a clash of IP addresses and the tp-link router was obligingly changing from 192.168.0.1 to 192.168.1.1 in order to avoid the clash, but resulting in it no longer being able to communicate with the Z21.

 

Given that my home wifi was already using the IP that was expected by the Z21, I decided to remove the tp-link router entirely and simply plug the Ethernet cable from the home wifi hub directly into the Z21 - and everything worked!

 

The advantage of this is that I no longer need to connect my devices to the tp-link router's network (Z21_4245) - I can just leave the devices connected to my home wifi network and I can control the Z21 with the app and still have internet access on my devices. Possibly this won't work for everyone - it guess depends on the IP address of your home wifi being 192.168.0.1 to begin with, but that should be easy to check.

 

Back to @PaulM381's original post about how to get the wifi connection to the Z21. I removed my Ethernet cable and instead of using powerline adaptors I had a wifi extender that had been given to me (the actual model is a tp-link RE330 but I assume that other - and better - ones are available) - see pictures below to give an idea. This is configured with the same network name and password as my home wifi, it is plugged in next to the Z21 and as you can see it has an an Ethernet port which is then connected directly into the Z21's Ethernet port. It may not work for everyone (possibly it will depend on home wifi signal strength at the place where your layout is located) but for me it works in place of my original 10 metre Ethernet cable strung across the lounge and into the dining room(!) and as I mentioned above I can now control my Z21 without changing networks and still have access to the internet on my devices.

 

I hope that all makes sense and that I have the terminology, IP addresses and everything else correct - and that I'm not teaching everyone how to suck eggs.

 

Screenshot2024-04-09115327.png.8c23cdb106ba6e5fa39de49343340644.pngScreenshot2024-04-09115415-2.png.78c1e0d792126471a4726462d74d36e8.png

Link to post
Share on other sites

Trouble with all the above....   

The reason Roco ship the Z21 with a configured router is the scope for folks to make a dogs-breakfast of their home networking.  Half a bit of knowledge about networking is usually the way to get into a mess  (been there, in 1986, got the tee-shirts).  

 

 

It should be possible to configure the second router so it takes its DHCP allocations from the "primary" router, and thus everything is on the appropriate number range.   Or, if everything in the house (other than the Z21) was on a dynamic address, then just change the house router so it doesn't clash with the supplied Roco unit.   

 

 

 

 

  • Like 1
Link to post
Share on other sites

21 hours ago, Nigelcliffe said:

Trouble with all the above....   

The reason Roco ship the Z21 with a configured router is the scope for folks to make a dogs-breakfast of their home networking.  Half a bit of knowledge about networking is usually the way to get into a mess  (been there, in 1986, got the tee-shirts).  

 

It should be possible to configure the second router so it takes its DHCP allocations from the "primary" router, and thus everything is on the appropriate number range.   Or, if everything in the house (other than the Z21) was on a dynamic address, then just change the house router so it doesn't clash with the supplied Roco unit. 

 

I think you've missed the point of my post, which was that I have not changed anything, anywhere, (so zero risk of making a dog's breakfast of either the home network or the Z21) yet I have ended up with a Z21 that is accessible from my home wifi network (rather than having to use the Z21_xxxx network of the supplied tp_link router) and therefore I can control trains via the Z21 app and still access the internet without even having to change my devices to a different network.

 

In fact, simply trying to connect an internet link to Roco's supplied configuration of the Z21 and tp_link router left me with a Z21 that didn't even work, so presumably if I wanted to get that configuration working I would have had to make some changes somewhere. That's something I might investigate later but just out of curiosity because I'm more than happy with what I have now.

 

IP addresses are as much a mystery to me as the next person, despite having worked in the IT industry for about 35 years (I did software - i.e. programming, fault-finding and analysis - other people handled the networking) and I was simply hoping that if others were able to follow my post then they might also be able to end up with a Z21 connected to their home network with internet connectivity and without the risk of irrevocably changing something that would result in the Z21 not working. Achieving that does depend on their home hub/router having the same IP address (range?) as the tp_link router's 192.168.0.1 but if they're trying to have internet connectivity while using the Z21 and they haven't achieved that any other way then it might be worth a try.

 

Surely it is just a question of plugging their internet connection directly into the back of the Z21 and if it works, it works? And if it doesn't work then nothing is lost - isn't that correct?

 

Edited by Porfuera
Link to post
Share on other sites

14 minutes ago, Porfuera said:

 

I think you've missed the point of my post, which was that I have not changed anything, anywhere, (so zero risk of making a dog's breakfast of either the home network or the Z21) yet I have ended up with a Z21 that is accessible from my home wifi network (rather than having to use the Z21_xxxx network of the supplied tp_link router) ............

 

IP addresses are as much a mystery to me as the next person, despite .....

 

The Z21 out of the box has a static IP address.   If you don't know the dynamic address range of your router and add a device with a static address,  then you risk two things with the same address.  

 

Your system works by good luck.  That luck could run out.  

 

 

 

 

  • Like 1
Link to post
Share on other sites

14 minutes ago, Nigelcliffe said:

The Z21 out of the box has a static IP address.   If you don't know the dynamic address range of your router and add a device with a static address,  then you risk two things with the same address.  

 

Your system works by good luck.  That luck could run out.

 

So what could happen? What is the risk?

 

I don't deny that what I have done works by good luck - my home network hub's IP address was correct for the Z21 - I said as much above. If it hadn't been then the IP address of the tp_link router would presumably not have changed itself and I would've had a working Z21 with internet connectivity on that network.

 

But it didn't work due to the IP address clash between the hub and the tp_link router, which is what makes it work the way I've configured it.

 

Edited by Porfuera
Link to post
Share on other sites

1 hour ago, Porfuera said:

 

So what could happen? What is the risk?

 

I don't deny that what I have done works by good luck - my home network hub's IP address was correct for the Z21 - I said as much above. If it hadn't been then the IP address of the tp_link router would presumably not have changed itself and I would've had a working Z21 with internet connectivity on that network.

 

But it didn't work due to the IP address clash between the hub and the tp_link router, which is what makes it work the way I've configured it.

 

 

You can set up a reservation in your home router's DHCP rules, you'd need to find the mac address of your Z21 and add using that. If that isn't crystal clear then I suggest you don't do it, too easy to get wrong if you aren't familiar.

 

Cheers

Dave

Link to post
Share on other sites

18 minutes ago, DaveArkley said:

You can set up a reservation in your home router's DHCP rules, you'd need to find the mac address of your Z21 and add using that. If that isn't crystal clear then I suggest you don't do it, too easy to get wrong if you aren't familiar.

 

Cheers

Dave

 

That doesn't mean anything to me - I think you are answering a question that I didn't ask.

 

I was told that there is 'risk' involved in connecting an Ethernet cable from my wifi hub directly into my Z21. I asked what that risk was and what could happen - I'm pretty sure that doesn't answer that question.

 

Edited by Porfuera
Link to post
Share on other sites

46 minutes ago, DaveArkley said:

You can set up a reservation in your home router's DHCP rules, you'd need to find the mac address of your Z21 and add using that. If that isn't crystal clear then I suggest you don't do it, too easy to get wrong if you aren't familiar.

 

Even easier is make sure that the DHCP pool starts above 192.168.x.128 which is the case for many home routers. Another common pool starts at 192.168.x.64  which will require alteration. When railway IP range is 192.168.0.x-254 and the home is on 192.168.1.0-254 then you could make the subnet mask 255.255.254.0 for everything and just have one large network  - but I wouldn't advise that 😉

Link to post
Share on other sites

4 hours ago, Porfuera said:

 

So what could happen? What is the risk?

 

 

Two devices on the network with same address, the Z21's static and a DHCP address assigned by your router to something else.  What happens then ?  Stuff stops working, or works intermittently -  intermittent is the most likely, and you'll be wondering why it appears to work, then doesn't, then works, then doesn't, or does something "odd" (because its received half of what you thought it was told to do). 

 

"reservation" is a mechanism to tell the router which is allocating DHCP addresses to treat the Z21 and its address in a specific manner.      But, this is well inside "if you know what you're doing" territory.      I suspect its simpler to pick up Iain's suggestion of controlling the DHCP address range in your router so the static address on the Z21 falls outside the DHCP range, but even that is well above basic-level of network device setup. 

 

Which is back to why Roco ship a router with their Z21...    

 

 

  • Like 1
Link to post
Share on other sites

  • RMweb Gold
3 hours ago, Porfuera said:

I was told that there is 'risk' involved in connecting an Ethernet cable from my wifi hub directly into my Z21. I asked what that risk was and what could happen - I'm pretty sure that doesn't answer that question.

 

No real risk other than things randomly not working correctly.

 

Unless you have pretty much hundreds of devices connected to your home network at once, I wouldn't give it a second thought.

 

 

For what its worth, the router that came with my Z21 has never left the box. The Z21 gets plugged into my network by ethernet whenever I'm using it. I could change the IP settings but there physically isn't enough networkable devices in the house to make the router get to the stage of trying to assign .111 to anything...

  • Thanks 1
Link to post
Share on other sites

A router doesn’t randomly assign addresses from the pool.

 

When a totally new device requests an address a specified sequence of events happen which results in the next free address starting from the beginning of the address range is issued out. This is also issued with a lease period which is commonly 24hrs or 30 days in home routers. The next new device is offered the next address, etc.

 

At 50% of the lease period an attempt is made to renew the lease using the same IP Address for the same MAC. If it is free then the lease is renewed for another lease period.

 

The router keeps a list of the MAC and IP addresses that have been used, but are now free, for a period and then eventually releases them. This retention of addresses and issuing of new addresses can quickly consume the available DHCP range, especially with the number of devices in households that use IP these days. Between phones, computers, televisions, and all the other white goods you can quickly allocate 50 to 100 addresses due to the retention period.

 

The effects of IP conflict can range from service denial to the two devices with the shared addresses to network collapse when devices use the so called ‘Smart IP’ because all the devices try to avoid each other and find there isn’t enough address space to stop the conflicts happening.

 

This is why all routers that have DHCP allow static addresses to be issued to network devices - they don’t implement the functionality because they are nice people, they implement it because it is vital to ensuring a network operates correctly.

  • Informative/Useful 1
Link to post
Share on other sites

2 hours ago, Kaput said:

No real risk other than things randomly not working correctly.

 

Unless you have pretty much hundreds of devices connected to your home network at once, I wouldn't give it a second thought.

 

For what its worth, the router that came with my Z21 has never left the box. The Z21 gets plugged into my network by ethernet whenever I'm using it. I could change the IP settings but there physically isn't enough networkable devices in the house to make the router get to the stage of trying to assign .111 to anything...

 

Thanks for that reply - that sounds like a practical and sensible approach.

 

I've just switched on every device in the house I can think of (except the Z21, which is boxed up atm) and a quick check of my hub shows that there are 10 devices connected so I don't think I'm going to worry about it for the time being.

Link to post
Share on other sites

13 hours ago, Porfuera said:

 

Thanks for that reply - that sounds like a practical and sensible approach.

 

I've just switched on every device in the house I can think of (except the Z21, which is boxed up atm) and a quick check of my hub shows that there are 10 devices connected so I don't think I'm going to worry about it for the time being.

If only it were that simple. There's no guarantee that DHCP will start with a low address, and then allocate them sequentially. It may do so for a span of time, and then (down to the software on the router, and entirely unpredictable unless you know in detail how that software works) may allocate any address it chooses. The only way to ensure it won't is to reserve and address in DHCP as I described earlier. Truth is it's very unlikely so there is a low risk, but still possible so not no risk.

 

Cheers

Dave

Link to post
Share on other sites

  • RMweb Premium
3 minutes ago, DaveArkley said:

If only it were that simple. There's no guarantee that DHCP will start with a low address, and then allocate them sequentially. It may do so for a span of time, and then (down to the software on the router, and entirely unpredictable unless you know in detail how that software works) may allocate any address it chooses. The only way to ensure it won't is to reserve and address in DHCP as I described earlier. Truth is it's very unlikely so there is a low risk, but still possible so not no risk.

 

Cheers

Dave

Agreed, out of idle curiosity just looked at the IP address assignment on my home router and they're all over the shop within the 192.168.1.x subnet.

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...