LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-21-2008, 04:41 PM   #1
Bill41
Member
 
Registered: Feb 2007
Posts: 34

Rep: Reputation: 0
Ubuntu 7 installed but without internet connection - help please.


I have installed Ubuntu 7 as dual boot with Windows XP, but Ubuntu has not set up my internet connection. I am trying to specify the appropriate Netwoek Settings but have very little clue about what I should be doing.
I have a D-Link DSL-504T Router with 2 computers connected by wired connection.
a) should I choose static, dynamic or Zeroconf IP address? Does it matter which? I currently use dynamic with XP on both computers, I think!
b) If Static, What IP address should I put in the second box on the etho properties window?
c) What subnetmask in the same window?
d) What Gateway address?

Where can I read what these terms mean (in Newbie language) so that I may have some understanding of what I am doing?
What else do I need to do to set up this connection?
Many thanks. Bill
 
Old 06-21-2008, 06:20 PM   #2
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,811
Blog Entries: 1

Rep: Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191
a) it's up to you, if you want to connect between the computers a static IP would be much better.
b) I usually put 192.168.1.100 ...101...102 on the systems on my main box and 192.168.1.200, ...201, etc on my laptop
c) 255.255.255.0
d) You can use your router address (usually 192.168.1.1 - but it depends on your router) -

DNS will also be your router's address or if you know the dns of your internet service provider you can use them.

hth

btw, why don't you install the latest version of ubuntu - 8.04

Last edited by sycamorex; 06-21-2008 at 06:22 PM.
 
Old 06-21-2008, 06:47 PM   #3
Bill41
Member
 
Registered: Feb 2007
Posts: 34

Original Poster
Rep: Reputation: 0
Connection not made yet!

I followed your suggestions, sycamorex, but the connection still does not seem to work. I can get to the router using http://192.168.1.1 but not beyond. Any other things I might try?
 
Old 06-21-2008, 07:08 PM   #4
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,811
Blog Entries: 1

Rep: Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191
what's the output of:
ifconfig


and what's inside the file: /etc/resolv.conf
 
Old 06-21-2008, 07:25 PM   #5
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,990

Rep: Reputation: 69
Using DHCP (also called a "dynamic IP address") will always set the correct settings, but then your IP address may change if you get disconnected from the network (eg if you turn the computer off). sycamorex is recommending a static IP to avoid this problem, but it does mean that you need to set up everything by hand.

If you can get to the router, but not see the Internet (or WAN or whatever is beyond your router), then your computer's routing table isn't set up properly.

You can see the routing table by running a command like this in a terminal window:
Code:
/sbin/route
There should be a line labelled "default" which lists your router address in the "gateway" column, and 0.0.0.0 as the "genmask", and the correct network interface (eth0 unless you have several network cards) under "Iface".

If this line is missing, then you don't have a default route set, and only have local network connectivity. You need to go to your network config screen and set up the "gateway" information (just enter your router's IP address).

Otherwise, post the output of the route program and we'll debug it from there.

Last edited by rjlee; 06-21-2008 at 07:26 PM. Reason: clarify
 
Old 06-21-2008, 11:05 PM   #6
mrrangerman
Member
 
Registered: Oct 2007
Location: MI
Distribution: Debian Slackware
Posts: 528

Rep: Reputation: 50
If you can get to your router there should be nothing wrong with you NIC card.

Make sure your router is set for DHCP, default usually is

Next I would use dhcp, edit your /etc/network/interfaces make sure it has a line in it like so.


Code:
# The primary network interface
allow-hotplug eth0
iface eth0 inet dhcp
Note don't mess with your loopback, if interfaces is in order check your
/etc/resolv.conf file and make sure it has a DNS nameserver ip listed.


Code:
nameserver dns.name.server.address
If you don't know the ip for your ISP's DNS go into your router settings and look and see what ip your router was given. Depending on your router, you may be able to just use your default gateway IP as the nameserver and your router will foreword for you.

Edit: Make the changes as root, then force your init.d to reread the network settings.
from a terminal window as root
/etc/init.d/networking force-reload

Or you can just reboot your system.

