# ADSL broadband connection with static IP

## satimis

Hi folks,

Gentoo_amd64

gnome-light

Previously I was running ADSL broadband connection with dynamic IP without problem.  Now I change the plan with ISP running static IP, no login and password required.  I tried to reconfig broadband connection but can't find "network-admin" on bash.  I can't get the gentoo box connected to Internet to download the necessary package.  Please advise which file/files I have to edit manually.

Connection: PC --> router --> ADSL modem --> ISP via telephone line.

Virtual IP 192.168.0.10 to 192.168.0.60 preset on router by ISP.  

Router, Linksys Etherfast Cable/DSL Router, is suppled by ISP

TIA

B.R.

satimis

----------

## Bojan

If I understand it correctly, you only need to configure your router: Change the WAN setting from dynamic to static IP. And that should be all.

----------

## satimis

Hi Bojan,

Tks for your advice.

 *Quote:*   

> 
> 
> If I understand it correctly, you only need to configure your router: Change the WAN setting from dynamic to static IP. And that should be all.

 

The router has been preset up by ISP.  Other Linux box is working on it without problem, only setting IP address on the Linux box as 192.168.0.10 and Net mask as 255.255.255.0.

On Gentoo box I can't find "network-admin" because running Gnome lite.  However "network-admin" is only the front end/GUI.  The backend will be on file/files

I have been looking at;

/etc/network/interfaces

```

# This file describes the network interfaces available on your system

# and how to activate them. For more information, see interfaces(5).

# The loopback network interface

auto lo

iface lo inet loopback

     address 127.0.0.1

     netmask 255.0.0.0

auth eth0

iface eth0 inet static

address 192.168.0.10

netmask 255.255.255.0

gateway 192.168.0.1

auto dsl-provider

iface dsl-provider inet ppp

provider dsl-provider

# added by pppoeconf

auto eth0

#pre-up /sbin/ifconfig eth0 up # line maintained by pppoeconf

```

and can't figure out how to change the content there.  OR is there another file I have to edit?

Tks.

B.R.

satimis

----------

## Bojan

In that case you should make changes to /etc/conf.d/net

```
# This blank configuration will automatically use DHCP for any net.*

# scripts in /etc/init.d.  To create a more complete configuration,

# please review /etc/conf.d/net.example and save your configuration

# in /etc/conf.d/net (this file :]!).

config_eth0=( "192.168.1.13 netmask 255.255.255.0" )

routes_eth0=( "default gw 192.168.1.1" )
```

----------

## satimis

Hi Bojan,

Performed following tests;

1)

edited /etc/conf.d/net

```

....

config_eth0=( "192.168.0.10 netmask 255.255.255.0" )

routes_eth0=( "default gw 192.168.0.1" )

config_eth0=( "adsl" )

....

```

Only 3 lines.  Others all commented out.  The last line config_eth0=( "adsl" ) already there

Still can't connect Internet.

# /etc/conf.d/net restart

.... permission denied

rebooted PC.  Still failed to connect ISP

2)

commented out the last line config_eth0=( "adsl" )

Still failed.  Rebooting PC did not help.

B.R.

satimis

----------

## Bojan

What does ifconfig say??

```
# ifconfig
```

Can you ping your router?Last edited by Bojan on Fri Jan 05, 2007 4:16 pm; edited 1 time in total

----------

## Bojan

 *satimis wrote:*   

> 
> 
> # /etc/conf.d/net restart
> 
> .... permission denied
> ...

 

```
/etc/init.d/net.eth0 restart
```

----------

## satimis

Hi Bojan,

I have broadband connection setup now.  Solution;

/etc/conf.d/net

```

config_eth0=( "192.168.0.10 netmask 255.255.255.0" )

routes_eth0=( "default gw 192.168.0.1" )

config_eth0=( "dhcp" )

```

# /etc/init.d/net.eth0 restart

Tks again for your advice.

# ifconfig

