LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Unable to connect internet in ubuntu (https://www.linuxquestions.org/questions/linux-newbie-8/unable-to-connect-internet-in-ubuntu-900886/)

ravi_nandula 09-03-2011 10:08 AM

Unable to connect internet in ubuntu
 
Hi everybody.....I have installed latest version of UBUNTU in my laptop successfully and able to handle some commands too...the problem is I am not able to connect internet in ubuntu.....
My internet connect is local provide which is a LAN connection......connected through a cable.....
Help out me to connect net.....
Thanks in advance..........

camorri 09-03-2011 10:57 AM

Please post the output from the following commands.

sudo ifconfig

sudo netstat -r

cat /etc/resolv.conf

Open a konsole, run each command, copy and paste the results into this thread.

The first command will give us the IP address you are using, if there is one set.

The second command will show if you have a default gateway defined.

The third will show if you have defined DNS addresses. You need all this to defined to work.

ravi_nandula 09-03-2011 11:22 AM

For the sudo ifconfig command....I got
eth0 Link encap:Ethernet HWaddr 70:5a:b6:5b:e3:f5
inet6 addr: fe80::725a:b6ff:fe5b:e3f5/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:308 errors:0 dropped:0 overruns:0 frame:0
TX packets:29 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:22217 (22.2 KB) TX bytes:7373 (7.3 KB)
Interrupt:17

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:16 errors:0 dropped:0 overruns:0 frame:0
TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:960 (960.0 B) TX bytes:960 (960.0 B)

For sudo netstat -r i got........

Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface

And for cat/etc/resolv.conf..
bash: cat/etc/resolv.conf: No such file or directory

ac_kumar 09-03-2011 11:37 AM

is internet is connecting in windows
when u r plugging in lan wire in ubuntu is it showing any notification as network connection established.

camorri 09-03-2011 03:03 PM

Quote:

cat/etc/resolv.conf..
This is a command, cat /etc/resolv.conf there has to be a space between cat the command and /etc/resolv.conf. resolv.conf is the file, in the /etc directory. Please run the command, copy and paste. Use the editing tools on the reply screen to format the output.

Quote:

For sudo netstat -r i got........
and what did this show? It should look something like this...

Quote:

netstat -r
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
localnet * 255.255.255.0 U 0 0 0 eth0
loopback * 255.0.0.0 U 0 0 0 lo
default cisco 0.0.0.0 UG 0 0 0 eth0
I need to see if you have a default route set. Mine says 'cisco' for you there should be an
ip address there.

salemeni 09-06-2011 02:29 AM

Edit file /etc/network/interfaces
Code:

auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
        address 192.168.X.X
        netmask 255.255.255.0
        gateway 192.168.X.254

Edit /etc/resolv.conf put ip of your DNS
Code:

nameserver X.X.X.X
Restart network
Code:

$ sudo /etc/init.d/netorking restart
java socket

sandwormusmc 09-06-2011 03:46 PM

Looks like your network card is "up", but doesn't have an IP ... try the following:

Code:

sudo dhclient eth0

baig 09-06-2011 04:40 PM

Quote:

Originally Posted by ravi_nandula (Post 4460494)
For the sudo ifconfig command....I got
eth0 Link encap:Ethernet HWaddr 70:5a:b6:5b:e3:f5
inet6 addr: fe80::725a:b6ff:fe5b:e3f5/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:308 errors:0 dropped:0 overruns:0 frame:0
TX packets:29 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:22217 (22.2 KB) TX bytes:7373 (7.3 KB)
Interrupt:17

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:16 errors:0 dropped:0 overruns:0 frame:0
TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:960 (960.0 B) TX bytes:960 (960.0 B)

For sudo netstat -r i got........

Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface

And for cat/etc/resolv.conf..
bash: cat/etc/resolv.conf: No such file or directory


Do you use a static IP on windows? (Have you configured any ip for it manually or it gets dynamically?)

if dhcp server assigns an ip on your network:

issue the following command in terminal :

Code:

sudo gedit /etc/network/interfaces &
and put
Code:

auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp

else, put

Code:

auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
        address "your ip address"
        netmask 255.255.255.0
        gateway "you gateway ip"

save file and close.


now restart network with

Code:

sudo /etc/init.d/networking restart
I think your network doesn't use dhcp for ip assignment.

Cheers!!


All times are GMT -5. The time now is 04:14 PM.