Results 1 to 7 of 7

Thread: Can't give my computer static ip!

  1. #1

    Default Can't give my computer static ip!

    I'm trying to give my computer (has ethernet wired cable connected to router) a static IP but it's not working. (BTW, I'm using ifup not network manager) Here's what I do:

    YAST > Network Settings > Overview > Edit...

    Statically assigned ip address...

    I give it 192.168.1.8 and 255.255.255.0.
    Hostname I leave as they have it (it's the name of my computer). Click OK, accept and it all says it went through but now I can't ping anything. If I change it back to DHCP, I can ping again. What am I doing wrong?

    (BTW, my ISP is through DHCP not static ip)

  2. #2
    Join Date
    Jun 2008
    Location
    Norman, OK
    Posts
    209

    Default Re: Can't give my computer static ip!

    Did you put anything in for a DNS name server?

    Are you trying to ping a fully qualified domain name (like ping www.google.com)? Have you tried just pinging an IP address (like ping 4.2.2.1).
    Main Machine: Dell G7 running Ubuntu 18.04
    Server: Dell PowerEdge SC1430 running CentOS 7.x

  3. #3

    Default Re: Can't give my computer static ip!

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    You're not filling in DNS settings, and possibly a default route. Having
    an IP address doesn't mean you have a valid IP address that will work with
    the rest of the network, and even if you do it does not mean you setup
    things properly to work with the rest of the network (or other networks)
    in other ways. Setup a default route (aka. gateway) which should be the
    same as your default route when using DHCP, and also set the same DNS
    servers as when using DHCP. To get these settings compare the output from
    the following commands while in DHCP or static modes:

    ip addr
    ip route
    grep -v '^#' /etc/resolv.conf

    Good luck.





    On 05/25/2011 01:06 PM, 6tr6tr wrote:
    >
    > I'm trying to give my computer (has ethernet wired cable connected to
    > router) a static IP but it's not working. (BTW, I'm using ifup not
    > network manager) Here's what I do:
    >
    > YAST > Network Settings > Overview > Edit...
    >
    > Statically assigned ip address...
    >
    > I give it 192.168.1.8 and 255.255.255.0.
    > Hostname I leave as they have it (it's the name of my computer). Click
    > OK, accept and it all says it went through but now I can't ping
    > anything. If I change it back to DHCP, I can ping again. What am I doing
    > wrong?
    >
    >

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v2.0.15 (GNU/Linux)
    Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

    iQIcBAEBAgAGBQJN3VSVAAoJEF+XTK08PnB5u+MQAIFNl5LkQr96P7M4KpuSlUFd
    tE2hsDCSKqnMzKBVgDx3XjZQ/G4vK03/NCWncqtX6e1+F3dzN7hSBHXqz0FK4Bd7
    mJLmrkcG317rFkOKGmMZFUty453vrxU9fAXpbpcyYGHeucbSpJYoRvfW3tHf0dtC
    s+lOXelOMbqQUJrRQcLtVOa5V4ZlvvTcJtDUW7HHIbLaLzoKp7Zijl6qzqdb65+h
    tyxa5IUa2L4gc4rZNMLtapOxOrffyYHouGiycinBtRldIZJ5/zPWamfT31OSWV3J
    2OD9DEyNHfxtUS/d5qoidhe0Azo/26azvAToZ7QGwlJ4yWpyFVnbTTqzYFgEI7l3
    ppHBmvq+Rb81Zb5JEdbtoWVe/oXNgVuvqUCSSBqY1N6EWvspp6S9snMXIVh21nz0
    XC348qwzviDZJOxG3+YCDd3Lr0K+UTBCckHBHBMDpKjku1+3KezuTo1vlWDEucKp
    VXydjc+6itIeM7jQQkKbYyYKVVeBa+LHN6hKUxvOIYczGIpUQpHY5mXQSDtcAUeO
    MMhLAJtmS7UQdQMaaAuaMkb5izznuwjRMji055sXQ4sq+F8AL65g2W1R0nooipMz
    fNK+ZbrGkj4M6zZATacaotf2ozjkBK0zNUCb/Q0D9ypR85BPvTaMAhN/j5WJ9QxB
    9f8obHU5RUiHXKPseJuh
    =q33W
    -----END PGP SIGNATURE-----

  4. #4

    Default Re: Can't give my computer static ip!

    Quote Originally Posted by katanacb View Post
    Did you put anything in for a DNS name server?

    Are you trying to ping a fully qualified domain name (like ping www.google.com)? Have you tried just pinging an IP address (like ping 4.2.2.1).
    Ah, this appears to be the issue. Pinging an ip address gives a reply. It's a qualified domain name that does not. But my router doesn't have any DNS' set in it because it's DHCP from the internet provider, so how do I know what DNS' to use?

  5. #5
    Join Date
    Jun 2008
    Location
    Norman, OK
    Posts
    209

    Default Re: Can't give my computer static ip!

    Quote Originally Posted by 6tr6tr View Post
    Ah, this appears to be the issue. Pinging an ip address gives a reply. It's a qualified domain name that does not. But my router doesn't have any DNS' set in it because it's DHCP from the internet provider, so how do I know what DNS' to use?
    Really -- hmm. If your internet provider is giving you a DHCP address, they must be supplying a DNS servername as well -- otherwise they aren't doing DHCP correctly IMHO. Check your router's IP configuration from your ISP (does it have some sort of web-based admin tool) ... and look in there for DNS server settings. They should be listed.

    If not, then it *USED* to be that you could use 4.2.2.1 and 4.2.2.2 for DNS as they were kinda like 'open' DNS servers, but your mileage may vary ... or you could call your ISP and ask them what DNS server IP addresses to use.
    Main Machine: Dell G7 running Ubuntu 18.04
    Server: Dell PowerEdge SC1430 running CentOS 7.x

  6. #6
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    4,654

    Default Re: Can't give my computer static ip!

    katanacb wrote:
    >
    > If not, then it *USED* to be that you could use 4.2.2.1 and 4.2.2.2 for
    > DNS as they were kinda like 'open' DNS servers, but your mileage may
    > vary ... or you could call your ISP and ask them what DNS server IP
    > addresses to use.
    >

    The following may work or not for the OP. My own router acts as a DNS if I
    set its local IP adress (192.168.178.1 in my special case, the router manual
    should tell which it is) into the appropriate field.

    --
    PC: oS 11.3 64 bit | Intel Core2 Quad Q8300@2.50GHz | KDE 4.6.3 | GeForce
    9600 GT | 4GB Ram
    Eee PC 1201n: oS 11.4 64 bit | Intel Atom 330@1.60GHz | KDE 4.6.0 | nVidia
    ION | 3GB Ram

  7. #7
    Join Date
    Sep 2010
    Location
    Poland
    Posts
    1,970

    Default Re: Can't give my computer static ip!

    Switch back to DHCP for a moment and see what IP of the DNS server You get it should be stored in "/etc/resolv.conf" file. Then with the manual static configuration simply enter the same address and You'll be fine.

    The easy way out is stick to the public DNS servers already provided or use 8.8.8.8 or 8.8.4.4 (google free to use DNSes). It might be that they will work better than your ISPs DNS it may be worse but anyway the difference most likely will be very hard to notice.

    Best regards,
    Greg
    Best regards,
    Greg

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •