How to configure my home network to access the Internet and use the FTP server made available by the router
Posted on 2008-10-16
I am in the following (IMHO complex) situation.
I have an ADSL PPPoA Internet connection.
I'm using and Ethernet modem to connect to it.
Then, the modem (which has just an ADSL link port and one Ethernet port) is connected to the WAN port of a router.
Lastly, my PC is connected to one of the router ports.
Let's look at each device.
The Ethernet modem is configured with an IP address of 192.168.2.1, subnet mask 255.255.255.0.
Actually, it is not just an Ethernet modem, but it have many features like routing tables, NAT, firewall, DHCP, etc.: so, it's like a mini-router.
It supports the following ADSL standards: PPPoA, PPPoE, RFC 1483 Bridged, RFC 1483 Routed and Bridged Mode Only.
The first problem is that my ISP dynamically assigns IP addresses, but NOT DNS addresses. That is, when connecting to Internet I have to configure the client so that it obtains IP automatically, but uses two fixed DNS IP addresses. However, my modem seems to mix the two concepts, so either I specify to get all the IP and DNS addresses automatically, or I must specify them all as fixed.
This is not a big problem as long as I then configure the router with the right DNS addresses, but it causes a second problem I will describe later.
For the sake of completeness, this modem is a Linksys AM-200.
The router is configured with an IP address of 192.168.1.1, subnet mask 255.255.255.0. It has all the usual features (firewall, NAT, DHCP, etc.) and it can be configured to access the Internet through its WAN port using PPPoE or PPTP, otherwise it can be configured to use a static IP address in the WAN side or to get IP automatically (so behaving as a DHCP client).
The router also have an USB port to which I can connect a USB hard disk to set up an FTP server.
For the sake of completeness, this router is an Asus WL-500gP V2.
Both the modem and the router have an integrated DDNS client and both support the service I'm using (DynDNS).
What I want to do is:
connect to the Internet from my PC
be able to connect from the Internet (using the DynDNS host name) to the FTP server made available by the router
have a network configuration which can react as fast as possible to perturbations like ADSL disconnections (unfortunately, my ADSL line is quite unstable...)
I'm not a network expert, so I proceeded by trial and error and got two working configurations, but both of them have problems.
They both share the following configuration:
the firewall in the modem is disabled: I'm going to use that of the router
UPnP is enabled on both the modem and the router: I like Windows UPnP support and the ability for certain programs to open ports as they need (eMule, for instance), without forcing me to set up ad-hoc configurations for each of them
DHCP server is enabled in the router for PC clients
NAT is enabled in the router
the modem is configured to use a PPPoA connection, getting IP (and DNS addresses...) automatically from the ISP
the router is configured to use the fixed DNS addresses the ISP gives me
The modem has DHCP server disabled, while the router is configured to use a static IP address of 192.168.2.2. In the modem, NAT is enabled, while DMZ is set to forward all the traffic to 192.168.2.2 (the router).
1) I tried to setup the DDNS client in the modem, but while the modem says it's ok, it actually doesn't update the DNS (if I login to DynDNS web site, I always see an old IP address I previously had manually set from there): my suspect is that the modem can't update the IP in DynDNS because it can't resolve the dyndns.org host names, because of the fact I can't set the DNS addresses on it (see above).
2) if I try to use the DDNS client in the router, that seems to work, but it obviously sets the IP to 192.168.2.2, which is the WAN IP seen by the router... and this is not good, of course
3) in this way I'm using two NATs, while I think it's useless; if I try to disable the NAT in the modem, the Internet connection does not work (maybe because I should also set up port forwarding manually from the modem to the router?)
4) I can't understand why whenever I change something in the modem configuration that causes an ADSL disconnection and reconnection, I have to reboot the router in order to have Internet back working; I don't know if this is related to routing tables that need to be updated: after changing the configuration to #2, I discovered that there is an option in the modem to configure it as in Gateway mode or Router mode; the default is Gateway but the on-line help says to use Router if there are other routers in the network and you want to enable the support for the RIP protocol, which sends notifications of network changes; I don't know if this can help (and I don't if I should enable Router mode also in the router, but its manual says that NAT gets disabled then...). Please note that even if Internet connection is not available until I reboot the router, I can always connect to 192.168.2.1 to enter the web management interface of the modem
The modem is configured to use ADSL PPPoA in Half-Bridge mode. DHCP server is enabled in the modem too, while the router is configured to get IP automatically for its WAN port. In the modem, both NAT and DMZ are disabled. In this way the router directly gets the IP coming from the ISP, so that it's internal DDNS client works perfectly and updates the IP address for DynDNS.
The modem is configured in router mode, but I don't know if this makes any difference.
1) whenever the ADSL connection is lost, the router gets mad; I think this is because as soon as the modem reconnects, it gets a new IP from the ISP, but the router doesn't realize that and tries to use the old one; in this way I cannot either connect to the Internet, nor to the modem web management interface until I reboot the router; I could minimize the impact of this problem by setting the modem DHCP server lease time to just 1 minute: in this way, the router takes approximately a couple of minutes to automatically react, realizing the IP address of its WAN port has changed and giving me back the Internet connection and the possibility to connect again to the modem using 192.168.2.1
So, configuration #2 is almost perfect, but because of my ADSL line is unstable, about 2 minutes to react to disconnections and reconnections is still annoying.
Further note: although the ISP says to configure my devices to connect using PPPoA, I'm pretty sure it should work with PPPoE, too, because I tried that in the past with other ISPs that use the same network infrastructure. I didn't try it right now, but I will. However, I think that what could make the difference would be the ability to set up the router to estabilish the ADSL connection by itself, so that it can realize immediately when there's a disconnection and reconnection: in other words, the modem should behave just as a plain modem, nothing more. However, I don't know how to properly configure it to do that (maybe Bridged Mode Only as the connection type is the answer? And what about NAT, DHCP and operating mode settings?).
In the end, my whole story translates to the following questions:
1) how to change configuration #1 in order to avoid the double-NATting?
2) why in configuration #1 the router seems not to react to ADSL disconnections/reconnections? The configuration between the router and the modem is always the same (I'm using static IPs), while I would expect that just the modem controls the interface between itself and the Internet, so I shouldn't have problems at the router level, should I?
3) any idea on how to solve the DDNS client problem in configuration #1?
4) any suggestion for my 2 minutes delay in reaction time I have with configuration #2? Is the use modem just as a modem solution the best answer for this? If so, how to do that?
Thanks in advance to anyone that can help.