LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 05-20-2009, 03:53 PM   #1
mufy
Member
 
Registered: Oct 2004
Location: Kuwait
Distribution: Currently - AIX | Previously - RHEL 4 ES, FC 10
Posts: 206
Blog Entries: 4

Rep: Reputation: 30
Network Change on Solaris 9.0 - My HOWTO


At first the interface bge0 was unplumbed.
ifconfig bge0 unplumb

An 'ifconfig -a' at this stage confirmed that the interface was released as the output showed only the loopback address.

The interface bge0 was given the new IP by plumbing it up (in a single command).
ifconfig bge0 plumb up 10.222.113.218 netmask 255.255.255.0

To make the IP change persistent across reboots, the following file was edited/created by adding the hostname.
vi /etc/hostname.bge0

Routing table was viewed with -
netstat -nr

A new route was added to enable the box to talk with the outside network.
route add 10.0.0.0 -netmask 255.0.0.0 10.222.113.1
route add default 10.222.113.1 (if the default entry is absent in the routing table).

Default gateway was also added to /etc/defaultrouter file.

A configuration reboot was done. Better to do 'sync' 2 times to update the changes before reboot.
reboot -- -r

Reboot produced a strange scenario. I'd be able to ping the members in the same network & outside, but not SSH from outside.
Checking the routing table showed that the entry for 10.0.0.0 --> 10.222.113.1 was absent, i.e that change was not persistent across reboots.

Manually adding the route again solved the problem.

To make this change permanent, I created the following script as /etc/init.d/inetroutes -
ifconfig bge0 unplumb
ifconfig bge0 plumb up 10.222.113.218 netmask 255.255.255.0
route add 10.0.0.0 -netmask 255.0.0.0 10.222.113.1

Gave it 'chmod 755' permission. And a symbolic link was created in run levels 2 & 3 for this file -
ln -s /etc/init.d/inetroutes /etc/rc2.d/S93inetroutes
ln -s /etc/init.d/inetroutes /etc/rc3.d/S93inetroutes

The S93 label is required (I think) for Solaris to pick it up in sequence during the system boot. S90 labelled file relates to NIS or
something. Picked that up from one of the 'rc' scripts.

Apart from the above, the following changes were also made (I'm not sure if these are relevant):
Added the gateway IP and subnet to /etc/netmasks
 
Old 05-24-2009, 03:27 AM   #2
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Some comments:

You are setting two different netmasks for the same network (10.222.113.0). There should be only one. You need to check what is the correct netmask to use in your network.

There is no need to unplumb/configure a NIC to change the routing table.

The /etc/netmasks file should contain a network/netmask pair, no a gateway IP/subnet one.
 
  


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
Howto Mount USB drive in Solaris 8 talat Solaris / OpenSolaris 14 03-25-2009 09:49 PM
howto share files between solaris and winxp a.toraby Solaris / OpenSolaris 11 07-16-2007 04:24 AM
Is there a howto to configure Linux Client to NIS+ Solaris server suchi Linux - Networking 1 11-30-2006 02:20 AM
HowTo mount all Solaris (sun) ufs slices under Linux? DrLou Solaris / OpenSolaris 1 11-17-2004 11:36 AM
Change WM howto? ..:eMa:.. Debian 2 04-07-2004 05:31 AM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 08:19 AM.

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