Network problems with Ubuntu Server 7.1

airbornflghtairbornflght Houston, TX
edited January 2008 in Science & Tech
I'm really running into some issues here. I'm not sure what is going awry, but when I installed ubuntu server 7.1 it would never be able to use DHCP to get network information. So at first I just typed everything in outside of the routers DHCP lease range. I gave it an ip of 192.168.0.251. I also typed in the gateway and net mask and all the other good stuff. Well it would go, but when it got to the part of the install that it scanned the remote server it would just hang.

So I restarted the install and said configure network settings later, leaving the network cable unplugged. So I get through the install and now I'm trying to get a connection to the internet. I have the network stuff setup from editing vi /etc/network/interfaces. Then I restarted the networking. I also edited sudo vi /etc/hosts and rebooted the computer. I checked my router and it is listed under the attached devices. Excellent, or so I thought. I go back to try and 'sudo apt-get update' and it say that it can't resolve the dns names. So I'm obviously not getting a live connection to the internet, just my network.

I have a netgear FA311 NIC that I just bought for it. The computer is a 333 Mhz Pentium II with 256 mb of ram. All I want to do is use this as a dev server.

All I need is apache, php and mysql. I also want ruby and python, but that can come later. I also am going to install webmin and ssh so that I can do everything from my room and stick this old tank (it literally weighs ~35 pounds) in the network closet up stairs.

The problem is I can't install ssh or webmin and the other packages without a live connection to the internet, if I read correctly. I thought this would be a bit easier.

Can some unix guru help me out?