```

eth0      Link encap:Ethernet  HWaddr 00:13:D4:FE:DA:87

          inet addr:192.168.0.10  Bcast:192.168.0.255  Mask:255.255.255.0

          inet6 addr: fe80::213:d4ff:fefe:da87/64 Scope:Link

          UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:819 errors:0 dropped:0 overruns:0 frame:0

          TX packets:940 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:747010 (729.5 Kb)  TX bytes:171270 (167.2 Kb)

          Interrupt:5 Base address:0x6000

lo        Link encap:Local Loopback

          inet addr:127.0.0.1  Mask:255.0.0.0

          inet6 addr: ::1/128 Scope:Host

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:19 errors:0 dropped:0 overruns:0 frame:0

          TX packets:19 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:1119 (1.0 Kb)  TX bytes:1119 (1.0 Kb)

```

A further question.  If this port on the router occupied by another Linux box what will be the config on /etc/conf.d/net on Gentoo box? 

```

config_eth0=( "192.168.0.11 netmask 255.255.255.0" )

routes_eth0=( "default gw 192.168.0.1" )

config_eth0=( "dhcp" )

```

???

Shall I make change on "netmask 255.255.255.1" ?

and retaining;

routes_eth0=( "default gw 192.168.0.1" )

Tks.

B.R.

satimis

----------

## satimis

Hi Bojan,

If connecting the Gentoo box directly to the Modem;

Gentoo box --> Modem --> ISP

Whether to edit /etc/conf.d/net as follow;

```

config_eth0=( "static_IP_add netmask 255.255.255.255" )

routes_eth0=( "default gw 192.168.0.1" )

config_eth0=( "dhcp" ) 

```

without the router.

Tks.

B.R.

satimis

----------

## Bojan

I am glad to hear that the problem is solved.

In case where you'd like to connect your Gentoo box directly to modem, I think that you should ask your ISP about the modem or consult its users manual  if such thing is available.

In my case the modem could also be a router (with its own firewall ... but this features are disabled and password locked by ISP) and has its own LAN IP. If I were you I'd call the ISP and ask about the modem. In this case your modems IP is the default GW and the question is if this thingie can also act as a dhcp server.

----------

## nobspangle

because you have set

```
config_eth0=( "dhcp" ) 
```

The other lines are redundant, Gentoo is just looking at the DHCP entry and using that. Just set all your machines on your network the same way and you will have no problems. 

Chances are you would use the same config if you wish to miss out your router. Remember that your router is also your firewall so it's probably a good idea to leave it as it is.

----------

## satimis

Hi nobspangle,

Tks for your advice.

 *Quote:*   

> 
> 
> because you have set
> 
> ```
> ...

 

Sorry, I'm not quite clear on this point.  Whether you meant the other 2 lines are redundant?  I can delete them.

Without;

config_eth0=( "dhcp" )

broadband did not work, unable to connect ISP

 *Quote:*   

> 
> 
> Just set all your machines on your network the same way and you will have no problems.
> 
> 

 

Whether set other machines the same way (only 3 lines) as the Gentoo box?

 *Quote:*   

> 
> 
> Chances are you would use the same config if you wish to miss out your router. 
> 
> 

 

I'm considering setup this Gentoo box as server.  In such a case I can't figure out how to set /etc/conf.d/net if leaving out the router.

 *Quote:*   

> 
> 
> Remember that your router is also your firewall so it's probably a good idea to leave it as it is.

 

According to ISP's advice that the router, Linksys Cable/DSL router with 4-port swtiches, is only a simple modem without firewall

B.R.

satimis

----------

## satimis

Hi Bojan,

OK I'll call ISP about the Linksys router.  I have no manual in hand because the router was supplied by ISP

 *Quote:*   

> 
> 
> In this case your modems IP is the default GW and the question is if this thingie can also act as a dhcp server.

 

How to find out the modem IP?  Could you please explain in more detail on "if this thingie can also act as a dhcp server".  Tks

B.R.

satimis

----------

## Bojan

Well, I simply removed the plastic cover and googled for the name I've foud on PCB - and it turned out that the modem I've got from ISP was a rebranded Viking II modem & router; in fact heavily loaded with different features  :Smile: 

But I use it as a modem only, I am happy with my own router.

Usually IPs of such devices are either 192.168.0.1 or 192.168.1.1. But you' have to connect it to PC directly, you cant see it through a router.

----------

