22 April, 2008

Determining IP address for eth0 failed

I had a tough time configuring wired internet connection on UBUNTU (7.10 Gusty Gibbon) and FEDORA Core 8 boxes. However after few amendments, I was able to fix and start internet in both. The Network Adapter (eth0) was not able to take IP address from the DHCP servers of my ISP ( Reliance, the case here) because the Linux distros support the future i.e. IPv6. Hence, the task at hand was to disable IPv6 and enable IPv4.

Let us discuss both of them in detail.

Ubuntu

There is process avahi-demon running which is responsible for IPv6 assignment. It can be disabled by removing from the following location
/etc/init.d/avahi-demon. Please not that all these should be done as sudo.
This should be able to fix the problem. You can restart the network and network interfaces by

/etc/init.d/networking restart
ifdown eth0
ifup eth0

Also, the interfaces file specifies starting of Network adapter and assigning address.
cd /etc/Network/interface

It should have following entry to take IP from dhcp server for eth0.

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet dhcp


Forcibly , IP address can be assigned by dhclient eth0.

Fedora Core

Disabling IPv6 in Fedora core 8 can also be done in similar fashion.

Now here is how you can do this with FC8 to disable IPv6:

  1. Append the following line to /etc/modprobe.conf:
    install ipv6 /bin/true
    alias net-pf-10 off
    alias ipv6 off

  2. Append the following line to /etc/sysconfig/network:
    NETWORKING_IPV6=no

  3. Ensure your network adapter is configured not to use IPv6. This is an easy edit in the system-config-network gui, or do it manually in /etc/sysconfig/network-scripts/ifcfg-eth0 (ammend for name of your adapter) by appending IPV6INIT=no

To restart the Network Adapter and assign address using DHCP.
ifconfig eth0 down
ifconfig eth0 up
dhclient eth0

After all these changes are made the network adapter takes an IPv4 IP address and works fine.





0 readers commented: