Find the answer to your Linux question:
Results 1 to 3 of 3
Hi, 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: # ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Feb 2006
    Posts
    3

    eth0 address and hostname


    Hi,

    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
    address 192.168.0.6
    netmask 255.255.255.0
    gateway 192.168.0.9
    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:169.254.102.165 Bcast:0.0.0.0 Mask:255.255.0.0
    Clearly something is not right here but also, if i call http://192.168.0.6 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
    Location
    Maryland, USA
    Posts
    510
    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
    Just Joined!
    Join Date
    Feb 2006
    Posts
    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
    ip_forward=no
    spoofprotect=yes
    syncookies=no
    Attached Files Attached Files

  4. $spacer_open
    $spacer_close

Posting Permissions

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