LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   LAN IP Address (Change) (https://www.linuxquestions.org/questions/linux-newbie-8/lan-ip-address-change-481215/)

sseeker 09-07-2006 06:23 AM

LAN IP Address (Change)
 
Is it possible to change my LAN IP on my Linux PC? Just i figured out something that i wanna try.

Thank you

P.S
OS: Red Hat Enterprise Version 4

zulfilee 09-07-2006 07:36 AM

Yes its possible.

The command is
netconfig

Run the above command as root user and change the Ip-address.

sseeker 09-07-2006 07:52 AM

Ahhhh yeah then i can't use the internet =/ Is there a way to change it in a file so i can still use the internet? I thought there was just can't remember.

zulfilee 09-07-2006 07:57 AM

What has the local IP to do with internet?

It will not affect the internet connection.
But that depends on what type of connection you are using.

And for what purpose do you want to change the IP?


If its just for temporary display [with ifcoonfig command] you can try

ifconfig eth0 ipaddress

[But take a not of the old ip before doing this]

sseeker 09-07-2006 08:00 AM

Ok well i did that "netconfig" And it came up etc etc... and i filled it out. BUT it don't work.There has to be a file you can edit to change the IP

zulfilee 09-07-2006 08:05 AM

netconfig is the command that is normally used to change the IP in a redhat PC.


IP address will be available in the following files.Check it out.

/etc/sysconfig/network
/etc/sysconfig/network-scripts/ifcfg-eth0 [eth1,etc...]

sseeker 09-07-2006 08:10 AM

Ok the files are saying my IP is 10.0.0.93 BUT the ifconfig isn't. It's saying it's 192.168.0.93 :S

zulfilee 09-07-2006 08:13 AM

Try this [as root user]

ifconfig eth0 down
ifconfig eth0 10.0.0.63
ifconfig eth0 up


But still the purpose of ur IPaddress change is unclear ;>

sseeker 09-07-2006 08:18 AM

Ok. Look my router only forwards ports with 10.0.0 infront of them e.g. (10.0.0.23 10.0.0.98 etc...) So i was wonder of changing the IP so it would work. And it doesn't work! The internet doesn't work.


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