dhcpd gateway settings

James Wilkinson fedora at aprilcottage.co.uk
Fri Apr 22 20:45:49 UTC 2011


Aaron Gray wrote:
> I am trying to set up a network and gateway on 192.168.1.x that I am using
> for BOOTP'ing servers.
<snip>
> But I cannot seem to get HTTP or other services to work on 192.168.1.x
>
> I have the existing 192.168.0.x network and was wondering how gateway
> requests should get from 192.168.1.x to 192.168.0.1 ?

I asked:
> How is this physically laid out?
>
> Are the two networks physically separate, and the gateway has two
> network cards (and hence is on both networks)?

Aaron replied:
> I have dhcpd running on a laptop with one network controller.
> 
> No, all on the same physical network.

I asked:
> Do you have forwarding turned on on the gateway?

Aaron replied:
> No

That might be a good place to start.

I asked:
> Does the gateway also have the connection to the Internet, or is this
> from another device?

Aaron replied:
> I want it to work as device 192.168.0.140

OK: I don’t quite think I understand this. Unless this is to be a
standalone network (and you mention Google, so…) something’s got to have
a connection to the Internet.

If the laptop has a connection of its own to the Internet (say a 3G
dongle or a USB ADSL modem), what you would want is something like this:

        Internet
            ^
            |
            |
          laptop
           /   \
          /     \
         /       \
192.168.0/24   192.168.1/24

Then all the devices on 192.168.0/24 should have 192.168.0.140 as their
gateway (assuming that’s the laptop’s IP address). You’d probably also
have NAT already turned on.

If, on the other hand, you’ve got a separate router (say an ADSL
router), then what you’ve got is something like this:

Internet <—–> router <—–> 192.168.1/24 <—–> laptop <—–> 192.168.0/24

Then you’ve got a problem for all the other devices on 192.168.1/24.
They know that anything on 192.168.1/24 is local, and should just be
sent on the local network. They “know” that anything else is on the
Internet, and should be sent to the router.

So, in particular, anything on 192.168.0/24 isn’t local to them, and
gets sent to the router, not the laptop.

What you need to do is to tell everything on 192.168.1/24 to use a
static route: packets to 192.168.0/24 should go to the laptop’s IP
address.

You might find it easier to get this working with static IP addresses
first, then replicate that with DHCP.

Hope this helps,

James.

-- 
E-mail:     james@ | "What is endlessly fascinating about US politics, you
aprilcottage.co.uk | think about the most insane thing that could happen -
                   | and something even crazier happens."
                   |     -- Doug Usher, pollster for John Kerry in 2004


More information about the users mailing list