1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Best modem hookup method?

Discussion in 'Tomato Firmware' started by sardaukar, May 5, 2009.

  1. sardaukar

    sardaukar Addicted to LI Member

    Hey!

    I just flashed my WRT54GL v1.1 with Tomato 1.23 and it rocks! :D Thanks to all involved in the project!

    Now, I use a Linksys AG241EU ADSL modem to connect to the internets :) and I'm using the modem in "Bridge Only" mode and it works flawlessly. But... is it "better" to do the PPPoE part on the modem, add the WRT to it's DMZ and use it like this? I'm just thinking, it's like the modem is basically doing nothing other than syncing the line and that sounds like a waste of CPU :D

    Also, in my current setup (modem as bridge only), is there a way to access the modem configuration page other than plugging an ethernet cable on one of it's ports? Is there a way in from "behind" the WRT54?

    Thanks for your time reading this, and for any replies!

    sardaukar
     
  2. Rafatk

    Rafatk Network Guru Member

    Leave the ADSL modem as bridge.
    Otherwise you have a router behind a router, no need for that at all.
    Let the WRT handle all the traffic.

    To access the modem GUI you will need to create and alias if the are on different IP range, and create a route in the modem to your WRT.

    I could not find right now, but there is a topic talking about and how to make the access to the UI of the modem.
     
  3. fun.k

    fun.k Addicted to LI Member

    as Rafatk said, leave all routing duties to your tomato and all modulation duties to your modem (check if it's a true bridge vs. half-bridge)

    then all you need is different IPs + appropriate init script like:

    modem: 192.168.1.1
    router: 192.168.2.1

    modem.jpg
     
  4. bogderpirat

    bogderpirat Network Guru Member

    i concur with the preceding statements, but want to add a visualization: letting the modem do the dialing in and initial routing would be double NAT, and that's almost as precarious as using grahams number as the parameters for the ackermann function!
     
  5. sardaukar

    sardaukar Addicted to LI Member

    I read this forum post (other forum, even thought the TLD is .fr, it's in English) http://jelnet.free.fr/forum/viewtopic.php?t=303 stating that not doing bridging was a more performant solution (and made sense in my n00b mind :) ).

    So, my modem being 192.168.1.1 and my Tomato being fed by it at 192.168.0.1, all I need is to add as an INIT script:

    Code:
    sleep 5
    ip addr add 192.168.1.10/16 dev vlan1 brd+ 
    Shouldn't it be 192.168.1.1/16 ? And then I can access the modem page... where? (always from inside my network, right?)


    Thanks again for the replies!
     
  6. Toastman

    Toastman Super Moderator Staff Member Member

    I don't think you will find it a "more performant solution", probably the exact opposite. Who said it should be better, and what was their reason for saying so?

    One italian gentleman put it this way: "I have setting it as a "RFC 2364 PPPoA" with NAT enabled with no problem. But I have saw that AG241 have a small CPU and are not able to support very good many connection like P2P software + skype + 10 pc's. So....I would to use AG241 like a simple modem and a WRT54GL with DD-WRT like a router/gateway (216 Mhz Cpu)"

    Here are some useful links:

    http://www.linksysinfo.org/forums/showpost.php?p=307908&postcount=1
    http://www.linksysinfo.org/forums/showpost.php?p=308111&postcount=2
    http://www.linksysinfo.org/forums/showpost.php?p=294377&postcount=1

    Hope this might be useful to you! Good luck.
     
  7. sardaukar

    sardaukar Addicted to LI Member

    Follow the link in my previous post - for no stated reason, it is said to be more performant. For me, it made sense, since the modem does more than just "sitting around" bridging the link and the PPPoE/A is offloaded from the WRT's CPU - right? And by placing the WRT on the router's DMZ (as the linked post mentions) it's not like I'm behind a router or something - I'm getting ALL packets, right?
     
  8. Toastman

    Toastman Super Moderator Staff Member Member

    The "DMZ host" function is actually port forwarding any ports not otherwise forwarded in any other rule to a specified IP address. In other words, it uses NAT. Your setup will be double - NAT'd and you will add some delay and probably encounter all sorts of problems you hadn't thought of, which you'll find referenced in many posts in this forum. The forwarding will also be subjected to the normal limits of the router and firmware, namely speed, low number of connections. That's why we usually want to use it only as a modem. The guys who are advising you in the posts above have been there - done that - got the scars :biggrin:
     
  9. sardaukar

    sardaukar Addicted to LI Member

    I'm convinced, thanks! :D

    What about my question in post #5?

     
  10. hjf288

    hjf288 LI Guru Member

    My DG834GT has a faster CPU than my WRT54GL so I guess I'm best using my WRT as an access point only right?

    There is no double NAT since the DG834GT is on the Switch and not the WAN port.
     
  11. paped

    paped LI Guru Member

    regarding you're queries - Shouldn't it be 192.168.1.1/16 ? And then I can access the modem page... where? (always from inside my network, right?)

    Firstly yes this would be from inside your network only but there are VPN's that can get around this limitation searce at AditoVPN or OpenVPN.

    This needs to be the last IP address on the subnet I believe and as the command is showing a /16 bit subnet (or 255.255.0.0) may not work if your modem is configured differently. As the 192.168.x.x ip's a class c networks it would be easier and simpler to stick to the standard /24 (bit) or 255.255.255.0 settings. However if you are using 192.168.1.x on the modem you need to use a different range on the router/pc's i.e. 192.168.0.x

    Thus TAKE A BACKUP OF YOUR MODEM AND ROUTER CONFIGURATION FIRST!!!!!
    Then.....
    Check you modems LAN set up and ensure that the settings are 192.168.1.1 with a subnet of 255.255.255.0 (or /24).
    Check that the router and pc equipment is using a different range i.e. 192.168.0.x or whatever, as per your requirements just NOT the 192.168.1.1 to 254 range of addresses.

    Then add the following to the firewall script
    /usr/sbin/iptables -I POSTROUTING -t nat -o vlan1 -d 192.168.1.0/24 -j MASQUERADE

    Then add the following to the init script (please note the space before the + thats missing from you're example)
    sleep 5
    ip addr add 192.168.1.254/24 dev vlan1 brd +

    Reboot the router and you should be able to get in to your modem by typing http://192.168.1.1 in your browser.
     
  12. sardaukar

    sardaukar Addicted to LI Member

    Thanks! I can access my modem's page now! :D Is it safe to, for example, upgrade my modem's firmware using this (if Linksys ever releases an update to the AG241) ?

    My setup for Tomato is now complete!! :biggrin:
     
  13. Toastman

    Toastman Super Moderator Staff Member Member

    It depends if your routers IP, password etc is changed when you upgrade, then you wouldn't be able to get back into the GUI. otherwise I don't see why not. By the way, there seems to be some 3rd party firmware available for that router which people find tons better than the linksys offering. Did you look yet?
     
  14. sardaukar

    sardaukar Addicted to LI Member

    No, I haven't. Since it's just being used as a bridge now, I don't see the point - except if this alternative firmware can improve/stabilize the ADSL line synchronizing process... does it?
     
  15. Toastman

    Toastman Super Moderator Staff Member Member

    I agree- no point. Just thought I'd mention it :biggrin:
     
  16. sardaukar

    sardaukar Addicted to LI Member

    But on the topic of stability... I just noticed my Tomato box stopped responding to my monitoring pings (I have an applet for it for Gnome). Last reply was 34 minutes ago... :| shouldn't the "connection keep alive" do something about this? (I think my ISP resets the connection every 24 hours). Or is this a case of Tomato crashing? :sad:

    Guess I'll only know for sure when I get home...
     
  17. Toastman

    Toastman Super Moderator Staff Member Member

    Did you use DDNS to allow remote access to your router? That makes it easy to see what is going on. [Owing to one of my mates being completely brain-dead when it comes to his router, I actually maintain his system for him from 6000 miles away, the distance doesn't matter and it's very easy to forget where he is!]

    But yes, it sounds like it's crashed !
     
  18. sardaukar

    sardaukar Addicted to LI Member

    Does it reboot automatically on crash? Because it's up now, and the log is full of:

    Code:
    May  7 17:48:29 ? daemon.info pppoe[3904]: Starting
    May  7 17:48:29 ? daemon.info pppoe[3904]: Sending PADI.
    May  7 17:48:39 ? daemon.info pppoe[3904]: Resending...
    May  7 17:48:49 ? daemon.info pppoe[3904]: Resending...
    May  7 17:48:57 ? daemon.info pppoe[3904]: Resending...
    May  7 17:49:00 ? daemon.info pppoe[3904]: Resending...
    May  7 17:49:05 ? daemon.info pppoe[3904]: Sending PADI.
    May  7 17:49:09 ? user.info redial[3903]: WAN down. Reconnecting...
    May  7 17:49:09 ? daemon.info dnsmasq[3901]: exiting on receipt of SIGTERM
    May  7 17:49:09 ? daemon.info dnsmasq[3909]: started, version 2.46 cachesize 150
    May  7 17:49:09 ? daemon.info dnsmasq[3909]: compile time options: no-IPv6 GNU-getopt no-RTC no-DBus no-I18N no-TFTP
    May  7 17:49:09 ? daemon.info dnsmasq[3909]: DHCP, IP range 192.168.0.100 -- 192.168.0.149, lease time 2h
    May  7 17:49:09 ? daemon.warn dnsmasq[3909]: no servers found in /etc/resolv.dnsmasq, will retry
    May  7 17:49:09 ? daemon.info dnsmasq[3909]: read /etc/hosts - 0 addresses
    May  7 17:49:09 ? daemon.info dnsmasq[3909]: read /etc/hosts.dnsmasq - 5 addresses
    May  7 17:49:15 ? daemon.info pppoe[3912]: Starting
    May  7 17:49:15 ? daemon.info pppoe[3912]: Sending PADI.
    May  7 17:49:15 ? user.info redial[3911]: Started. Time: 30
    May  7 17:49:25 ? daemon.info pppoe[3912]: Resending...
    May  7 17:49:35 ? daemon.info pppoe[3912]: Resending...
    May  7 17:49:38 ? daemon.info pppoe[3912]: Resending...
    May  7 17:49:42 ? daemon.info pppoe[3912]: Resending...
    May  7 17:49:49 ? daemon.info pppoe[3912]: Sending PADI.
    May  7 17:49:53 ? daemon.info pppoe[3912]: Resending...
    May  7 17:49:55 ? user.info redial[3911]: WAN down. Reconnecting...
    May  7 17:49:55 ? daemon.info dnsmasq[3909]: exiting on receipt of SIGTERM
    May  7 17:49:55 ? daemon.info dnsmasq[3917]: started, version 2.46 cachesize 150
    May  7 17:49:55 ? daemon.info dnsmasq[3917]: compile time options: no-IPv6 GNU-getopt no-RTC no-DBus no-I18N no-TFTP
    May  7 17:49:55 ? daemon.info dnsmasq[3917]: DHCP, IP range 192.168.0.100 -- 192.168.0.149, lease time 2h
    May  7 17:49:55 ? daemon.warn dnsmasq[3917]: no servers found in /etc/resolv.dnsmasq, will retry
    May  7 17:49:55 ? daemon.info dnsmasq[3917]: read /etc/hosts - 0 addresses
    May  7 17:49:55 ? daemon.info dnsmasq[3917]: read /etc/hosts.dnsmasq - 5 addresses
    May  7 17:50:00 ? user.info redial[3919]: Started. Time: 30
    May  7 17:50:00 ? daemon.info pppoe[3920]: Starting
    May  7 17:50:00 ? daemon.info pppoe[3920]: Sending PADI.
    May  7 17:50:10 ? daemon.info pppoe[3920]: Resending...
    May  7 17:50:20 ? daemon.info pppoe[3920]: Resending...
    May  7 17:50:24 ? daemon.info pppoe[3920]: Resending...
    May  7 17:50:28 ? daemon.info pppoe[3920]: Resending...
    May  7 17:50:37 ? daemon.info pppoe[3920]: Sending PADI.
    May  7 17:50:40 ? user.info redial[3919]: WAN down. Reconnecting...
    
    Lots of these "Resending..." lines. Is my ISP to blame? It took 12 minutes to establish PPPoE (it did at 18:01) but I don't know if there are previous lines in the log, since the output of "View All Lines" starts with these lines pasted here - and does THIS fact mean that it crashed and the log started at this time? (again, assuming it rebooted on crash)

    I hope I made myself clear :tongue:


    EDIT: The connection dropped once more after being established at 18:01... really sounds like my ISP is to blame :mad:
     
  19. Toastman

    Toastman Super Moderator Staff Member Member

    Yes, something is screwed badly. Tomato does usually reboot if it crashes, though not always. Maybe your ISP as a DSLAM problem, it may clear later.
     
  20. sardaukar

    sardaukar Addicted to LI Member

    Can I do a grep for something in the logs to know if Tomato crashed? Like "unclean shutdown" or something?
     
  21. Toastman

    Toastman Super Moderator Staff Member Member

    Usually there won't be any entry - you can only tell by the uptime since it came back up. You can use the logging to send data to a monitor on your PC (google wallwatcher) which will log events leading up to the reboot, but generally it's not of any help at all. Our posts just crossed, I see you do that already...

    It'll start up with something like this:

    Jan 19 07:00:09 ruankaew-8 syslog.info syslogd started: BusyBox v1.14.0
    Jan 19 07:00:10 ruankaew-8 user.notice kernel: klogd started: BusyBox v1.14.0 (2009-04-15 12:23:08 PDT)
    Jan 19 07:00:10 ruankaew-8 user.warn kernel: CPU revision is: 00029008
     
  22. sardaukar

    sardaukar Addicted to LI Member

    I am forwarding the log to a syslog server in my LAN - isn't there a "booting up" message that I can look for?
     

Share This Page