Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

When I try to connect to the Internet using pon provider, I get this error:

error sending pppoe packet: Network is down
error receiving pppoe packet: Network is down

If I configure the Internet with pppoeconf, then run pon provider, the connection works. I should not have to run pppoeconf every time I turn on my computer. How can I connect to the Internet, with pon without having to run pppoeconf every time?

Update:

When I installed Debian, the installer could not establish a DHCP connection, so I skipped the "Configure network" option. I have found, running this command allows me to start the Internet, without having to configure pppoeconf again.

ifconfig eth0 up
pon dsl-provider

Is there some place I should add ifconfig eth0 up so that it begins during startup and shutdown or when I run pon or poff?

share|improve this question
1  
Watch your system logs (files under /var/log) to see what pppoeconf does that pon doesn't do. Post all the logs that appear while you run pppoeconf or pon. –  Gilles Feb 14 '12 at 7:43
    
Is there any particular log which I should be checking? There are many logs, so I don't know how to find these. –  Village Feb 23 '12 at 23:43
1  
Look at the ones that changed in the last few minutes: ls -ltr /var/log –  Gilles Feb 23 '12 at 23:45
    
According to this, after running pppoeconf, no logs were changed. –  Village Feb 23 '12 at 23:53
add comment

2 Answers

up vote 2 down vote accepted
+100

Checkout man 5 interfaces. The /etc/network/interfaces file tells bunch of scripts (debian package ifupdown) how to bring up various network interfaces. You'd find stanzas like the following in them:

auto eth0
iface eth0 inet dhcp

The 'auto eth0' line tells the ifupdown bunch of scripts to 'UP' the eth0 interface when asked to UP everything. The system startup script normally requests that without having to add any lines in it/them.

So, I suggest you have a look at your /etc/network/interfaces file to see if you have an iface line for eth0. If you do check for presence of auto eth0.

If you dont have a DHCP server on the network, you could static IP and set an auto-IP value (for e.g. 169.254.1.1) for the static address. If you chose to use 'manual' method you could add a simple script like the following to /etc/network/if-up.d/ :

#!/bin/bash
test "${IFACE}" = "eth0" && ifconfig ${IFACE} up
exit 0

You'd need auto eth0 if you want it to be automagically brought up during bootup. You can test this (and your script) by using ifup -a and ifdown -a which acts on all the interfaces marked as auto.

share|improve this answer
    
There already is a line for auto eth0, the next line is iface eth0 inet manual. When I change manual to dhcp, durign startup, DHCPDISCOVER spends about a minute testing various ports and finally reports, "No DHCPOFFERS received." I do not think that my ISP uses DHCP. –  Village Feb 24 '12 at 0:03
    
I was assuming your eth0 normally gets a LAN address. Also, It does not look like setting it manual would UP the interface. You would have to add a script in /etc/network/if-up.d to do the job. I'll edit my answer to incorporate a sample. –  Anil Feb 24 '12 at 4:15
add comment

When you have a pppoe connection, you can do it in the /etc/network/interfaces via 'Debian' or 'Ubuntu' way like:

auto eth0
iface eth0 inet ppp
    provider dsl-provider

You can find this solution in /usr/share/doc/pppoe/README.Debian

Edit:

If you want to start connection manually, don't use a line auto eth0 and connection you can start by ifup eth0 command.

share|improve this answer
    
According to README.Debian, this should be used if you want to start the Internet during startup, which is not what I wish to do. Adding these lines results in an error during startup that /dev/modem was not found. –  Village Feb 23 '12 at 23:23
    
The exact error is: /var/log/syslog:Feb 23 20:48:16 * pppd[*]: In file /etc/ppp/peers/provider: unrecognized option '/dev/modem'. Note that I don't use a provider file, but a dsl-provider file, so I do not know why it is looking for the wrong file. –  Village Feb 23 '12 at 23:50
    
@Village In my case I had a exactly same block in /etc/network/interfaces and for me Ubuntu used file dsl-provider, which was a correct??? And if you want to start connection manually, see my updated answer. –  Jan Marek Feb 24 '12 at 1:43
    
Simple solution of problem with a dsl-provider and provider is deleting a /etc/ppp/peers/provider file and make link dsl-provider -> provider. But it's not as good as I would like. –  Jan Marek Feb 24 '12 at 1:52
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.