You are not logged in.

#1 2009-08-28 00:26:47

santiagorf
Member
Registered: 2009-03-12
Posts: 32

[solved] network problem

Hi,
I made some moddifications on rc.conf, and after that I cannot access anymore to internet  though I have restored the rc.conf file to its original state. Here is some information that it might help.

$ ifconfig
eth0      Link encap:Ethernet  HWaddr 00:0B:6A:CF:8E:99  
          inet addr:192.168.0.2  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1            
          RX packets:544 errors:0 dropped:0 overruns:0 frame:0          
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0          
          collisions:0 txqueuelen:1000                                  
          RX bytes:174984 (170.8 Kb)  TX bytes:861 (861.0 b)            
          Interrupt:10 Base address:0x4c00                              

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:20 errors:0 dropped:0 overruns:0 frame:0
          TX packets:20 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:1000 (1000.0 b)  TX bytes:1000 (1000.0 b)
$ ping 192.168.0.1
PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data.
64 bytes from 192.168.0.1: icmp_seq=1 ttl=127 time=1.21 ms
64 bytes from 192.168.0.1: icmp_seq=2 ttl=127 time=0.335 ms
64 bytes from 192.168.0.1: icmp_seq=3 ttl=127 time=0.356 ms
$ route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.0.0     *               255.255.255.0   U     0      0        0 eth0
default         192.168.0.1     0.0.0.0         UG    0      0        0 eth0
# -----------------------------------------------------------------------
# NETWORKING
# -----------------------------------------------------------------------
#
# HOSTNAME: Hostname of machine. Should also be put in /etc/hosts
#
HOSTNAME="myhost"

# Use 'ifconfig -a' or 'ls /sys/class/net/' to see all available interfaces.
#
# Interfaces to start at boot-up (in this order)
# Declare each interface then list in INTERFACES
#   - prefix an entry in INTERFACES with a ! to disable it
#   - no hyphens in your interface names - Bash doesn't like it
# 
# DHCP:     Set your interface to "dhcp" (eth0="dhcp")
# Wireless: See network profiles below
#
eth0="eth0  192.168.0.2 netmask  255.255.255.0 broadcast  192.168.0.255"
INTERFACES=(eth0)

# Routes to start at boot-up (in this order)
# Declare each route then list in ROUTES
#   - prefix an entry in ROUTES with a ! to disable it
#
gateway="default gw 192.168.0.1"
ROUTES=(gateway)

many thanks in advance

Last edited by santiagorf (2009-08-28 02:37:10)

Offline

#2 2009-08-28 00:48:26

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,694
Website

Re: [solved] network problem

So ... you are using an static IP. What's in your /etc/resolv.conf ? Do you have the correct DNS servers?

R.

Edit: I also noticed that you do not have the loopback listed in your rc.conf (lo="lo 127.0.0.1" )

Last edited by ralvez (2009-08-28 00:50:13)

Offline

#3 2009-08-28 01:00:55

santiagorf
Member
Registered: 2009-03-12
Posts: 32

Re: [solved] network problem

I was using a static IP.
/etc/resolv.conf is empty
Should I add (lo="lo 127.0.0.1" ) in rc.conf?

ralvez wrote:

So ... you are using an static IP. What's in your /etc/resolv.conf ? Do you have the correct DNS servers?

R.

Edit: I also noticed that you do not have the loopback listed in your rc.conf (lo="lo 127.0.0.1" )

Offline

#4 2009-08-28 01:10:47

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,694
Website

Re: [solved] network problem

Nope ... /etc/resolv.conf needs your DNS servers.
If you do not have them use OpenDNS addresses it will work.

nameserver 208.67.222.222 
nameserver 208.67.220.220

and the loopback goes in /etc/rc.conf

lo="lo 127.0.0.1"                                                                                                           
eth0="eth0 192.168.1.21 netmask 255.255.255.0 broadcast 192.168.1.255"   
INTERFACES=(lo eth0)

That should do.

R.

Last edited by ralvez (2009-08-28 01:12:14)

Offline

#5 2009-08-28 02:37:59

santiagorf
Member
Registered: 2009-03-12
Posts: 32

Re: [solved] network problem

it works
thanks!!!

Offline

#6 2009-08-28 06:10:21

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,694
Website

Re: [solved] network problem

Glad to be of help.

R.

Offline

Board footer

Powered by FluxBB