David L writes:
> Where I can learn about those things, without trying to guess or go to a
> forum or expensive courses.?
docs.sun.com and google are good resources.
> I LOVE Solaris, it is such a cool OS but it is not easy to understand. For
> example the networking, I can get to work through DHCP but I wanted to have
> static name and IP address and be able to talk to other windows Pcs and
> MAC10.9.
First, make sure that you're running the "traditional" configuration
interface, rather than NWAM. Use "svcs network/physical" to see which
one is enabled. If you're running NWAM, then you'll either need to
switch back or to consult with the NWAM project team about how to
manage static interfaces.
Then, assuming the traditional mechanism, find out what your network
interface is called and address you want to use. Use "ifconfig -a"
and you should see output that includes something like this:
bge0: flags=201000843<UP,BROADCAST,RUNNING,MULTICAST,DHCP,IPv4,CoS> mtu 1500
index 2
inet 192.168.1.1 netmask ffffff00 broadcast 192.168.1.255
To change that from DHCP to static on the next boot, remove this file:
# rm /etc/dhcp.bge0
and then insert the address and netmask into the "hostname" file, like
this:
# echo 192.168.1.1/24 > /etc/hostname.bge0
You'll probably want to put the host name somewhere useful, like this:
# echo myhost > /etc/nodename
# echo 192.168.1.1 myhost >> /etc/hosts
and you'll probably need to set a default router or some other routing
mechanism and set up name servers, assuming that DHCP once set these
things for you (yes, DHCP is much simpler than static configuration):
# netstat -nr | grep default
default 192.168.1.254 UG 1 33 bge0
# echo 192.168.1.254 > /etc/defaultrouter
The next time you boot up, the system will have a static address.
You don't have to reboot, though. Just use ifconfig to change the
interface:
# ifconfig bge0 dhcp drop
# ifconfig bge0 192.168.1.1/24 broadcast + up
and use the "route" command to set the default route as needed:
# route add default 192.168.1.254
--
James Carlson, Solaris Networking <james.d.carlson at sun.com>
Sun Microsystems / 35 Network Drive 71.232W Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757 42.496N Fax +1 781 442 1677