howto relay ISPs dhcp ip's though linux router to LAN
hi, i have a problem with figuring out how to accomplish this.
my situation:
i have an ADSL ISP, that supplies me with 5 public IP addresses through DHCP via a bridged atm connection. i've put a the ADSL modem into the linux router and attached it via an 10/100Mbit ethernet controller to my LAN. the server gets its IP address via dhcp also.
what i'm trying to accomplish:
i've been trying by all means imaginable to me get this network arranged so that my linux router routes traffic between my LAN and the ISP:s gateway without any masquerade/nat being done (this is because my lan has a few other servers and i want them to have full access to the internet both up and downband). also i would prefer if the machines in the lan were configured with their public IP address ie. one that's supplied by the ISP's dhcp server.
i used to run this system with Bridging in the linux router, but now i want to move to real routing. everything worked perfectly with bridging, the bridge-server got its ip from the isp's dhcp and also routed all my lan machine dhcp requests (and all other traffic) to the isps server, allowing them to get public ip's.
now i've switching to ip forwarding, and i've got it working with masquerading lan ip addresses, but this doesn't accomplish what i'm attempting.
i can't seem to get dhcp working through the linux-router. i've tried using dhcrelay to relay dhcp requests from my lan to the isp dhcp server, but the isp server seems to be refusing the relayed request, it never replies to it, atleast when monitoring bootpc and bootps port traffic with tcpdump.
i've thought of two reasons why it doesn't work:
(1) the isp server refuses dhcp request that aren't broadcast, but are set with a specific destination and source ip address, unlike normal dhcp queries which originate from 0.0.0.0 and are broadcast (255.255.255.255).
(2) that dhcrelay somehow conflicts with dhclient that sets the servers ip address, and doesn't work because of that, although i think nr1 more likely, because of what i saw (or didn't see) in tcpdump.
the second thought i had was to use virtual interfaces on the ADSL interface to reserve all 5 public IP's to the linux-router and then use dhcpd to give the same ip's to the LAN segment machines and do 1-to-1 NAT:ting (ie. nas1:0 would be routed to the machine on the LAN that has the same ip)or something similar to accomplish network routing. the problem here is that dhclient doesn't seem to work very well with virtual interfaces and refuses to get a new ip for them. also i couldn't figure if dhcpd can somehow figure which ip's to distribute from those configured to specific interfaces.
hope theres someone with more experience in this field who can shed some light on how to get where i want to go, i'm starting to be out of ideas.
oh yeah: i'm using Debian testing/sarge with 2.4.27 kernel, iptables and i'm using version 3.0.1-1 version of the dhcp3 packages from apt (ISC's dhcp-server, client and relay)
thanks in advance,
//deice
// an intermediate linux sysadmin
Last edited by deice; 09-20-2004 at 11:46 AM.
|