View Full Version : Very new to Ubuntu and networking
caspert_ghost
16th May 2007, 13:46
Hello and thank you for your assistance.
I am following the how-to at:
http://www.howtoforge.com/perfect_setup_ubuntu704_p3
I have gotten this far :)
in section: Configure The Network
is where I am having trouble.
I am running Win XP pro sp2 with Ubuntu 7.04 server in Microsoft virtual PC 6.0.156.0 2007.
I have installed Ubuntu and been playing around with the functions and commands to get a feel (my first time in linux,Ubuntu, using a command server)
In the network settings:
vi /etc/network/interfaces
I have:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
address 172.16.8.100
netmask 255.255.255.192
network 172.16.0.0
broadcast 172.16.8.255
gateway 172.16.8.62
I then type:
/etc/init.d/networking restart
and get the following:
*Reconfiguring network interfaces...
SIOCADDRT: Network is unreachable
Failed to bring up eth0.
our network here is a strange one...
On my host machine:
static IP (from DHCP, but this is the address I have had for 3 years now so I made it static):
ip: 172.16.8.3
subnet mask 172.16.8.3
gateway 172.16.8.62
DNS 218.6.200.139, 172.6.200.139, 61.139.2.69
so the question is what would the "network" be for my situation?
Thank you
Leszek
16th May 2007, 15:26
Hi!
For the broadcast address try 172.16.8.127 and 172.16.8.64 for the network.
Next restart the network:
/etc/init.d/networking restart
caspert_ghost
16th May 2007, 15:46
Thank you.
I now have:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
address 172.16.8.100
netmask 255.255.255.0
network 172.16.8.64
broadcast 172.16.8.127
gateway 172.16.8.62
*if netmask 255.255.255.192 I still get the error**
restarted and all went through...however.
I can not ssh into it.
apt-get update also does not connect
Leszek
16th May 2007, 15:50
Enter:
ifconfig
What do You see ?
caspert_ghost
16th May 2007, 16:04
eth0 Link encap:Ethernet HWaddr 00:03:FF:0F:6D:65
inet addr: 172.16.8.100 Bcast:172.17.8.127 Mask:255.255.255.0
inet6 addr: fe80::203:ffff:fe0f:6d65/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTV:1500 Metric:1
RX packets:42 errors:0 dropped:0 overruns:0 frame:0
TX packets:165 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2520 (2.4 KiB) TX bytes:7674 (7.4 KiB)
Interupt:11 Base address:0xe880
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:95 errors:0 dropped:0 overruns:0 frame:0
TX packets:95 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:9433 (9.2 KiB) TX bytes:9433 (9.2 KiB)
Leszek
16th May 2007, 16:09
Your subnet mask is wrong (255.255.255.0)
caspert_ghost
16th May 2007, 16:21
Your subnet mask is wrong (255.255.255.0)
Your subnet mask is wrong (255.255.255.0)
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
add netmask 255.255.255.0 here
# The primary network interface
auto eth0
iface eth0 inet static
address 172.16.8.100
netmask 255.255.255.0 change this to what?
network 172.16.8.64
broadcast 172.16.8.127
gateway 172.16.8.62
Leszek
16th May 2007, 16:28
The mask from Your first post.
netmask 255.255.255.192
caspert_ghost
16th May 2007, 16:32
* Reconfiguring Network interfaces...
SIOCADDRT Network is unreachable
failed to bring up eth0.
[OK]
Leszek
16th May 2007, 16:46
We got a little mixed up.
Which ip and subnet mask is right for You? Which ones can You use?
The simplest way to find out is configuring the network settings to get everything from dhcp - the way it was when You installed the system,enter ifconfig and write down the settings.You should then be able to use them in the static configuration.
You could even skip writing the network and broadcast addresses and see if Your IP and netmask is right.You have to know Your network's settings to do it by hand.
caspert_ghost
16th May 2007, 16:52
are you refering to my XP settings or the Ubuntu settings??
My XP was getting from DHCP but has never changed so I made them static so they will never change.
On the ubuntu; you mean remove all of the items listed and change "static" to dhcp??
caspert_ghost
16th May 2007, 17:04
ok I changed ubuntu to get from dhcp.
everything appears the same except
ifconfig:
**everything appears the same except**
eth0 inet addr 192.168.131.69 Bcast:192.168.131.255 Mask: 255.255.255.0
open PuTTy insert 192.168.131.69
wait 30 sec.
"network error: connection timed out"
apt-get update
gets updates...
so apparently we are closer to solving my main issue :)
Leszek
16th May 2007, 18:04
So You've got Your settings.This time the mask looks ok.
I haven't noticed the mistake earlier.
You can now write them down and use them next time You experiment :) .
Is ssh server installed (and running) on Your system according to the howto?
apt-get install ssh openssh-server
caspert_ghost
17th May 2007, 08:38
yes it is installed and running.
apt-get install ssh openssh-server
reading package list...done
Building dependency tree
Reading state information...done
ssh is already the newest version
openssh server is already the newest version
The following packages were already installed and no longer required:
libcompress-zlib-perl
use apt-get autoremove to remove them
0 upgraded, 0 installed, 0 to remove and 0 to be upgraded.
caspert_ghost
17th May 2007, 14:18
I have no clue what the problem was.
I started over from scratch and left the dhcp as is from install and everything works fine (including PuTTy into it)
Is it ok to leave it as dhcp or SHOULD it be changed to "static"
Leszek
17th May 2007, 14:39
If You leave it as DHCP Your computer will get the network configuration from the DHCP server.This means that You don't need to worry about configuring Your system to work in the network.DHCP is often used to dynamically change IP addresses of it's clients after some time or reboot of the client system but it doesn't have to work like that.Sometimes DHCP is used to dynamically assign static IP addresses to clients by the MAC addresses of their ethernet cards or modems so they'd always have the same settings.It's pretty convenient.I think that this applies to Your network.
If the administrator would change Your IP from DHCP then Your server would be unreachable from the address specified durring instalation of ISPConfig.
The choice is Yours.
caspert_ghost
17th May 2007, 15:03
I believe its based on the mac address because as I stated earlier I have had the same ip on my xp machine for 3 years now.
if I leave the server as dhcp will I be forced to reboot when the license expires?
here is what I got from ifconfig after setup... would you recomend make it static or leave it as is?
eth0 Link encap:Ethernet HWaddr 00:03:FF:02:6D:65
inet addr:172.16.8.15 Bcast:172.16.8.63 Mask:255.255.255.192
inet6 addr:fe80: :203:ffff:fe02:6d65/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:9 errors:0 dropped:0 overruns:0 frame:0
TX packets:14 errors:0 dropped:0 overruns:0 carrier:0
Collisions:0 txqueuelen:1000
RX bytes:1377 (1.3 KiB) TX bytes:1628 (1.5 KiB)
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: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 KiB) TX bytes:0 (0.0 KiB)
what would I put in the interfaces?
thank you
Leszek
17th May 2007, 16:27
You can configure the eth0 network interface with the static ip with:
ip:172.16.8.15
mask:255.255.255.192
broadcast:172.16.8.63
network:172.16.8.0
But if You decide not to change eth0 to have static settings You won't be disconnected if the lease would expire.That period will then be extended according to DHCP settings.
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.