Setting up Static IP and Port Forwarding with modem and router

sasalakic20

Reputable
Jan 12, 2018
11
0
4,510
Hello! I have a problem with running my server. Until recently I was running a game server on my pc for my friends. The server was running fine, I set the main modem which is connected to my phone (DSL) and to my PC with ethernet cable to LAN1. Static IP and the Port Forwarding are also set. I also have a TP LINK router connected to my DSL modem(LAN4, because LAN3 and LAN2 are reserved for IPTV.) Server got popular, and I needed it to run 24 hours a day. So i found an old PC and connected it to my second router (which is connected to DSL modem) on the other end of the house and pluged in the old PC which I am controling through my main pc in my room with Team Viewer. The problem is that I cannot coonect to my sever anymore. Before I was connecting with my PC static IP(192.168.1.99) and my friends were connecting thorugh my public IP. I couldn't connect to my sever with my PC IP, neither with the secondary router IP (192.168.0.100), so I figured that problem must be in the other router, so I tried to set Static IP and Port Forwarding on the second router and I was ubable to do so. Later I set the static IP on the second routers setup to be the same as my DSL modems IP, after that the Internet worked but i couldn't set the Port Forwarding, and it's just very annoying, I think it is somehow colliding with my DLS modem.

P.S. Should I set up the Static IP though Windows, or the TP LINK router settings?
Excuse me for the bad English, I hope you understood me well.
Greetings from Serbia.
 
Solution


Ok ... so I would set a static IP address on PC2 to 192.168.1.99. Why? It's easy and the port forwarding is already setup.


Your english is great. You must have had good teachers.

I assume you have taken a cable from LAN4 on your router/modem to the WAN port of your 2nd modem. If this is incorrect, stop reading.
I also assume that LAN1 and LAN4 on your router/modem are just plugs and not actually separate networks.

If I understand your problem correctly, you have created 2 networks 192.168.0.x (2nd router) and 192.168.1.x (router/modem). A computer one 192.168.1.x can't talk to the computer on 192.168.0.x because it does not have a path to get there. The solution is to have everything on the same network. If you put your 2nd router into bridge mode than your router/modem will control the entire network (all your devices will be on 192.168.1.x). The alternative is to take the line that is from LAN4 to the WAN port, unplug it from the WAN port and plug it into one of the LAN ports on the 2nd router. If you are using DHCP for IP allocation your computers may not update their IP addresses automatically. Restarting them should fix this (can also do this in a command prompt if you know the commands).
 

sasalakic20

Reputable
Jan 12, 2018
11
0
4,510


Thank you for answering. I did mess around a bit with the Router2. I disabled DHCP on it and made its IP static, but I haven't tested it yet. I will do a factory reset now since i haven't connected it to a PC yet, only to a phone with static option(for testing purposes). Yes, I did connect the Router2 the way you mentoined earlier (Ethernet cable connecting LAN4 port on my modem and WAN port on Router2). And no, ports on the moden do not represent two independent networks. Service here works in a way that you have 2 ports (LAN1, LAN4) for the Internet, and LAN3 and LAN2 for TV modem. Anyway, if I understood You correctly, connecting LAN4 port on my modem and one of LAN ports on Router2, while simultaneously connecting PC2 to one of those same ports on Router2 would basicaly be the same as if I connected PC2 to LAN4 on my modem directly, right?
Also, is this what You consider a Bridge Mode? And will I be able to maintain my WiFi connection on Router2? Because that router was installed there with a purpose to cover blank spots of the house with WiFi signal.
By the way my teacher was a real pain in the ass!
 
Yes, connecting LAN4 on main router to LAN1 on the 2nd router and then a computer to LAN2 on 2nd router is just like connecting the PC directly to LAN4 (the 2nd router acts as a switch, not a router). It is a simple way to do it, but you use an extra port.

Bridge mode is a setting on your router which turns off DHCP, NAT, and firewall (usually). It's used to create a bridge between 2 networks and make them into 1. Most routers have the option, but not all.

Yes, WiFi should still work on Router 2 in both these situations.

**Oh ... as far as the port forwarding, that would only be done on the main router in both these situations.
 

sasalakic20

Reputable
Jan 12, 2018
11
0
4,510


