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-02-2007, 08:24 AM   #1
jonfa
Member
 
Registered: Mar 2001
Location: FL
Posts: 257

Rep: Reputation: 30
Solaris 10 adding/seeing 2nd Nic


Hi All,

I setup a Solaris 10 machine with 2 nics, but only one nic is recognized when I do a:

/sbin/ifconfig -a

They are identical nics. Can someone point me to the proper way to add & configure the nic.

I did a:

/usr/sbin/prtconf -pv | more

and it shows both nics.

Thanks
 
Old 05-02-2007, 09:44 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
Code:
/sbin/ifconfig -a plumb
should make the second NIC visible.

You'll need more settings if you want the interface to stay after a reboot. The way to do it depends on whether you want a fixed IP or a DHCP one.
 
Old 05-02-2007, 09:54 AM   #3
jonfa
Member
 
Registered: Mar 2001
Location: FL
Posts: 257

Original Poster
Rep: Reputation: 30
/sbin/ifconfig -a plumb worked...Thanks!

How do I make the settings permanent for a static IP?
 
Old 05-02-2007, 11:02 AM   #4
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
You are likely to already have a file named "/etc/hostname.<ifname>0" which sets the IP for the first NIC.

Just create a file names "/etc/hostname.<ifname>1" containing the new NIC settings.
 
Old 05-02-2007, 01:59 PM   #5
jonfa
Member
 
Registered: Mar 2001
Location: FL
Posts: 257

Original Poster
Rep: Reputation: 30
I currently have a /etc/hostname.pcn0, but all it contains is my hostname. If I create a /etc/hostname.pcn1 for the second nic where do I make modifications to specify the ip address and netmask?

Do I modify a file in /etc/inet?

Can I use ifconfig to specify the ip, netmask, gateway, etc...?

Thanks for the help.
 
Old 05-02-2007, 02:24 PM   #6
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
Quote:
Originally Posted by jonfa
I currently have a /etc/hostname.pcn0, but all it contains is my hostname. If I create a /etc/hostname.pcn1 for the second nic where do I make modifications to specify the ip address and netmask?
The same way it is done for the first nic.
Quote:
Do I modify a file in /etc/inet?
Yes, you can add the new "IP hostname" line to the /etc/hosts (a.k.a. /etc/inet/hosts).
Quote:
Can I use ifconfig to specify the ip, netmask, gateway, etc...?
Everything in the /etc/hostname.xxx is automatically processed by ifconfig.
You can directly put the IP address here if you don't want to use the /etc/hosts file for name resolution.
netmasks are better set in /etc/netmasks.
The (default) gateway is set in the /etc/defaultrouter file.
 
Old 05-03-2007, 07:51 AM   #7
jonfa
Member
 
Registered: Mar 2001
Location: FL
Posts: 257

Original Poster
Rep: Reputation: 30
Thank you for all your help. I really appreciate it.
 
Old 05-03-2007, 08:53 AM   #8
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
You are welcome !
 
  


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
Adding 2nd NIC diff subnet - looking for how to? tiger.woods Linux - Networking 2 04-11-2007 02:55 PM
Adding 2nd NIC for LAN EgoX Linux - Networking 8 02-13-2006 08:45 PM
Adding 2nd NIC to FC4 Machine lucktsm Linux - Networking 3 01-07-2006 08:12 PM
1st nic regular FTP, 2nd nic SSH Riselong Linux - Distributions 2 02-02-2004 05:13 PM
Problem with adding a 2nd NIC to RH 7.0 IHawk Linux - Networking 0 02-18-2001 09:44 PM

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

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

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