Hi,
How can I permanently change the IP address of a SUN box.
I tried the following:
ifconfig eri0 192.168.1.57 up.
I also tried :
ifconfig eri0 plumb
ifconfig eri0 192.168.1.57 netmask 255.255.255.0
up.
It works until i reboot the box . Once rebooted I get the old IP
address 192.168.0.57.
Regards,
Nithin
|
|
0
|
|
|
|
Reply
|
Nithin
|
2/20/2009 5:23:00 AM |
|
Nithin <nithinrajan.k@gmail.com> wrote:
> Hi,
>
> How can I permanently change the IP address of a SUN box.
>
> I tried the following:
> ifconfig eri0 192.168.1.57 up.
>
> I also tried :
> ifconfig eri0 plumb
> ifconfig eri0 192.168.1.57 netmask 255.255.255.0
> up.
>
> It works until i reboot the box . Once rebooted I get the old IP
> address 192.168.0.57.
>
> Regards,
> Nithin
man sys-unconfig
You can either use the command to reset networking and reconfigure following
a reboot or use the list of files given in the man page to ensure you've
updated everything that need to be changed.
--
Atheism: Godless, not believing in the existence of gods.
|
|
0
|
|
|
|
Reply
|
Nomen
|
2/20/2009 6:26:06 AM
|
|
Hello, Nithin!
N> How can I permanently change the IP address of a SUN box.
N> I tried the following:
N> ifconfig eri0 192.168.1.57 up.
N> I also tried :
N> ifconfig eri0 plumb
N> ifconfig eri0 192.168.1.57 netmask 255.255.255.0
N> up.
N> It works until i reboot the box . Once rebooted I get the old IP
N> address 192.168.0.57.
/etc/inet/...
/etc/inet/hosts
---
|
|
0
|
|
|
|
Reply
|
Andrew
|
2/20/2009 7:26:54 AM
|
|
Nithin wrote:
> Hi,
>
> How can I permanently change the IP address of a SUN box.
Read the fine Manual ->
http://docs.sun.com/app/docs/doc/816-4554/fwawf?l=en&a=view
regards,
SK
|
|
0
|
|
|
|
Reply
|
Stefan
|
2/20/2009 9:59:44 AM
|
|
Nithin wrote:
> Hi,
>
> How can I permanently change the IP address of a SUN box.
>
> I tried the following:
> ifconfig eri0 192.168.1.57 up.
>
> I also tried :
> ifconfig eri0 plumb
> ifconfig eri0 192.168.1.57 netmask 255.255.255.0
> up.
>
> It works until i reboot the box . Once rebooted I get the old IP
> address 192.168.0.57.
>
> Regards,
> Nithin
Just how did you think the box remembers its IP address???? It's stored
in a file! Look at /etc/hostname/eri*
|
|
0
|
|
|
|
Reply
|
Richard
|
2/20/2009 1:19:44 PM
|
|
you need to change coupe of files in etc than reboot
not the ifconfig cmd
Nithin wrote:
> Hi,
>
> How can I permanently change the IP address of a SUN box.
>
> I tried the following:
> ifconfig eri0 192.168.1.57 up.
>
> I also tried :
> ifconfig eri0 plumb
> ifconfig eri0 192.168.1.57 netmask 255.255.255.0
> up.
>
> It works until i reboot the box . Once rebooted I get the old IP
> address 192.168.0.57.
>
> Regards,
> Nithin
|
|
0
|
|
|
|
Reply
|
BeterHans
|
2/20/2009 1:52:48 PM
|
|
On Feb 20, 5:19 am, "Richard B. Gilbert" <rgilber...@comcast.net>
wrote:
> Nithin wrote:
> > Hi,
>
> > How can I permanently change the IP address of a SUN box.
>
> > I tried the following:
> > ifconfig eri0 192.168.1.57 up.
>
> > I also tried :
> > ifconfig eri0 plumb
> > ifconfig eri0 192.168.1.57 netmask 255.255.255.0
> > up.
>
> > It works until i reboot the box . Once rebooted I get the old IP
> > address 192.168.0.57.
>
> > Regards,
> > Nithin
>
> Just how did you think the box remembers its IP address???? It's stored
> in a file! Look at /etc/hostname/eri*
I thought you had to solder in some jumpers on the NIC?
I mean after all, the OP did ask how to *PERMANENTLY*
change the IP -- ??
8-D
|
|
0
|
|
|
|
Reply
|
ThanksButNo
|
2/20/2009 7:40:14 PM
|
|
On Feb 20, 1:59 am, Stefan Krueger <stadtki...@gmx.de> wrote:
> Nithin wrote:
> > Hi,
>
> > How can I permanently change the IP address of a SUN box.
>
> Read the fine Manual ->http://docs.sun.com/app/docs/doc/816-4554/fwawf?l=en&a=view
Hey, reading the manual is cheating!
I usually thrash around until I either get it to work right
or it breaks, and if it breaks, it probably needed replacing
anyway!
8-D
|
|
0
|
|
|
|
Reply
|
ThanksButNo
|
2/20/2009 7:42:52 PM
|
|
On Feb 19, 9:23 pm, Nithin <nithinraja...@gmail.com> wrote:
> Hi,
>
> How can I permanently change the IP address of a SUN box.
>
> I tried the following:
> ifconfig eri0 192.168.1.57 up.
>
> I also tried :
> ifconfig eri0 plumb
> ifconfig eri0 192.168.1.57 netmask 255.255.255.0 up.
>
> It works until i reboot the box . Once rebooted I get the old IP
> address 192.168.0.57.
Well, you can wade through the 28 page chapter of the Fine Manual
that refers to this topic (yes, I counted the pages);
-- or you can do the following:
Create and edit file: /etc/hostname.eri0
(Generally, "/etc/hostname.{interface}", depending on what
sort of network card the box is using.)
Put in a hostname: say, "mybox"
(Be creative here. We had a customer that named all their
boxes something to the effect of "host01", "host02", etc.
How droll.)
If that's the official name for the host, you might want to
also put it into file "/etc/nodename".
Edit file: /etc/inet/hosts
(although I prefer the old link, "/etc/hosts", and will continue
using it until they take it away, and even then I might just put
it back)
Put in a line that reads:
192.168.1.57 mybox
(generally, "{IP} {hostname} [{host alias}]")
Just in case, check your "/etc/nsswitch.conf" file to make sure
that the "hosts:" line has "files" on it before anything else.
Reboot.
That's usually all I've ever had to do to fix the IP on a Sun box,
although it might be necessary to disable the DHCP client as well.
Try this first, and if it doesn't work, look in /etc/init.d/network
to find out how to shut off the DHCP client.
/:-/
|
|
0
|
|
|
|
Reply
|
ThanksButNo
|
2/20/2009 8:04:25 PM
|
|
On 20 Feb., 21:04, ThanksButNo <no.no.tha...@gmail.com> wrote:
> On Feb 19, 9:23 pm, Nithin <nithinraja...@gmail.com> wrote:
>
> > Hi,
>
> > How can I permanently change the IP address of a SUN box.
>
> > I tried the following:
> > ifconfig eri0 192.168.1.57 up.
>
> > I also tried :
> > ifconfig eri0 plumb
> > ifconfig eri0 192.168.1.57 netmask 255.255.255.0 up.
>
> > It works until i reboot the box . Once rebooted I get the old IP
> > address 192.168.0.57.
>
> Well, you can wade through the 28 page chapter of the Fine Manual
> that refers to this topic (yes, I counted the pages);
>
> -- or you can do the following:
>
> Create and edit file: /etc/hostname.eri0
>
> (Generally, "/etc/hostname.{interface}", depending on what
> sort of network card the box is using.)
>
> Put in a hostname: say, "mybox"
> (Be creative here. We had a customer that named all their
> boxes something to the effect of "host01", "host02", etc.
> How droll.)
>
> If that's the official name for the host, you might want to
> also put it into file "/etc/nodename".
>
> Edit file: /etc/inet/hosts
> (although I prefer the old link, "/etc/hosts", and will continue
> using it until they take it away, and even then I might just put
> it back)
>
> Put in a line that reads:
> 192.168.1.57 mybox
>
> (generally, "{IP} {hostname} [{host alias}]")
>
> Just in case, check your "/etc/nsswitch.conf" file to make sure
> that the "hosts:" line has "files" on it before anything else.
>
> Reboot.
>
> That's usually all I've ever had to do to fix the IP on a Sun box,
> although it might be necessary to disable the DHCP client as well.
> Try this first, and if it doesn't work, look in /etc/init.d/network
> to find out how to shut off the DHCP client.
>
> /:-/
You could also create a runlevel script which alters the ip address
each time the machine gets booted (*remembers the trick to have a
hostname*)
|
|
0
|
|
|
|
Reply
|
Claus
|
2/21/2009 11:47:46 AM
|
|
I am not quite sure which files to edit, but I guess they're in
/etc/inet
However, you know your old IP-adress.
You could do: `cd /etc && grep -R "192.168.0.57" *`
Then you see all the files that have your old IP-address. Also you check
all that files and do:
`sed -i -e 's/192\.168\.0\.57/192\.168\.1\.57/g' /etc/*`
Or something like that.
|
|
0
|
|
|
|
Reply
|
Blikje
|
2/21/2009 5:05:54 PM
|
|
Blikje Ham writes:
> I am not quite sure which files to edit, but I guess they're in
> /etc/inet
> However, you know your old IP-adress.
> You could do: `cd /etc && grep -R "192.168.0.57" *`
> Then you see all the files that have your old IP-address. Also you check
> all that files and do:
> `sed -i -e 's/192\.168\.0\.57/192\.168\.1\.57/g' /etc/*`
>
> Or something like that.
/etc/nodename
/etc/hostname.<interface>
/etc/inet/hosts
/etc/inet/ipnodes
Those are all files you need to edit on Solaris 10.
--
Micha� Marek Gryko sometimes called Odkurzaczem.
|
|
0
|
|
|
|
Reply
|
odk
|
2/22/2009 1:28:30 PM
|
|
On Feb 21, 6:47=A0am, Claus Dragon <clausk...@hotmail.com> wrote:
>
> You could also create a runlevel script which alters the ip address
> each time the machine gets booted (*remembers the trick to have a
> hostname*)
Oh, the next sysadmin to get the machine would just love THAT.
-andy
|
|
0
|
|
|
|
Reply
|
andy
|
2/22/2009 3:29:56 PM
|
|
On Feb 22, 5:28 am, odk <o...@pg.gda.delthis.pl> wrote:
> Blikje Ham writes:
> > I am not quite sure which files to edit, but I guess they're in
> > /etc/inet
> > However, you know your old IP-adress.
> > You could do: `cd /etc && grep -R "192.168.0.57" *`
> > Then you see all the files that have your old IP-address. Also you check
> > all that files and do:
> > `sed -i -e 's/192\.168\.0\.57/192\.168\.1\.57/g' /etc/*`
>
> > Or something like that.
>
> /etc/nodename
> /etc/hostname.<interface>
> /etc/inet/hosts
> /etc/inet/ipnodes
>
> Those are all files you need to edit on Solaris 10.
One more --
/etc/nsswitch.conf
It's possible the "hosts:" line instructs to fetch the
IP from the NIS server, and only use the local files
if that fails. There are two options here: the more
correct option of course is to fix the NIS server, but
if that's not possible, then set the "hosts:" line to
fetch from "files" before asking NIS (or NIS+).
/:-/
|
|
0
|
|
|
|
Reply
|
ThanksButNo
|
2/22/2009 8:10:44 PM
|
|
Here=92s a quick HOWTO. Let=92s assume our network card is eri0, and we
want to create a virtual interface called eri0:1
Create the virtual interface:
# ifconfig eri0:1 plumb
Configure the virtual interface:
# ifconfig eri0:1 179.164.83.161 netmask 255.255.255.0 broadcast
179.164.83.255
Check to make sure it worked:
# ifconfig -a
lo0: flags=3D1000849 mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
eri0: flags=3D1000843 mtu 1500 index 2
inet 179.164.83.160 netmask ffffff00 broadcast 179.164.83.255
ether 0:3:ba:9:63:9b
eri0:1: flags=3D1000842 mtu 1500 index 2
inet 179.164.83.161 netmask ffffff00 broadcast 179.164.83.255
Finally bring up your new virtual interface:
# ifconfig eri0:1 up
To make it come up on start, this is important: Create /etc/
hostname.eri0:1 with below entries, make sure the hostname is in /etc/
hosts
hostname
addif <IP> netmask + broadcast + up
|
|
0
|
|
|
|
Reply
|
Aadi
|
2/23/2009 8:41:58 AM
|
|
|
14 Replies
1142 Views
(page loaded in 0.557 seconds)
|