OK, I tried to do it that way. First of I did a Factory Reset on Router2, then I connected LAN4 of the modem and LAN1 of the second router, and i connected PC to LAN2 of Router2. PC was unable to connect to Internet. Is there some option I need to enable first? Also I tried looking for Bridge mode on router setings, and also no succes. I did however find this on google: "Definition:The TL-WR702N borrows existing wireless Internet and broadcasts it using a different network name(SSID) and password. This application can create two individual networks for two groups of users sharing one Internet." This is from official site which "fits" to my make and model of Router2, and everything I could find was just talking about connecting router to the WiFi so it could emmit a new hotspot.
And if I somehow disable DHCP, NAT and firewall manually, will that work same as if I enabled Brige Mode?

 
Good .. I checked the user manual and that model does not have a bridge mode. This limits you to going form LAN4 of main router to LAN1 of the 2nd router.
Do make sure the DHCP is turned off on the 2nd router.
Also, make sure the IP address for the LAN side (page 31 of user manual) is an address in the main routers range (192.168.1.x).
NAT and firewall should not be an issue because you don't have anything plugged into the WAN port.

Are you using DHCP on the main router or all static addresses? If static, then setup should similar to this:

Main router - 192.168.1.1
2nd router - 192.168.1.2
Computer - 192.168.1.10 netmask 255.255.255.0 gateway 192.168.1.1

If this does not work, then something wacky is going on.
 

sasalakic20

Reputable
Jan 12, 2018
11
0
4,510


Okay, something werid is going on. First thing I did was to turn of the DHCP on the TP LINK router. Now its acting like it is not here, which is good I guess. My PC is plugged into LAN2 port and the LAN1 port of the TP LINK is connected to LAN4 of the modem. Now my internet works, but when I try to acces TP LINK setup by typing 192.168.0.1 or tplinkwifi.net, it just says that I do not use the TP LINK router, so does that mean that the router is just a bridge between the modem and the pc now? Altrough I was unable to change LAN IP which is currently 192.168.0.1, so it is not in a main routers range. I will probably factory reset the 2nd router and change LAN IP first and then turn of the DHCP.

 
On the TP Link, unplug the line in LAN1.
On the computer, set it to a static IP of 192.168.0.2, netmask 255.255.255.0 gateway 192.168.0.1.
Now you can access the TP Link with 192.168.0.1 ... update the IP address to 192.168.1.2 (or something similar). You will lose connection to the TP Link after doing this.
Set the computer back to your old setting (automatic or static)
Plug the cable back into LAN1 on the TP Link and you should be good to go. Let me know.
 

sasalakic20

Reputable
Jan 12, 2018
11
0
4,510

The router lan IP is now 192.168.1.2 The modem IP is 192.168.1.1, and yeah i cannot acces TP LINK anymore. I'm going to plug it in in the other room and try on the other PC I will update you, I still am not sure how I'm going to setup the static IP (considering there is PC1 connected directly to the MAIN ROUTER (LAN1), and a PC2 connected to the LAN2 of the TP LINK router)
 

sasalakic20

Reputable
Jan 12, 2018
11
0
4,510

Yeah, the main router is doing DHCP, because I disabled it on the 2nd router, but I cannot find informations about main routers DHCP range anywhere.. And is it enough to make IP static just on a PC that is connected to main ruter, since PC2 is basicaly just "bridged" through the 2nd router?


 

sasalakic20

Reputable
Jan 12, 2018
11
0
4,510


Model of the main router is ZTE ZXHN H168N, and the Port Forwarding is enabled on it, but for some other IP (192.169.1.99)
 

sasalakic20

Reputable
Jan 12, 2018
11
0
4,510


The problem is that game automaticly takes routers IP which is 192.168.1.7, i could just type in that IP in Port Forwarding slot of the main router, right?
Also I would have to make IP static on game server PC right?
 


Sorry, this confused me a bit. You talked about the game and the game server PC. By game, I assume you mean the software you friends are trying to connect to. I would expect the game to take the IP address of the computer it is running on, which I assume is the game server PC ... yes?
 

sasalakic20

Reputable
Jan 12, 2018
11
0
4,510

Yes, you're right. And that software is running on PC2 which is connected to TP LINK router.
ALSO yes that software just takes IP from PC.
 


Ok ... so I would set a static IP address on PC2 to 192.168.1.99. Why? It's easy and the port forwarding is already setup.


 
Solution

sasalakic20

Reputable
Jan 12, 2018
11
0
4,510

Thank you, everything is working now thanks to your help! If you ever find yourself in this part of the world I owe you a beer! Cheers!