Linux下设置路由,使多个不同网段能相互访问。 Linux AS3.0 。
[root@PDM8_NewDB etc]# cat rc.local
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
touch /var/lock/subsys/local
/opt/Navisphere/bin/naviserverutilcli update
route add -net 10.16.0.0 netmask 255.255.0.0 gw 10.16.24.1 dev eth0
route add -net 10.15.0.0 netmask 255.255.0.0 gw 10.16.24.1 dev eth0
route add -net 10.19.0.0 netmask 255.255.0.0 gw 10.16.24.1 dev eth0
[root@PDM8_NewDB etc]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:1D:09:08:7A:AB
inet addr:10.161.24.60 Bcast:10.16.27.255 Mask:255.255.252.0
inet6 addr: fe80::21d:9ff:fe08:7aab/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packe