Networking Forums

Networking Forums > Computer Networking > Linux Networking > Simple dhcrelay question

Reply
Thread Tools Display Modes

Simple dhcrelay question

 
 
Andy Richardson
Guest
Posts: n/a

 
      05-19-2005, 09:18 PM
Hi folks,

How does a dhcp server figure out what subnet clause to use for
assigning ip addresses when the originating NIC knows nothing about itself?

Does it work it out from the netmask of the very first router interface
that the dhcp discover hit?

thanks

--
Andy Richardson

We need Linux, like dolphins need a hole in the head.
 
Reply With Quote
 
 
 
 
Horst Knobloch
Guest
Posts: n/a

 
      05-19-2005, 10:57 PM
Andy Richardson <(E-Mail Removed)> wrote:

> How does a dhcp server figure out what subnet clause to use for
> assigning ip addresses when the originating NIC knows nothing about
> itself?
>
> Does it work it out from the netmask of the very first router interface
> that the dhcp discover hit?


No. The dhcp server knows this because this information
was provided by configuration. Google for ISC dhcpd and
have a look to the documentation of the config files.

Ciao, Horst
--
»When pings go wrong (It hurts me too)« E.Clapton/E.James/P.Tscharn
 
Reply With Quote
 
prg
Guest
Posts: n/a

 
      05-20-2005, 12:18 AM

Andy Richardson wrote:
> Hi folks,
>
> How does a dhcp server figure out what subnet clause to use for
> assigning ip addresses when the originating NIC knows nothing about

itself?
>
> Does it work it out from the netmask of the very first router

interface
> that the dhcp discover hit?


Assuming the server is not _on_ the subnet, but using a relay ...

IIRC, it's this (from RFC 951):
http://www.faqs.org/rfcs/rfc951.html
[q]
If a gateway [ie., relay agent] does decide to forward the request, it
should look at the 'giaddr' (gateway IP address) field. If zero, it
should plug its
own IP address (on the receiving cable) into this field.
[eq]

Thus, the server knows on what subnet the request originated.

hth,
prg
email above disabled

 
Reply With Quote
 
Andy Richardson
Guest
Posts: n/a

 
      05-20-2005, 11:00 PM
Thanks guys
(I didn't mean netmask originally anyway. oops)


Thanks especially for the rfc 951. I've read down to about section 8
and my head was starting to hurt. It all makes good sense though. I'll
try again in the morning.
I like the writing style. I must start visiting RFC's. I knew they
existed but assumed that they would be very dry and stiff.


Thanks again.
--
Andy Richardson

We need Linux, like dolphins need a hole in the head.
 
Reply With Quote
 
purple_stars
Guest
Posts: n/a

 
      05-21-2005, 03:00 PM
dry and stiff ? the rfc's ? you obviously haven't read rfc 1149,
"Standard for the transmission of IP datagrams on avian carriers"

http://www.faqs.org/rfcs/rfc1149.html

 
Reply With Quote
 
Horst Knobloch
Guest
Posts: n/a

 
      05-21-2005, 06:03 PM
Andy Richardson <(E-Mail Removed)> wrote:


> Thanks especially for the rfc 951. I've read down to about section 8
> and my head was starting to hurt. It all makes good sense though. I'll
> try again in the morning.
> I like the writing style. I must start visiting RFC's. I knew they
> existed but assumed that they would be very dry and stiff.


Ok. That's good because then you aren't that frustrated
when I say that you need to read for DHCP the RFC 2131. ;-)

However the good thing is that DHCP is the bigger brother
of BOOTP and they are similar since DHCP is based on
BOOTP. DHCP was designed in a way that it can also serve
BOOTP clients.


Ciao, Horst
--
»When pings go wrong (It hurts me too)« E.Clapton/E.James/P.Tscharn
 
Reply With Quote
 
zhaoyao73_ca@yahoo.ca
Guest
Posts: n/a

 
      05-21-2005, 11:58 PM
if dhcp messages were relayed, there will be an option gateway, server
will do longest match. gateway address will be the interface address
where the packet come from.

 
Reply With Quote
 
Andy Richardson
Guest
Posts: n/a

 
      05-22-2005, 02:37 PM
>dry and stiff ? the rfc's ? you obviously haven't read rfc 1149,
>"Standard for the transmission of IP datagrams on avian carriers"
>
>http://www.faqs.org/rfcs/rfc1149.html


I don't want one of them avian carrier masts near my home. Hell, just
think of all those critters trying to er... "rapidly gain height by
losing ballast" ... over my car windscreen.


> Ok. That's good because then you aren't that frustrated
> when I say that you need to read for DHCP the RFC 2131. ;-)


Bye 'eck , forget reading it fresh in the morning, I'll need a long
weekend to get through that lot. Still, the UK has a bank holiday coming
up - quiz me after that. ;-)


--
Andy Richardson

We need Linux, like dolphins need a hole in the head.
 
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
Simple Question John Carroll Home Networking 5 12-02-2006 03:56 PM
Simple Question Marco Roberto Gonçalves Junior Wireless Networks 0 07-10-2006 07:10 PM
a simple question richard noel fell Linux Networking 5 04-17-2005 04:33 AM
DHCPd / dhcrelay problems. Phill Harvey-Smith Linux Networking 0 05-27-2004 02:26 PM
Simple question... MacDaddy Wireless Internet 7 12-01-2003 06:36 PM



1 2 3 4 5 6 7 8 9 10 11