[ug-bosug] Zone Host name command
Zoram Thanga
Zoram.Thanga at Sun.COM
Wed Jul 18 07:14:21 PDT 2007
srikanth kshatriy wrote:
> Hi ananth,
>
> To configure a zone, we need to know network interface.
> ifconfig -a will show many other details also along with network
> interface.
> I just want to know is there any other specific command which can give
> list only the network interfaces.
grep network /etc/path_to_inst
will show you the network adapters available on the system, along with
the instance numbers. On my system, for example, I can see:
# grep network /etc/path_to_inst
"/pci at 1f,700000/network at 2" 0 "bge"
"/pci at 1f,700000/network at 2,1" 1 "bge"
"/pci at 1d,700000/network at 2" 2 "bge"
"/pci at 1d,700000/network at 2,1" 3 "bge"
"/pci at 1d,700000/pci at 1/network at 0" 0 "ce"
"/pci at 1d,700000/pci at 1/network at 1" 1 "ce"
"/pci at 1d,700000/pci at 1/network at 2" 2 "ce"
"/pci at 1d,700000/pci at 1/network at 3" 3 "ce"
#
This shows that I have bge0, bge1, bge2, bge3, ce0, ce1, ce2 and ce3
network interfaces on my system.
HTH,
Zoram
>
>
>
>
> On 7/18/07, Ananth Shrinivas <Ananth.Shrinivas at sun.com> wrote:
>>
>> srikanth kshatriy wrote:
>> > Hi ananth,
>> >
>> > On 7/18/07, *Ananth Shrinivas* <Ananth.Shrinivas at sun.com
>> > <mailto:Ananth.Shrinivas at sun.com>> wrote:
>> >
>> > srikanth kshatriy wrote:
>> > > Hello..
>> > >
>> > >
>> > > 1) What is the command to get the host name of the zone?
>> > >
>> > > * zlogin <zone name> uname -n * command works for only running
>> > zones.
>> > > If its in the
>> > > configured or installed state how to get that??
>> > zoneadm list -p <ZONENAME> | nawk -F ':' '{print "cat
>> > $4/etc/hostname.*"}' | bash
>> >
>> >
>> >
>> > This command is giving the list of all existing zone's host names.
>> > I need the host name of a particular zone.
>> > Is there any way to grep it?
>>
>> Sorry. Mistyped the command
>> zoneadm -z myzone list -p | nawk -F ':' '{print "cat " $4
>> "/etc/hostname.*"}' | bash
>>
>> >
>> >
>> >
>> > >
>> > >
>> > > 2) Is there any specific command to get the only network
>> interface??
>> >
>> >
>> >
>> > Inside a running zone or outside of it ?
>> >
>> > I want to list all the network interfaces existing in the system.
>> >
>> > I need these two for my project. So please help..
>>
>> ifconfig doesn't help ?
>>
>> You could explain in a little more detail what you are trying to do so
>> that people can help you with more "insightful" answers.
>>
>> Cheers,
>> Ananth
>>
>> _______________________________________________
>> ug-bosug mailing list
>> List-Unsubscribe: mailto:ug-bosug-unsubscribe at opensolaris.org
>> List-Owner: mailto:ug-bosug-owner at opensolaris.org
>> List-Archives: http://www.opensolaris.org/jive/forum.jspa?forumID=54
>>
>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> ug-bosug mailing list
> List-Unsubscribe: mailto:ug-bosug-unsubscribe at opensolaris.org
> List-Owner: mailto:ug-bosug-owner at opensolaris.org
> List-Archives: http://www.opensolaris.org/jive/forum.jspa?forumID=54
--
Zoram Thanga::Sun Cluster Development::http://blogs.sun.com/zoram
More information about the ug-bosug
mailing list