You are not logged in.

#1 2008-01-02 03:25:06

smcsw2000
Member
Registered: 2007-06-22
Posts: 130

can't connect to internet

Finally got arch to install and got x to come up. Now I need to get the internet up to update via pacman. Here is what I got so far. /etc/resolv.conf is
HOSTNAME="cmehil"
lo="lo 127.0.0.1"
eth0="dhcp"
eth0="eth0 192.168.1.1 netmask 255.255.255.0 broadcast 192.168.254.255"
INTERFACES=(lo eth0)

gateway="default gw 192.168.1.1"
ROUTES=(gateway)
etc/hosts is
127.0.0.1   cmehil.domain.org  localhost.localdomain   localhost   cmehil
when I ping -c 3 www.google.com I get unknown host www.google.com
I am connected hardwire from eithernet card to dsl.

Offline

#2 2008-01-02 04:07:08

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: can't connect to internet

In /etc/resolv .conf you should have DNS server(s)listed.


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#3 2008-01-02 05:03:20

byte
Member
From: Düsseldorf (DE)
Registered: 2006-05-01
Posts: 2,046

Re: can't connect to internet

Exactly, so I hope that was just a mistake and actually the contents from /etc/rc.conf.
Also, why is eth0 listed twice? If you have a DHCP setup, comment the 2nd entry and the ROUTES line. If not, comment the first eth0 line.


1000

Offline

#4 2008-01-02 07:36:37

Corey
Member
From: Poland, Słupsk
Registered: 2007-12-10
Posts: 6

Re: can't connect to internet

Your /etc/resolv.conf should have only the DNS servers IPs suitable for your country:

nameserver xxx.xxx.xxx.xxx
nameserver xxx.xxx.xxx.xxx

The part of /etc/rc.conf that you are reffering to should look like this:
- for DHCP

lo="lo 127.0.0.1"
eth0="dhcp"
INTERFACES=(lo eth0)
#gateway="default gw 192.168.2.1"
#ROUTES=(gateway)

- for STATIC IP

lo="lo 127.0.0.1"
eth0="eth0 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255"
INTERFACES=(lo eth0)
gateway="default gw 192.168.0.1"
ROUTES=(gateway)

Note that you can't have the same static IP and gateway address. The IP that you put in "eth0 xxx" is your computer's IP, and the IP in gateway should be your DSL modem IP. But most of the DSL modems with ethernet output should have built-in DHCP server, so check the DHCP setting first. If it won't work then go with STATIC IP setting with info provided in modem's manual (getting his IP and such).
And for the boardcast address: if your IP is 192.168.1.1, then boardcast should be 192.168.1.255. It's always the same as your IP, but with number 255 on the end.

As for /etc/hosts file:

127.0.0.1    cmehil.domain.org    cmehil

or

127.0.0.1    cmehil.domain.org    localhost cmehil

(people use both setting - I'm using first one and it works fine for me)

Hope this helps.

Offline

#5 2008-01-04 02:57:13

smcsw2000
Member
Registered: 2007-06-22
Posts: 130

Re: can't connect to internet

fixed etc/hosts and commented out gateway and routes lines and everything works.  thanks:)

Offline

#6 2008-01-04 04:19:29

dolby
Member
From: 1992
Registered: 2006-08-08
Posts: 1,581

Re: can't connect to internet

Corey wrote:

The part of /etc/rc.conf that you are reffering to should look like this:
- for DHCP

lo="lo 127.0.0.1"
eth0="dhcp"
INTERFACES=(lo eth0)
#gateway="default gw 192.168.2.1"
#ROUTES=(gateway)

- for STATIC IP

lo="lo 127.0.0.1"
eth0="eth0 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255"
INTERFACES=(lo eth0)
gateway="default gw 192.168.0.1"
ROUTES=(gateway)

lo is not handled by rc.conf anymore


There shouldn't be any reason to learn more editor types than emacs or vi -- mg (1)
[You learn that sarcasm does not often work well in international forums.  That is why we avoid it. -- ewaller (arch linux forum moderator)

Offline

Board footer

Powered by FluxBB