LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Set MAC/HW Address in /etc/rc.d/rc.inet1.conf? (https://www.linuxquestions.org/questions/slackware-14/set-mac-hw-address-in-etc-rc-d-rc-inet1-conf-367659/)

TotalDefiance 09-27-2005 09:38 PM

Set MAC/HW Address in /etc/rc.d/rc.inet1.conf?
 
I know how to manually set a mac address using ifconfig, is there an arguement to do so in /etc/rc.d/rc.inet1.conf? Just wondering. If not, I'll just make a script to set it and bring it up/down. Thanks.

debianmike 09-27-2005 10:04 PM

in distro's i use, i just put MACADDR=blah:blah:blah in those config files....maybe try that?

Alien Bob 09-28-2005 03:10 PM

Starting with Slackware 10.2, you can add this to /etc/rc.d/rc.inet1.conf :

Code:

HWADDR[0]="00:12:34:56:78:9A"
if your card is not 0 but 1 in the .conf file, change "HWADDR[0]" to "HWADDR[1]" of course. And the value for HWADDR is yours to change...

Cheers, Eric

TotalDefiance 09-28-2005 09:30 PM

ho ho. That's kind of amusing, as I did try that already, (mirroring the same general setup I figured it would use) However, it didnt work (probably since I'm running 10.1!!) Thanks for the heads up. I guess I'll just *make do*.

Alien Bob 09-29-2005 02:35 AM

You can copy the rc.inet1.* and rc.wireless.* files that Slackware 10.2 uses - they work perfectly well in Slackware 10.1 (just replace the old rc.wireless and rc.inet1 with the newer ones). You don't have to replace your *.conf files with the new ones, but you should look at them anyway, to see the new options that you can use.

If you have trouble getting the files out of a Slackware 10.2 CD or package, I have them as individual file here as well: http://www.slackware.com/~alien/rc_scripts/

Cheers, Eric

BroX 09-29-2005 07:11 AM

Can someone tell me what the advantage is to override the card's hardware MAC address?

Here at the universities network I can only use one network card (card1), which is registered using the MAC address connected to my username. Can I then connect with a different card (card2) by entering the MAC address of card1 in rc.inet1.conf?

Cheers, Leon.

carboncopy 09-29-2005 07:32 AM

Quote:

Originally posted by LJSBrokken
Can someone tell me what the advantage is to override the card's hardware MAC address?

Here at the universities network I can only use one network card (card1), which is registered using the MAC address connected to my username. Can I then connect with a different card (card2) by entering the MAC address of card1 in rc.inet1.conf?

Cheers, Leon.

I tried "changing" MAC address before using dhcpcd command. What it actually do is that when the dhcpClient ask for an IP address from the dhcpServer, it will report the SPECIFIED Mac address. That is when it matters most. Getting your machine a valid IP address and "registered" on the dhcp server.

When you probe your machine, it will still show the ORIGINAL MAC address.

I know that the dhcp server can be set to check your MAC address against an allowed list before giving out the IP address. So, yes, I think you can use a different card to connect using your old card MAC address. But, you can be using both card at the same time since both will have the same IP address.

I may be wrong. :)

My NIC was block once, I just "changed" the MAC address and it works. :D


All times are GMT -5. The time now is 04:05 PM.