networking and two-routers question [SOLVED]

Issues and / or general discussion relating to Puppy

Moderator: Forum moderators

Post Reply
User avatar
ocpaul20
Posts: 33
Joined: Tue Jul 14, 2020 3:46 am
Location: PRC
Has thanked: 4 times
Been thanked: 1 time

networking and two-routers question [SOLVED]

Post by ocpaul20 »

So to describe my home network:

I have one router(192.168.1.1) at the point where the fibreoptic from the ISP comes into the apartment.
I have a PC(192.168.1.25) connected by wifi to this. Internet works fine.

I have one other router(192.168.0.1) connected to the first router by ethernet but I cannot 'see' this router from my PC.

Code: Select all

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         192.168.1.1     0.0.0.0         UG    303    0        0 wlan0
192.168.1.0     0.0.0.0         255.255.255.0   U     303    0        0 wlan0

Code: Select all

root@lapdoglen:~# ping 192.168.0.1
PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data.
^C
--- 192.168.0.1 ping statistics ---
10 packets transmitted, 0 received, 100% packet loss, time 215ms

So, what route statement do I have to use to bridge the two networks as I would like to have a Raspberry Pi connected to this other network and to 'see' it from my PC.

From what I understand I should be able to add a route statement something like this

Code: Select all

ip route add 192.168.0.1 via 192.168.1.1

but this does not fix it.

Thanks for any help.
Paul

I posted this in a sub-forum but I am still unable to get it working and understand how I should bridge separate networks.

Last edited by ocpaul20 on Tue Nov 23, 2021 8:21 am, edited 1 time in total.

System: Fanless PC DebianDog Buster Frugal

User avatar
snoring_cat
Posts: 206
Joined: Tue Sep 21, 2021 3:40 pm
Location: Earth
Has thanked: 24 times
Been thanked: 46 times

Re: networking and two-routers question

Post by snoring_cat »

Hi ocpaul20,

I think the problem is with the router configurations (e.g. rules, firewalls, VLANs, DHCPD server collisions, etc.). If possible, could you disconnect the second router and then connect a second laptop on the ethernet jack that the second router was using. The second laptop should get a 192.168.0.x IP from the first router (if DHCP is enabled on it). Then try pinging each of the computers. Hopefully you can ping correctly. Then you would know that it has to do with router configurations.

