Network Notes (Solaris 10)
route - manually manipulate the routing tables
route manually manipulates the network routing tables. These tables are normally maintained by the system routing daemon, such as in.routed(1M) and in.ripngd(1M).
Say, for example, you have the wrong default router subnet 54 instead of subnet 56
[root@srv16 etc]# netstat -rn Routing Table: IPv4 Destination Gateway Flags Ref Use Interface -------------------- -------------------- ----- ----- ------ --------- 10.0.0.0 10.25.56.26 U 1 270 bge0 224.0.0.0 10.25.56.26 U 1 0 bge0 default 10.25.54.1 UG 1 22 127.0.0.1 127.0.0.1 UH 5 172 lo0 [root@srv16 etc]#
You can edit /etc/defaultrouter so that the correct value is set the next time you reboot, but you can also delete the old, incorrect entry and add the new one while still online.
[root@srv16 etc]# route delete default 10.25.54.1 delete net default: gateway 10.25.54.1 [root@srv16 etc]# route add default 10.25.56.1 add net default: gateway 10.25.56.1 [root@srv16 etc]# netstat -rn Routing Table: IPv4 Destination Gateway Flags Ref Use Interface -------------------- -------------------- ----- ----- ------ --------- 10.0.0.0 10.25.56.26 U 1 270 bge0 224.0.0.0 10.25.56.26 U 1 0 bge0 default 10.25.56.1 UG 1 0 127.0.0.1 127.0.0.1 UH 5 172 lo0 [root@palsrv16 etc]#
Activating the DNS Resolver - /etc/nsswitch.conf
Out of the box, Solaris 10 only uses /etc/hosts table to lookup IP numbers. The problem is the default configuration of /etc/nsswitch.conf.
To configure your host to lookup IP numbers using DNS, you must modify the line that starts with hosts: to include the keyword dns.
The default /etc/nsswitch.conf file hosts line looks like this:
hosts: files
To enable DNS based hostname resolution, change it to this:
hosts: files dns