# New install (3rd attempt) no network connectivity using eth0

## csaenemy

First install I had problems connecting while using live disk. Replaced cable and managed to continue with install. Everything fine until reboot after disk removed. Booted up fine but no network connectivity. ifconfig indicated no RX or TX packets. Booted into live disk again and no network connectivity. Replaced ethernet card and started from scratch. Reinstalled and had similar problems, although now there were packets showing when ifconfig was run, unable to ping though. Tried various things based on what I read in forums and made the problem worse, so went back to square 1. I now have fresh install (again) ifconfig shows RX and TX packets. All I have done since install is added nameserver 8.8.8.8 to resolv.conf and have stopped and started /eth/init.d/net.eth0. I'm scared to go any further. What info do you need from me to help me on my way?

----------

## NeddySeagoon

csaenemy,

You have learned one valuable lession about Gentoo.  Reinstalling won't fix it. It just gives you another opportunity to not make the same error again.

To understand your issue, whe need the output of lspci - you can get that using the liveCD. No need to chroot

From insisde your own install we need 

The output of 

```
ifconfig -a
```

, the output of 

```
route
```

the content of

```
/etc/resolv.conf
```

 and the content of 

```
/etc/conf.d/net
```

If you know the IP address of your router that might be useful too.

Does

```
ping 209.85.229.105
```

work from inside your install?

To copy command output from your install, you can do things like

```
 ifconfig -a > /config.txt
```

then post the file /mnt/gentoo/config.text using the liveCD after you have mounted your root filesystem.

If you cannot copy/part into a post, do wgetpaste /path/to/file and tell us the URL.

----------

## csaenemy

NeddySeagoon,

Thanks for your patience.

```
lspci

00:00.0 Host bridge: Intel Corporation 82945G/GZ/P/PL Memory Controller Hub (rev 02)

00:01.0 PCI bridge: Intel Corporation 82945G/GZ/P/PL PCI Express Root Port (rev 02)

00:1b.0 Audio device: Intel Corporation N10/ICH 7 Family High Definition Audio Controller (rev 01)

00:1d.0 USB controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #1 (rev 01)

00:1d.1 USB controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #2 (rev 01)

00:1d.2 USB controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #3 (rev 01)

00:1d.3 USB controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #4 (rev 01)

00:1d.7 USB controller: Intel Corporation N10/ICH 7 Family USB2 EHCI Controller (rev 01)

00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev e1)

00:1f.0 ISA bridge: Intel Corporation 82801GB/GR (ICH7 Family) LPC Interface Bridge (rev 01)

00:1f.1 IDE interface: Intel Corporation 82801G (ICH7 Family) IDE Controller (rev 01)

00:1f.2 IDE interface: Intel Corporation N10/ICH7 Family SATA Controller [IDE mode] (rev 01)

00:1f.3 SMBus: Intel Corporation N10/ICH 7 Family SMBus Controller (rev 01)

01:00.0 VGA compatible controller: nVidia Corporation G72 [GeForce 7300 LE] (rev a1)

02:01.0 Ethernet controller: Sundance Technology Inc / IC Plus Corp IC Plus IP100A Integrated 10/100 Ethernet MAC + PHY (rev 31)

02:03.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)
```

```
ifconfig -a

eth0      Link encap:Ethernet  HWaddr54:e6:fc:82:46:45 

          inet addr:169.254.183.25  Bcast:169.254.255.255  Mask:255.255.0.0          

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:144 errors:0 dropped:3403 overruns:0 frame:0

          TX packets:16 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:9040 (8.8 KiB)  TX bytes:4249 (4.1 KiB)

          Interrupt:22

eth1      Link encap:Ethernet  HWaddr 00:01:6c:1a:2c:f3         

           BROADCAST MULTICAST  MTU:1500  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:0  (0.0 B)  TX bytes:0 (0.0 B)

          Interrupt:16 Base address:0x0xe000

lo        Link encap:Local Loopback  

          inet addr:127.0.0.1  Mask:255.0.0.0          

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0 

          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
```

```
route

Kernel IP routing table

Destination       Gateway         Genmask               Flags  Metric  Ref       Use  Iface

loopback           tux                  255.0.0.0               UG      0         0           0      lo

link-local            *                     255.255.0.0            U        2         0           0      eth0

```

```
/etc/resolv.conf

# Generated by dhcpcd

# /etc/resolv.conf.head can replace this line

# /etc/resolv.conf.tail can replace this line
```

```
/etc/conf.d/net

# This blank configuration will automatically use DHCP for any net.*

# scripts in /etc/init.d. To create a more complete configuration,

# please review /usr/share/doc/openrc*/net.example* and save your configuration

# in /etc/conf.d/net (this file ;]!).

hostname="tux"

config_eth0="dhcp"
```

my router ip is 192.168.1.254

```
ping 209.85.229.105
```

doesn't work from inside my install

----------

## Hu

