Find the answer to your Linux question:
Results 1 to 3 of 3
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    change ip address


    I work with NFS, and would like to change ip address & mac address in the application. From past experience I remember that it causes problems and that OS then halts, but I didn't find any documentation for that. I would like to ask if it is legal to change ip & ethernet in the application when working with NFS, and if yes, how should it be done ?
    Thank you, Ran

  2. #2
    Linux Engineer Kloschüssel's Avatar
    Join Date
    Oct 2005

    would like to change ip address & mac address in the application
    1] the MAC shouldn't be related to the NFS (network file system) protocol
    2] a NFS client or server does not change the IP address by itself, but rather it uses one of the IP addresses that are configured on the computer where the NFS client or server runs

    is legal to change ip & ethernet in the application when working with NFS
    1] Changing the IP address shouldn't be a problem - but changing the ip address on the NFS server means that all clients have to connect to another IP address and have to be configured to do so.
    2] Changing the MAC is not prohibited, but you should do so if and only if you are on a private network where you know all computers and if the private network is unable to communicate with the rest of the world. A MAC address is unique for all manufactored network cards and should NEVER exist twice. If it does you will experience strange things happen. It's comparable to a situation where two households have the same address - the postal services won't know which one of them should receive packets and may deliver one packet to one household and the next packet to the other household.

    how should it be done
    1] changing an ip address is easy as that:
    ~# ifconfig <device> <address> netmask <netmask>
    where <device> may be "eth0", <address> may be "" and <netmask> may be "".

    2] For the mac address it is not easy, since the mac address is programmed into the network card chipset. Some network cards do not support to change their mac address, but if your model allows that you should be able to do so with something like:
    ~# ifconfig <device> hw ether <mac>
    where <device> may once more be "eth0" and <mac> may be something like "01:23:45:67:89:AB".


  3. #3
    Hi Kloschussel,

    Thanks for reply.
    I want to change the ip & mac in the client (target running embedded linux).
    From past experience I remember that when I changed the ip or mac address after linux startup with NFS, then it caused the OS to "halt".
    I searched the internet but found no documentary regarding such limitation when working with NFS.
    I assume that changing the ip address in the target might cause problem with NFS protocol becuase it tries to send udp/tcp to the previous address from u-boot.


  4. $spacer_open

Posting Permissions

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