SunOS 5.X Administering TCP/IP and PPP #

To place a Solaris 2.X machine into an established network and set up TCP/IP communications: 1. Set the system's hostname and IP address in /etc/hosts. In this example, the example host's name is "roadrunner": 198.252.182.23 roadrunner.foo.com roadrunner

2. Modify /etc/hostname.le0 (or hostname.ie0) and /etc/nodename to contain the correct hostname: roadrunner

3. Modify /etc/netmasks to have the appropriate entry: 198.252.182.0 255.255.255.0

The /etc/netmasks file contains network masks used to implement IP standard subnetting. For each network that is subnetted, a single line should exist in this file. The line should contain the network number, any number of SPACE or TAB characters, and the network mask to use on that network.

4. Add the IP address of the default gateway to /etc/defaultrouter: 198.252.182.20

5. Reboot the system.

6. Check network interface configuration with ifconfig:

   solaris# ifconfig le0
   le0:
   flags=863<UP,BROADCAST,NOTRAILERS,RUNNING,MULTICAST> mtu 1500
   inet 198.252.182.23 netmask ffffff00 broadcast 198.252.182.255
   ether 8:0:20:11:34:6e

7. Check the route information with netstat -r. In this example, host "bob" has IP address 198.252.183.20.

solaris# netstat -r | grep default default bob UG 0 3

8. Verify basic network connectivity to other systems using ping:

solaris% /usr/sbin/ping -sv 15.2.72.150 64 4 PING 15.2.72.150: 64 data bytes 72 bytes from hp-ux (15.2.72.150): icmp_seq=0. time=7. ms 72 bytes from hp-ux (15.2.72.150): icmp_seq=1. time=1. ms 72 bytes from hp-ux (15.2.72.150): icmp_seq=2. time=1. ms 72 bytes from hp-ux (15.2.72.150): icmp_seq=3. time=1. ms

----15.2.72.150 PING Statistics---- 4 packets transmitted, 4 packets received, 0% packet loss round-trip (ms) min/avg/max = 1/2/7

The packets are numbered (icmp_seq) and the round trip time for each packet is displayed. The packet loss value is an indication of performance in communicating with a remote host. On a local area network, this packet loss value should be very close to zero. However, on a wide area network, there may be some packet loss, and on portions of the Internet, there may be high packet loss. (High packet loss is not uncommon on the Internet and it is extremely annoying.) 9. If you are running NIS or DNS, add the hostname and IP address of the new system to the NIS or DNS databases. If you are not running either of these services, add the hostname and IP address of other systems to the /etc/hosts file.

Well, first off I am hoping those were just typo's, but the file names are

/etc/nsswitch.conf /etc/resolv.conf

You also need to check /etc/hosts and make sure the netmask for your domain is correct, and make sure the interface is up with /sbin/ifconfig. also you can manually configure the interface with the ifconfig command I'm not positive of the exact syntax, each unix flavor is a bit different, so I generally confuse linux and solaris syntax and have to look it up in man. :) but its basically something like...

/sbin/ifconfig hme0 10.1.1.102 10.1.1.1 netmask 255.255.255.0 1 up

I am quite sure thats wrong, but you can figure it out from there.

Once you have ran that, you can ping the gateway address, then ping the nameserver address, do an nslookup on a domain name, then ping that domain name. once you get all of that your golden. if one of them fails troubleshoot from there.

Re: Solaris 9 networking issues Author: sundaram123 In Reply To: Solaris 9 networking issues Aug 10, 2004 10:44 AM Reply 2 of 5 Hi,

you need to add default gateway entry.

/etc/defaultrouter

Here is the step you need to follow. 1. set host name in /etc/hostname.hme0 file hme0 - is interface file

2. Add hostname alias in /etc/hosts file

3. Add you domain name in /etc/defaultdomain file

4. add DNS address in /etc/resolv.conf

after this re-boot the machine you should be able to ping gateway and internet.

or you can use sys-unconfig command.

============================================================= How to add a NIC card on Sun:

ifconfig hmeX plumb ifconfig hmeX inet xxx.xxx.xxx.xxx netmask xxx.xxx.xxx.xxx ifconfig hmeX up

How to change a hostname on Sun:

Make sure to use notepad or vi to edit files in order to avoid hidden characters.

There are four files that must be modified in order to rename the hostname:

1) /etc/hosts 2) /etc/net/ticlts/hosts 3) /etc/net/ticolts/hosts 4) /etc/nodename 5) /etc/hostname.hmex 6) /etc/net/ticotsord/hosts

Another way to change the hostname is by using sys-unconfig command. This restores the system to an unconfigured state and should only be used when you are not concerned about preserving the current setup of the system. I suggest looking at the man pages for further information (man sys-unconfig) or edit the following files above.

Note: rename the directory under /var/crash to match your new hostname.

Sun Solaris Servers Network Configuration Guide (SPARC Platform Only)

To bind an IP address to a Network Interface Card

  1. ifconfig -a
--- to check the configuration
  1. ifconfig qfe0 plumb