You have two Ethernet cards.  The DHCP client attempted to acquire an address for the first card, but was unable to get a response from a DHCP server.  As a fallback, it assigned the card a link-local address.  Therefore, it is expected that the ping command given above did not work.  We need to understand why no DHCP server responded to you.  Since you see received traffic on eth0, I think we can assume that you connected the network cable to the correct NIC.  Do I understand correctly that, when you use the LiveCD, the card with MAC address 54:e6:fc:82:46:45 is fully usable, which is how you posted the information above?

The second card did not attempt to acquire an address.  It is likely that, since this is a new install, you only have eth0 configured to start on boot.  Therefore, it is normal and expected that the second card did not attempt to acquire an address.

----------

## csaenemy

@ Hu

The Sundance Technology  NIC with the MAC address 54:e6:fc:82:46:45 is the one with an ethernet cable attached and the one that works in the live environment as eth0. There is currently no cable attached to the eth1 NIC.

----------

## Hu

That is what I thought from the output, but that is unfortunate because it rules out all the easy explanations.  As a temporary workaround, you could configure eth0 statically so that you can use the system until we figure out why your DHCP client is unable to configure the interface.  To perform a static configuration, use:

```
config_eth0="192.168.1.2 netmask 255.255.255.0 broadcast 192.168.1.255"

routes_eth0="default via 192.168.1.254"

dns_servers_eth0="8.8.8.8"
```

Take care that you do not step on an in-use IP address with this.

What DHCP client and version are you using in the working and non-working cases?  What home router are you using?

----------

## csaenemy

Not sure how much help this is, but using System Rescue CD I get:

```
ifconfig

eth0      Link encap:Ethernet  HWaddr 54:e6:fc:82:46:45  

          inet addr:192.168.1.69  Bcast:192.168.1.255  Mask:255.255.255.0

          inet6 addr: fe80::56e6:fcff:fe82:4645/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:14 errors:0 dropped:0 overruns:0 frame:0

          TX packets:11 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:1384 (1.3 KiB)  TX bytes:1348 (1.3 KiB)

          Interrupt:22 Base address:0xef00
```

Using Gentoo Live CD I get the same output, but only after using net-setup, with one difference. Live cd recognises the NIC as eth1. if I do net-setup eth0 it tries to use the unplugged NIC.

I notice that the third line is missing completely in the installed version:

```
ifconfig  

eth0      Link encap:Ethernet  HWaddr54:e6:fc:82:46:45 

          inet addr:169.254.183.25  Bcast:169.254.255.255  Mask:255.255.0.0          

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1 

          RX packets:144 errors:0 dropped:3403 overruns:0 frame:0 

          TX packets:16 errors:0 dropped:0 overruns:0 carrier:0 

          collisions:0 txqueuelen:1000 

          RX bytes:9040 (8.8 KiB)  TX bytes:4249 (4.1 KiB) 

          Interrupt:22 
```

My router is a Thomson 	TG585v7. Not sure how to get the DCHP client and version information.

----------

## csaenemy

Also interesting, when I type my router IP address into a browser on a different computer on the same network, it identifies the Gentoo installation as "Live cd" even when I'm booted into the installed version.

----------

## csaenemy

 *Quote:*   

> Also interesting, when I type my router IP address into a browser on a different computer on the same network, it identifies the Gentoo installation as "Live cd" even when I'm booted into the installed version.

 

Turns out to be irrelevant as it still shows the same information several hours later with pc turned off.

----------

## Jaglover

Please can we see output of

```
cat /etc/udev/rules.d/70-persistent-net.rules; ifconfig -a
```

with your network cable plugged in.

----------

## csaenemy

@ JagLover

This with both NICs cabled to router:

```
cat /etc/udev/rules.d/70-persistent-net.rules

# This file was automatically generated by the /lib/udev/write_net_rules

# program, run by the persistent-net-generator.rules rules file.

#

# You can modify it, as long as you keep each rule on a single

# line, and change only the value of the NAME= key.

# PCI device 0x13f0:0x0200 (sundance)

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="54:e6:fc:82:46:45", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

# PCI device 0x10ec:0x8139 (8139too)

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:01:6c:1a:2c:f3", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
```

```
ifconfig -a

eth0      Link encap:Ethernet  HWaddr 54:e6:fc:82:46:45  

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:18 errors:0 dropped:0 overruns:0 frame:0

          TX packets:5 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:1132 (1.1 KiB)  TX bytes:1807 (1.7 KiB)

          Interrupt:22 Base address:0xef00 

eth1      Link encap:Ethernet  HWaddr 00:01:6c:1a:2c:f3  

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

          Interrupt:16 Base address:0x4000 

lo        Link encap:Local Loopback  

          inet addr:127.0.0.1  Mask:255.0.0.0

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0 

          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
```

Incidentally when

```
 ifconfig -a
```

 is issued from live environment both cards seem to be working.

