dhcp-users Digest, Vol 33, Issue 8

Barry Stear bstear at gmail.com
Thu Jul 7 16:13:35 UTC 2011


Thank you for your replies everyone. I submitted this to the DHCP-HACKERS
list and still haven't heard anything.

Simon.. I don't have OpenWRT on my Router but I do have DD-WRT. I could not
find where I can assign another IP address to my router, at least not under
Setup | Basic Settings.Perhaps if you could point me in the right direction
there.

I figured this was a routing problem but I thought I wouldn't need a route
setup for the 100.X subnet since the 100.1 ip address is an alias of Eth0:1
on Eth1 on my linux box. I just want to make sure you understand that this
is ONE interface card so I thought any traffic from the 192.168.100.X subnet
would just need to have 192.168.100.1 assigned as a gateway and my linux box
would be doing the routing internally.

Maybe I am missing something the DHCP Handbook made it sound like there was
no routing configuration needed, and I believe actually said to not setup
routing.

Please reply directly to me because I seem to only be getting digests of
these emails (bstear at gmail.com)

Date: Wed, 6 Jul 2011 19:04:33 +0100
From: Simon Hobson <dhcp1 at thehobsons.co.uk>
Subject: Re: Unable to Ping / Shared Network
To: Users of ISC DHCP <dhcp-users at lists.isc.org>
Message-ID: <p06240803ca3a50531693 at simon.thehobsons.co.uk>
Content-Type: text/plain; charset="us-ascii" ; format="flowed"

Barry Stear wrote:

>I have my isc-dhcp-server setup as a shared network with two subnets that
>are using the same interface (eth0). ETH0 is connected to a 5 port switch
>which connects Linksys router. The problem I have is that I cannot ping
>anything on the internet when I receive an IP address in the 192.168.100.X
>subnet. I am unable to ping 192.168.1.2 from the 192.168.100.X subnet.
>
>  I tried changing the 'options routers' for the 192.168.100.X subnet to
>192.168.1.2 and that didn't make a difference.

Your problem is one of routing, not DHCP. In summary, EVERY device
should have a route available to it that will get packets to EVERY
other device in the network. For a simple non-shared network, local
devices can be reached via the ARP process - in effect, when a device
needs to talk to another it shouts out "192.168.1.7, where are you
?", and assuming it's there, the other device will respond with it's
MAC address, after which the two can chat away.

Once you have a shared network then things get harder. Without local
configuration on each device, they will need the assistance of a
router. With a router, the devices don't even need to know that they
are on a shared network - they just toss the packets at the router
and let it deliver them.
So a simple solution is to configure at least one dual homed device
(your DHCP server may well be a good candidate), turn on IP
Forwarding, and tell any other routers about the routes it can
handle. In fact, from your posted config, devices in the
192.168.100.0 subnet are already using this machine as their gateway.
So go to your Linksys router, and you'll find a page for setting up
static routes (from memory it's Setup (left hand tab) and Static
Routes (near the right of the sub-menu)). Simply tell it that
192.168.100.0/24 is reachable via 192.168.1.2 and things will
probably start working.

If you do this then packets do take a tortuous route :
 From 192.168.1.x to 192.168.100.y : packets got to the Linksys at
192.168.1.1, then to the server at 192.168.1.2, and then the the
other device.
In the reverse direction, there is one less hop : packets go to the
server at 192.168.100.1, but this knows about the locally connected
192.168.1.0 subnet and forwards it directly to the destination.


As already pointed out, it is even better if you can configure the
router with an address on both subnets. I don't recall seeing this on
Linksys routers, but you can definitely do it with OpenWRT if your
hardware supports that.


Yet another (high maintenance) method is to configure VERY device
with either an address in both subnets OR a static route for the one
it isn't a member of. I think it should be enough to tell a device on
192.168.1.x a static route of "192.168.100.0/24 via <interface>" -
and vice-versa for all devices on 192.168.100.0. They can then use
ARP to find each other. But you cannot do this via DHCP.
That's why advice is normally to "let the routers deal with it" - ie
you setup routers that can do it and the end devices need never know
any details.

