IP address depending on interface

Martins Purins mpurins at gmail.com
Thu Aug 23 11:37:03 UTC 2007


I found following messages
DHCPREQUEST for 10.1.1.4 from aa:aa:aa:aa:aa:aa via 10.1.2.254
DHCPACK on 10.1.1.4 to aa:aa:aa:aa:aa:aa via 10.1.2.254
DHCPINFORM from 10.1.1.4 via 10.1.2.254: not authoritative for subnet
10.1.2.0

or somethimes

08:52:59 dhcpd: DHCPDISCOVER from aa:aa:aa:aa:aa:aa via 10.1.2.254
!!!!!!! 08:52:59 dhcpd: DHCPOFFER on 10.1.1.4 to aa:aa:aa:aa:aa:aa via
 10.1.2.254
!!!!!! 08:52:59 dhcpd: DHCPREQUEST for 10.1.1.4 (127.0.0.1) from
aa:aa:aa:aa:aa:aa via 10.1.2.254
!!!!!! 08:52:59 dhcpd: DHCPACK on 10.1.1.4 to aa:aa:aa:aa:aa:aa via
10.1.2.254


It seems that problem is with leases time or ?
Other parametrs of my configuration file is

At the begining of file
option domain-name "dot.com";
option domain-name-servers 10.7.7.5;
option netbios-name-servers 10.7.7.7;
option netbios-node-type 8;
default-lease-time 86400;
max-lease-time 172800;
And then follow subnets and hosts with pairs mac+ip

Of course I changed the name of host to mambo1 and mambo2.


On 23/08/07, Simon Hobson <dhcp1 at thehobsons.co.uk> wrote:
>
> Martins Purins wrote:
>
> >I have two subnets
> >vlan10
> >subnet 10.1.1.0 netmask 255.255.255.0 {
> >         option routers 10.1.1.254;
> >         option subnet-mask 255.255.255.0;
> >}
> >
> >vlan 11
> >subnet 10.1.2.0 netmask 255.255.255.0 {
> >         option routers 10.1.2.254;
> >         option subnet-mask 255.255.255.0;
> >}
> >
> >And host entries with pairs
> >host mambo {
> >  hardware ethernet aa:aa:aa:aa:aa:aa;
> >  fixed-address 10.1.1.4;
> >}
> >host mambo {
> >  hardware ethernet aa:aa:aa:aa:aa:aa;
> >  fixed-address 10.1.2.77;
> >}
> >When host connect from vlan 10 he receive correct address 10.1.1.4, but
> when
> >he connect from vlan 11 he receive also address 10.1.1.4.
>
> Then something else is wrong in your config - can you post the whole thing
> ?
>
> >So is it possible set ip address based on interface from which request
> come.
>
> Yes, that is automagic
>
> >For example if request come from DHCPDISCOVER from aa:aa:aa:aa:aa:aa via
> >10.1.1.254 then ip is 10.1.1.4 and if from 10.1.2.254 then ip is
> 10.1.2.77.
>
> Yes, the above should do it - apart from the fact that the hostnames
> must be different for the two declarations. IIRC you should be able
> to do :
>
> host mambo {
>   hardware ethernet aa:aa:aa:aa:aa:aa;
>   fixed-address 10.1.1.4,10.1.2.77;
> }
>
>
>
>




More information about the dhcp-users mailing list