LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 02-07-2003, 08:43 AM   #1
wass29
Member
 
Registered: Feb 2003
Distribution: Slack 9,10 Ubuntu 8.04-current RHEL4(sort of)
Posts: 63

Rep: Reputation: 15
Smile Change of IP


I Installed Slackware 8.1 on Monday of this week and have been enjoying everyday since. this is a work machine and so I get to play while I get payed..... Since it is a learning expiernce for me and my background knowledge with linux is limited to a little playing around a year ago. I sit in the office and try to find things to do to the computer. Ways to make it better and things totry etc... On of my coworkers wants me to put it on our network and se how it deals with that sort of stuff, I have tried searching for a little while but cannot find what file I need to modify to change the IP address, Anyone know. I am looking to learn from this so if there is an easy way and a hard way then I would like to know both...... I know this is long and dumb but I am having fun and looking for some help.....
 
Old 02-07-2003, 08:55 AM   #2
Astro
Member
 
Registered: Jan 2003
Location: Ballston Lake, NY
Distribution: Slackware, Debian
Posts: 665

Rep: Reputation: 30
Well first of all, when you ran setup did you let it configure your network for you? If not, you'll need to get to a root account and run 'netconfig'... it will ask you the basics, like static or dhcp, dns, gateway, and what not, then at the end it will try to probe your ethernet card. I havn't yet found an ethernet card it can't probe, while other distros sometimes have problems. Once you run netconfig, still as root you can run 'ifconfig' and it will show you what interfaces are currently up and other misc. information about them.
 
Old 02-07-2003, 10:05 AM   #3
Half_Elf
LQ Guru
 
Registered: Sep 2001
Location: Montreal, Canada
Distribution: Slackware; Debian; Gentoo...
Posts: 2,163

Rep: Reputation: 46
Setup scripts are for weak (hehehe)

edit /etc/rc.d/rc.inet1 with a text editor (pico as example)
the adress your system assign to eth0 and eth1(ethernet card #0 and #1) at boot are inside. Just change it as what you want.

Or if you want to change your IP on-the-fly, just type this :
ifconfig eth0 your_ip
Et voilą! no need to reboot.
 
Old 02-07-2003, 11:46 AM   #4
Astro
Member
 
Registered: Jan 2003
Location: Ballston Lake, NY
Distribution: Slackware, Debian
Posts: 665

Rep: Reputation: 30
In reference to editing the rc.inet.1 and rc.inet.2 if you run netconfig it edits inet.1 for you. Plus it's a somewhat nice interface for setting it up...if you have a second ethernet card I reccomend using rc.local to inititlize it like this:

Code:
# First we set the ip address and misc shitza:
IPADDR="192.168.0.1"      # Internal IP
NETMASK="255.255.255.0"   # Netmask
NETWORK="192.168.0.0"     # Network Address
BROADCAST="192.168.0.255" # Broadcast Address
GATEWAY=""                #Gateway

# now we set up the nic:
echo "Configuring eth1 as ${IPADDR}..."
/sbin/ifconfig eth1 ${IPADDR} broadcast ${BROADCAST} netmask ${NETMASK}
The second assuming that you have the proper module loaded for that specific ethernet card.
 
Old 02-08-2003, 09:10 PM   #5
morad
LQ Newbie
 
Registered: Jan 2003
Location: Paris, FRANCE
Distribution: slackware 8.1
Posts: 3

Rep: Reputation: 0
let'go hard

I'm assuming here that your net card module is loaded. And assuming you only have one card for your network.

Now, instead of speaking about config files, i'm simply going to tell you about the "ifconfig" command.
You asked for a way to change IP adress, here it is : ifconfig.
Just run :

/sbin/ifconfig eth0 "your_ip" broadcast "your_broadcast" netmask "your_netmask"

For example on my computer i just run :

/sbin/ifconfig eth0 172.16.0.221 broadcast 172.16.255.255 netmask 255.255.0.0

this is basically what you need to change IP/NetMAsk/Broadcast on your linux box.
The rc.inet1 and co. files mentionned above are just files launching ifconfig while starting your system.
 
  


Reply



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
How do I change the cursors globaly for a user? and how do I change them in the E-WM? enigma Z Linux - Software 1 09-18-2004 03:59 PM
Cannot Change GNOME Menu Items to add/change Item for Mozilla 1.2 After Upgrade metoome General 0 03-27-2004 12:19 AM
Cannot Change GNOME Menu Items to add/change Item for Mozilla 1.3 After Upgrade SForsgren Linux - General 4 03-26-2004 11:43 PM
under kde3 i change change language, where in gnome? sirpelidor Mandriva 1 12-10-2003 04:39 PM
mountig - change ro to rw, delete directory, change rw to ro ?? itsjustme Linux - General 6 10-17-2003 11:48 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

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

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