LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-17-2006, 11:53 PM   #1
sapheroth
LQ Newbie
 
Registered: Jun 2004
Posts: 28

Rep: Reputation: 15
how to bind IP with MAC


hi
i want to know how to bind IP address with MAC address in linux...
if there is a script then plz share with me..
thanx
 
Old 09-18-2006, 12:06 AM   #2
Thoreau
Senior Member
 
Registered: May 2003
Location: /var/log/cabin
Distribution: All
Posts: 1,167

Rep: Reputation: 45
ifconfig eth0 down
ifconfig eth0 hw ether 12:34:56:78:91:01
ifconfig eth0 up

You bind MAC's to hardware, not IP schemes.

The Media Access Control (MAC) sublayer is the part of the OSI network model data link layer that determines who is allowed to access the physical media at any one time. It acts as an interface between the Logical Link Control sublayer and the network's physical layer.

The MAC sublayer is primarily concerned with the control of access to the physical transmission medium (i.e. which of the stations attached to the wire or frequency range has the right to transmit?) or low-level media-sharing protocols like CSMA/CD.
 
Old 09-18-2006, 12:34 AM   #3
sapheroth
LQ Newbie
 
Registered: Jun 2004
Posts: 28

Original Poster
Rep: Reputation: 15
actualy i want that the user may have access to inernet (get an IP) only if his MAC address is in my database. and is the user changes his LAN card he doesnt get any IP with his new NIC untill unless he comes to me and provide his new MAC address.
 
Old 09-18-2006, 12:49 AM   #4
Thoreau
Senior Member
 
Registered: May 2003
Location: /var/log/cabin
Distribution: All
Posts: 1,167

Rep: Reputation: 45
That's nice.
 
Old 09-18-2006, 12:52 AM   #5
roopunix
Member
 
Registered: Feb 2004
Location: Kathmandu
Distribution: Redhat/fedora/Suse [Wanna Drive With Debian]
Posts: 208

Rep: Reputation: 30
Ddns-update-style interim;
ignore client-updates;

subnet 10.69.0.0 netmask 255.255.0.0 {

# --- default gateway
option routers 10.69.5.1;
option subnet-mask 255.255.0.0;

# option nis-domain "domain.org";
# option domain-name "domain.org";
option domain-name-servers 10.69.5.1;

option time-offset -18000; # Eastern Standard Time
# option ntp-servers 192.168.1.1;
# option netbios-name-servers 192.168.1.1;
# --- Selects point-to-point node (default is hybrid). Don't change this unless
# -- you understand Netbios very well
# option netbios-node-type 2;

# range dynamic-bootp 10.69.6.100 10.69.6.200;
default-lease-time 21600;
max-lease-time 43200;

# we want the nameserver to appear at a fixed address
host www

# next-server marvin.redhat.com;
{
hardware ethernet 00:15:60:bb:9f:ea;
fixed-address 10.69.8.x;
}
host Mr YYY
{ hardware ethernet 00:c0:9f:9d:8b:bd;
fixed-address 10.69.8.x;
}
host Mr-XXX
{ hardware ethernet 00:15:60:bb:af:09;
fixed-address 10.69.8.x;
}
}
 
Old 09-19-2006, 01:25 AM   #6
sapheroth
LQ Newbie
 
Registered: Jun 2004
Posts: 28

Original Poster
Rep: Reputation: 15
i think this script is for DHCP server.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I import bind ".hosts" files into another BIND server chantman Linux - Software 0 06-30-2006 11:51 AM
LXer: DNS: The Bind Leading the Bind LXer Syndicated Linux News 0 06-15-2006 10:33 PM
How to update BIND ./etc/bind/db.coaxcables AndeAnderson Debian 0 03-03-2006 09:35 AM
Bind ETH devices to specific NIC/MAC not_an_expert Slackware 8 10-13-2004 11:00 AM
how to use iptables -m mac --mac-source DeployedOne Linux - Security 3 08-06-2004 03:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:25 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration