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

University Network DHCP

Discussion in 'Networking Issues' started by NickCatal, Dec 1, 2005.

  1. NickCatal

    NickCatal Network Guru Member

    I am going to try to explain this the best I can quickly.

    Alright. I am running my brand new WRT54GS v4 with the latest Beta 2 DD-WRT on a university network. I have it setup so that it is not broadcasting DHCP and Port 1 is up linked to the building. Thus, I am assigned IPs from the university's DHCP server and not my routers (as is university policy, as authentication is entirely MAC based). The university assigned me a 172.16.x.x address to use as my local IP address.

    The problem I am having is that the only way for me to access this router is by changing the settings on my computer to set the 172.16 address as the gateway and then assign my own static IP (temporarily). It is network policy that you can not use Static IPs (at least permanently). When I set my computer up like this then I can no longer access the internet. All the while, my WRT54GS does not have ANY connectivity to the outside network.

    I want to be able to use my router in AP Mode while still having a control panel & shell to log into...

    What do I do?
  2. raistphrk

    raistphrk Network Guru Member

    As long as your router is on the same subnet as you, and both the router and host PC have the same default gateway, you shoudn't have any problems. Could you be a little more specific about your configuration (ie, ip address and subnet mask)? Even if you want to put some variables in there, troubleshooting is going to be more difficult if we don't know how the network is set up. Can you ping your router? If you run a packet sniffer when you assign the static IP, are you seeing any arp traffic? When you connect to the wireless network via the access point, is it pulling a DHCP lease properly from the university DHCP server, or does it time out? Is the router set up in router mode, or gateway mode (advanced routing tab)?

    As I understand things now, this is how the network is set up (using made-up IPs):

    Host PC /16 (assigned by DHCP)
    Linksys router: /16 (assigned by DHCP)
    Gateway: /16
    DHCP: /16

    If you're on a /16 network, you should be able to access the router configuration directly from your host PC, since they're both on the same subnet, unless your university routers are set up to block internal servers. All the router is really doing is acting as a switch, so it really shouldn't matter that the router isn't your gateway.

    If any of that didn't make sense, chalk it off to another long day of work.

    Anywho, good luck.
  3. NateHoy

    NateHoy Network Guru Member

    Maybe I'm missing something here, but couldn't you simply spoof the MAC address of your laptop or main computer into the router, then use NAT to build a local network that has whatever computers you want in it?

    How would the University even know (or why would they care) that your "computer" is actually a router?
  4. raistphrk

    raistphrk Network Guru Member

    If the network registration system doesn't check anything but MAC after the computer is registered, then yes. However, if it also does some sort of OS check, then it wouldn't work. Not knowing what system they are using, I'm not sure what checks will be used for authentication, but considering his PC has been registered already, then yes - spoofing the MAC on the WAN side, running a DHCP and private network on the LAN, and using NAT through the WAN interface should work fine. However, he needs to make sure he's using the MAC for a wired NIC - if he uses a wireless MAC, and uses another university access point, he'll have problems.
  5. 4Access

    4Access Network Guru Member

    Just posting here so I can easily monitor the topic... thanks raistphrk for pointing me to this (mostly) duplicate thread. (Thread I originally responded to: here)

    The summaries in your two posts are slightly different...

    This post summary:
    Other thread summary:
    Since I read the summary immediately above first I originally thought that when you said the following: "but still have it visible to the internet" you wanted to have your router visible from the internet. Now after having read this thread I'm thinking that you might have been trying to say the same thing in both summaries.... namely that you want your PC to have access to the internet while also being able to administer your router...

    In that case what raistphrk posted is correct. As long as both your router and your PC have addresses in the same subnet you should be able to both surf the net & administer your router without doing any reconfiguration.

    But I'm now thinking that maybe your school is requiring that you configure your router with an IP address in the 172.16.x.x subnet while they are giving out DHCP addresses to PCs in another subnet like 10.x.x.x

    If that's the case then personally I'd probably just try cloning your PC's MAC address to the WAN port on your WRT and then try connecting your WRT to the school's network using the WAN port to see if it can't lease the 10.x.x.x IP address. If it does then you'll be able to use the WRT as a router and have your PC lease a 192.168.1.x IP address from your WRT like most configurations.

    Of course you have to evaluate the repercussions if this violates the school's acceptible use policy and they discover you doing so.
  6. NickCatal

    NickCatal Network Guru Member

    When I have it setup in Gateway mode (where the WAN port is being used) it is assigned an IP from the school (I had them add the mac addy for me.) The IPs being leased are globally routable addresses in the University's IP range.

    What I want to have is where a student who wants to log into my open access point is assigned an IP from the school's DHCP servers. Right now it is set up like this (port 1 is up linked to the school's servers and DHCP is turned off).

    BUT I also want to be able to administrate the router by simply accessing it through the IP address the school is assigning it.
  7. NickCatal

    NickCatal Network Guru Member

    Essentially, I want the router to act both as if it were another computer on the network as well as an access point...

    And they would care because I am leaving it rather open and I don't want people who are using it who may share files or do something else to get pegged because the data came from an IP that was assigned to me...

    Sorry for dupe posting this... I wasn't getting a response on the other thread and figured it was worth posting in the correct forum...
  8. 4Access

    4Access Network Guru Member

    Like raistphrk said the only way we're going to be able to help you is if you tell us the IP info...

    When the router is connected to the school's network using a LAN port we need to know the following:

    1. LAN IP address & subnet mask of the WRT.
    2. The IP address & subnet mask (or general subnet info) of addresses being assigned to computers by the school's DHCP server.
  9. NickCatal

    NickCatal Network Guru Member

    The LAN IP address & subnet mask of the router is the default... and ... the school WANTS me to change it to and ... They will NOT under ANY CIRCUMSTANCES give me a static IP other than ... If I want a globally routable IP I need to get it from their DHCP server...

    The IP of my computer right now is , subnet mask of , with the gateway & dhcp server being and the DNS server being and ... The DHCP server was assigning my router back when I had it in Gateway/NAT mode...

    I have the ear of the main network guy, who is willing to give me all the information necessary to make sure this works (well, perhaps not the password on the switch in the closet)
  10. 4Access

    4Access Network Guru Member

    So if we could get the WRT to assign it's LAN IP address by using the school's DHCP server you might be in business?
  11. raistphrk

    raistphrk Network Guru Member

    Theoretically, that's possible, but to do that, you'd need to ONLY be using the LAN ports - which makes things really screwy. You can't use a DHCP server on the WAN side to assign IP addresses inside the LAN; DHCP would be going through a NAT, which isn't possible, because DHCP would see the MAC of the router in the request, rather than the MACs of the internal clients. You're definitely going to have to use a modified firmware such as HyperWRT or DD-WRT.

    The only way I can think of to get the router to assign a dynamic address to the LAN VLAN to write a startup script that calls dhclient (or whatever the DHCP client happens to be; I'm a FreeBSD guy mainly, so I don't know what Busybox has in it) on the LAN interface instead of assigning it a static IP address...and I'm not even sure that's possible.

    As I mentioned in another thread, I've basically spent all week trying to get a WRT54GS to work with a SonicWall properly ONLY using the LAN ports, without much success. The SonicWall didn't have a DHCP server running, and you're university does, so that might make enough of a difference to make things work.

    I'm half asleep right now, so I can't really do any scripting, but if I have time tomorrow at my office, I'll take a look at this again and see if I can help out.
  12. NickCatal

    NickCatal Network Guru Member

    That sounds right...
  13. NickCatal

    NickCatal Network Guru Member

    That sounds right, and I really like DD-WRT's web interface...

    If you could help, that would be great. I'm sure it could be of help to others as well...
  14. 4Access

    4Access Network Guru Member

    Hmm... well I was hoping simply launching:

    udhcpc -i br0 -b -s /sbin/rc

    would do the trick but it doesn't seem to work. The udhcpc man page can be found here if you want to play with it more.

    The reason I chose to specify /sbin/rc as the script file is because when udhcpc is used for the WAN interface it specifies /tmp/udhcpc as the script file and /tmp/udhcpc is nothing more than a symlink to /sbin/rc
  15. NickCatal

    NickCatal Network Guru Member

    Thanks for your try, please post if you think of anything else.

    Anyone else?
  16. NickCatal

    NickCatal Network Guru Member

    Would physically plugging an ethernet cable between say Port 2 and the WAN link (with Port 1 being plugged into the University) work?
  17. NickCatal

    NickCatal Network Guru Member

    Problem Solved!

    Just had to plug the WRT54G's WAN port into one of the LAN ports using an actual wire...

    now if only there was some virtual way of doing this... or, even better, having the local IP dynamicly assigned...
  18. 4Access

    4Access Network Guru Member

    Ha! :grin: Sometimes the simplest solutions are the most brilliant! I'm actually posting this from a PC connected to a router hooked up exactly the way you suggest! Nice one!

    Things to keep in mind:

    1. You will need to make sure you disable the DHCP server in the WRT!

    2. You will need to enable Remote Administration if you want to admin the router using the IP address leased from the school.

    3. You are only left with 2 LAN ports free for actually connecting computers to the router. Not a bad price to pay for such an easy solution!

    I'm still convinced that other options exist such as moving all the LAN ports and the WAN port into a new bridge but why spend the time now! :thumb:

Share This Page