Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 10-24-2006, 09:47 AM   #1
LQ Newbie
Registered: Jul 2006
Posts: 10

Rep: Reputation: 0
Manually assigning ip address using Slackware

Hello. I am trying to assign a static ip address using Slackware 2.4.26. This is the command that I am typing in:

ifconfig eth0 netmask yyy.yyy.yyy.yyy up route -n add default gw zzz.zzz.zzz.zzz

I did this once before and it worked. Now I get an error statement that says "Host name lookup failure". When I do ifconfig to see the ip settings they all look correct except for the gateway value. That was not accepted for some reason and of course I can't reach the internet to download my Nessus updates.

Can anyone help? Thanks
Old 10-24-2006, 10:21 AM   #2
Registered: Apr 2005
Location: Ohio
Distribution: Slackware && freeBSD
Posts: 676

Rep: Reputation: 30

I think adding ".local" onto the end of your hostname would fix your issues, that and assigning the proper gateway and dns as well.

Hope that helps some.
Old 10-24-2006, 12:18 PM   #3
LQ Newbie
Registered: Jul 2006
Posts: 10

Original Poster
Rep: Reputation: 0
So it would look like: This would be for the static ip address value I presume? Thanks
Old 10-24-2006, 02:26 PM   #4
Senior Member
Registered: Jul 2005
Distribution: Slackware
Posts: 1,178

Rep: Reputation: 47
You have two commands on one line. They need to be separated.

ifconfig eth0 netmask yyy.yyy.yyy.yyy up
route -n add default gw zzz.zzz.zzz.zzz
or if you prefer one line, separate them with a semicolon

ifconfig eth0 netmask yyy.yyy.yyy.yyy up ; route -n add default gw zzz.zzz.zzz.zzz


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Assigning IP address stryka Linux - Networking 5 12-09-2005 11:41 AM
dhcp networking not assigning address quwiltw Linux - Networking 9 12-22-2004 08:25 AM
assigning memory address to pointer irfanhab Programming 4 04-24-2004 03:35 AM
Assigning site-local ipv6 address to an interface goto Linux - Networking 0 03-24-2003 04:06 AM
assigning ip address after install gui10 Linux - Networking 2 03-06-2002 03:36 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:12 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration