Networking Forums

Networking Forums > Computer Networking > Linux Networking > ipconfiguration in terminal

Reply
Thread Tools Display Modes

ipconfiguration in terminal

 
 
Raghul
Guest
Posts: n/a

 
      03-05-2005, 09:01 PM
Hi,
I am new to linux.I am having a problem in changing ip address. I
use 192.168.1.1 ip and 203.155.548.1 . What i need is a script that can
change the ip from 192... to 203... ip .Is it possible in linux?

 
Reply With Quote
 
 
 
 
Mark Carroll
Guest
Posts: n/a

 
      03-06-2005, 01:46 AM
In article <(E-Mail Removed) .com>,
Raghul <(E-Mail Removed)> wrote:
>Hi,
> I am new to linux.I am having a problem in changing ip address. I
>use 192.168.1.1 ip and 203.155.548.1 . What i need is a script that can
>change the ip from 192... to 203... ip .Is it possible in linux?


Try "man ifconfig". It may be what you want.

-- Mark
 
Reply With Quote
 
Raghu Uppalli
Guest
Posts: n/a

 
      03-06-2005, 03:24 AM
What distribution do you use. Most distributions now have some GUI for
configuration tasks.

--r

 
Reply With Quote
 
Sir Jackery
Guest
Posts: n/a

 
      03-07-2005, 05:17 AM


On 5 Mar 2005, Raghul wrote:

> Hi,
> I am new to linux.I am having a problem in changing ip address. I
> use 192.168.1.1 ip and 203.155.548.1 . What i need is a script that can
> change the ip from 192... to 203... ip .Is it possible in linux?


Are you physically changing the networks that you are plugged into? Those
addresses belong to different classes.

Do you have two network cards that are each plugged into a different
network? Sounds to me like you have a computer that is connected to the
internet and one connected to a LAN. If this is the case you need to
assign one card one address and another card the other address. You can do
this with ifconfig (man ifconfig). You will also need to setup your
routing table with route so that the correct packets are transmitted to
the correct networks through the correct interfaces (network cards).

If all you need to do is change the IP address of the card, you can write
a script like this:

--cut--

#!/bin/bash

lan() {
echo -n $"Switching to 192 address."
ifconfig <ifconfig parameters that match your needs>
}

wan() {
echo -n $Switching to WAN address."
ifconfig <ifconfig parameters that match your needs>
}

case "$1" in
lan)
lan
;;
wan)
wan
;;
*)
echo $"Usage: $0 {lan|wan}"
exit 1
esac

exit 0


--cut--

-jackery

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Terminal Server and DNS mohammed Windows Networking 4 07-01-2004 04:04 AM
Terminal Services Windows Networking 6 06-30-2004 08:38 AM
terminal services f5mann Windows Networking 3 06-23-2004 08:46 PM
Terminal RDP problem news.microsoft.com Windows Networking 1 12-16-2003 11:35 PM
Remote Terminal Christopher Linux Networking 3 06-25-2003 04:23 PM



1 2 3 4 5 6 7 8 9 10 11