help :giaddr

Randall C Grimshaw rgrimsha at syr.edu
Thu Oct 16 13:06:15 UTC 2008


Having the layer2 switch relay dhcp can also cascade a bit if you have
many switches in a broadcast domain. Imagine 10-15 discovers,offers,....

Randy

-----Original Message-----
From: dhcp-users-bounce at isc.org [mailto:dhcp-users-bounce at isc.org] On
Behalf Of Chuck Anderson
Sent: Thursday, October 16, 2008 8:33 AM
To: dhcp-users at isc.org
Subject: Re: help :giaddr

On Thu, Oct 16, 2008 at 05:23:16PM +0530, abhijit khadatare wrote:
> client----->layer2-[switch]----->[if0]router[if1]-------[isc]dhcp
server
> 
> layer2 switch is manager switch----192.168.1.46/24
> router interface0 -----192.168.1.1/24
> router interface 1---192.168.2.5/24
> dhcp server ------192.168.2.1/24
> i'm putting giaddr as layer2 switch which is 192.168.1.46

You generally don't need to use a Layer2 switch as a relay agent, 
because Layer2 switches forward broadcast packets by default.  Why 
don't you put one relay agent on the router instead?  That is a more 
standard set up.

>  PROBLEM  is discover is reached upto the server ,but we dont get any
offer
> routing table is as below
> #route -en
> Kernel IP routing table
> 192.168.2.0     0.0.0.0         255.255.255.0   U         0 0
0
> eth1
> 192.168.0.0     0.0.0.0         255.255.255.0   U         0 0
0
> eth0
> 0.0.0.0         192.168.0.1     0.0.0.0         UG        0 0
0
> eth0

The server needs to have some kind of route to all the client networks 
that it serves DHCP to.  Ususall this is by having a default route 
(0.0.0.0) to a router that has a route to every part of the LAN.  In 
your case, you have a default route through 192.168.0.1.  You haven't 
shown that device in your network diagram.  Does 192.168.0.1 have a 
route to every part of the LAN including 192.168.1.0/24?

> but when i add static route for 192.168.1.1 on server
> 
> #route -en
> Kernel IP routing table
> Destination     Gateway         Genmask         Flags   MSS Window
irtt
> Iface
> 192.168.2.0     0.0.0.0         255.255.255.0   U         0 0
0
> eth1
> 192.168.1.0     0.0.0.0         255.255.255.0   U         0 0
0
> eth1
> 192.168.0.0     0.0.0.0         255.255.255.0   U         0 0
0
> eth0
> 0.0.0.0         192.168.0.1     0.0.0.0         UG        0 0
0
> eth0

That makes no sense.  You've told the server that 192.168.1.0/24 is a 
directly connected subnet, but its not.  It should be something like 
this instead because the next hop torwards 192.168.1.0/24 is the 
router if1:

192.168.1.0     192.168.2.5       255.255.255.0   UG         0 0
0 eth1

> then we got offer we saw on wireshark that
> discover   from 192.168.2.5 to 192.168.2.1
> offer from 192.168.2.1 to 192.168.1.46
> port unreacheable..

I see that you are doing something special that requires you to use a 
Layer2 relay agent--setting Relay Agent Infomration Option (option 82 
based on which switch port the client is coming from?).

Is the relay agent configured on the Layer2 switch to accept DHCP 
packets on 192.168.1.46?  Port unreachable usually means that nothing 
is listening on the destination port, which in this case I think would 
be 67/udp or 68/udp (I don't remember which).

I think you still need a Layer3 relay agent on the router even if you 
use a Layer2 relay agent as well.



More information about the dhcp-users mailing list