```
ifconfig -a

eth0      Link encap:Ethernet  HWaddr 54:e6:fc:82:46:45  

          inet addr:192.168.1.69  Bcast:192.168.1.255  Mask:255.255.255.0

          inet6 addr: fe80::56e6:fcff:fe82:4645/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:190 errors:0 dropped:0 overruns:0 frame:0

          TX packets:3335 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:13428 (13.1 KiB)  TX bytes:413426 (403.7 KiB)

          Interrupt:22 Base address:0xef00 

eth1      Link encap:Ethernet  HWaddr 00:01:6c:1a:2c:f3  

          inet addr:192.168.1.70  Bcast:192.168.1.255  Mask:255.255.255.0

          inet6 addr: fe80::201:6cff:fe1a:2cf3/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:4345 errors:0 dropped:0 overruns:0 frame:0

          TX packets:260 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:4824895 (4.6 MiB)  TX bytes:19670 (19.2 KiB)

          Interrupt:16 

lo        Link encap:Local Loopback  

          inet addr:127.0.0.1  Mask:255.0.0.0

          inet6 addr: ::1/128 Scope:Host

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0 

          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
```

----------

## Jaglover

You cannot use two NIC's on same subnet, hope you know that? (Well, you can, but your switch needs to support that plus different setup is required.)

----------

## csaenemy

@ JagLover

I only wish to use the card that is showing here as eth0 with the HWaddr 54:e6:fc:82:46:45.

The other card would not normally be connected to the router. I connected the cable purely so I could post the output of ifconfig -a with the network cable plugged in as per your request. Maybe I misunderstood what you were asking.

----------

## Jaglover

Well, I was trying to have some information about your card and network in working condition, having two cards on same subnet is not a working setup. 

Are you trying to set up static configuration or you want to use DHCP? If latter then you need to install a DHCP client.

----------

## csaenemy

@ JagLover

I am trying to use DHCP. How do I do this? Is it something I've missed as I've been following the handbook?

----------

## Jaglover

Did you install a DHCP client or you did not?

If not, then you need to setup your net connection from CLI as described in Handbook and emerge the client.

Look at 2.4

http://www.gentoo.org/doc/en/gentoo-x86-quickinstall.xml#doc_chap2

----------

## csaenemy

Please excuse my ignorance. I am very much a beginner. Do I run the code exactly as stated in 2.4?

```
livecd root # ifconfig eth0 192.168.1.10/24

livecd root # route add default gw 192.168.1.1

livecd root # echo nameserver 192.168.1.1 > /etc/resolv.conf
```

Can I do this from within my install? And then what exactly am I emerging?

----------

## Jaglover

ifconfig and route are the tools. How you use them is up to you, methinks studying a little of networking basics is in order? Google is your friend, I'm sure it will bring up tens of good tutorials. Sorry for not doing any spoonfeeding, but I strongly believe in giving a fishing rod instead of fish.

----------

## csaenemy

This is what I am seeing at the end of the boot process. I think this suggests that dhcp is installed. Please correct me if I'm wrong.

```
INIT: Entering runlevel: 3

* Binging up interface eth0

* dhcp

* Running dhcpcd...

dhcpd[12016]: version 5.2.12 starting

dhcpd[12016]: eth0: rebinding lease of 192.168.1.69

dhcpd[12016]: eth0: acknowledged 192.168.1.69 from 192.168.1.254

dhcpd[12016]: eth0: checking for 192.168.1.69

dhcpd[12016]: eth0: leased 192.168.1.69 for 86400 seconds

dhcpd[12016]: eth0: forked to background, child pid 12040                                                   [  ok  ]

* received address 192.168.1.69/24                                                                                       [  ok  ]

* Mounting network file systems ...                                                                                         [  ok  ]

* Doing udev cleanups

* Starting local                                                                                                                          [  ok  ]
```

----------

## csaenemy

 *Quote:*   

> ifconfig and route are the tools. How you use them is up to you, methinks studying a little of networking basics is in order? Google is your friend, I'm sure it will bring up tens of good tutorials. Sorry for not doing any spoonfeeding, but I strongly believe in giving a fishing rod instead of fish.

 

I quite agree with what you're saying and I've read so much my head is spinning, but I seem to be missing something basic.

----------

## Hu

 *csaenemy wrote:*   

> This is what I am seeing at the end of the boot process. I think this suggests that dhcp is installed.

 Which boot process are you showing?  You previously stated that the System Rescue CD is able to boot your system and establish networking.  You stated that your installed system does not establish (functional) networking.  The output you provided shows a DHCP client acquiring an address successfully.  If this output is from your system, then it would appear that the problem no longer occurs.  If this output is from the System Rescue CD, then it only shows that the System Rescue CD has a DHCP client, but does not tell us whether your installed system has a DHCP client.

----------

## csaenemy

It's ok, I have finally realised my mistake. I read this elsewhere  *Quote:*   

> The main portion of Gentoo's network configuration will take place inside the /etc/conf.d/net file. The default behavior of Gentoo is to assume that the network interface will be utilizing DHCP to attain an IP address and as such the file is simply filled with comments explaining this. A completely empty file will cause the same behavior.

 .

I deleted the uncommented lines from /etc/conf.d/net, then stopped and started  /etc/init.d/net.eth0, and now it works.

----------

