Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: Changing MAC using ifconfig causes connectivity lost

  1. Default Changing MAC using ifconfig causes connectivity lost

    Hi,
    I am using Suse 10 sp2. By running ifconfig I am changing the mac address. Everything is happening successfully, but this is adapter losing the network connection. Even when I give a static IP. I am not able to ping any other IP.

    I've seen this problem on many other forums but haven't found any concrete solution yet. Any suggestions ?

    Thanks
    Abhinav

  2. #2
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    10,594

    Default Re: Changing MAC using ifconfig causes connectivity lost

    Are you running SUSE Linux Enterprise Desktop?

    If so, you might get better support at the Novell forums. (Although this looks like a distro-agnostic type of networking question).

    Everything is happening successfully, but this is adapter losing the network connection. Even when I give a static IP. I am not able to ping any other IP.
    I don't quite understand you here. Are you using dhcp or static ip addresses? Can you post the command sequences you've tried (along with any relevant output)?

  3. Default Re: Changing MAC using ifconfig causes connectivity lost

    Hi, I am using SLES 10 SP2

    Assume eth0 has the MAC MACX
    Command Sequence -
    service network stop
    ifconfig eth0 down
    ifconfig eth0 hw ether MACY
    ifconfig eth0 up


    Now moving the file /etc/sysconfig/network/eth-id-MACX to /etc/sysconfig/network/eth-id-MACY

    ( eth0 is set to get the IP from DHCP )

    service network start

    eth0 gets no IP from DHCP
    if I give a static IP by - ifconfig eth0 10.244.43.10 netmask 255.255.255.0

    Now I try to ping 10.244.43.1

    From 10.244.43.10 icmp_seq=1 Destination host unreachable.

    Now if I run all above commands again and set the MAC back to MACX
    and follow same IP assignment process. It starts working. Even when I give a new static IP it works.

  4. #4
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,941
    Blog Entries
    4

    Default Re: Changing MAC using ifconfig causes connectivity lost

    Are you the sysadmin? If not, perhaps you should ask your sysadmin if they have a security feature on the switch where ports are associated with particular MAC addresses which must be registered beforehand with the switch. This is so that people cannot plug a different device on the port.

  5. Default Re: Changing MAC using ifconfig causes connectivity lost

    No there is no MAC associations, its like an open network environment. I've seen this problem discussed on other linux forums also but haven't found a concerete solution yet.

    A similar discussion on Fedora Forums -

    F7 MAC address spoofing - FedoraForum.org

  6. #6
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    10,594

    Default Re: Changing MAC using ifconfig causes connectivity lost

    Without knowing more about your router, its not clear about what may be happening. (It does look like MAC filtering or similar is at play here). Are you sure that the ethernet driver for your network card supports this operation, as mentioned in man ifconfig?

    Does ifconfig command confirm the new MAC address after invoking the change?

  7. #7

    Default Re: Changing MAC using ifconfig causes connectivity lost

    Try sending some ICMP ping packets out from your system to a known working host on another network (or subnet) after you have changed its MAC address. This will force the router to update its ARP tables, associating your new MAC address with your IP address.

    Worth a try - some routers can take up to 30 minutes or so to update.

    Andy

  8. Default Re: Changing MAC using ifconfig causes connectivity lost

    @deano_ferrari: I am running SLES 10 SP2 on a hyper-v Virtual Machine and using a legacy network adapter. Shutting down the machine and changing mac from VM settings and booting again works fine. But I have to make it work without rebooting the machine. And yes, ifconfig commands confirms the MAC change.

    @Andy: I tried but didnt work. Its not even getting any IP from dhcp while restarting network service after moving the file /etc/sysconfig/network/eth-id-MACX to /etc/sysconfig/network/eth-id-MACY
    (where MACY is new mac assigned)

  9. #9
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,941
    Blog Entries
    4

    Default Re: Changing MAC using ifconfig causes connectivity lost

    Perhaps your DHCP server won't give out IP addresses to non-registered MAC addresses?

  10. Default Re: Changing MAC using ifconfig causes connectivity lost

    @ken_yap : Shutting down the virtual machine and changing mac (a new MAC) from VM settings and booting again works fine. It gets a new IP address from DHCP. There is no restriction on DHCP. Even when giving a static IP doesn't help in the communication to work.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •