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.