LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-26-2005, 04:55 AM   #1
Henningstrom
LQ Newbie
 
Registered: Feb 2005
Posts: 3

Rep: Reputation: 0
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.
 
Old 02-26-2005, 08:12 AM   #2
ekman
Member
 
Registered: Apr 2004
Location: Sweden
Posts: 41

Rep: Reputation: 15
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
 
Old 02-26-2005, 08:42 AM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,681

Rep: Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894
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.
 
Old 02-27-2005, 05:18 AM   #4
Henningstrom
LQ Newbie
 
Registered: Feb 2005
Posts: 3

Original Poster
Rep: Reputation: 0
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
 
Old 02-27-2005, 09:21 AM   #5
osvaldomarques
Member
 
Registered: Jul 2004
Location: Rio de Janeiro - Brazil
Distribution: Conectiva 10 - Conectiva 8 - Slackware 9 - starting with LFS
Posts: 519

Rep: Reputation: 34
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.
 
Old 02-27-2005, 03:10 PM   #6
Boow
Member
 
Registered: Feb 2004
Distribution: Slackware 10.2
Posts: 669

Rep: Reputation: 32
Im guessing some adsl connections don't need pppoe just dhcp. mine was always on i didn't dial a phone connection.
 
Old 02-27-2005, 08:48 PM   #7
osvaldomarques
Member
 
Registered: Jul 2004
Location: Rio de Janeiro - Brazil
Distribution: Conectiva 10 - Conectiva 8 - Slackware 9 - starting with LFS
Posts: 519

Rep: Reputation: 34
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Connect to internet through network kiteguy101 Linux - Newbie 1 10-22-2004 04:10 PM
my new network card cant connect to internet klara Linux - Networking 5 09-02-2004 08:39 AM
How can i choose network card (eth0 or wlan0) to connect to internet? Klas Linux - Networking 4 05-07-2004 04:36 PM
how to connect to internet through network matt_w_lambert Linux - Networking 4 02-10-2004 09:55 PM
Not able to connect to the internet (I suspect my network card to be the problem) Moominpeikko Linux - Networking 2 08-31-2003 03:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:18 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration