Editing
Solaris 10 System Administration Part I
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Interface Configurations == network commands such as ifconfig, ping, & snoop control & monitor functionality of network interfaces === View MAC address === * use ifconfig -a command as root user * On SPARC system that hasn't booted use boot programmable read-only memory (PROM) banner command. At ok prompt type banner Example: <pre># ifconfig -a lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1 inet 127.0.0.1 netmask ff000000 bge0: flags=1004843<UP,BROADCAST,RUNNING,MULTICAST,DHCP,IPv4> mtu 1500 index 2 inet 192.168.1.55 netmask ffffff00 broadcast 192.168.1.255 ether 0:3:ba:a5:e2:eb # exit $ ifconfig -a ksh: ifconfig: not found $</pre> === IP address === * use ifconfig -a command * shows interface as up or down * Change interface state ** use ifconfig command format # ifconfig [interface name] [up|down] === Ping === * confirm basic IP connectivity over network by using ICMP ECHO_REQUEST. ** use ping command format # ping [domain name|IP address] for ping command to succeed conditions must be true on both systems: * interface must be plumbed * interface must be properly onfigured * interface must be up * interface must be physically connected * interface must have valid routes configured === Trace utility === * use traceroute command to trace the route that IP packet follows to another IP host === capture & inspecting network packets === use snoop utility to capture & inspect network packetsm format # snoop [host name|IP address] [host name|IP address] use Control-C to exit snoop utility use option -a to enable audible clicks Example of enabling audible clicks for all network traffic related to DHCP: # snoop -a dhcp Additional snoop options <table style="text-align: left; width: 50%;" border="1" cellpadding="2" cellspacing="0"> <tr> <td>snoop</td> <td>summary output</td> </tr> <tr> <td>snoop -o filename</td> <td>save captured packets in filename</td> </tr> <tr> <td>snoop -i filename</td> <td>displays packets previously saved to file</td> </tr> <tr> <td>snoop -i filename -v</td> <td>file output to verbose mode</td> </tr> <tr> <td>snoop -i filename -V</td> <td>file output to summary verbose mode</td> </tr> <tr> <td>snoop -i filename -x offset</td> <td>displays packet data in hexadecimal & ASCII format</td> </tr> <tr> <td>snoop -d device</td> <td>receives packets from a network interface specified by device</td> </tr> </table> === Configure IPv4 interfaces at boot time === files & services that impact IP interfaces: * svc:/network/physical:default service * /etc/hostname.xxn file * /etc/inet/hosts * /etc/inet/ipnodes ==== svc:/network/physical:default service ==== * service calls /lib/svc/method/net-physical method script, a startup script * script uses ifconfig utility to configure each interface with IP information * script searches for files called hostname.xxn in the /etc directory where xx is an interface type and n is the instance of the interface * each .xxn file found the script uses ifconfig command with plumb option to make the kernel ready to talk to this type of interface * script then configures the named interface using other options to the ifconfig command ==== /etc/hostname.xxn file ==== * file contains information that configures named interface <table style="text-align: left; width: 50%;" border="1" cellpadding="2" cellspacing="0"> <tr> <td>Entry</td> <td>Interface</td> </tr> <tr> <td>e1000g0</td> <td>First e1000g (Intel PRO/1000 Gigabit family device driver) Ethernet interface in the system</td> </tr> <tr> <td>bge0</td> <td>First bge (Broadcom Gigabit Ethernet device driver) Ethernet interface in the system</td> </tr> <tr> <td>qfe0</td> <td>First qfe (Quad Fast-Ethernet device driver) Ethernet interface in system</td> </tr> <tr> <td>nge0</td> <td>First nge (Nvidia Gigabit Ethernet driver) Ethernet interface in the system</td> </tr> </table> * The /etc/hostname.bge0 file contains host name or IP address of system that contains the bge0 interface. * the host name contained in the file must exist in the /etc/inet/hosts file so that it can be resolved to an IP address at boot time * You can edit /etc/hostname.bge0 file to contain either host name or IP address from /etc/inet/hosts file '''NOTE In this example the Solaris machine uses DHCP without defined host so host is unknown.''' <pre>root@unknown # ls -l /etc/hostname.bge0 -rw-r--r-- 1 root root 1 May 17 10:30 /etc/hostname.bge0 root@unknown # cat /etc/hostname.bge0 root@unknown # more /etc/inet/hosts # # Internet host table # 127.0.0.1 localhost loghost 192.168.1.10 unknown # Added by DHCP root@unknown # ifconfig -a lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1 inet 127.0.0.1 netmask ff000000 bge0: flags=1004843<UP,BROADCAST,RUNNING,MULTICAST,DHCP,IPv4> mtu 1500 index 2 inet 192.168.1.10 netmask ffffff00 broadcast 192.168.1.255 ether 0:14:4f:47:bf:9e root@unknown #</pre> ==== /etc/inet/hosts ==== * a file that associates the IP addresses of hosts with their names * you can use file with, or instead of, other hosts databases, including DNS, NIS hosts map, & the NIS+ hosts table * programs use library interfaces to access info in the file * file contains at least the loopback & host info * format for each line: [IP Address] [host name] [aliases/nicknames - optional field] ==== /etc/ipnodes file ==== * symbolic link to /etc/inet/hosts file * associates names of nodes with IP addresses * can be used in conjunction with, instead of, other ipnodes databases, including DNS, NIS ipnodes map, & LDAP * IP addresses can be defined in ipnodes or hosts file * ipnodes file is searched first then hosts file === Changing System Host Name === * host name is contained in four files on system * all must be modified & system rebooted to successfully change system's host name * four files: ** /etc/nodename ** /etc/hostname.xxn ** /etc/inet/hosts ** /var/crash if crash dump is enabled on system use uname -S command to temporarily change host name ==== edit /etc/nodename file ==== Each Solaris OS has a canonical name, which is the official name used when referring to a system. the system name is the same as host name associated with IP address of the primary network interface, for example, hostname.bge0 change canonical name by editing the /etc/nodename file & reboot system if interface is managed by DHCP or remote procedure call (RPC) bootparams protocols, the /etc/nodename file is not used My example using DHCP /etc/nodename file doesn't exist: <pre># more /etc/nodename /etc/nodename: No such file or directory #</pre> ==== /etc/hostname.xxn file ==== ==== /etc/inet/hosts ==== * host names are text strings up to 24 characters * alphabetic characters, numbers, hyphen, period are allowed in host name * periods are allowed only to delimit components of domain style names * first character must be alphabetic character * last character cannot be hyphen or period * not case sensitive (unless NIS naming service is used, uppercase characters in names have been known to cause problems with NIS) * A hash (#) indicates the beginning of a command === sys-unconfig command === use sys-unconfig command to undo a system configuration & restore to unconfigured state so you can reconfigure sys-unconfig commands does: * save /etc/inet/hosts file to /etc/inet/hosts.saved * if /etc/vfstab file contains NFS mount entries file is saved to /etc/vfstab.orig file * restores default /etc/inet/hosts file * removes default host name in /etc/hostname.xxn file for all configured interfaces * removes default domain name in /etc/defaultdomain file * removes the time zone to PST8PDT in /etc/TIMEZONE file * resets naming services to local files * removes the /etc/inet/netmasks file * remotes the /etc/defaultrouter file * removes password set for root user in /etc/shadow file * removes /etc/.rootkey file for NIS+ * executes all system configuration applications (applications are defined by prior use of sysidconfig -a command) * removes /etc/resolv.conf file for DNS clients * disables LDAP by removing: ** /var/ldap/ldap_client_cache file ** /var/ldap/ldap_client_file file ** /var/ldap/ldap_client_cred file ** /var/ldap/cachemgr.log file * regenerate keys for sshd when sys-unconfig command is finish the system is shutdown can only be run as root user when system is powered on a configuration script prompts you to configure system info sys-unconfig command is not available on diskless client
Summary:
Please note that all contributions to GotOpinion may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
GotOpinion:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
Edit source
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information