Configuration notes for dual NICs in Ubuntu8.04

Source: Internet
Author: User
One night yesterday, I upgraded Ubuntu to 8.04. Today I have studied the dual-nic configuration. The record is as follows: 1. The intranet IP10.10.10.100 and the gateway 10.10.10.1 use a USB Nic named: USB 0; the Internet IP address is a dynamic address, the gateway is 192.168.1.1, and the device name is eth0. 2. Modify the/etc/network/interfaces file and add the following content: autousb0ifaceusb0inetstatic.

One night yesterday, I upgraded Ubuntu to 8.04. Today I have studied the dual Nic configuration, as shown below:

1. Intranet IP10.10.10.100, Gateway 10.10.10.1, uses a USB Nic, device name: USB 0, Internet IP address is a dynamic address, Gateway is 192.168.1.1, device name is eth0.

2. Modify the/etc/network/interfaces file and add the following content:
Auto USB 0
Iface usb0 inet static
Address 10.10.10.100
Netmask 255.255.255.0
Network 10.10.10.0
Broadcast 10.10.10.255
Gateway 10.10.10.1

Because the Internet address is a dynamic address, you do not need to configure it. If it is a static address, copy the above content and modify the relevant fields.

3. Restart the NIC:
/Etc/init. d/networking start // start the NIC
/Etc/init. d/networking stop // stop the NIC
/Etc/init. d/networking restart // restart the NIC (use this operation)

4. Modify the route:
Delete the default route. If the NIC is correctly configured, two default routes are displayed. delete the default route: sudo route delete default (twice)
Add new route: sudo route add-net 10.0.0.0 netmask route 0.0.0 dev usb0 (intranet route)
Sudo route add default gw 192.168.1.1 dev eth0 (Internet route)

5. The network test is successful.

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.