How to Limit MAC addresses in my DHCP Linux server

Hi all ...

Hi have dhcp linux server , it is work fine , but I need to specify MAC's addresses for Trusted PC Only witch Only I need to get dynamic ip from dhcp , so if another/Unowned  PC's connect to my switch then it can not get ip from my dhcp

Note : I need PC get Dynamic IP NOT Static/Reserved  IP

my desrto is CentOS 5.3

Thank ..


Show my DHCP configurations
############################
## DHCP Configurations
## Configured By KING SABRI
############################
 
# ---> Options
 
ddns-update-style none; # keep it simple for now ( donn't use this option when you have DNS server )
ignore client-updates;  # here too authoritative ( donn't use this option when you have DNS server )
default-lease-time 600;
max-lease-time 7200;
authoritative;
DHCPARGS=eth1;          # what interface to listen on as DHCP
# ---> END
 
# ---> Subnet 30.0.0.0/8
 
subnet 30.0.0.0 netmask 255.0.0.0 {
 
       option routers                  30.0.0.1;         # gateway is eth1 LAN interface
       option subnet-mask              255.0.0.0;        # subnet mask
       option domain-name              "30.0.0.1";       # domain name given to client
       option domain-name-servers      30.0.0.1;         # the IP of your ISP's nameservers you're using
       option broadcast-address        30.255.255.255;   # Broadcast
       range 30.0.0.11 30.0.0.100;                       # the range of IP's your clients will get
# ---> END

Open in new window

LVL 1
eng-sabriAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

DCMBSCommented:
Hi.  MAC address filtering can be done ip IPtables MC Module.  It is not a DHCP function.

Check the following link.

http://www.cyberciti.biz/tips/iptables-mac-address-filtering.html
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
eng-sabriAuthor Commented:
Thank you DCMBS for help , but I know how to allow and prevent MAC from iptables

I think sir there are options can support my request like playing with

 host apex {

      hardware ethernet 00:A0:78:8E:9E:AA;
      fixed-address 192.168.1.4;
   }

you can see " fixed-address 192.168.1.4  "

so I think there are some options do not force fixed ip of put " if statement  " or thing like that  
0
DCMBSCommented:
Well I'm not sure what you are tring to achieve.  If you use iptables to restrict connections based on MAC addess then if a connection is allowed it will get a dynamic IP address from DHCP.  I don't know any way to do this just using DHCP.  DHCP issues dynamic or reserved IP addresses.  A Dynamic IP address will be provided to any MAC address that does not have a reservation allocated to it. A reserved address can be issued to a nominated MAC address.
0
eng-sabriAuthor Commented:
thank you DCMBS ..

but I think Limitation/Handling offering IP's this is DHCP business because it depend on MAC to offer this service to it must me handle MAC's ,, I think I sow this function in Windows DHCP server

so ..

Do you have Ideas ?
0
DCMBSCommented:
I have never seen this as part of a DHCP server in any O/S.  Even in wireless routers the MAC filtering function is seperate from DHCP.  Someone may come along and contradict me but in my experience I have never seen this.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux Distributions

From novice to tech pro — start learning today.