Networking Forums

Networking Forums > Computer Networking > Linux Networking > MAC address change question

Reply
Thread Tools Display Modes

MAC address change question

 
 
Bill Oliver
Guest
Posts: n/a

 
      02-25-2006, 11:36 PM

I recently travelled to Seattle for a meeting and decided to play with
changing my MAC address and seeing how that would affect my network
access.

My configuration:

HP Pavilion zd8000 laptop
Mandriva 2006 Linux

Now, if I change my MAC address, either directly using ifconfig or with
macchanger, everything *seems* to work right locally on the machine,
but none of the DHCP servers I've played with will give me an ip address.
This was true for the wireless server at my hotel room, and for the Cingular
service here at SeaTac (where I'm waiting for a plane).

This is true even if I put the change early in the boot up sequence.

If I change my MAC address back to the "real" hardware address, Cingular
will give me an ip address no questions asked.


So for example, if I:

<boot up with network down>

% /etc/init.d/network start
% ifup wlan0 (I don't have my wireless come
up automatically)

I get an ip address from the dhcp server
just fine.

Then:

% /etc/init.d/network stop
% macchanger -e -a wlan0
% /etc/init.d/network start
% ifup wlan0

I get a time out and no dhcp response,
even though ifconfig wlan0 gives the
new mac number as the HWaddress.

Then:

% /etc/init.d/network stop
% macchanger -m <original number>
% /etc/init.d/network start
% ifup wlan0

I get an address from the dhcp server!

Everything I know to check looks fine with
respect to the change in MAC address having
been done correctly.

I don't understand why this doesn't work.
Obviously I need to learn something. Any
pointers would be appreciated!

Thanks in advance,

billo
 
Reply With Quote
 
 
 
 
prg
Guest
Posts: n/a

 
      02-26-2006, 05:56 PM

Bill Oliver wrote:
> I recently travelled to Seattle for a meeting and decided to play with
> changing my MAC address and seeing how that would affect my network
> access.
>
> My configuration:
>
> HP Pavilion zd8000 laptop
> Mandriva 2006 Linux
>
> Now, if I change my MAC address, either directly using ifconfig or with
> macchanger, everything *seems* to work right locally on the machine,
> but none of the DHCP servers I've played with will give me an ip address.
> This was true for the wireless server at my hotel room, and for the Cingular
> service here at SeaTac (where I'm waiting for a plane).


What is the "real" mac address? What did you change it to? What is
the difference?

> This is true even if I put the change early in the boot up sequence.


Should not make a difference.

> If I change my MAC address back to the "real" hardware address, Cingular
> will give me an ip address no questions asked.


They _might_ recognize the mac address as "administratively" set and
won't accept what might be a spoofed mac.

> So for example, if I:
>
> <boot up with network down>
>
> % /etc/init.d/network start
> % ifup wlan0 (I don't have my wireless come
> up automatically)
>
> I get an ip address from the dhcp server
> just fine.
>
> Then:
>
> % /etc/init.d/network stop
> % macchanger -e -a wlan0


What is your mac address at this point?

> % /etc/init.d/network start
> % ifup wlan0


It may be using a client-ID that the ISP is "tracking" as well as the
fact that your leases file is not in accord with the mac/client-ID now
being sent in the request. What does your leases file look like?

> I get a time out and no dhcp response,


No response or no offer?

> even though ifconfig wlan0 gives the
> new mac number as the HWaddress.


Seems the ISP's dhcp server does not like your new mac address.

> Then:
>
> % /etc/init.d/network stop
> % macchanger -m <original number>
> % /etc/init.d/network start
> % ifup wlan0
>
> I get an address from the dhcp server!


It does like this mac address with a client-ID in accord with it's
records of your lease. This is speculation at this point and there are
other possible causes for the success as opposed to failure.

> Everything I know to check looks fine with
> respect to the change in MAC address having
> been done correctly.


It's likely that the ISP's dhcp server does not like the change. This
varies _greatly_ with different ISPs or even the same ISP when they
reconfigure the dhcp server.

> I don't understand why this doesn't work.
> Obviously I need to learn something. Any
> pointers would be appreciated!


There could be several reasons it does not work. What is your hardware
connection to the ISP's network at home? DSL? Cable modem? Dial-up?
Did you have to manually establish an account with a mac address?

As far as the hot-spot connection failing there are several, perhaps
related, reasons for that as well. Depends on how they were having you
connect. Captive portal? Account setup? Open access hot spot?
Checking your "home" account?

You might notice the same sort of anomolies working from your home
network where you are more familiar with and have greater control over
the variables involved. On the road, you have many new variables of
which you are ignorant and over which you have little or no control and
on top of that you've introduced yet another variable by changing your
mac administratively.

Bottom line is that it is hard to be certain where the "fault" lies.

Did you try using network profiles? Mandriva has profiles, doesn't it?
The best way to get a properly functioning setup that is different
depending on your location is to use profiles.

In any case, if you want to "play" with changing your mac address, I
would do it at home. It's good to know ahead of time if your "regular"
dhcp server will work with such a software change in case you really do
need to make a change to force a new lease be given to you. Handy
sometimes.

hth,
prg

 
Reply With Quote
 
Bill Oliver
Guest
Posts: n/a

 
      03-02-2006, 06:06 AM
In article <(E-Mail Removed) .com>,
prg <(E-Mail Removed)> wrote:
>
>Bill Oliver wrote:
>> I recently travelled to Seattle for a meeting and decided to play with
>> changing my MAC address and seeing how that would affect my network
>> access.
>>

>
>What is the "real" mac address? What did you change it to? What is
>the difference?
>


Thanks for the reply! Sorry about the delay, but I just got
back from the road.

The real mac address is: 00:90:4b:ee:77:ca
A faked mac address is: 00:90:4b:54:c2:5b
which is essentially a random number with the same
vendor bits.


[snip]


>> So for example, if I:
>>
>> <boot up with network down>
>>
>> % /etc/init.d/network start
>> % ifup wlan0 (I don't have my wireless come
>> up automatically)
>>
>> I get an ip address from the dhcp server
>> just fine.
>>
>> Then:
>>
>> % /etc/init.d/network stop
>> % macchanger -e -a wlan0

>
>What is your mac address at this point?


00:90:4b:54:c2:5b

>
>> I get a time out and no dhcp response,

>
>No response or no offer?
>


No response. Here's my log file:

Mar 2 01:33:57 localhost dhclient: DHCPREQUEST on wlan0 to 255.255.255.255 port 67
Mar 2 01:34:05 localhost dhclient: DHCPREQUEST on wlan0 to 255.255.255.255 port 67
Mar 2 01:34:25 localhost dhclient: DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 3
Mar 2 01:34:28 localhost dhclient: DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 4
Mar 2 01:34:32 localhost dhclient: DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 9
Mar 2 01:34:41 localhost dhclient: DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 9
Mar 2 01:34:50 localhost dhclient: DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 15
Mar 2 01:34:51 localhost net_applet[6131]: running: /sbin/iwgetid -r wlan0
Mar 2 01:34:51 localhost net_applet[6131]: running: /sbin/iwgetid -r -a wlan0
Mar 2 01:34:51 localhost net_applet[6131]: running: /sbin/iwlist wlan0 scanning
Mar 2 01:35:05 localhost dhclient: DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 14
Mar 2 01:35:19 localhost dhclient: DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 7
Mar 2 01:35:26 localhost dhclient: No DHCPOFFERS received.
Mar 2 01:35:26 localhost dhclient: Trying recorded lease 192.168.0.4


>> even though ifconfig wlan0 gives the
>> new mac number as the HWaddress.

>
>Seems the ISP's dhcp server does not like your new mac address.
>


Nor does my home dhcp server :-(


>> Everything I know to check looks fine with
>> respect to the change in MAC address having
>> been done correctly.

>
>It's likely that the ISP's dhcp server does not like the change. This
>varies _greatly_ with different ISPs or even the same ISP when they
>reconfigure the dhcp server.
>
>> I don't understand why this doesn't work.
>> Obviously I need to learn something. Any
>> pointers would be appreciated!

>
>There could be several reasons it does not work. What is your hardware
>connection to the ISP's network at home? DSL? Cable modem? Dial-up?
>Did you have to manually establish an account with a mac address?
>


Well, I don't know how things are set up at the airport or
the Hilton, but here at home, I just have an old Netgear
MR814 v.2 wireless router/firewall that does dhcp service
and NAT for me. The dhcp is independent of my isp here.

[snip]
>
>You might notice the same sort of anomolies working from your home
>network where you are more familiar with and have greater control over
>the variables involved. On the road, you have many new variables of
>which you are ignorant and over which you have little or no control and
>on top of that you've introduced yet another variable by changing your
>mac administratively.


Yep. Same thing happens at home.

>
>In any case, if you want to "play" with changing your mac address, I
>would do it at home. It's good to know ahead of time if your "regular"
>dhcp server will work with such a software change in case you really do
>need to make a change to force a new lease be given to you. Handy
>sometimes.
>


I tried deleting all the leases by hand in /var/lib/dhcp/dhclient-wlan0.leases.
Same thing happened -- with the spoofed mac address, I didn't get an ip address,
and nothing was written, and when I changed back, everything worked and a
lease was written. I don't know anywhere else to look.

>hth,
>prg
>


Thanks!


 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Question on delegating ip address change Abhi Windows Networking 1 07-02-2008 06:58 AM
TCP/IP Address Change Mark Windows Networking 1 06-24-2006 04:18 PM
change MAC address can change IP address of a machine? apngss@yahoo.com Linux Networking 7 01-05-2006 11:09 PM
change MAC address can change IP address of a machine? apngss@yahoo.com Wireless Internet 7 01-05-2006 11:09 PM
stupid question - how do I change a MAC address on an Aironet 350 client card? Andrei Moutchkine Wireless Internet 0 06-25-2004 04:39 PM



1 2 3 4 5 6 7 8 9 10 11