LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   No internet connection upon startup (https://www.linuxquestions.org/questions/linux-newbie-8/no-internet-connection-upon-startup-833852/)

Quinlan 09-22-2010 02:55 PM

No internet connection upon startup
 
When I boot up my machine (running CentOS 5.5), I have no internet connection.

ifconig doesn't show that eth0 is present. Going into my Network Gui from the administration tools, it says that eth0 is not active. I can't activate it from the GUI.

But...
If I sudo dhclient -d eth0, the process runs for a little bit, and all of the sudden my internet connection is there.

There must be some sort setting that I need to change to avoid doing this everytime I start the machine. Its odd, because I have an identical machine right next to it that doesn't have this problem.

Any advice?
Any more info required?

suprstar 09-22-2010 03:14 PM

System / Administration / Network

Double click on eth0 (or whatever your NIC is)

Make sure 'Activate device when computer starts' is checked

'Automatically obtain IP address settings with:' is selected,

and 'dhcp' is in the pulldown, ie not bootp or anything else.

There isn't really anything else to it..

Quinlan 09-22-2010 04:07 PM

Hmm. All of those things check out, and it's still not working.

whk 09-22-2010 05:16 PM

eth0
 
Try this:

sudo ifup eth0

reboot
If it does not take then add the command in
/etc/rc.local
or similar file
hth

onebuck 09-22-2010 06:21 PM

Hi,

From a terminal do 'ifconfig -a'. What does it show?
:hattip:

prayag_pjs 09-23-2010 12:18 AM

You said ifconfig doesn't show eth0;

Please tell us what's the output of :

Code:

sudo mii-tool
and

Code:

sudo ifconfig eth0
Please paste the output here.

Disable iptables and selinux

Also let us know if your network has DHCP

John VV 09-23-2010 03:50 AM

just how are you connecting ?
a cable hook up through the ether port ?
or the usb ( if usb there is a bug someplace ) i am tiring to figure that one out [ cable to usb ]


usb wireless
eth to a wireless hub ?

what

leejohnli 09-23-2010 04:28 AM

Quote:

Originally Posted by whk (Post 4106067)
Try this:

sudo ifup eth0

reboot
If it does not take then add the command in
/etc/rc.local
or similar file
hth

I go for this one to ease burden of troubleshooting.It should be on /etc/rc.d/rc.local

jmc1987 09-23-2010 06:21 AM

does
/etc/sysconfig/network-scripts/ifcfg0

the option onboot is it set to yes like this
onboot=yes

if so then check your boot log in

/var/log/

Quinlan 09-23-2010 10:05 AM

I am using a cable through an ethernet port.

The output of ifconfig -a is:

Code:

eth0      Link encap:Ethernet  HWaddr 00:13:72:14:01:E9 
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
          Interrupt:177 Memory:fbef0000-fbf00000

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:1603 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1603 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:2681508 (2.5 MiB)  TX bytes:2681508 (2.5 MiB)

sit0      Link encap:IPv6-in-IPv4 
          NOARP  MTU:1480  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)


ifup eth0 gives this output:

Code:

Determining IP information for eth0... failed; no link present.  Check cable?
Clearly it's not a cable problem, since I'm online right now without having to mess with the cable at all.

mii-tool gives me:

Code:

SIOCGMIIPHY on 'eth0' failed: Resource temporarily unavailable
no MII interfaces found

In the ifcfg-eth0 file, ONBOOT = yes.
/var/log/boot.log has a couple entries similar to this:

Code:

Sep 22 17:04:31 localhost NET[3539]: /sbin/dhclient-script : updated /etc/resolv.conf

Quinlan 09-23-2010 10:11 AM

One thing I noticed, is that once I have the internet working, running ifconfig eth0 gives me this:

Code:

eth0      Link encap:Ethernet  HWaddr 00:13:72:14:01:E9 
          inet addr:141.218.146.170  Bcast:141.218.146.255  Mask:255.255.255.0
          inet6 addr: fe80::213:72ff:fe14:1e9/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1283 errors:0 dropped:0 overruns:0 frame:0
          TX packets:125 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:130866 (127.7 KiB)  TX bytes:19784 (19.3 KiB)
          Interrupt:177 Memory:fbef0000-fbf00000

Inside my resolv.conf file:

Code:

generated by /sbin/dhclient-script
search wmich.edu
nameserver 141.218.140.6
nameserver 141.218.1.100

We recently had our lab's computers assigned static IP's, but were having problems. There ended up being some sort of problem with LAN vs VLAN (or something like that) which was in the hands of the IT guys. I may have changed some files while trying to fix that problem, which is now causing this connection problem.

Do you see any problem with my IP being 141.218.146.170 and the name server being 141.218.140.6?

jmc1987 12-28-2010 10:47 PM

Sorry for the supper late reply but the nameserver ip is just for dns resolution so you can type linuxquestions.org into your browser or whatever webaddress you may use. you ip ending in 170 is your personal ip. Just wanted to confirm that for you.


All times are GMT -5. The time now is 01:17 AM.