Networking Forums

Networking Forums > Computer Networking > Linux Networking > DHCP relay and iptables

Reply
Thread Tools Display Modes

DHCP relay and iptables

 
 
Mark
Guest
Posts: n/a

 
      08-24-2010, 08:28 AM
Hello

I've got the scheme as follows:

host ---------------[eth0 device eth1]---------------dhcp server
(192.168.1.100)
eth0 192.168.2.1
eth1 192.168.1.1

The device runs embedded linux, where I set up DHCP relay from busybox
package (version 1.7.2 if it maters). The problem I'm having is that the
DHCP server sends responses to 192.168.2.1 (as I understood RFC2131, this is
valid behavior), but the device
is unable to route these packets on to eth0, which is strange.

So, the client behind 'eth0' sends DHCP discover from port 68 to port 67,
it's fine; the DHCP relay relays the query via eth1 from port 68 to 67 -
makes sense, the server responds from 192.168.1.100:67 to 192.168.2.1:67
(RFC says this is also a valid beahavior). But anyway, the response never
reaches dhcp relay listening socket on interna; interface eth0.

What am I doing wrong?

--
Mark

 
Reply With Quote
 
 
 
 
Tauno Voipio
Guest
Posts: n/a

 
      08-24-2010, 04:41 PM
On 24.8.10 11:28 , Mark wrote:
> Hello
>
> I've got the scheme as follows:
>
> host ---------------[eth0 device eth1]---------------dhcp server
> (192.168.1.100)
> eth0 192.168.2.1
> eth1 192.168.1.1
>
> The device runs embedded linux, where I set up DHCP relay from busybox
> package (version 1.7.2 if it maters). The problem I'm having is that the
> DHCP server sends responses to 192.168.2.1 (as I understood RFC2131,
> this is valid behavior), but the device
> is unable to route these packets on to eth0, which is strange.
>
> So, the client behind 'eth0' sends DHCP discover from port 68 to port
> 67, it's fine; the DHCP relay relays the query via eth1 from port 68 to
> 67 - makes sense, the server responds from 192.168.1.100:67 to
> 192.168.2.1:67 (RFC says this is also a valid beahavior). But anyway,
> the response never reaches dhcp relay listening socket on interna;
> interface eth0.
>
> What am I doing wrong?



BOOTP and DHCP are local network protocols. They live on local
net broadcasts, and this is not designed to pass routers without
extra means in the routers.

If you need to pass a DHCP interchange between 'host' and 'dhcp server',
you need a DHCP proxy in the box with 'eth0' and 'eth1'.

--

Tauno Voipio
tauno voipio (at) iki fi

 
Reply With Quote
 
Tauno Voipio
Guest
Posts: n/a

 
      08-24-2010, 05:17 PM
On 24.8.10 7:41 , Tauno Voipio wrote:
> On 24.8.10 11:28 , Mark wrote:
>> Hello
>>
>> I've got the scheme as follows:
>>
>> host ---------------[eth0 device eth1]---------------dhcp server
>> (192.168.1.100)
>> eth0 192.168.2.1
>> eth1 192.168.1.1
>>
>> The device runs embedded linux, where I set up DHCP relay from busybox
>> package (version 1.7.2 if it maters). The problem I'm having is that the
>> DHCP server sends responses to 192.168.2.1 (as I understood RFC2131,
>> this is valid behavior), but the device
>> is unable to route these packets on to eth0, which is strange.
>>
>> So, the client behind 'eth0' sends DHCP discover from port 68 to port
>> 67, it's fine; the DHCP relay relays the query via eth1 from port 68 to
>> 67 - makes sense, the server responds from 192.168.1.100:67 to
>> 192.168.2.1:67 (RFC says this is also a valid beahavior). But anyway,
>> the response never reaches dhcp relay listening socket on interna;
>> interface eth0.
>>
>> What am I doing wrong?

>
>
> BOOTP and DHCP are local network protocols. They live on local
> net broadcasts, and this is not designed to pass routers without
> extra means in the routers.
>
> If you need to pass a DHCP interchange between 'host' and 'dhcp server',
> you need a DHCP proxy in the box with 'eth0' and 'eth1'.



Oops - my bad. I did not read the question well enough.

Trace the packets (tcpdump, Wireshark) and check that
the relay agent field 'giaddr' is set up corrctly. The server
should respond to the relay agent, using the agent's IP.

--

Tauno Voipio
tauno voipio (at) iki fi

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How DHCP decide which scope to give thourgh dhcp relay agent? cs Windows Networking 3 01-04-2007 03:48 AM
DHCP Relay and 2003 DHCP Server AndrewZirkel@gmail.com Windows Networking 12 11-08-2005 10:55 PM
DHCP Scopes with Cisco dhcp-relay Matthew Reath Linux Networking 1 08-18-2004 09:02 AM
DHCP Scopes with Cisco dhcp-relay Matthew Reath Linux Networking 0 08-18-2004 02:12 AM
dhcp relay? Nick Linux Networking 5 01-15-2004 05:06 AM



1 2 3 4 5 6 7 8 9 10 11