LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 09-20-2004, 11:40 AM   #1
deice
LQ Newbie
 
Registered: Sep 2004
Distribution: Debian testing/sarge
Posts: 6

Rep: Reputation: 0
Red face 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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Static IP's with LAN/WAN nistur Linux - Networking 3 05-25-2005 05:01 PM
ADSL router / DHCP / Linux / Windows XP LAN shazam75 Linux - Networking 0 02-17-2005 05:17 AM
My laptop receives an IP via DHCP, but can't ping router or outside IP's! Max P0wer Linux - Networking 12 08-17-2004 05:45 PM
can i have both dhcp and static ip's ? mjenkins Linux - Networking 1 09-22-2003 09:29 AM
ADSL Router + Linux Router + LAN = HELP!!! linuxlois Linux - General 2 09-16-2003 08:24 AM


All times are GMT -5. The time now is 06:10 PM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration