Dual NIC installation:
Net (ETH0) IP: 192.168.16.38 Gateway: 192.168.16.1
External Network (Eth1) IP: 61.136.151.38 Gateway: 61.136.151.126
1. First install the first network card, default is Eth0, plug in the intranet line, generally there will be no problem.
2. Plug in the second network card, boot detection, allowing the second block of network cards to be configured.
3. NetConf
4. Set information such as IP and NetMask, etc. in Host Name and IP Nework Devices, and then Accept.
5. Set the DNS of Eth1 in "Name Server Specification (DNS)", here 202.103.6.46 and 202.103.0.117.
6. Set the default gateway of the "default" option in "Routing and Gateways", here is the gateway of Eth1, here is 61.136.151.126,
And select "enable routing".
7. vi /etc/rc.d/rc.local, in the last plus:
Route Add -Net 192.168.0.0 Netmask 255.255.0.0 GW 192.168.16.1 Eth0
8. Reboot
9. After restart, execute the route command, which should have the following two lines of information:
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 192.168.16.1 255.255.0.0 UG 0 0 0 Eth0
Default 61.136.151.126 0.0.0.0 UG 0 0 0 Eth1
10. Test: ping 192.168.88.34
Ping www.sohu.com
11. If ping, congratulations!
Note: The key to dual network card configuration is "to refer to the default gateway to the external network, add a route in the internal network."
My understanding is that the internal network machine can communicate with each other through the route and can access the Internet through the gateway of the external network.
If the firewall is not restricted, the machine on the Internet should be able to enter the internal network through the external network gateway, and access any machine in the intranet through the internal network route.
If you do not add step 7, the machine should be able to ping out the network, you can also ping the 192.168.16.0 network segment, but other network segments cannot be pinged, and the test is established.
2002.02.26.