# Learning the ways to connect to the net...

## dE_logics

I know very basic networking like subnets, NFS, SSH, Classes of IP DHCP etc... what I do not know is the ways to connect to the net ADSL, T3, T1, dialup etc... etc... etc... and configuring them in each disto is different. I don't know what to make the disto do since I don't know what to actually do to connect to the Internet.

So I was wondering about a book or something which explains the ways to connect to the Internet in Linux and a bit of the protocols internals which I think will be mandatory to accomplish the goals; I should know what to make the OS do so as to get it connected to the net.

----------

## Jimini

Actually, I have not read a book about this question yet, but these links could help you understand the way of data through the internet:

http://www.linux-tutorial.info/modules.php?name=MContent&obj=page&pageid=142

http://www.searchandgo.com/articles/internet/internet-practice-4.php

I found these links here ;)

Best regards,

Jimini

----------

## Inodoro_Pereyra

There is only one way to connect to the internet: By telling to the operating system wich net is the local one (assuming you know about subnets as stated above). All other traffic not belonging to a local net will be forwarded to the gateway. That´s all. This is the same no matter what OS we are talking about.

The universal way to do it in Linux:

```
ifconfig <ip_number> <subnet_mask>
```

There you have, all traffic outside the subnet will be routed by the gateway, so you have to specify one:

```
route add default gw <ip_number>
```

And for domain name to IP resolution, just specify a DNS:

```
echo "nameserver <ip_number>" >> /etc/resolv.conf
```

Thats the underlying magic under any script o network manager of every Linux distro.

Cheers!

----------

## Jimini

Hm...maybe it was a misunderstanding, I understood him in the way that he wants to get information in general how such a connection works :)

Best regards,

Jimini

----------

## dE_logics

 *Jimini wrote:*   

> Actually, I have not read a book about this question yet, but these links could help you understand the way of data through the internet:
> 
> http://www.linux-tutorial.info/modules.php?name=MContent&obj=page&pageid=142
> 
> http://www.searchandgo.com/articles/internet/internet-practice-4.php
> ...

 

I know about these protocols... I can configure IP tables. I'm asking for lower (or higher) level protocols at work like ADSL, PPP etc... which are responsible for the authentication to connect to the Internet. A bit info about these protocols like the mechanism of their authentication methods so I know how to configure the OS to connect to the net.

@Inodoro_Pereyra

If we have a gateway, problem is reduced by a fraction. If we don't we need to 'dial up' (i.e direct connection to the modem)... that causes major issues. Each OS has it's separate way to do so. How do I fix that?

----------

## krinn

to my knowledge, only by PPP, you have sub-formats (pppoa...) but always PPP, like for a 56k

Even when you are using ethernet to connect to a dsl router, in fact the router itself use pppoe(a) to connect with your modem... that's why you don't need anything else, but still, the protocol is use, just by the router and not the os.

So i would said, for linux, learn pppd usage, you will be able to connect to anything.

----------

## dE_logics

What about the interface requirements? pppd will run on this interface, so what will be the configuration of this interface (from the OS side)? For e.g. will it be set to dhcp or static or something else or simply null?

----------

## krinn

it will be set by the provider thru dhcp for random ip, or static for fixed ip, as simple as that.

These are part of the connection itself, like password, protocol and implementation, so OS have nothing to do on that, user need to implement them.

Have a look here to see howto setup one (pickup that one, because i answer that one)

https://forums.gentoo.org/viewtopic-t-813542-highlight-ppp.html

Another interesting case, some more hardware specifications need.

https://forums.gentoo.org/viewtopic-t-825214-highlight-module.html

But as you see, from the OS pov, nothing change, pppd at work.

Pretty sure the forum is full of answers from someone else (you don't want to be Krinn, else you'll be as limited as him) that could easy higher your knowledge in minutes.

----------

## dE_logics

The usual technique provided in the handbook does not work (maybe cause I'm using baselayout 2). I have to use rp-pppoe.

So basically to connect to the net using ppp, I have to set eth0 to DHCP, then start pppoe-connect after setup through pppoe-setup?

That's it?... will it be the same for all OS?

----------

## krinn

yes,

i remember win95 (or was it 98?) didn't provide pppoe layer, and by this time an external program was need for that. I suppose newer windows versions provide pppoe now.

So when using an OS, try to find the ppp program/functions and set it up and you'll be ok.

----------

## dE_logics

But in those times I did not have an ADSL connection.

Apparently it appears to work... all of a sudden, it did not work in Sabayon however and I was head banging for a long time.  :Mad: 

Actually here, I did not even start eth0... it's down and the net's still working.

Anyway, thanks.

----------

## Inodoro_Pereyra

 *dE_logics wrote:*   

> The usual technique provided in the handbook does not work (maybe cause I'm using baselayout 2). I have to use rp-pppoe.
> 
> So basically to connect to the net using ppp, I have to set eth0 to DHCP, then start pppoe-connect after setup through pppoe-setup?
> 
> That's it?... will it be the same for all OS?

 

Not exactly. PPPoE works encapsulating traffic over ethernet frames, so there is no need of DHCP, IP o any other higher level protocols. If you capture a PPPoE session, you will see ARP broadcast traffic only in the PADI packets. That´s why you don´t need an IP number in the interface connected to a DSL provider and for sure that´s why it works even while net.ethX has not been started.

Cheers!

----------

