dhcpd gateway settings

Tim ignored_mailbox at yahoo.com.au
Sat Apr 23 01:20:49 UTC 2011


Aaron Gray:
> I want the laptop to serve as a gateway between the 192.168.0.x and
> 192.168.1.x subnets, so it can serve BOOTP and TFTP to provide PXE
> booting for diskless servers.

It doesn't *have* to be the gateway to do that.  It can merely be a
server on the LAN.

The only thing that has to be a gateway is that which sits between the
two halves of the network.  And I do mean *between*, as it's an
obstacle, not just something else on the same network.

If the computers on the 192.168.0 and 192.168.1 subnets are actually
sharing a switch/router where they can directly talk to each other, then
they don't need something acting as a gateway.  And you could change the
netmask to 255.255.0.0.

It all depends on whether you're trying to enforce a segregation, or
just get two different IP address ranges communicating together.


James Wilkinson:
>> 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

> yep, but all on one physical network.

I have to wonder why do you want 192.168.XXX. subnetting, then?

If it's not actually separated by hardware, you can't *enforce* separate
networks just by putting in different IPs.


>> 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.

> ?

Anything on the 192.168.0 subnet has to go through the 192.168.0
gateway, and *that* gateway has to have access to whatever it needs
(e.g. the WWW, if necessary).

Likewise, everything on the 192.168.1 subnet has to go through the
192.168.1 gateway, and *that* gateway has to have access to whatever it
needs (e.g. the WWW, if necessary).

It gets complicated if one of the gateways has to go through the other.

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

> I need DHCP to serve the BOOTP protocol, so static IP's other than the
> laptops don't really help.

In general, you give all your servers (computers, routers, whatever)
fixed IPs, and one of them doles out the dynamic ones ones.  So, I'm
presuming you've already done that.

Now, to test that your network actually works, before bashing your head
against a brick wall in configuring your DHCP/BOOTP servers, try
configuring some clients, by hand, with static IPs, and check that they
actually work.  If they don't, you've got a networking issue to resolve,
first.  If they do, it's only your DHCP/BOOTP servers you need to fix.

-- 
[tim at localhost ~]$ uname -r
2.6.27.25-78.2.56.fc9.i686

Don't send private replies to my address, the mailbox is ignored.  I
read messages from the public lists.





More information about the users mailing list