[afnog] config dhcp

Dany Mustapha cristophe06 at yahoo.fr
Thu Sep 25 22:42:06 UTC 2008


thanks so much i will try it

--- En date de : Jeu 25.9.08, Geert Jan de Groot <GeertJan.deGroot at xs4all.nl> a écrit :
De: Geert Jan de Groot <GeertJan.deGroot at xs4all.nl>
Objet: Re: [afnog] config dhcp
À: cristophe06 at yahoo.fr
Cc: "AFNOG" <afnog at afnog.org>
Date: Jeudi 25 Septembre 2008, 21h31

On Thu, 25 Sep 2008 14:38:16 +0000 (GMT)  Dany Mustapha wrote:
> can you please tell me is it possible to give diffrent gateways to
> hosts in our network by using dhcp.
> i explain for example host1 & host2 must have gatway1 and host3
>  & host4 h gateway2,

It is possible, but you must know the MAC address of all the
hosts so you can add specific configurations for each host.

This is what I have with ISC DHCP - there may be newer versions
with a slightly different syntax, but I hope this gets you started:

# Subnet declaration
subnet 192.0.2.0 netmask 255.255.255.192 {
	range 192.0.2.10 192.0.2.60;
}

# Declaration for host1, using gateway1
host host1 {
	hardware ethernet 00:60:1a:01:02:03;
	fixed-address 192.0.2.1;
	option routers gateway1;
}

# Declaration for host2, using gateway1
host host2 {
	hardware ethernet 00:60:1a:04:05:06;
	fixed-address 192.0.2.2;
	option routers gateway1;
}

# Declaration for host3, using gateway2
host host3 {
	hardware ethernet 00:60:1a:07:08:09;
	fixed-address 192.0.2.3;
	option routers gateway2;
}

# Declaration for host4, using gateway2
host host4 {
	hardware ethernet 00:60:1a:0a:0b:0c;
	fixed-address 192.0.2.4;
	option routers gateway2;
}


In general, using different gateways is not a good idea, but sometimes
needs must.

Hope this helps,

Geert Jan




      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://afnog.org/pipermail/afnog/attachments/20080925/5421402f/attachment-0002.html>


More information about the afnog mailing list