--
Simon Hobson

Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed
author Gladys Hobson. Novels - poetry - short stories - ideal as
Christmas stocking fillers. Some available as e-books.

On Thu, Jul 7, 2011 at 5:00 AM, <dhcp-users-request at lists.isc.org> wrote:

> Send dhcp-users mailing list submissions to
>        dhcp-users at lists.isc.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>        https://lists.isc.org/mailman/listinfo/dhcp-users
> or, via email, send a message with subject or body 'help' to
>        dhcp-users-request at lists.isc.org
>
> You can reach the person managing the list at
>        dhcp-users-owner at lists.isc.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of dhcp-users digest..."
>
>
> Today's Topics:
>
>   1. Re: Adding host entry dynamically using dhcpctl functions (
>      dhcp      hungs ) (Glenn Satchell)
>   2. RE: Option 3 (Routing) does not appear for fixed-address
>      hostsafter        dhcp relay (Edward Aronovich)
>   3. Unable to Ping / Shared Network (Barry Stear)
>   4. Re: Unable to Ping / Shared Network (Dave Brenner)
>   5. Re: Unable to Ping / Shared Network (Simon Hobson)
>   6. Re: DHCP client not working (Simon Hobson)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Wed, 06 Jul 2011 22:35:37 +1000
> From: Glenn Satchell <glenn.satchell at uniq.com.au>
> Subject: Re: Adding host entry dynamically using dhcpctl functions (
>        dhcp    hungs )
> To: Users of ISC DHCP <dhcp-users at lists.isc.org>
> Message-ID: <4E145699.7030506 at uniq.com.au>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> On 07/06/11 06:56, Niall O'Reilly wrote:
> > On 05/07/11 14:21, Johnson koil Raj wrote:
> >> Any other way to reserve an IP to a Machine ( static IP configuration at
> >> DHCP server side) *not at the machine.*
> >
> >       Have you considered that, by design, the same address is used
> >       not only when the lease is renewed before it expires, but also
> >       on any later occasion when an address is requested for what
> >       appears to be the same machine (same uid, if any; otherwise
> >       same hardware address) UNLESS it was necessary to give away
> >       the address in order to satisfy a request from an unknown
> >       machine?  This should only happen when all addresses in the
> >       pool are marked 'used';  in this case, offering a 'free' address
> >       is preferred to refusing to offer any address.
> >
> >       Unless your pool is too small to accommodate the number of
> >       machines you're planning to serve, normal default lease
> >       management may be sufficient to meet your requirements.
> >
> >       If you feel that this approach still involves more risk
> >       than you're prepared to bear, you may find it useful to
> >       search the mail archives for "reserved lease" or the like.
> >
> >
> >       I hope this helps (and that I'm not mistaken).
> >
> >       Best regards,
> >       Niall O'Reilly
>
> Niall, I think you've got it right. A reserved lease is exactly what is
> needed here.
>
> A similar effect can be done by setting the lease time to be rather
> long, like a few months or a year. That way the client will be pretty
> sure to always use the same address.
>
> As for dhcpd hanging, I think this may be due to the main process
> waiting for the executed script to finish. But the executed script is
> waiting for dhcpd to respond to the dhcpctl_connect call. I believe this
> is called a "deadly embrace" :)
>
> The other disadvantage of your method is that it creates a host entry
> with a fixed-address that is part of the dynamic range. As has been
> mentioned many times before, this can lead to problems where dhcpd
> allocates the same dynamic address to another host and the static host
> is already using it.
>
> --
> regards,
> -glenn
> --
> Glenn Satchell                            |  Miss 9: What do you
> Uniq Advances Pty Ltd, Sydney Australia   |  do at work Dad?
> mailto:glenn.satchell at uniq.com.au         |  Miss 6: He just
> http://www.uniq.com.au tel:0409-458-580   |  types random stuff.
>
>
> ------------------------------
>
> Message: 2
> Date: Wed, 6 Jul 2011 17:23:39 +0300
> From: "Edward Aronovich" <eddiea at tau.ac.il>
> Subject: RE: Option 3 (Routing) does not appear for fixed-address
>        hostsafter      dhcp relay
> To: "Users of ISC DHCP" <dhcp-users at lists.isc.org>
> Message-ID: <CA6DD70F3F91A64091D3A658835979F359E1B3 at onyx.cs.tau.ac.il>
> Content-Type: text/plain;       charset="US-ASCII"
>
>
> >
> > Please copy and paste the config as it's defined, not what you've
> > mistyped above !
> >
> > But I see two problems :
> >
> > 1) You must NEVER have a fixed address which is part of a dynamic
> > pool. Sooner or later this will cause you problems. But that's not
> > your issue.
> >
> > 2) You should define the subnet options OUTSIDE of the pool like this
> :
> >
> > subnet 10.100.100.0 netmask 255.255.255.0 {
> >    pool {
> >      failover peer "lb-1";
> >      range 10.100.100.65 10.100.100.254;
> >    }
>
> That did the trick !
> The problem was the routing options were part of the pool and not of the
> subnet as it was suppose to be.
>
> Thank you,
> Eddie
>
>
> > The issue is that your fixed address assignment is not part of the
> > pool, therefore options defined in the pool are not applied to it. By
> > defining the options correctly in the subnet scope, they will be
> > inherited by your fixed address declaration.
> >
> > --
> > Simon Hobson
> >
> > Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed
> > author Gladys Hobson. Novels - poetry - short stories - ideal as
> > Christmas stocking fillers. Some available as e-books.
> > _______________________________________________
> > dhcp-users mailing list
> > dhcp-users at lists.isc.org
> > https://lists.isc.org/mailman/listinfo/dhcp-users
>
>
> ------------------------------
>
> Message: 3
> Date: Wed, 6 Jul 2011 09:10:09 -0700
> From: Barry Stear <bstear at gmail.com>
> Subject: Unable to Ping / Shared Network
> To: dhcp-users at lists.isc.org
> Message-ID:
>        <CAAAmp=buaO1hYWQsByFJE-7Po4p7ED--iBS9fYceEw-3=8JsBg at mail.gmail.com
> >
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi,
>
> I have my isc-dhcp-server setup as a shared network with two subnets that
> are using the same interface (eth0). ETH0 is connected to a 5 port switch
> which connects Linksys router. The problem I have is that I cannot ping
> anything on the internet when I receive an IP address in the 192.168.100.X
> subnet. I am unable to ping 192.168.1.2 from the 192.168.100.X subnet.
>
>  I tried changing the 'options routers' for the 192.168.100.X subnet to
> 192.168.1.2 and that didn't make a difference.
>
> Network Topology
> ------------------------
> Linkysys router (192.168.1.1) --->  5 Port Hub ---- > NIC Eth0
> (192.168.1.2)  /  ETH0:1 (192.168.100.1)
> Snippet from my configuration
>
> DHCP.CONF
> ----------------------
>
> option routers 192.168.1.1;
> one-lease-per-client true;
> get-lease-hostnames true;
>
> shared-network MYNET {
>
>   # trusted subnet
>  subnet 192.168.1.0 netmask 255.255.255.0 {
>  max-lease-time 172800;
>  default-lease-time 28800;
>
>  pool {
>  range 192.168.1.10 192.168.1.39;
>  option routers 192.168.1.1;
>  option domain-name-servers 192.168.1.2;
>  option subnet-mask 255.255.255.0;
>  deny unknown-clients;
>  }
>  }
>
>  # untrustedhosts
>  subnet 192.168.100.0 netmask 255.255.255.0 {
>  max-lease-time 28800;
>  default-lease-time 14400;
>
>  pool {
>
>  range 192.168.100.2 192.168.100.6;
>  option routers 192.168.1.1;
>  option domain-name-servers 192.168.100.1;
>  option subnet-mask 255.255.255.0
>  allow unknown-clients;
>  }
>  }
>  }
>
>
> My NIC is setup as follows :
>
> eth0
> ipv4 address : 192.168.1.2
> netmask 255.255.255.0
> broadbase 192.168.1.255
>
> eth0:1 Virtual
> ipv4 address : 192.168.100.1
> netmask 255.255.255.0
> broadcast 192.168.100.255
>
> According to a book I have called The DHCP Handbook I should not have to
> setup a route since it is setup as a shared network using a single NIC, i
> am
> unsure what I need to do to route the traffic to my Linksys router
> (192.168.1.1)
>
> Let me know if you need any other information..
>
> Any help is appreciated.
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> https://lists.isc.org/pipermail/dhcp-users/attachments/20110706/3c612eda/attachment-0001.html
> >
>
> ------------------------------
>
> Message: 4
> Date: Wed, 06 Jul 2011 09:58:15 -0700
> From: Dave Brenner <david at toledotel.com>
> Subject: Re: Unable to Ping / Shared Network
> To: dhcp-users at lists.isc.org
> Message-ID: <4E149427.2050808 at toledotel.com>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> On 7/6/2011 9:10 AM, Barry Stear wrote:
>
> > I have my isc-dhcp-server setup as a shared network with two subnets that
> > are using the same interface (eth0). ETH0 is connected to a 5 port switch
> > which connects Linksys router. The problem I have is that I cannot ping
> > anything on the internet when I receive an IP address in the
> 192.168.100.X
> > subnet. I am unable to ping 192.168.1.2 from the 192.168.100.X subnet.
> >
> >   I tried changing the 'options routers' for the 192.168.100.X subnet to
> > 192.168.1.2 and that didn't make a difference.
>
> If you have two subnets, then you need two gateways.  This is
> accomplished with a router that can have multiple IPs assigned to a
> given interface.  If your Linksys can do that, great.  Just have it
> answer on both 192.168.1.1 and 192.168.100.1 and call it good.  If it
> can't do that and you don't have a compelling reason to use a second
> subnet, then keep things simple and ditch the second subnet.
>
> --
> Dave Brenner - david at toledotel.com
> The Toledo Telephone Company, Inc.
>
>
> ------------------------------
>
> Message: 5
> Date: Wed, 6 Jul 2011 19:04:33 +0100
> From: Simon Hobson <dhcp1 at thehobsons.co.uk>
> Subject: Re: Unable to Ping / Shared Network
> To: Users of ISC DHCP <dhcp-users at lists.isc.org>
> Message-ID: <p06240803ca3a50531693 at simon.thehobsons.co.uk>
> Content-Type: text/plain; charset="us-ascii" ; format="flowed"
>
> Barry Stear wrote:
>
> >I have my isc-dhcp-server setup as a shared network with two subnets that
> >are using the same interface (eth0). ETH0 is connected to a 5 port switch
> >which connects Linksys router. The problem I have is that I cannot ping
> >anything on the internet when I receive an IP address in the 192.168.100.X
> >subnet. I am unable to ping 192.168.1.2 from the 192.168.100.X subnet.
> >
> >  I tried changing the 'options routers' for the 192.168.100.X subnet to
> >192.168.1.2 and that didn't make a difference.
>
> Your problem is one of routing, not DHCP. In summary, EVERY device
> should have a route available to it that will get packets to EVERY
> other device in the network. For a simple non-shared network, local
> devices can be reached via the ARP process - in effect, when a device
> needs to talk to another it shouts out "192.168.1.7, where are you
> ?", and assuming it's there, the other device will respond with it's
> MAC address, after which the two can chat away.
>
> Once you have a shared network then things get harder. Without local
> configuration on each device, they will need the assistance of a
> router. With a router, the devices don't even need to know that they
> are on a shared network - they just toss the packets at the router
> and let it deliver them.
> So a simple solution is to configure at least one dual homed device
> (your DHCP server may well be a good candidate), turn on IP
> Forwarding, and tell any other routers about the routes it can
> handle. In fact, from your posted config, devices in the
> 192.168.100.0 subnet are already using this machine as their gateway.
> So go to your Linksys router, and you'll find a page for setting up
> static routes (from memory it's Setup (left hand tab) and Static
> Routes (near the right of the sub-menu)). Simply tell it that
> 192.168.100.0/24 is reachable via 192.168.1.2 and things will
> probably start working.
>
> If you do this then packets do take a tortuous route :
>  From 192.168.1.x to 192.168.100.y : packets got to the Linksys at
> 192.168.1.1, then to the server at 192.168.1.2, and then the the
> other device.
> In the reverse direction, there is one less hop : packets go to the
> server at 192.168.100.1, but this knows about the locally connected
> 192.168.1.0 subnet and forwards it directly to the destination.
>
>
> As already pointed out, it is even better if you can configure the
> router with an address on both subnets. I don't recall seeing this on
> Linksys routers, but you can definitely do it with OpenWRT if your
> hardware supports that.
>
>
> Yet another (high maintenance) method is to configure VERY device
> with either an address in both subnets OR a static route for the one
> it isn't a member of. I think it should be enough to tell a device on
> 192.168.1.x a static route of "192.168.100.0/24 via <interface>" -
> and vice-versa for all devices on 192.168.100.0. They can then use
> ARP to find each other. But you cannot do this via DHCP.
> That's why advice is normally to "let the routers deal with it" - ie
> you setup routers that can do it and the end devices need never know
> any details.
>
> --
> Simon Hobson
>
> Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed
> author Gladys Hobson. Novels - poetry - short stories - ideal as
> Christmas stocking fillers. Some available as e-books.
>
>
> ------------------------------
>
> Message: 6
> Date: Wed, 6 Jul 2011 20:49:12 +0100
> From: Simon Hobson <dhcp1 at thehobsons.co.uk>
> Subject: Re: DHCP client not working
> To: dhcp-users at lists.isc.org
> Message-ID: <p06240804ca3a6c219b00 at simon.thehobsons.co.uk>
> Content-Type: text/plain; charset="us-ascii" ; format="flowed"
>
> Kishore Kumar Kakarla wrote:
>
> >Sorry, I have taken note of earlier reply from Steinar Haug. I was
> >thinking if something can be done from the client side instead of
> >changes of DHCP server / DHCP relay agent because I have no control
> >over DHCP server.
>
> Have you read your own message ?
>
> >  >DHCPv4 client package has been modified to use sockets by defining
> >>USE_SOCKETS in site.h of the includes directory so that it works for
> >  >ppp interface.
>
> This is the source of your issues, and it is in your power to deal
> with. It's  CLIENT issue, not a server issue, since you have modified
> the client. I think Steiner just missed that detail when mentioning
> server.
>
> --
> Simon Hobson
>
> Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed
> author Gladys Hobson. Novels - poetry - short stories - ideal as
> Christmas stocking fillers. Some available as e-books.
>
>
> ------------------------------
>
> _______________________________________________
> dhcp-users mailing list
> dhcp-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/dhcp-users
>
> End of dhcp-users Digest, Vol 33, Issue 8
> *****************************************
>



-- 
<a href="http://www.c28.com/?adid=st&iid=19467">
<img src="http://www.c28.com/images/banner_88x31.gif" border="0" width="88"
height="31"></a>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20110707/8bb6433e/attachment.html>


More information about the dhcp-users mailing list