Jump to content

static ip


mblanco2000
 Share

Recommended Posts

I am using MDK 10 CE. Before all this I was using dhcp with no problems. I am setting up a server and I need it to have a static ip address. So I set it up in the mandrake control center.

 

I gave it an ip address outside of the range gave it a subnet 255.255.255.0 and the gateway.

 

I can ping everything internally but can not ping or get out of the gateway. Can someone please help I thought this would be alot easier than this.

Link to comment
Share on other sites

I had problems with MCC and network setup. Try to set it up manually:

 

# ifconfig eth0 ${IP_ADDR} broadcast ${BROADCAST} netmask ${NETMASK} up

 

then

 

# route add default gw ${GATEWAY}

 

Replace the ${ } with your settings. May also want to post what comes out when you type

 

#ifconfig (as root)

 

also check your /etc/resolv.conf

In a static environment you must Identify your DNS manually. Id check there first.

 

/etc/resolv.conf

nameserver ${NAMESERVER1}

nameserver ${NAMESERVER2}

 

replace your DNS in ${ }

 

Easiest way to find out if its a DNS problem:

 

type:

 

$ ping -c 3 www.yahoo.com

 

then type

 

$ ping -c 3 216.109.118.79

 

If the second one works but the first doesn't, you need to set your DNS.

Edited by ac_dispatcher
Link to comment
Share on other sites

Im sorry my Laptop died again (another 4 months at best buy repair). My other computer runs SUSE 9.0. Can anyone else help?

 

Maybe post (copy) the file to this board and I may be able to help you.

 

Edit: added point.

 

Your resolv.conf will survive a reboot. no problem there.

Edited by ac_dispatcher
Link to comment
Share on other sites

Ok all of that worked but I want these settings to survive a reboot also.

 

I was able to find where the defualt route gets set. /etc/sysconfig/network

 

Where does the static ip and netmask get set?

 

Thanks for the help

Check the settings in /etc/sysconfig/network-scripts/ifcfg-eth0 (assuming eth0 as the default interface). Mine is:

DEVICE=eth0
BOOTPROTO=static
IPADDR=192.168.0.2
NETMASK=255.255.255.0
NETWORK=192.168.0.0
BROADCAST=192.168.0.255
ONBOOT=yes
HWADDR=<card's MAC address>
MII_NOT_SUPPORTED=no

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...