LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to connect to the internet using network card? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-connect-to-the-internet-using-network-card-295052/)

Henningstrom 02-26-2005 04:55 AM

How to connect to the internet using network card?
 
Hi!

Recently i installed Slackware 10.1, and now I'm trying to connect to internet using a cable modem and a network card.

What is the first step?

I've belive that the kernel has found my network card, not sure though, what's the best way to ensure that?

How do i tell Linux that i wan't to use internet through ADSL?

I've used ppp several years ago, no prob whith that, but how do i get linux and ADSL to cooperate?

Best regards,

Henning, Sweden.

ekman 02-26-2005 08:12 AM

Hej,

The ADSL modem acts as a DHCP server (Dynamic Host Configuration Protocol).
Meaning that your PC can broadcast a request for an IP-address, router-address, DNS-address
and everything necessary to setup the network connection.

You must start the DHCP-client program on your machine. There may be some support for
this in Slackware (I am running Fedora so I don't know). Otherwise the man-page should
be available; "man dhclient" (if Slackware uses the same client as Fedora that is).

Use "ifconfig -a" to check if the kernel sees the interfaces. The "real" HW-interfaces usually
shows up as "eth0" etc, and are having a HWaddr field with an ethernet address.

Linux (or Windows for that matter) desn't usually know anything about ADSL. It just sees
an ethernet with a DHCP server on it, that's enough. So you will probably not find any
ADSL specific programs for setting up connections on Linux.

Regards,
L Ekman

michaelk 02-26-2005 08:42 AM

You mention both a cable modem and ADSL. Since they are different we need to know which broadband service you are using.

What type of modem do you have? Some are a combination of modem/router. If you have a combination modem / router then you do not need to configure pppoe on linux.

With cable all you need to do is configure the network adapater for DHCP. For ADSL you need to run the adsl-setup configuration script. The adsl-start script starts the pppoe connection.

Henningstrom 02-27-2005 05:18 AM

Hi!

Thanks for the replies!

The problem was solved when i installed the dhcpcd client (of course).

However, does anybody have a quick solution on how to connect and disconnect? Should i use
Code:

ifconfig eth0 up
and
Code:

ifconfig eth0 down
?

Best regards,

Henning

osvaldomarques 02-27-2005 09:21 AM

Hi Henning,
Usually, a broadband connection is started at boot and stays up until power off as you are not paying call charges.
In slackware, at least until 9.1 which I have installed, you just have to configure "/etc/rc.d/rc.inet1.conf".
Code:

# /etc/rc.d/rc.inet1.conf
#
# This file contains the configuration settings for network interfaces.
# If USE_DHCP[interface] is set to "yes", this overrides any other settings.
# If you don't have an interface, leave the settings null ("").

# Config information for eth0:
IPADDR[0]=""
NETMASK[0]=""
USE_DHCP[0]="yes"
DHCP_HOSTNAME[0]=""

Of course you have to setup network at boot. Just look at the permissions of "/etc/rc.d/rc.inet1". It must be "-rwxr-xr-x" to execute at boot.

Regards,

Osvaldo.

Boow 02-27-2005 03:10 PM

Im guessing some adsl connections don't need pppoe just dhcp. mine was always on i didn't dial a phone connection.

osvaldomarques 02-27-2005 08:48 PM

Hi Boow,

It depends on the modem. Any adsl line works the same way. It needs to establish a ppp connection between the client (you) and the server (the telephone central). Depending on the modem type and configuration, you have to instruct your computer to do that, using "pppoe" or leave this responsibility to the modem.
In the last case, the modem establish a ppp connection to the server and setup a dhcpd server to configure your stations. Then all you need is to configure your board with dhcp client and you are surfing.
The problem with this configuration is all your machines are behind NAT. The node which has a public internet address is the modem.
But, in both modes, I don't know any need to connect on demand as we pay a monthly subscription for the connection and it does not occupy our phone line.

Osvaldo.


All times are GMT -5. The time now is 12:26 AM.