Routing
Solaris: routing can be checked by command:
netstat -nr
For example on clondaq2 it shows following:
Routing Table: IPv4 Destination Gateway Flags Ref Use Interface -------------------- -------------------- ----- ----- ------ --------- 129.57.68.0 129.57.68.24 U 1 6 e1000g1 129.57.69.0 129.57.69.202 U 1 3 e1000g2 129.57.167.0 129.57.167.109 U 1 546 e1000g0 129.57.16.0 129.57.68.100 UG 1 4 224.0.0.0 129.57.167.109 U 1 0 e1000g0 default 129.57.167.99 UG 1 356 127.0.0.1 127.0.0.1 UH 5 180 lo0
In that example traffic was routed to subnet 16 to serve SILO. It was achieved by script /etc/rc3.d/S99manualroute with following contents:
#!/sbin/sh # # This script adds a manual route to force traffic to the 16 net # out the NIC that is on the 129.57.68.x lan. # - P. Letta 04/06/2006 case "$1" in start) /usr/sbin/route add -net 129.57.16.0 -netmask 255.255.252.0 129.57.68.100 ;; stop) ;; *) echo "Usage: $0 { start }" exit 1 ;; esac exit 0
Linux: use command
ip route show
from web: add a plain route to network 10.0.0/24 via gateway 193.233.7.65
ip route add 10.0.0/24 via 193.233.7.65
/sbin/route add -net 172.16.0.0 netmask 255.255.255.0 gw 192.168.0.3 /sbin/route add -net 129.57.160.0 netmask 255.255.255.0 gw 129.57.68.100