how can I install a network by use of a router (gateway) manually?

Asked by schumi_lu

Hi,
I'm new on Ubuntu (Linux)

Ubuntu has prepared my network and my connection to internet automatically.

Now as we use other PCs that are all connected to a router, how can I define the IP-addresses manually such that all PCs and the network.printer can be addressed?

How can I ddefine a new IP-address for my PC ?

I tried to define the addresses in the interface-file but then the internet connection didn't work anymore.

On windows xp there was no problem for me to declare theses addresses.
many thanks in advance.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
schumi_lu
Solved:
Last query:
Last reply:
Revision history for this message
Steven Danna (ssd7) said :
#1

Hi,

We are gonna need a bit more information in order to solve your problem. First,

Is the computer in question connecting to the router via a wired or wireless connection?

Second, can you post the /etc/network/interfaces file that you have created?

Third, can you do the following and post the output here:

1) Open a terminal (Applications->Accessories->Terminal)
2) Run the command
apt-cache policy network-manager

If you are using a current version of network manager, it should be possible to set this up without /etc/network/interfaces

Revision history for this message
teresa (obrienteresa9) said :
#2

I have a similar problem in that my computer will run the internet from a cable connection but I cannot get it to run from the wireless internet USB cartridge connection. Can you help?
I am running ubuntu 9.04 on the computer and have Talktalk internet service. They have said they
only support Windows and that I have to sort it out on my own.
Teri

Revision history for this message
Steven Danna (ssd7) said :
#3

Teresa,

Could you please create a separate question for your issue? You can do that by going here:

https://answers.launchpad.net/ubuntu/+addquestion

Revision history for this message
schumi_lu (schumi-lu) said :
#4

Hi Steven,

Thanks for your reply.

Here my answers:

1) it's a wireless connection (LAN)

2)here the contents of the /etc/network/interfaces :
actually:

auto lo
iface lo inet loopback

and when I changed:

iface eth0 inet static
address 192.168.1.2
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameservers 192.168.1.1

auto eth0

3) Here the output of apt-cache policy network-manager (sorry, but I use the german version):

Installiert: 0.7.1~rc4.1.cf199a964-0ubuntu2
 Kandidat: 0.7.1~rc4.1.cf199a964-0ubuntu2
 Versions-Tabelle:
*** 0.7.1~rc4.1.cf199a964-0ubuntu2 0
       500 http://lu.archive.ubuntu.com jaunty/main Packages
       100 /var/lib/dpkg/status

I've installed Ubuntu 9.04
Thanks in advance,
Dietmar

Revision history for this message
Steven Danna (ssd7) said :
#5

Hi, try the following directions. Unfortunately I do not know enough German to write these in German so hopefully you will be able to translate.

1) Open a terminal (Applications->Accessories->Terminal)
2) run the command: gksudo gedit /etc/network/interfaces
3) remove everything from the file EXCEPT:

auto lo
iface lo inet loopback

4) Save and Close the file.
5) Restart your computer.
6) Log in.
7) In the top right hand corner you should see the NetworkManager applet. By clicking on this you should get a list of the wireless networks in the area.
8) Select your wireless network and put in any network keys required to connect to it. By default this will use DHCP to connect, however we will change this shortly.
9) After you are connected Right-Click on the Network Manager Icon and Select "Edit Connections"
10) Switch to the wireless tab
11) Select your wireless network from the list and hit "Edit"
12) In the new box, switch to the IPv4 Settings Tab
13) Change "Method" to "Manual"
14) Click the "Add" button and then manually put in your desired IP address, the netmask, and gateway.
15) Also put in a dns-server. Rather than 192.168.1.1 you may want to do the following:

     a) Right click on the Network Manager Icon again
     b) Click "Connection Information"
     c) Make note of your "Primary DNS" for the connection and use that.

16) Once all that information is entered "Hit apply" and close the "Network Connections" dialog box.
17) Click on the Network Manager applet and click on your network again to force it to reconnect with the new settings.
18) Ensure that it your settings are now as desired by Right clicking on "Network Connections" and clicking "Connection Information"

Revision history for this message
schumi_lu (schumi-lu) said :
#6

Thanks very much Steven. english is no problem for me.

I did all you explained, but the Apply-button is not activated after having entered all thes details as you described (manual method)

I only find one wireless network in the list on the top right hand corner and it's called "Auto eth0". It is this one I tried to change by following your instructions.

So, why is the Apply button not activated?

Hope you have patience enough for help.

Thanks in advance,
Dietmar

Revision history for this message
Steven Danna (ssd7) said :
#7

Hi,

I think the auto eth0 is the wired network since your Wireless network would be listed by its SSID, that is, the name of your wireless network. Do you not see any wireless network in Network Manager? If so, are you sure you edited /etc/network/interfaces as I described and that your wireless network is broadcasting its SSID?

The Apply button won't become activated until you have filled out all the required fields with valid information.

Revision history for this message
schumi_lu (schumi-lu) said :
#8

Hi,

It works finally. Thank you very much for all your support and patience.

First it is a wired network and not as I said a wireless network I want to change.

I followed all steps as you explained, except the dns-server- address which I had to set on 192.168.1.1 (like the gateway).
The address I picked up from Primary DNS on the connection Information did not work because my internet connection did not function with this.

The next step is to connect my PC to a printer that is connected to another PC in the network. Can you give me a link to the right documentation for this challenge?

Have a good day.
Dietmar

Revision history for this message
Steven Danna (ssd7) said :
#9

Glad to hear everything worked out. Setting up a network printer will depend on what OS the machine connected to the printer is running. There are directions on the following page for various configurations:

https://help.ubuntu.com/community/Printers

It may be best to mark this question as solved and opened a new one that way if you have problems it is more likely to be seen by people with knowledge of setting up printers.

Revision history for this message
schumi_lu (schumi-lu) said :
#10

The network-printer also works now. Thanks for the link, it helped me to define the parameters of the printerserver (see systemadministration/printers):
For the connection I had to a add the IP-address of the other PC which is directly connected to the printer by USB.

Both PC use Ubuntu 9.04