Naming in Solaris and OpenSolaris

Solaris
For browsers to be able to display webpages, the underlying network stack has to resolve web address to IP address. This name resolution is performed by different ways. One of them in by using DNS (Domain Name System).

For example, to open the home page of this site, we request web browser to open the page at www.osfaqs.com. The naming system first resolves www.osfaqs.com to its corresponding IP address using DNS. In a simple way, you can find the IP address for any valid web site using ping. For example, run "ping www.osfaqs.com". Ping program works based on ICMP protocol for which name resolution is required before continuing to send request to www.osfaqs.com. You can see the IP address being displayed by the ping program before sending request to the server hosting www.osfaqs.com.


In Solaris, naming servers can be specified through a configuration file resolv.conf. This file has a standard location /etc/resolv.conf. To add 208.67.222.222 as one of the naming servers, add an entry in /etc/resolv.conf like this

nameserver 208.67.222.222

If you have multiple naming servers, add them in the same way in separate lines.

Solaris also has a file, nsswitch.conf, which controls how a process looks up various databases. Each of these databases comes from a source like hosts, groups, users, etc. This file specifies the order in which the naming system has to look up the sources. For the naming system to be able to resolve domain names to IP addresses, make sure that the line with hosts also has dns; i.e., there should be a line in /etc/nsswitch.conf like this

hosts: files dns


If naming fails even after setting up naming system in /etc/resolv.conf and /etc/nsswitch.conf, look at routing table. Default route may be set to a different route.

Read More...
Bookmark and Share
Your Ad Here

Changing MTU for an interface in Solaris

Solaris
MTU (Maximum Transfer Unit) of an interface specifies the maximum number of bytes (octets) of a protocol data unit (PDU) supported by the protocol. For example, in Ethernet v2, the MTU has been standardized to 1500 bytes. In case of Jumbo Ethernet Frames, usually MTU can be in the range from 1500 to 9000. Some hardwares support more than 9000 (upto 16Kilobytes). The maximum limit is set by the hardware vendors.


In Solaris, MTU of an interface can be changed (at least) in two ways. One is by using ifconfig as in other operating systems and the other is by using dladm (Data Link Administration command).

Similar to Linux, FreeBSD and other operating systems, MTU of an interface can be changed using ifconfig.
Usage:

ifconfig <interface> mtu <new_allowable_mtu>

Example:
ifconfig bge0 mtu 6000


In Solaris, it is also possible to change MTU of an interface using dladm command. For this, the interface should be in unplumbed state.
Usage:
dladm set-linkprop -p mtu=<new_allowable_mtu> <interface>

Example:
dladm set-linkprop -p mtu=2000 bge0


Note that the MTU changed using dladm command is persistent. For a temporary change in MTU, pass an extra -t as below:
dladm set-linkprop -t -p mtu=<new_allowable_mtu> <interface>

Read More...
Bookmark and Share
Your Ad Here

Solaris Device Driver Attach Failure


Many times, we have seen failure while attaching a driver module to its corresponding device(s). The more frequent error message is "driver loaded successfully but failed to attach". We don't find any more information in the system log (/var/adm/messages or dmesg) too.


During the driver attach, the Operating System tries to know the presence of the device to which driver module is to be attached. To do this, it checks the name property of each device in the device tree and them proceeds with matching compatible property if it finds no match. If it finds no matching compatible property, then it fails the attach operation.


We can make use of -i (the alias) option of add_drv to specify device to which the driver need to be attached. For example, to attach driver module xyz to a PCIe device with vendor ID 0xABCD and device ID 0x1234, use add_drv -i '"pciexABCD,1234"' xyz. This will result in attaching driver module xyz to the device with vendor ID 0xABCD and device ID 0x1234. This can be verified by running modinfo.

Read More...
Bookmark and Share
Your Ad Here