# network unreachable

## breman

I am no longer able to access the internet. Only change I have made is switch isp's and instead of using  a router  I am using ethernet from cable modem.

My nic is intel 82567 ..module loaded is e1000e.

the network was working until the isp switch,

on startup eth0 is started and a valid ip address is found by dhcp. 

after startup 

the command ifconfig eth0 does not show an ip address, just a hardware address.

ping www.yahoo.com gives unknown host

ping <ip> gives network unreachable

The internet will work from livecd though..

Can anyone help..

----------

## mokia

Try dhcpcd eth0. Did you get an adress, or some error?

----------

## Hu

Please post the output of ip a; ip r as seen both on the LiveCD and from the non-working main system.  The easiest way to do this would be to boot the main system, run those commands with output redirected to a file, then boot the LiveCD and post the contents of that file.

----------

## cach0rr0

 *Hu wrote:*   

> Please post the output of ip a; ip r as seen both on the LiveCD and from the non-working main system. 

 

what provides these? I don't have 'em

was going to have have OP show us ifconfig -a and route -n output, wondering if the two you posted show essentially the same thing?

----------

## Hu

 *cach0rr0 wrote:*   

> what provides these? I don't have 'em

 sys-apps/iproute2

 *cach0rr0 wrote:*   

> was going to have have OP show us ifconfig -a and route -n output, wondering if the two you posted show essentially the same thing?

 Yes.  Also, the sys-apps/iproute2 tools have a more concise invocation syntax and I find their output to be nicer to use.

----------

## breman

I tried dhcpcd eth0 but still no internet access..

 resolv.conf is cleared everytime dhcpcd is ran, I copy file from livecd ..also no internet access.

here is the outputs.

ip a livecd

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN 

    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00

    inet 127.0.0.1/8 brd 127.255.255.255 scope host lo

2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 100

    link/ether 00:1c:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff

    inet 68.186.xx.xx/22 brd 255.255.255.255 scope global eth0

ip r live cd

68.186xx.xx/22 dev eth0  proto kernel  scope link  src 68.186.xx.xx

127.0.0.0/8 dev lo  scope link 

default via 68.186.xx.xx dev eth0 

ip a system

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN 

    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00

    inet 127.0.0.1/8 scope host lo

2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN qlen 1000

    link/ether 00:1c:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff

ip r system

127.0.0.0/8 via 127.0.0.1 dev lo

----------

## mokia

Im not familiar width the ip command, but seems like it is down

ifconfig eth0 up maybe help you

----------

## breman

the net.eth0 interface is started at boot up but 

I've tried /etc/init.d/net.eth0 restart ..start

The interface starts/restarts, sometimes has correct ip sometimes has a 169 .xx.xx.xx address

I haven't been able tol manually configure the network either ..passing the valid ip addresss broadcast and netmask addressses to ifconfig..

----------

## mokia

169 .xx.xx.xx? 

Dhcpcd set an ip like this by timeout. It is from the  IP range reserved for autoconfiguration.

Try to set a timeout in /etc/dhcpcd.conf  see man dhcpcd.conf for details

----------

## krinn

lol, am i the only one to think the iproute2 output is "unpleasant"

----------

## Hu

 *breman wrote:*   

> The interface starts/restarts, sometimes has correct ip sometimes has a 169 .xx.xx.xx address

 This could indicate that your DHCP server is unreliable and does not always issue an address fast enough.  You can ask dhcpcd not to assign an APIPA address, which I think will get it to report failure when the DHCP server does not issue a proper address.  You might also try asking dhcpcd to wait longer before timeout.

However, I am more worried about the NO-CARRIER indicator.  I would not expect this to occur on a system that is properly plugged in.  Are you using the same network card driver on the live CD as you are on the installed system?

----------

## breman

on startup the dhcp shows a valid ip address for eth0

I used dmesg|grep eth0.

it shows the following entries several times

e1000e eth0 Nic Link is up 100mb Full duplex Flow control:none

eth0 10/100 disabling TSO

eth0 changing MTU from 1500 to 576

eth0 changing MTU from 576 to 1500

ADDRCONF(NETDEV_Change):eth0 link becomes ready

the ip a command still showed no carrier with the above messages and a valid ip address found at startup..

the ipconfig eth0 still does not show an inet address(just hardware) even though one is found for eth0 at startup.

I also issued the dmesg|grep eth0  on the live cd..although I did not see all the above but  it did show the same driver for the nic card..

I've always used a router in the past and never really had any networking issues before.Now I am using the ethernet port from the back of the modem and I just cannot seem to get the network working..

Does a router make this much difference?

----------

## cach0rr0

 *breman wrote:*   

> 
> 
> I've always used a router in the past and never really had any networking issues before.Now I am using the ethernet port from the back of the modem and I just cannot seem to get the network working..
> 
> Does a router make this much difference?

 

seems silly to suggest, but have you tried cutting the power off on the modem for ~5 minutes, then turning it back on with your machine attached? 

Lot of the time they're finicky about receiving a new mac address. Have had to go through this silliness with a number of broadband routers. 

Sorry if this is an obvious one you've already looked at, but it's the absolute first thing that comes to mind.

Am in bed half asleep, sorry if you've already done this and mentioned it, I only skimmed!

----------

## krinn

 *breman wrote:*   

> 
> 
> the ipconfig eth0 still does not show an inet address(just hardware) even though one is found for eth0 at startup.
> 
> 

 

a poor cable (faulty, unshield one or untwisted...) can be affect by environment and so could make the datas pass thru fine and then fail, then rework...

if you can't change the cable to test, maybe pinging the modem IP many times to see if any ping would fail.

You might also see it in the TX errors (and that is shown in ifconfig output, ahah, i don't like that iproute2  :Very Happy:  )

Also some modem need a crossover cable, i think most (all?) 1000 ethernet cards have the feature to cross/uncross on need a cable, but the feature could be disable.

----------

## breman

I'm at a loss for words..

I reinstalled the system.

fresh install

livecd finds network no problem.

once I boot into system. valid ip is found at startup. then any ping command returns unknown host or network unreachable.

I started up gentoo with no network cable plugged in..system gave me a 169.xx.xx.xx ipadress

I then plugged cable in, restarted eth0..system gave me a valid ip address..

resolv.conf was blank though..had to manually enter nameservers.

but still cannot access internet..

going to walmart in the morning to get a router  and try again.

----------

