LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   SuSE 9.0 and 9.2 Static IP Setup ? (https://www.linuxquestions.org/questions/linux-networking-3/suse-9-0-and-9-2-static-ip-setup-272180/)

frank-01 12-30-2004 10:37 PM

SuSE 9.0 and 9.2 Static IP Setup ?
 
Hi every body!

I have 2 computer, one with SuSE 9.0 and the other one SuSE 9.2.

I have set up the 2 for DHCP and i use a router/hub. All work fine. (Internet, lan)

I want to use static IP instead of DHCP so that if i use my laptop unplug and then want to go on the net, i wont have to reboot.

I tried to set it up. The lan is working but it does not access the net. It tell me that it dose not find the hostname. I think that it is a question of DNS setup. I tried to fix the problem but with no success. So i set it back to DHCP until i find a solution.

Can anyone help me and tell me how to set the thing to work in static IP ?

Thank you in advance for your reply.

Frank

neo77777 12-30-2004 10:41 PM

edit /etc/resolv.conf file as root
add nameservers statements
nameserver x.x.x.x
nameserver y.y.y.y

Most probably you will need to put the IP of your router in there.

frank-01 12-30-2004 10:49 PM

What do you meen by the x.x.x.x and the y.y.y.y ?

Do you meen that i should replace it by my provider DNS IP adress, primiary for x and secondary for y ?

How do i put the ip for my router in that file, can you give me an example?

Here is the file contant:

--------------------------
### BEGIN INFO
#
# Modified_by: dhcpcd
# Backup: /etc/resolv.conf.saved.by.dhcpcd.eth0
# Process: dhcpcd
# Process_id: 8584
# Script: /sbin/modify_resolvconf
# Saveto:
# Info: This is a temporary resolv.conf created by service dhcpcd.
# The previous file has been saved and will be restored later.
#
# If you don't like your resolv.conf to be changed, you
# can set MODIFY_{RESOLV,NAMED}_CONF_DYNAMICALLY=no. This
# variables are placed in /etc/sysconfig/network/config.
#
# You can also configure service dhcpcd not to modify it.
#
# If you don't like dhcpcd to change your nameserver
# settings
# then either set DHCLIENT_MODIFY_RESOLV_CONF=no
# in /etc/sysconfig/network/dhcp, or
# set MODIFY_RESOLV_CONF_DYNAMICALLY=no in
# /etc/sysconfig/network/config or (manually) use dhcpcd
# with -R. If you only want to keep your searchlist, set
# DHCLIENT_KEEP_SEARCHLIST=yes in /etc/sysconfig/network/dhcp or
# (manually) use the -K option.
#
### END INFO
search @ @
nameserver 192.168.0.1
--------------------------

that IP is the lan ip adress for my router that i use to configure it using a web browser.

thanks

Frank

illusive_spirit 12-31-2004 12:51 PM

I believe neo77777 means you should enter your primary and secondary nameserver values in the Domain Site sector of the /etc/resolv.conf flie in your SuSE box.

However YaST2 configuration Utility can provide a more user friendly interface to configure static IP's. Power Up YaST2(as root) and check out the network device module. Also make sure you set up your default gateway properly.

frank-01 12-31-2004 02:11 PM

I have tried that, nothing i do work.

I have tried to change the file manually with no success.

I have tried YaST2 with no success ether.

I have tried to isolate the problem by trying to access the net using: http://66.54.153.74/
but it did not work, it tell's me an error message.

------------
An error occurred while loading http://66.54.153.74/:
Could not connect to host 66.54.153.74.
------------

that address work when i am with DHCP.

so the problem is not with DNS.

I am at lost.

One thing i think is that it has someting to do with setting my computer to work with my router.

YaST2 set it up right in DHCP mode but not in static IP

Thanks

Frank

andrewdodsworth 01-01-2005 06:28 PM

In YaST .. Network Devices .. Network Card .. Change configured devices .. Edit .. change static IP address on next screen, click on Host name and nameserver button and enter your ISPs nameservers in Nameserver 1 and 2
click Back .. click Routing and enter your gateway address in Default Gateway box (presumably 192.168.0.1).

That should work fine.


All times are GMT -5. The time now is 05:18 AM.