LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-24-2007, 10:17 AM   #1
shipon_97
Member
 
Registered: Oct 2005
Location: Bangladesh
Posts: 490

Rep: Reputation: 30
Question Bind Mac with Ip address


hI FRIENDS ,

I just want to know How I can bind my MAC address of lan card with my IP address without configuring DHCP server in Linux Distribution . Is there any third party tools or other way... ... Plz give me some directions .
I am using Redhat Enterprise 4 server .

My another question is , if I make RAID into my HDD , then using which command I will see the RAID / Mirror Drive ?

Last edited by shipon_97; 01-25-2007 at 11:25 AM.
 
Old 01-24-2007, 10:37 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,911
Blog Entries: 14

Rep: Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142
It sounds like you're talking about static IP rather than DHCP. If so you just configure the NIC to do static IP and input the address along with netmask etc...

HOW you do the above depends on what distro you're using.

Please let us know which distro (e.g. Suse, RedHat, Ubuntu, Fedora Core, Debian ...) and version of same you're using.
 
Old 01-24-2007, 10:39 AM   #3
zytsef
Member
 
Registered: Apr 2006
Location: Vancouver, Canada
Distribution: Slackware, Ubuntu
Posts: 168

Rep: Reputation: 30
The easiest way I can think of is to simply set a static IP one the computer in question. I'm not sure which distro you're using but I'll tell you how to do this with Slackware (since that's what I'm most familiar with) and it shouldn't be wholly different for the distro you're using. Go into the directory in /etc for your init scripts (probably rc.d) and make sure dhcpd (or whatever your distro uses for a dhcp deamon) is not executable using chmod. This prevents your computer from pulling an IP from whatever DHCP server may be set up on your network. Then modify the rc.inet1.conf file (should also be in one of your init directories), to read something like this:
Code:
# Config information for eth0:
IPADDR[0]="<IP you want goes here>"
NETMASK[0]=""
USE_DHCP[0]="no"
DHCP_HOSTNAME[0]=""
That should do the trick.
 
Old 01-25-2007, 11:26 AM   #4
shipon_97
Member
 
Registered: Oct 2005
Location: Bangladesh
Posts: 490

Original Poster
Rep: Reputation: 30
Bind Mac with Ip address

thx for ur reply .


I just want to know How I can bind my MAC address of lan card with my IP address without configuring DHCP server in Linux Distribution . Is there any third party tools or other way... ... Plz give me some directions .
I am using Redhat Enterprise 4 server .
 
Old 01-25-2007, 12:16 PM   #5
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,911
Blog Entries: 14

Rep: Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142
You can run the RedHat network config command:

/usr/sbin/redhat-config-network.

OR

You can manually edit the file in /etc/sysconfig/network-scripts. File will be ifcfg-eth0 for eth0, ifcfg-eth1 for eth1 etc...

An example file from my RH AS 3 system:
Code:
DEVICE=eth0
BOOTPROTO=static
HWADDR=00:0A:30:A1:D7:45
ONBOOT=yes
TYPE=Ethernet
IPADDR=10.0.19.21
NETMASK=255.255.252.0
GATEWAY=10.0.19.1
SLAVE=no
ETHTOOL_OPTS="autoneg off speed 100 duplex full"
In the above:
The BOOTPROTO tells it to do either dhcp or static - you want static.
HWADDR should NOT be changed. This is the MAC address specific to your card.
ONBOOT=yes tells it start up at boot.
IPADDR is the static IP address.
NETMASK and GATEWAY should be whatever is appropriate to your network.

ETHTOOL_OPTS - Above turns off auto negotiation and hard sets the interface to speed 100 and full duplex. This is not required and may not work on some NICs. See ethtool man page for more detail. If it doesn't work then mii-tool likely does.

Don't forget to also update your /etc/hosts file with the IP.

P.S. The MAC, IPADDR and other things above were obfuscated so don't tell me the NETMASK isn't right.

Last edited by MensaWater; 01-25-2007 at 12:17 PM.
 
Old 11-23-2007, 12:14 AM   #6
shipon_97
Member
 
Registered: Oct 2005
Location: Bangladesh
Posts: 490

Original Poster
Rep: Reputation: 30
Bind IP with 10 LAN MAC adsress

An example file from my RH AS 3 system:
Code:
DEVICE=eth0
BOOTPROTO=static
HWADDR=00:0A:30:A1:D7:45
ONBOOT=yes
TYPE=Ethernet
IPADDR=10.0.19.21
NETMASK=255.255.252.0
GATEWAY=10.0.19.1
SLAVE=no
ETHTOOL_OPTS="autoneg off speed 100 duplex full"
Friends ,

This is the procedure how I can Bind IP with a MAC address of a LAN card of the server . Now I have 10 clients also 10 LAN cards through my Linux RHEL4 server . Now I want to bind ip address of the client pcs with their LAN MAC Address , so that they cannot use another different IP which I m not provided to them .

Plz help me How can i do that ?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:443 bruvajon Linux - Software 34 11-30-2011 03:08 PM
How to find an IP address from the MAC address of a remote machine ? jitz Linux - General 3 01-03-2006 07:55 AM
How to find IP address of a machine if I know their MAC Address dysenteryduke Linux - Networking 13 09-12-2005 10:21 AM
how to get ip address, broadcast address, mac address of a machine sumeshstar Programming 2 03-12-2005 04:33 AM
DHCP Server MAC Address found, IP address not assigned wmburke Linux - Wireless Networking 17 11-17-2004 10:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:43 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration