View Source

Normally, the NWAM service properly configures your network connection. This procedure shows how to configure the connection manually if, for example, you want to configure static IP addresses for your network interface. The procedure applies whether you are manually configuring wired network settings or wireless network settings.

You can manually configure network settings in one of two ways:
* By using the OpenSolaris GUI
* By issuing commands in a terminal window

The following are steps that you perform when using the OpenSolaris GUI.

# *From the Desktop menu, choose System > Administration > Network.*
The prompt to choose to configure automatically or manually appears.
# *Choose the appropriate option to configure the network manually.*
The NWAM service is disabled and the Network settings window appears.
# *In the Connections tab of the Network settings window, do one of the following, depending on the kind of interface that you want to configure:*
* If you are manually configuring the wired network settings, select the wired interface, then click Properties.
* If you are manually configuring the wireless network settings, select the wireless interface, then click Properties.
A separate Interface properties window appears, as shown in the following figure.

!networkscreen.gif|align=center!
# *In the Interface properties window, select whether you want to configure a static IP address or DHCP.*
# *To activate this interface connection every time the system boots, select Activate on boot.*
# *If you are configuring static IP addresses, provide the IP address, Subnet mask, and Gateway address on the appropriate fields, and then click OK.*
# *To provide the host name, select the General tab and supply the requested information.*
# *To configure DNS, select the DNS tab and supply the requested information.*
# *To add hosts, click the Hosts tab and supply the requested information.*
# *Click OK.*
# (For wireless network configurations only) *Connect to the wireless network of your choice.*
See [How to Connect to a Wireless Network at Startup|http://wikis.sun.com/display/OpenSolarisInfo/How+to+Connect+to+a+Wireless+Network+at+Startup].

The following example shows how to manually configure network settings by issuing commands in a terminal window. The commands start a privileged shell, stop the NWAM service, and configure a static IP address for the selected wired or wireless interface. This example uses a wired interface. In addition, parameters are defined in configuration files to create a persistent configuration.

The example assumes that the host name is {{sys001}}. You would type the following commands in a terminal window.

{code}
user@opensolaris:-$ pfexec bash
#
# svcadm enable network/physical:default
# svcadm disable network/physical:nwam
#
# dladm show-phys
LINK MEDIA STATE SPEED DUPLEX DEVICE
e1000g0 Ethernet up 1000 full e1000g0
e1000g1 Ethernet down 1000 full e1000g1
ath0 Wifi up 1000 full ath0
#
# ifconfig e1000g0 plumb 192.168.10.10/24 up
# ifconfig e1000g0
e1000g0: flags=201100843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 6
inet 192.168.10.10 netmask ffffff00 broadcast 192.168.10.255
ether 2:8:20:b2:f1:76
#
# echo sys001 > /etc/hostname.e1000g0
# vi /etc/hosts
...
192.168.10.10 sys001 loghost
#
{code}
If you are configuring a wireless network setting, you would perform the following additional steps.
{code}
# dladm scan-wifi
LINK ESSID BSSID/IBSSID SEC STRENGTH MODE SPEED
ath0 net1 00:0e:38:49:01:d0 none good g 54Mb
ath0 net2 00:0e:38:49:02:f0 none very weak g 54Mb
ath0 net3 00:0d:ed:a5:47:e0 none very good g 54Mb
#
# dladm connect-wifi -e net3
# dladm show-wifi
LINK STATUS ESSID SEC STRENGTH MODE SPEED
ath0 connected net3 none very good g 54Mb
{code}
Perform other network configurations as needed.
For example, if a router exists, add the router's IP address to the {{/etc/defaultrouter}} file. If you are using a naming service, copy that naming service's configuration file. For example, copy {{/etc/nsswitch.dns}} to {{/etc/nsswitch.conf}}.

{include:bottom_navigation}

The individuals who post here are part of the extended Sun Microsystems community and they might not be employed or in any way formally affiliated with Sun Microsystems. The opinions expressed here are their own, are not necessarily reviewed in advance by anyone but the individual authors, and neither Sun nor any other party necessarily agrees with them.

Copyright 1994-2009 Sun Microsystems, Inc.
Powered by Atlassian Confluence
Sun Guidelines on Public Discourse Privacy Policy Terms of Use Trademarks Site Map Employment Investor Relations Contact