You are not logged in.

#1 2010-11-14 20:02:50

coldblud
Member
Registered: 2010-11-11
Posts: 11

Problems using ifconfig

I am trying to change my IP after booting my arch system. Unfortunately, I am bieng able to set up the IP using Ifconfig and ping the gateway, but the network just doesnt seem to work past my gateway. I am not changing the IP in the rc.conf file while doing this because  I just want to change my IP temporarily. Thankx for you help in advance.


Trying to get into the world of linux

Offline

#2 2010-11-14 20:19:41

skunktrader
Member
From: Brisbane, Australia
Registered: 2010-02-14
Posts: 1,543

Re: Problems using ifconfig

If your new IP address is on a different subnet, then are you also changing the mask and default gateway / setting up a route?

Offline

#3 2010-11-14 20:24:41

coldblud
Member
Registered: 2010-11-11
Posts: 11

Re: Problems using ifconfig

I am changing the subnet everytime along with the ifconfig syntax..  Still it isnt working.. Any other way to change the IP temporarily?


Trying to get into the world of linux

Offline

#4 2010-11-14 21:50:19

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Problems using ifconfig

You haven't answered skunktrader's question about routing. Changing your IP address without changing your routing table would create the behaviour you described. You may also need to make similar changes for dns.

Offline

#5 2010-11-15 06:47:08

coldblud
Member
Registered: 2010-11-11
Posts: 11

Re: Problems using ifconfig

The subnet is same for both the IPs. Is there a need to change the routing table?


Trying to get into the world of linux

Offline

#6 2010-11-15 07:19:49

cirkit
Member
From: San Francisco
Registered: 2008-01-29
Posts: 80
Website

Re: Problems using ifconfig

coldblud wrote:

I am changing the subnet everytime along with the ifconfig syntax..  Still it isnt working

Why would you need to change the subnet if you're just trying to change the IP within that same subnet?

coldblud wrote:

The subnet is same for both the IPs. Is there a need to change the routing table?

Since it seems you're just trying to change the IP within the same subnet, a simple

ifconfig <interface> <new IP> up

will do this. In this case, changing the routing table would not be necessary. You may however want to remind the system that you're still using the same default gateway

route add default gw <gateway>

right after using ifconfig, then see if you can ping past the gateway.  I had to reinput the default gateway on a few occasions.

Offline

#7 2010-11-15 16:32:56

coldblud
Member
Registered: 2010-11-11
Posts: 11

Re: Problems using ifconfig

I guess thats where I went wrong, I had to supply the gateway ip again to the system, and it worked.. Thanks a lot.. Really appreciate your help.


Trying to get into the world of linux

Offline

#8 2010-11-16 10:36:05

cirkit
Member
From: San Francisco
Registered: 2008-01-29
Posts: 80
Website

Re: Problems using ifconfig

Glad it worked smile

Please mark this thread as solved in the subject.

Offline

Board footer

Powered by FluxBB