Install dual-nic in Linux

Source: Internet
Author: User
Install dual-NIC: Intranet (eth0) IP: 192.168.16.38GATEWAY: 192.168.16.1 Internet (eth1) IP: 61.136.151.38GATEWAY: 61.136.151.1261. install the first network card. The default value is eth0. Plug in the internal network cable. Generally, no problem occurs. 2. Plug in the second network card, boot detection, allows the second network card configuration. 3. netconf4. set the IP address and netmask of the two NICs in "Host Name and IP nework devices", and then Accept. 5. In "Name server specification (DNS)", set the DNS of eth1, Which is 202.103.6.46 and 202.103.0.117. 6. In "Routing and route ways", set the default gateway of the "default" option to eth1, 61.136.151.126, and select "Enable routing. 7. vi/etc/rc. d/rc. local, add route add-net 192.168.0.0 netmask 255.255.0.0 gw 192.168.16.1 eth08. reboot9. run the route command after the restart. The following two lines of information should be added: destination Gateway Genmask Flags Metric Ref Use Iface192.168.0.0 192.168.16.1 255.255.0.0 UG 0 0 0 eth0default 61.136.151.126 0.0.0.0 UG 0 0 0 eth110. test: ping 192.168.88.34 ping www. sohu. com11. if ping is successful, congratulations! Note: The Key to dual Nic configuration is "pointing the default gateway to the Internet and adding a route in the intranet ". In my understanding, machines on the Intranet can communicate with each other in the internal network through this route and access the Internet through the Internet gateway. If the firewall is not restricted, machines on the Internet should be able to access the Intranet through the Internet gateway and access any machines on the Intranet through the Intranet route. If Step 2 is not added, the machine should be able to ping the Internet and machines in the 192.168.16.0 network segment. However, the machine in other network segments cannot be pinged. 2002.02.26.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.