Originally posted by: robeest
hello user 1234, sorry to bother you again. i managed to get the wrt54g side to have the same subnet now. I can access the internet from the wrt54g side with the subnet .0.xxx same as the di624. I basically just changed autodhcp setting to static and put in ip address in the range of the subnet. I also put in the DNS of the di624 router which i guess is given by my isp. I also enabled upnp. I basically did not know what i was doing..just fiddling around. But now my problems is that i cannot ping a machine from either side of the routers. for instance, my laptop connected to wrt54g cannot ping my pc connected to the di624 router and vice versa. my laptop connected to wrt54g cannot ping di624 router ( 192.168.0.1). it can only ping the wrt54g. I tried that route command from the pc connected to di624 as you suggested in your tutorial when there were two subnets, but in this new case there is only one subnet but for some reason not all machines can't see eachother...I would really appreciate your help on this once again.
What you've done is just make the two networks (unfortunately you still have two separate networks - using the same address range doesn't make them into a single network) use overlapping IP address ranges, which doesn't really help much, but creates more problems for the routing since the addresses are now indistguishable, so we can't create a routing table rule to to properly forward them (for example, now your client router will not forward packets addressed to 192.168.0.x to the main router). Also you turning off DHCP doesn't make any difference, just makes things more tedious (nor does Upnp matters here).
But you gave me an idea to improve upon this by making the client network to be a proper subnet of the main network. You do this by choosing a netmask of 255.255.255.128 and the IP address of 192.168.0.129 in the client router (leaving the gateway as 192.168.0.1 and automatic configuration via DHCP). Also make sure the starting IP address the client router assigns to its attached PCs starts at a number higher then 129 (for example 192.168.0.150). All these setting are in Setup::Basic Setup screen of the client router. Also make sure that the address range the main router assigns to its attached devices ends at 192.168.0.127 so it doesn't overlap the client's router subnet.
So now all the numbers will be in the 192.168.0.x range, where x is below 128 in the main network and above it in the client network. This is important because now the address are easy to tell apart and will be routed properly from the client network to the main network. To create the routing table entry for forwarding packets from the main network back to the client network you can (manually) add this rule:
route add -net 192.168.0.128 netmask 255.255.255.128 gw 192.168.0.102
(where 192.168.0.102 is the client router's address in the main network as shown in its status screen).
But I still don't think this will solve your problem, as these are still two different networks - a main network and a subnet (instead of two distinct networks previously). Try it and see. The only way we can make this into a single network if we could somehow get the client router to not perform network address (replacing the addresses in packets with its own address) translation when it forwards packets.