Also, if possible, can you please give us the output of the following commands on your computers (though I don't think the problems are at the computer level)

Code: Select all

ifconfig -a
netstat -rn

Meeeooow!

-- substance over noise, since 5 minutes in the future --

User avatar
snoring_cat
Posts: 206
Joined: Tue Sep 21, 2021 3:40 pm
Location: Earth
Has thanked: 24 times
Been thanked: 46 times

Re: networking and two-routers question

Post by snoring_cat »

Hi again,

I should have put this in the last post. The key issue probably is with the way you configured your routers. They probably aren't bridged correctly. I didn't want to go into specifics because I do not know which routers you have. Suffice it to say, here are some links that will help clarify bridging

Connect 2 Routers
Bridge 2 Networks

Just a reminder, you don't want both routers trying to tell each other that they are each in charge of DHCP address assigning

Meeeooow!

-- substance over noise, since 5 minutes in the future --

User avatar
ocpaul20
Posts: 33
Joined: Tue Jul 14, 2020 3:46 am
Location: PRC
Has thanked: 4 times
Been thanked: 1 time

Re: networking and two-routers question

Post by ocpaul20 »

OK, thanks. I definitely have a problem with the way I have configured my routers because in my head I am thinking that I want devices attached to the second router(192.168.0.1) to have addresses in that range. So, both ARE trying to assign addresses in their respective ranges of IPs via DHCP.

The second is a modern router, (but everything for both routers are in Chinese so I have to wing-it and guess what is requested - which is not that difficult as long as I dont try to do anything clever). The IP of the second router is defaulted to 192.168.0.1 so I have left it at that but the ISP router default IP is 192.168.1.1

In a way, I would prefer to have all on the 192.168.1.1 network and not have the other 0.1 addresses floating about. It would make it much easier. I am not sure how I can remove the IP from the second router and allow it to take an IP from the first via DHCP but I can fiddle about to try and make it work.

Now that I know one thing I am doing wrong, I can try some more things to get it all more orderly. I will come back and post some more info whichever way it works out.

Thanks for your help.

System: Fanless PC DebianDog Buster Frugal

User avatar
snoring_cat
Posts: 206
Joined: Tue Sep 21, 2021 3:40 pm
Location: Earth
Has thanked: 24 times
Been thanked: 46 times

Re: networking and two-routers question

Post by snoring_cat »

You can have computers connected to router 1 have router 1 assign IPs in 192.168.0.x range and
You can have computers connected to router 2 have router 2 assign IPs in 192.168.1.x range

But the connection between router 1 and router 2 should have static IP addresses, and in bridge mode.

Depending on your routers, you can set up bridge mode, repeater mode, extender mode, gateway mode, etc. For example, if extender mode is available, you could be on the same network IP range. There are just too many unknowns on your routers for me to guess what settings would be best.

Eventually I think you are trying to have router 1 assign IPs 192.168.0.1-128 and router 2 assign IPs 192.168.0.129.254. That way all computers are on 192.168.0.x

Meeeooow!

-- substance over noise, since 5 minutes in the future --

User avatar
rcrsn51
Posts: 1273
Joined: Sun Aug 23, 2020 4:26 pm
Been thanked: 296 times

Re: networking and two-routers question

Post by rcrsn51 »

If I understand this correctly, it sounds like you want to plug the cable from router #1 into a LAN port of router #2. Then turn auto DHCP on router #2 OFF.

That way everything is on the same subnet and machines connecting to router #2 will get their IP address from router #1.

User avatar
ocpaul20
Posts: 33
Joined: Tue Jul 14, 2020 3:46 am
Location: PRC
Has thanked: 4 times
Been thanked: 1 time

Re: networking and two-routers question

Post by ocpaul20 »

I have played around a little more and found a translation app on my tablet which works pretty well.

What I have come to understand is that in my case it seems I have to have a different IP sub network on each router. So my Router #2 stays at 192.168.0.1 and ISP Router #1 stays at 192.168.1.1
I dont seem to be able to pick up DHCP IPs from ISP Router #1 from BEYOND the other one. I tried switching off using the DHCP allocation on Router #2 and I did not get any IP address allocated to my laptop. Maybe I should have done one more router reboot or spent more time fiddling about. Is this strange for a modern TP-LINK router?

Anyway, thanks for all the thoughts on this.

What I still would like please is a route statement which allows me to get from my PC attached to ISP Router #1 to a laptop attached to my Router #2.
If you imagine the letter 'Y' I cannot get from my PC down one arm of the 'Y' and up the other arm of the 'Y' to my laptop.

From that laptop attached by ethernet to Router #2, I can get to the internet and obviously traffic from the internet can get through to the laptop which is beyond Router #2.
I can also get from my PC out to the internet, so logically it must be something in my PC or Router #1 which is stopping me using it as a route through to Router #2 and beyond from my PC.

System: Fanless PC DebianDog Buster Frugal

User avatar
bigpup
Moderator
Posts: 6468
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 778 times
Been thanked: 1337 times

Re: networking and two-routers question

Post by bigpup »

What specific Puppy version?

If both of these routers are WIFI signals, so they connect to the computers by WIFI.
Do you have them set to use different WIFI channels?
They are not both trying to use the same channel?
Also how many other WIFI signals are you getting in your location from other peoples WIFI routers?

Info here:
https://oldforum.puppylinux.com/viewtopic.php?t=115108

Note:
In Fossapup64 9.5

Code: Select all

iwlist wlan0 s > list.txt

did not work.
Had to use:

Code: Select all

iwlist scanning

Forum Global Moderator
The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

User avatar
rcrsn51
Posts: 1273
Joined: Sun Aug 23, 2020 4:26 pm
Been thanked: 296 times

Re: networking and two-routers question

Post by rcrsn51 »

You may need to assign router #2 a static IP address on router #1's subnet.

User avatar
ocpaul20
Posts: 33
Joined: Tue Jul 14, 2020 3:46 am
Location: PRC
Has thanked: 4 times
Been thanked: 1 time

Re: networking and two-routers question

Post by ocpaul20 »

Sorry, I thought I had answered but maybe the ether swallowed it up.

snoring_cat wrote: Tue Nov 09, 2021 2:55 pm

You can have computers connected to router 1 have router 1 assign IPs in 192.168.0.x range and
You can have computers connected to router 2 have router 2 assign IPs in 192.168.1.x range

But the connection between router 1 and router 2 should have static IP addresses, and in bridge mode.

Depending on your routers, you can set up bridge mode, repeater mode, extender mode, gateway mode, etc. For example, if extender mode is available, you could be on the same network IP range. There are just too many unknowns on your routers for me to guess what settings would be best.

Eventually I think you are trying to have router 1 assign IPs 192.168.0.1-128 and router 2 assign IPs 192.168.0.129.254. That way all computers are on 192.168.0.x

The bolded piece above would be one way to do it, but I just want to be able to 'see' and get on to all of the computers on my network - that means somehow bridging the 'gap' between the 2 routers subnet 192.168.1.0 and 192.168.0.1
I understand this needs to be done with a 'route' statement telling the IP packets which way to go to get to the other #2 router.

What specific Puppy version?
Linux busterdog 4.19.0-9-686-pae #1 SMP Debian 4.19.118-2 (2020-04-29) i686 GNU/Linux

If both of these routers are WIFI signals, so they connect to the computers by WIFI.
Do you have them set to use different WIFI channels?
They are not both trying to use the same channel?
Also how many other WIFI signals are you getting in your location from other peoples WIFI routers?

They are set to 10 & 11 and many others around are set to 1 so I think this is probably OK
Although there are quite a few nearby routers as I live in an apartment complex.

You may need to assign router #2 a static IP address on router #1's subnet.

I have tried but for some reason I have not been able to. Maybe the routers software blocks this and wants it to be on its own subnet. However, as I understand it, I should be able to navigate through the home network with the proper 'route' commands and entries into the routing table, shouldn't I?

Many people and companies must have 2 subnetworks on their LAN, so I feel it is a piece of knowledge I am missing and that I dont understand what 'route' command to use to achieve this hop onto a PC attached to another subnetwork.

Thanks for the help in understanding this.

System: Fanless PC DebianDog Buster Frugal

User avatar
rcrsn51
Posts: 1273
Joined: Sun Aug 23, 2020 4:26 pm
Been thanked: 296 times

Re: networking and two-routers question

Post by rcrsn51 »

ocpaul20 wrote: Thu Nov 18, 2021 11:49 pm

I have tried but for some reason I have not been able to. Maybe the routers software blocks this and wants it to be on its own subnet. However, as I understand it, I should be able to navigate through the home network with the proper 'route' commands and entries into the routing table, shouldn't I?

Here is my understanding of the situation. Someone with greater knowledge is free to correct me.

Consider how a regular home Internet router works. It gives users connected to its LAN side access to the outside world on its WAN side.

But it also acts as a firewall. A foreign computer on the WAN side cannot see computers on your LAN. This is a good thing.

The same is true with your setup of two routers. A host connected to router #1 does not automatically get access to hosts on the LAN side of router #2, regardless of what routes the first host sets up.

To allow this, router #2 has to enact some policies that give permission to packets coming from router #1's LAN.

As I suggested above, you can eliminate this problem by connecting router #1 to a LAN port of router #2 and getting everything on the same subnet. This would be a lot easier if the router dialogs were not in Chinese.

Here is an example that I do with Wlanmaker.

The Wlanmaker machine acts as a router. It has a "WAN" side because its ethernet port is connected to my main LAN 192.168.2.0/24 by DHCP. On its "LAN" side, the subnet is 192.168.51.0/24. So a host connecting by wifi gets an IP address in this second range. That host has access to the "outside world" on my ethernet LAN and eventually out to the Internet.

However a host on the ethernet LAN cannot automatically see hosts on the wifi subnet. For example, a Samba server running on an ethernet host could be accessed by a wifi host, but not vice versa.

If I want an ethernet host to see a wifi host, I must set the first host's default gateway to the Wlanmaker machine. Then the iptables rules in Wlanmaker allow the packets across into the wifi LAN.

The ethernet host still has access to the outside world because Wlanmaker routes those packets out through its gateway to the main gateway on the wired network. Or it may be that the ethernet host keeps using its original gateway because it is the lower cost route.

Last edited by rcrsn51 on Wed Nov 24, 2021 6:27 pm, edited 1 time in total.
User avatar
ocpaul20
Posts: 33
Joined: Tue Jul 14, 2020 3:46 am
Location: PRC
Has thanked: 4 times
Been thanked: 1 time

Re: networking and two-routers question

Post by ocpaul20 »

A host connected to router #1 does not automatically get access to a host on the LAN side of router #2, regardless of what routes the first host sets up.

I think this is my mis-understanding. So, thank you for that explanation.

So, I have reconnected the ethernet from Router #1 to one of the 4 LAN sockets on Router # 2 and this at the moment seems to be the missing piece in my puzzle. For the moment I can 'see' all the machines on my network.
Thank you.

System: Fanless PC DebianDog Buster Frugal

Post Reply

Return to “Users”