\r\n\r\n注意:使用/etc/gateways要将/etc/defaultrouter去掉才生效\r\n楼主的问题可以参见SA-389第6章的实习例子作者: flutter 时间: 2006-01-10 20:22
1,如果网卡2只访问内网本网段,则很简单,网卡1写外网的地址hosts、hostname.xx0、掩码netmasks、网关defaultrouter,网卡2只写地址hostname.xx0和掩码netmasks,则有默认路由,可以满足你的要求,我在XP和SOL10下都是这样做的,一个访问外网INTERNET,一个访问内网。\r\n2,使用双网关,一个网关写defaultrouter,一个写路由在/etc/rc2.d/S72inetsvc中:\r\nrouter add net 192.168.2.0 192.168.2.1\r\n3,两个都在在/etc/gateway中:\r\nrouter add default net 202.106.12.0 202.106.12.1\r\nrouter add net 192.168.2.0 192.168.2.1作者: 风之幻想 时间: 2006-01-11 18:10
添加route add脚本的情况下,可以根据情况保留/etc/defaultrouter的.作者: wxws2002 时间: 2006-01-12 09:07
同意FLUTTER的2,觉得这种应用较多作者: zcg931708 时间: 2006-02-08 14:35
多谢几位大侠拔刀相助作者: metor78 时间: 2006-02-08 15:02
Multihomed Host\r\nTo create a multihomed host:\r\n1. Become superuser on the prospective multihomed host.\r\n2. Create an /etc/hostname.interface file for each additional\r\nnetwork interface installed in the machine.\r\n3. Type:\r\n# touch /etc/notrouter\r\nThis creates an empty file called /etc/notrouter.\r\n4. Reboot the machine.\r\nWhen the machine reboots, the startup script looks for the presence of\r\nthe /etc/notrouter file. If the file exists, the startup script does not\r\nrun in.routed -s or in.rdisc -r, and does not turn on IP\r\nforwarding on all interfaces configured “up” by ifconfig. This\r\nhappens regardless of whether an /etc/gateways file exists. Thus the\r\nmachine is now a multihomed host.\r\n===================================\r\n详细内容可以看SA389-SG的第六章