LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 07-30-2003, 06:49 PM   #1
i_is_cat
Member
 
Registered: Apr 2003
Distribution: redhat 7.2
Posts: 159

Rep: Reputation: 30
how do i reset my ip?


hi
running redhat 7.3 kde
just had the internet reconnected as i hadn't paid the bill until today and i do not want to reboot my system but the internet company doesn't have any info on how to reset the ip on linux the best help they can give is to reboot which i do not want to do.. i know it will work fine if i do reboot but i want to know how to do it without rebooting every single time i have a problem can anyone help plz?
 
Old 07-30-2003, 07:00 PM   #2
fsbooks
Member
 
Registered: Jan 2002
Location: Missoula. Montana, USA
Distribution: Slackware (various)
Posts: 464

Rep: Reputation: 52
The method differs if you have a dynamic or a static IP. It also differs if you are dialup (ppp - modem connection) or dsl (eth0 -NIC connection). Can you fill us in plz?
 
Old 07-30-2003, 07:33 PM   #3
Azmeen
Senior Member
 
Registered: May 2003
Location: Malaysia
Distribution: Slackware, LFS, CentOS
Posts: 1,307

Rep: Reputation: 47
ifconfig <device> down
ifconfig <device> up

Where <device> is usually...
eth0 (or eth1, eth2, etc... depending on how you assign your NIC) for NICs

I don't think you're using dialup/modem, correct me if I'm wrong.

Last edited by Azmeen; 07-30-2003 at 07:34 PM.
 
Old 07-30-2003, 07:36 PM   #4
i_is_cat
Member
 
Registered: Apr 2003
Distribution: redhat 7.2
Posts: 159

Original Poster
Rep: Reputation: 30
sorry fsbooks i posted a reply but i guess it never made it through..
i have a cable modem hooked through a hub to my box and the windows one i am currently using and the other guy.. (your nick here) i will try that out and post another reply
 
Old 07-30-2003, 07:39 PM   #5
i_is_cat
Member
 
Registered: Apr 2003
Distribution: redhat 7.2
Posts: 159

Original Poster
Rep: Reputation: 30
Azmeen

i tried what you said to do and it said there is no command "ifconfig" got any more ideas? ;/
 
Old 07-30-2003, 08:11 PM   #6
fsbooks
Member
 
Registered: Jan 2002
Location: Missoula. Montana, USA
Distribution: Slackware (various)
Posts: 464

Rep: Reputation: 52
Are you doing this as root? Is /sbin in your path? You can always try "/sbin/ifconif" to explicitly state the path. It is in the rpm net-tools: you can always do "rpm -q net-tools" to make sure you have it, but I suspect you do.

The configuration information is actually in a file called /etc/network-scripts/ifcfg-eth0. It is worth taking a look at even if your configuration is setup properly already through a GUI. I myself explicitly set my IP (local 192.168.0.0 space) there, although most people use the DHCP from their router/modem.
 
Old 07-30-2003, 08:28 PM   #7
i_is_cat
Member
 
Registered: Apr 2003
Distribution: redhat 7.2
Posts: 159

Original Poster
Rep: Reputation: 30
ya i switched to root and then tried ifdown eth0 and then ifup eth0 or something like that
it said it worked but then mozilla and lynx and everything still wouldn't work so i just ended up rebooting but i'd still like to know how to do it if anyone can still help
thanx to everyone who tried so far
 
Old 07-30-2003, 09:47 PM   #8
fsbooks
Member
 
Registered: Jan 2002
Location: Missoula. Montana, USA
Distribution: Slackware (various)
Posts: 464

Rep: Reputation: 52
The "ifdown eth0;ifup eth0" sequence should work if your NIC is configured as eth0 (which it usually is). Basically, the /etc/init.d/network script does on bootup is an "ifup eth0" (getting this from the existence of a file /etc/sysconfig/network-scripts/ifcfg-eth0). I suspect your routing was messed up as well. I would do the following next time (as root, of course) "/etc/init.d/network restart" . This would reset all network parameters and devices to bootup conditions. You can mess around with it if you like. For example, save the output of "/sbin/route" and "/sbin/ifconfig". Execute "/etc/init.d/network stop" and you will nolonger have internet. Compare the output "/sbin/route" and "/sbin/ifconfig". now to the previous output. The execute "/etc/init.d/network start" and see that the output of those commands are now what they were to begin with. Note: "/etc/init.d/network restart" is simply a stop/start in sequence. Have fun.

Chris
 
Old 07-31-2003, 03:22 AM   #9
i_is_cat
Member
 
Registered: Apr 2003
Distribution: redhat 7.2
Posts: 159

Original Poster
Rep: Reputation: 30
thanx fsbooks i will try that out
 
  


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 reset AlsaModularSynth FlyingSolo Linux - Software 0 03-31-2005 08:20 PM
Reset permissions spaceballs Slackware 8 03-02-2005 02:45 PM
wallpaper reset OsirisX Debian 2 02-28-2005 02:53 PM
WINE Reset Obelus Linux - Software 3 09-29-2003 01:11 PM
reset stats Tinkster LQ Suggestions & Feedback 3 08-07-2003 01:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:37 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