--- to enable the first Network Interface Card
  1. ifconfig qfe0 <ip address> netmask <subnet> up
--- to bind IP address, subnet, and enable the configuration

Create a file on /etc directory - hostname.qfe0 with hostname entry Add entry on /etc/netmasks if IP address is on different subnet Add entry on /etc/inet/hosts file with IP address and hostname

Example:

  1. ifconfig -a
hme0: flags=863<UP,BROADCAST,NOTRAILERS,RUNNING,MULTICAST> mtu 1500 inet 202.40.231.2 netmask ffffff00 broadcast 202.40.231.255 ether 8:0:20:9f:51:fe
  1. ifconfig qfe0 plumb
  2. ifconfig qfe0 202.40.231.3 netmask 255.255.255.0 up
  3. ifconfig -a

hme0: flags=863<UP,BROADCAST,NOTRAILERS,RUNNING,MULTICAST> mtu 1500 inet 202.40.231.2 netmask ffffff00 broadcast 202.40.231.255 ether 8:0:20:9f:51:fe qfe0: flags=863<UP,BROADCAST,NOTRAILERS,RUNNING,MULTICAST> mtu 1500 inet 202.40.231.3 netmask ffffff00 broadcast 202.40.231.255

To change IP Address

  1. ifconfig qfe0 down
--- to disable the first Network Interface Card

To remove Network Interface Card

  1. ifconfig qfe0 unplumb
--- to remove the first Network Interface Card

To bind a virtual IP address to Network Interface Card

  1. ifconfig qfe0:1 plumb
--- in some cases this is not needed if qfe0 has been plumb
  1. ifconfig qfe0:1 202.40.231.4 netmask 255.255.255.0 up

Create a file on /etc directory - hostname.qfe0:1 with hostname entry Add entry on /etc/netmasks if IP address is on different subnet Add entry on /etc/inet/hosts file with IP address and hostname

NOTE: -If adding a quad

Network Interface Card, the naming convention will be qfe0, qfe1, qfe2, qfe3. -If adding a single port Network Interface Card, the naming convention will be hme1, hme2, hme3. -The onboard Network Interface Card is hme0 -If adding a virtual IP address, the naming convention will be hme0:1, hme0:2, up to hme0:3 only for hme0, or qfe0:1, qfe0:2, up to qfe0:3 only for qfe0, depending on the number of hme and qfe port used.

To hardcode the speed of the Network Interface Card Example: You want to hardcode 100Full Duplex for hme0

  1. ndd -set /dev/hme instance 0
  2. ndd -set /dev/hme adv_100fdx_cap 1
  3. ndd -set /dev/hme adv_100hdx_cap 0
  4. ndd -set /dev/hme adv_10fdx_cap 0
  5. ndd -set /dev/hme adv_10hdx_cap 0
  6. ndd -set /dev/hme adv_autoneg_cap 0

Create an input on the file /etc/system so that when your system rebooted it will run the NIC in 100Full Duplex automatically. set hme:hme_adv_100fdx_cap=1 set hme:hme_adv_100hdx_cap=0 set hme:hme_adv_10fdx_cap=0 set hme:hme_adv_10hdx_cap=0 set hme:hme_adv_autoneg_cap=0

To check the status

  1. ndd /dev/hme \?
--- displays all command options for ndd
  1. ndd /dev/hme link_status
--- displays the hme0 link status

The above configurations should be followed in order.

1 = Capable/Enable 0 = Disable hme1 = instance 1 hme2 = instance 2 hme3 = instance 3

The system on the other end of network cable should be hardcode to 100Full Duplex also. If the other end is a switch, check your vendor manuals on how to do it.

To monitor packets traveling in your NIC ports Example: You want to monitor your hme0 port of packets coming from IP address 202.40.224.14

  1. snoop -d hme0 | grep 202.40.224.14

You want to monitor your qfe1 port of packets coming from host server1

  1. snoop -d qfe1 | grep server1

You want to monitor your hme1 ports of all packets

  1. snoop -d hme1

To add or remove a static route Example: You want to add a static route to network 192.168.16.0 to your default gateway of 10.236.74.1

  1. route add -net 192.168.16.0 10.236.74.1

then create a script, so that when the system rebooted the route will automatically added

  1. cd /etc/rc2.d
  2. vi S168staticroute

Add the following line route add -net 192.168.16.0 10.236.74.1

You want to add a static route to host 192.168.64.4 to your default gateway of 10.236.74.1

  1. route add 192.168.64.4 10.236.74.1

then create a script, so that when the system rebooted the route will automatically added

  1. cd /etc/rc2.d
  2. vi S168staticroute

Add the following line route add 192.168.64.4 10.236.74.1

You want to delete the static route to network 192.168.16.0 to your default gateway of 10.236.74.1

  1. route delete -net 192.168.16.0 10.236.74.1

You want to delete the static route to host 192.168.64.4 to your default gateway of 10.236.74.1

  1. route delete 192.168.64.4 10.236.74.1

Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-1) was last changed on 24-May-2008 13:26 by 192.168.1.1