Last edited by mrrangerman; 06-21-2008 at 11:12 PM. Reason: add info
 
Old 06-22-2008, 04:00 AM   #7
Bill41
Member
 
Registered: Feb 2007
Posts: 34

Original Poster
Rep: Reputation: 0
Many thanks for the help

Lots of help and suggestions. Many thanks. I'll have a go and let you know how I get on. Cheers. Bill
 
Old 06-22-2008, 04:06 AM   #8
Person_1873
Member
 
Registered: Sep 2007
Location: Australia
Distribution: Arch Linux
Posts: 496

Rep: Reputation: 40
i had the same problem except with wireless, linux dislikes D-Links DNS servers, you have to go into the routers DHCP settings and change the DNS servers, i recomend 61.9.188.33 as prefered and 61.9.207.1 as secondary
 
Old 06-22-2008, 04:53 AM   #9
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,811
Blog Entries: 1

Rep: Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191
Quote:
i recomend 61.9.188.33 as prefered and 61.9.207.1 as secondary
Correct me if I'm wrong (and very often I am), but these, Person, seem like YOUR ISP's dns addresses so it would probably be of very little use for the OP.

Last edited by sycamorex; 06-22-2008 at 04:55 AM.
 
Old 06-22-2008, 03:41 PM   #10
Bill41
Member
 
Registered: Feb 2007
Posts: 34

Original Poster
Rep: Reputation: 0
Trying DHCP first

I have set network configuration to DHCP.
When I did that there was still no joy from the internet connection. The first few lines of ifconfig looked like this:
eth0 Link encap:Ethernet HWaddr 00:0B:6A:8D:98:0F
inet addr:192.168.1.2 Bcast:198.168.255 Mask:255.255.255.0
inet6 addr:fe80::20b:6aff:fe8d:980f/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
and so on ...

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
and so on ....

etc/resolv.conf contains:
nameserver 192.168.1.1

/sbin/route gave me:
Kernel IP routeing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 * 255.255.255.0 U 0 0 0 eth0
link-local * 255.255.0.0 U 1000 0 0 eth0
default mygateway 0.0.0.0 UG 100 0 0 eth0

The default line is there, but the router address has been replaced by mygateway. Is this the problem? In the Network Settings - eth0 Properties window, when Configuration is DHCP the Gateway address is 192.168.1.1 (all too familiar) but it is greyed out.
What now?

I'll check the router DNS servers in a moment.
 
Old 06-22-2008, 03:58 PM   #11
Bill41
Member
 
Registered: Feb 2007
Posts: 34

Original Poster
Rep: Reputation: 0
Router DNS settings

On the LAN settings page the DNS configuration is:
DNS Relay: Use User Discovered DNS Server Only
User Configuration:
Preferred DNS Server: 62.241.162.200
Alternative DNS Server: 62.241.163.200

The Management IP page includes the following:
IP Address 192.168.1.1
Net Mask 255.255.255.0
Default Gateway 62.241.160.191
Hostname mygateway

I tried changing the network settings to static and included the above default gateway address, but with no luck.
Should I try changing the Preferred and Alternative DNS Servers as suggested?
 
Old 06-22-2008, 04:38 PM   #12
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,990

Rep: Reputation: 69
If you really can't access anything outside the Internet, then the gateway is the problem. But that may not be the case. Try running
Code:
ping -c 1 66.249.93.147
This will send a ping packet to one of the Google servers, and should give you something like this:

Code:
PING 66.249.93.147 (66.249.93.147) 56(84) bytes of data.
64 bytes from 66.249.93.147: icmp_seq=1 ttl=240 time=31.0 ms

--- 66.249.93.147 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 31.000/31.000/31.000/0.000 ms
(The times may differ depending on your network and ISP).

If you get output similar to the above, then you are connected to the Internet: if web-pages don't work, then that's a separate issue, probably with your DNS nameservers, and you should move on to that.

If the response from ping is more like this:
Code:
1 packets transmitted, 0 received, 100% packet loss, time 0ms
…then you still have a problem with your gateway setup.

The use of “mygateway” instead of the IP just means that your gateway has got a name from somewhere; this isn't a problem but if you want to check that the IP address is correct then you can run:
Code:
/sbin/route -n
 
