Assigning IP Range via First Half of MAC ( hardware ) Address

Assigning IP Range via First Half of MAC ( hardware ) Address

Post by Chad » Fri, 14 Jan 2005 08:54:26



Does anyone know if it is possible to assign a certain range of IP
numbers to a certain range of MAC addresses? I'm not sure if this is
possible but I don't see why it wouldn't be. I need to do it so that I
can have my IP Phones on a different scope than my PC's. I don't wanna
manually enter them as reservec clients as this would take forever.
Thanks,
Chad
 
 
 

Assigning IP Range via First Half of MAC ( hardware ) Address

Post by prg » Fri, 14 Jan 2005 13:09:33



> Does anyone know if it is possible to assign a certain range of IP
> numbers to a certain range of MAC addresses? I'm not sure if this is
> possible but I don't see why it wouldn't be. I need to do it so that
I
> can have my IP Phones on a different scope than my PC's. I don't
wanna
> manually enter them as reservec clients as this would take forever.
> Thanks,
> Chad

I started to respond earlier till I realized that I had no way of
finding out how your IP phones are connected (ethernet, wireless?),
what brand/model phone you have, and what if anything the maker reveals
about its initializtion process.  It sounds like -- but you don't say
-- that you are trying to use dhcp to _assign_ them IPs.  Is it even
possible?  Or are you trying to _avoid_ assigning to other, dynamically
assigned, nics the IPs used by the IP phones?

If -- a big if -- you are assigning the phones dynamic IPs via dhcp,
then the _phone_ must send the dhcp server some kind of
client-identifier.  The phone may do this already.  Check the phones
docs for what they send in a lesae request.  No docs?  Sniff the wire
and read the packets.  What are they sending that would identify them?

Read the man pages for all the dhcp related entries.  Things like:
dhcpd
dhcpd.conf
dhclient
dhclient.conf
dhcpcd
dhcpcd.conf
dhcp-options

Which ones you have will depend on your distro and what dhcp software
you are running.  I use ISC software, so ymmv.

Once you have an identifier that will work use a class statement (or
equivalent) together with a match expression in the dhcpd.conf.  This
can be made to work in the second case mentioned above also.
hth,
prg
email above disabled

 
 
 

Assigning IP Range via First Half of MAC ( hardware ) Address

Post by David Schwart » Sat, 15 Jan 2005 02:48:34



Quote:> Does anyone know if it is possible to assign a certain range of IP
> numbers to a certain range of MAC addresses? I'm not sure if this is
> possible but I don't see why it wouldn't be. I need to do it so that I
> can have my IP Phones on a different scope than my PC's. I don't wanna
> manually enter them as reservec clients as this would take forever.

    Your question is really vague. What does this have to do with Linux? Is
your question about configuring a DHCP server?

    DS

 
 
 

Assigning IP Range via First Half of MAC ( hardware ) Address

Post by James Knot » Sun, 16 Jan 2005 08:44:30



> Does anyone know if it is possible to assign a certain range of IP
> numbers to a certain range of MAC addresses? I'm not sure if this is
> possible but I don't see why it wouldn't be. I need to do it so that I
> can have my IP Phones on a different scope than my PC's. I don't wanna
> manually enter them as reservec clients as this would take forever.
> Thanks,
> Chad

Many NICs support locally assigned addresses.  You can put what you want in
them, provided each one is unique on the local network.  Incidentally, IPv6
uses the MAC address, to provide part of the IP.
 
 
 

1. dhcp-server: assign fixed address to clients within MAC address range

Hi,

I have to do a very special dhcp setup:

A number of client (about 100) that have NICs from the same vendor have to get
fixed-addresses that are dependant from the dhcp-client-identifier.

With some host sections I managed to give thie client the correct fixed addresses,
but because of security reasons we have to forbit any client whose MAC address does not
fit to a specific mask (the first 3 bytes of the MAC have to be checked).

This means I need this:

        if mac_address = 01.02.03:xx.xx.xx {
                if option dhcp-client-identifier = "ID_1234" {
                        fixed-address 192.168.1.2;
                } else if option dhcp-client-identifier = "ID_1235" {
                        fixed-address 192.168.1.3;
                } else if .... {

                }
        } else ... no IP is assigned

Is this possible with the ISC dhcp-server ?

I tried host sections within a pools, but it does not seem to work. My idea was to create a pool
for all clients with the correct MAC addresses and to put some host section inside
the pool. But when the dhcp-client-identifier options was accepted, the pool allow rule was ignored.

Matthias

2. PIPE HELP!!!!

3. assign fixed address to clients with MAC address range

4. modem configuration

5. assigning multiple IP address to one interface via dhcpd

6. Binding Network Interfaces

7. Assigning IP Range to Wildcard MAC-Adresses with ISC dhcpd

8. Adaptec 2940UW problems

9. How to assign a IP address range to an interface ?

10. Determination of the IP address by a given Ethernet MAC hardware address

11. Looking up IP address via MAC address

12. Determine IP address assigned to MAC

13. Command for assigning IPv6 address and MAC address on the interface