Comments

  • airbornflghtairbornflght Houston, TX
    edited January 2008
    Anyone? This is semi-urgent.
  • JBJB Carlsbad, CA
    edited January 2008
    What does 'sudo ifconfig' output?

    Secondly, what did you edit in the hosts file?
  • airbornflghtairbornflght Houston, TX
    edited January 2008
    In the hosts file I changed ubuntu's (my hostname) ip address to what it is on the network. I was following a guide, but it assumed you had a live internet connection.
  • JBJB Carlsbad, CA
    edited January 2008
    What is in /etc/network/interfaces? Is that where you specify your static IP or the dhcp program to run?

    Did you get an output from ifconfig?
  • airbornflghtairbornflght Houston, TX
    edited January 2008
    etho:

    Link encap: Ethernet HWaddr 00 : 1E : 2A : 3D : 84 : FE
    inet addr: 192.168.0.251 Bcast: 192.168.0.255 Mask: 255.255.255.0
    inet6 addr: fe80::21e:2aff:fe3d:84fe/64 Scope:Link
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:21273 errors:0 dropped:0 overruns:0 frame:0
    TX packets:1492 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:1788526(1.7 MB) TX bytes:206831 (201.9 KB)
    Interupt:11 Base address:0xe000


    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:747 errors:0 dropped:0 overruns:0 frame:0
    TX packets:747 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:59930(58.5 KB) TX bytes:59930 (58.5 KB)

    That is what it says, but I don't know how I would test to see if it is seeing the internet. is there anything I can do from the CLI to.... scratch that.

    I am pinging google, I typed in a resolved ip that i got from the windows ping utility (64.233.167.104) and I am getting replies. So how do I get dns/hostnames to resolve. This seems to be the issue. I have two dns servers from my isp (dedicated fiber) is there a place to set those? Shouldn't it be getting those from the gateway(router)?

    I just ended the ping and I have a 43% packet lost out of 115, 65 were received. So that is a little interesting. Our connection has been flaky lately but I think that is the router's fault. And I didn't think it was that flaky
  • JBJB Carlsbad, CA
    edited January 2008
    So at first I just typed everything in outside of the routers DHCP lease range. I gave it an ip of 192.168.0.251.

    Switch back to DHCP and see if it all just works. If you want to keep the static IP you need to edit /etc/resolv.conf and add your dns servers.
  • airbornflghtairbornflght Houston, TX
    edited January 2008
    Ok, just did a little troubleshooting.

    I pinged both a local computer(my workstation) and a remote computer(google server) with 100 packets. The local computer had no packet loss, the remote computer had 21% packet loss. What gives? Obviously it's the router/gateway that is being flaky, I guess it could also be the transceiver that is old as balls, but I doubt it.

    How do I get this thing to resolve host/DNS names? I'm litterally getting drove up a wall by this. I wanted to get ssh and webmin installed and tuck the computer away in a networking closet.
  • airbornflghtairbornflght Houston, TX
    edited January 2008
    JB wrote:
    Switch back to DHCP and see if it all just works. If you want to keep the static IP you need to edit /etc/resolv.conf and add your dns servers.

    Would I list my gateway or my ISP's dns servers?

    I just opened that file in vi and it is a new file. So it wasn't there.
  • JBJB Carlsbad, CA
    edited January 2008
    Lots of traffic? Be thankful for TCP.;)
  • JBJB Carlsbad, CA
    edited January 2008
    Would I list my gateway or my ISP's dns servers?

    You'll need to set your gateway and dns servers. Why don't you go back to DHCP, since your router is already handing that information out?
  • airbornflghtairbornflght Houston, TX
    edited January 2008
    These are what my two files look like except with my information put in. Both the network and the hosts. I don't know how to do DHCP since I typed the eth0 in by hand.
  • JBJB Carlsbad, CA
    edited January 2008
    Edits to hosts:
    remove the line "192.168.1.101 Server1"

    Edits to networks:
    Remove all your hand typed addresses
    change "iface eth0 inet static" to "iface eth0 inet dhcp"

    This is assuming you have a dhcp client (dhcpcd for example).
    you can type "sudo apt-get -s dhcpcd" to see if you need to install this application.

    After you make the changes restart your network device and see what happens.
    "sudo /etc/init.d/networking restart"

    **Edited for Ubuntu specific config**
  • airbornflghtairbornflght Houston, TX
    edited January 2008
    can I just comment out those lines instead of removing them? Is the # the comment character?
  • JBJB Carlsbad, CA
    edited January 2008
    That works too.
  • airbornflghtairbornflght Houston, TX
    edited January 2008
    well hot damn. It's working. I did 'sudo apt-get update' and it's all downloading. friggin amazing. Now I just have to figure out how to get it on a static ip so I can use it for server duty.
  • JBJB Carlsbad, CA
    edited January 2008
    well hot damn. It's working. I did 'sudo apt-get update' and it's all downloading. friggin amazing. Now I just have to figure out how to get it on a static ip so I can use it for server duty.

    http://www.cyberciti.biz/tips/howto-ubuntu-linux-convert-dhcp-network-configuration-to-static-ip-configuration.html
    Google is your friend, linux n00b ;)

    You could also use no-ip.com's client (http://www.no-ip.com/downloads.php) that updates no-ip.com every time your server address changes. Do an apt-get -s no-ip and see what you can find.
  • airbornflghtairbornflght Houston, TX
    edited January 2008
    no, I think you misunderstand my friend.

    We have a static external ip address. We are on a dedicated 10/1 fiber line. (which is weird because I'm downloading at a blazing 8KB/s..I blame the cheap ass router)

    Besides, I don't want the server to be visible from the outside. I just want a static internal ip address so that my router isn't always handing out different ip's to this server. That way I can remote into it and do work.
  • JBJB Carlsbad, CA
    edited January 2008
    Besides, I don't want the server to be visible from the outside. I just want a static internal ip address so that my router isn't always handing out different ip's to this server. That way I can remote into it and do work.

    It won't be public with the no-ip tool. Your server will report it's address, 192.168.1.101 for example. When you connect to airborn.no-ip.com the name will resolve to that private IP. You will be able to connect, but that address has no meaning to anyone on the other side of your router.
  • airbornflghtairbornflght Houston, TX
    edited January 2008
    oh ok I get it.

    is there a way to just set a static ip? I thought if I put it outside of the routers dhcp range then I'd be fine. Right now I'm downloading at a wholping 15 kB/s (tops). damn gamers. I'd like nothing more than to boot them off the network. I have qos with port 80 tcp/udp traffic the highest, but the poor thing can't handle the traffic.

    I read the how to, I'll try that. But is there a reason why my settings didn't work when I had them entered correctly, or is there more to it that I'm not seeing?


    3 hours and all my updates should be downloaded... 10kB/s sucks big time when you have 100mB to download.
  • shwaipshwaip bluffin' with my muffin
    edited January 2008
    your router should be able to give it a static ip.
  • airbornflghtairbornflght Houston, TX
    edited January 2008
    I read the how to, I'll try that. But is there a reason why my settings didn't work when I had them entered correctly, or is there more to it that I'm not seeing?
  • beatzbeatz i am a hamburger
    edited January 2008
    Without any settings in resolv.conf your server won't be able to resolve any hostnames without dhcp. Check the manpage (man resolv.conf) to see how to set it up.
  • airbornflghtairbornflght Houston, TX
    edited January 2008
    Ok, I'm all set up for the most part.

    I have ssh and webmin working. It is up in the network closet and I'm working on it right now. Right now I'm trying to create a share to the apache directory and get bandwidthd to work.

    Am I correct in assuming bandwidthd will track bandwidth usage for everyone on the network (all on same subnet).
  • JBJB Carlsbad, CA
    edited January 2008
    Am I correct in assuming bandwidthd will track bandwidth usage for everyone on the network (all on same subnet).

    I think you would have to be the router or on a hub to see everyone else's traffic. Your router's built in switch is not going to broadcast every packet to your server.
  • airbornflghtairbornflght Houston, TX
    edited January 2008
    JB wrote:
    I think you would have to be the router or on a hub to see everyone else's traffic. Your router's built in switch is not going to broadcast every packet to your server.

    We are on a switch. But those don't broadcast every packet though. I'll try it. you never know.
Sign In or Register to comment.