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

    eth0 address and hostname


    I am having some issues with my eth0 settings and my system hostname. My network IP address does not seem to equal the address i define in /etc/network/interfaces:
    # The primary network interface
    auto eth0
    iface eth0 inet static
    Above are the settings i want to have assigned however below is what is output from ifconfig
    spirit:~# ifconfig
    eth0 Link encap:Ethernet HWaddr 00:13:D4:2B:EB:F7
    inet addr: Bcast: Mask:
    Clearly something is not right here but also, if i call from my browser i get the apache homepage of the same machine with no problems. phpsysinfo reports the correct IP but at the same time ifconfig reports a completely different one.

    Any thoughts? I am slightly confused :)

    (While on the subject, phpsysinfo reports my hostname as "localhost.localdomain" but every referance to a hostname i have have ever seen has been changed to "spirit". How can i find out where i have missed the setting?)

  2. #2
    Linux Enthusiast KenJackson's Avatar
    Join Date
    Jun 2006
    Maryland, USA
    What Linux distribution are you using?

    Mandriva does not use /etc/network/interfaces, although other distributions may use it. You may want to look at (but not modify) /etc/init.d/network. That's the script that starts up your network. It will reference the right configuration files. I would expect them to be /etc/sysconfig/network and files in /etc/sysconfig/network-scripts/.

    That 169.254. address is a ZEROCONF or LINKLOCAL address, which means you are using DHCP, but no DHCP server could be found. Windows calls it Automatic Private IP Addressing (APIPA). In theory, this allows machines on small networks to pick addresses and run (i.e. "just work").

  3. #3
    Ah yes, sorry. I am using Debian.

    Attached is my init.d entry for networking. I can't see any reference to /etc/network/interfaces which is where i try to define the correct address. It is interesting what you say about 169.254 because i dont remember setting DHCP anywhere. Also i'd like to point out again that while ifconfig displays the 169.254 address, the system actually responds to the correct 192.168 address when i try to use a service.

    Quote Originally Posted by /etc/network/options
    Attached Files Attached Files

  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