Old 06-23-2008, 04:33 AM   #13
Bill41
Member
 
Registered: Feb 2007
Posts: 34

Original Poster
Rep: Reputation: 0
Tried a few more suggestions but no luck so far

The ping test produced a negative result:
1 packets transmitted, 0 received, etc.
So it looks like the gateway is the problem. What is the gateway, apart from the bit where all the mud is and the cattle go through on the way to the field? Does it open and close or is is a particular location or route? Why does it work with Windows and not with Linux? What counts as an incorrect or correct gateway, apart from working or not working?

/sbin/route - n gave me:
192.168.1.1

I tried changing the DNS preferred and alternate addresses as suggested but this didn't make any difference and made the laptop connection fail as well.

Many thanks for all the help. Any other suggestions? I'll try anything!

Should I splash out some cash on a new router? Seems a pity as the router works perfectly well for Windows on both machines.
 
Old 06-25-2008, 03:20 PM   #14
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,990

Rep: Reputation: 69
Quote:
Originally Posted by Bill41 View Post
What is the gateway, apart from the bit where all the mud is and the cattle go through on the way to the field? Does it open and close or is is a particular location or route? Why does it work with Windows and not with Linux? What counts as an incorrect or correct gateway, apart from working or not working?
Fair question.

You may only have one computer (plus your router) on your network, but I find it easier to understand the terms if you think in terms of several computers.

Every computer on the network (including your router) has a network interface, also known as a network card or NIC, that you plug a network cable into.

Every NIC has a unique number called an “IP address”; 192.168.1.1 is an example of an IP address. On any given network, a number of similar IP addresses can be used; this is actually controlled by the netmask (the 255.255.255.0 number), but in practice this means that anything starting with 192.168.1 is on the local network, and anything else isn't.

If the computer wants to talk to the local network, it just sends out information from the NIC onto the cable, and it gets picked up by other machines on the network. These machines are all attached to the same network cable (by a device called a hub or switch — which may be physically inside the same box as your router), and so they can communicate easily.

The router is a computer (usually a very simple one) connected both to your network and also to the Internet (or any other network, in theory). The router has two NICs, one connecting to your network, and the other to the Internet, and both of these have an IP address.

When your computer wants to send information to the Internet, it has to send it to the router. To do this, it sends a special message to the router's IP address, telling it the IP address of where it wants to send the information to, and then it sends the information to the router. The router's job is to forward this information to wherever it needs to go on the Internet (as well as keeping track of replies).

The term "gateway" simply means the IP address of your router's NIC on your network.


I would advise against buying a new router, if it works; this looks like a simple configuration problem on the Linux machine. Have you tried using DHCP?
 
Old 06-25-2008, 04:13 PM   #15
Bill41
Member
 
Registered: Feb 2007
Posts: 34

Original Poster
Rep: Reputation: 0
My Heron is Flying!

Many thanks for the explanation about gateways. That was very helpful.

I have now installed Ubuntu 8.04. After an initial problem with the partitions all went well and I have an internet connection and can print.

The outstanding problem is that I cannot yet print from my Windows XP laptop, as client,(connected via the modem/router) while running Ubuntu on this PC as host. I'm not even sure how to check that the network connection with the laptop is properly and completely set up.

Is this the place to sort this out or should I start a new thread?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
internet connection to newly installed linux, i have a dual up connection babu.knl Linux - Newbie 1 05-22-2008 11:36 PM
How to connect internet in ubuntu 6.10 installed. hashim abdul azeez Linux - Newbie 7 04-10-2007 09:02 AM
Just installed ubuntu 6.06.1 LTS and am trying to set up an internet connection gerryk1949 Linux - Newbie 2 02-20-2007 10:30 PM
Cannot get Internet access on newly installed Ubuntu v5.10 chris_i Ubuntu 10 07-20-2006 06:46 PM
I installed Mandrake 10.0 - cannot get a wireless internet connection !!!! Caine Linux - Wireless Networking 1 03-21-2004 04:50 PM


All times are GMT -5. The time now is 12:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration