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

WRT54GL: Wan needs two ip's

Discussion in 'Networking Issues' started by krijn1985, Apr 2, 2008.

  1. krijn1985

    krijn1985 Addicted to LI Member


    I've got a problem with my router to get the desired configuration. Before I can ask the question i need to explain how our network is situated:

    In my room I've got an Ethernet wall-out let. If i put this cable into my computers network card my mac address is going to be registered on a LAN here on campus.
    This IP is in the 172.20.x.x range. I've got a static network IP depending on my Mac address.
    If i want to use internet i use an PPoE connection on the same network card and I get another IP for use on internet 145.122.*.*

    So basically it comes down to the fact my WAN port needs to get two IP adresses.

    I've cloned my mac adrress from my computer to my WAN port and if i put the connection type on DHCP it will get my LAN IP address, but then I can't use PPoE.
    If I select PPPoE and I connect, my PPoE is connected with the right IP address, but it seems that I can't load any web page. (windows says there is an gateway connected).

    My question is how is it possible to let my WAN port get on the LAN and then use PPPoE on top of it?

    I've installed Tomato v1.17 at the moment. But willing to try anything to get this work.

    If anything is unclear please let me know.
  2. HennieM

    HennieM Network Guru Member

    Don't know if I understand quite correct, but your problem seems to be routing, complicated by NAT on your router. I can't help you, but maybe a setup explanation would help. It seems you have this:

    PC (192.168.1.x) --- ( LAN-NAT-router-WAN (172.20.x.x) --- (172.z.x.y) campusLAN [no internet connection anywhere on this LAN]

    on top of this you now have

    PPPoE-PC (145.122.y.z over 192.168.1.x) --- through-your-NATted-router--- PPPoE-server --- internet

    The 145.122.y.z address you get on the PPPoE connection is an internet IP address, so it is, or should be, like a direct connection to the internet.

    I would, once the PPPoE is connected, do a
    tracert www.google.com
    (or some other web address) and see which path the packets take. Hopefully from this, you could modify the Win PPPoE connection parameters, or do some manual routing on the Win PC.
  3. krijn1985

    krijn1985 Addicted to LI Member

    My idea is actually that PPPoE (145.122.y.z) is coming from my router. Because i want to share this connection with my windows mobile devices and some laptops from roommates.

    I did a tracert when my computer was connected and with my router. I could ping IP addresses but the DNS looked like it wasn't working. Is there a way to manualy input an DNS server for PPPoE. The reason that the DNS server isn't working may has to do with the fact my router isn't recognised/signed on to our LAN.

  4. HennieM

    HennieM Network Guru Member

    OK, now we're getting somewhere. There are many possibilities, but I'd take a wild guess that you have WinXP on your computer, and this would be your most likely solution:

    Your PC must only talk to the router for DNS. Thus, your router must function as a DNS forwarder. In order for the router to function as a DNS forwarder, it (the router) must get the address of one or more real DNS servers when it connects with PPPoE to the PPPoE server.
    Alternatively, if the PPPoE server does not supply a DNS server address on connect, you could manually enter an address for a DNS server in Tomato.

    More detail:
    1) Check that your computer gets an IP address (like 192.168.1.x) from your router. [This has no bearing yet on having any connection whatsoever from your router to the internet or the campus network.] Also check that your computer gets your router's IP address (most likely as its DNS server, and as its gateway. You can check so by running, in a DOS prompt
    ipconfig -all

    [We'll assume the above is so]

    2) Now check your router: WAN connection set for PPPoE: on Tomato's Advanced > DHCP/DNS page, it should have "Use Internal Caching DNS Forwarder" checked.

    If now you let your router connect, and try some DNS query from your PC, like this:
    In a DOS prompt:

    It should now show something like this:
    Default Server:  somename.somedomain
    If the address shown is not that of your router, go back to (1) above.
    Now type

    If this name does not resolve, your router is most likely not getting a DNS server address. Do this:
    On Tomato's Basic > Network page, type in a DNS server address under LAN > Static DNS, and try the nslookup again.

    The DNS server address used by the router can be any valid DNS server, but you would want one close to you, so DNS queries resolve quickly.
    If you want to use the DNS server that your PC uses when you use your PC to connect PPPoE, let the PC connect, and then use "ipconfig -all" to find out which DNS server it uses, and type that address into Tomato.
  5. krijn1985

    krijn1985 Addicted to LI Member

    At the moment of writing I got my router online with pppoE.
    The funny thing is in IPconfig -all my internet connection doesn't seem to have a DNS. It probably used the DNS from our campus network, but because I'm not on the campus network this won't work. I've found the DNS server from our university (which provides our internet) and it works.

    (by the way i've given the computer a static IP address. Now the main thing that remains is how to get the network shares to work. Is there a possibility to route a DHCP request from my computer to the WAN port?

    There may be two options for this:

    1. My network card requests an IP and is tunneled through to our network (so my mac address is send to the network), but this may give troubles with accessing my router because my network card IP will be: 172.20.x.y

    2. I make use of the two network cards like this:

    networkcard ---->router ---> internet
    networkcard----->router(gives DHCP reqeust to LAN) ----> network

    so the second networkcard (the card with the macaddress known to our campusnetwork get his IP from the network DHCP server.

    I obviously prefer the first option.
  6. HennieM

    HennieM Network Guru Member

    Don't quite understand which network shares you want to get working? Your other PCs connected to your router, or other PCs on the campus net? As the former should work already, I assume it is the latter - try this (which I'm not sure if it would work):

    telnet or ssh to your Tomato router.
    ps w
    see if you get an entry similar to this:
    1887 root        396 S   pppoecd vlan1.....
    If so, your PPPoE connections is done over virtual network interface vlan1, so we try to configure vlan1 with the address/netmask you usually get on your campus net, like this
    ifconfig vlan1 172.20.x.x netmask 255.a.b.c
    Now, when your PC tries to talk to a host on the campus net, the router should send that through vlan1, and when your PC tries to talk internet, the router should send it through the PPP interface over vlan1.

    I'm no fundi w.r.t. vlans, so the suggested setup may not work at all. Once you have the interfaces configured, try some tracerts as suggested originally, and see if your packets take the right route.
  7. krijn1985

    krijn1985 Addicted to LI Member

    I've got it working with some extra help for the exact commands.

    Thnx for your help.
  8. HennieM

    HennieM Network Guru Member

    Good on you. If you got it working, and want to make it work every time the router starts, you can put the sequence of commands into a init- or other script under Administration > Scripts.

Share This Page