Ubuntu dual NIC Setup internal and external network problems

Source: Internet
Author: User
Tags manual git clone

UBUNTU12.04 System, dual network card: eth0, eth1. DB set to public IP, and LAN IP,

This allows the computer to access various IPs within the LAN, and can be accessed worldwide, using SSH or Remote Desktop tool.


Then began to implement:

First step: Modify the Network settings:

sudo vim/etc/network/interfaces

Step Two: Restart the network Service

sudo/etc/init.d/networking restart

Note the error message may pop up at this point:

Rtnetlink Answers:file exists

Failed to bring up eth1.

why.

in the first step of the setup, the eth0,eth1 are set up a gateway, respectively, the extranet gateway and LAN Gateway. This poses a problem because the default gateway is only one.

Workaround: Remove the LAN gateway and restart the Network service. ---------OK, enjoy your network system.


There are also netizens said you can execute the following command:

IP addr Flush Dev eth1

UBUNTU14.04 in the networking Stop/start/restart can not be used ...

To revert back to the 13.10 Networking scripts go:

Https://github.com/metral/restore_networking

This would replace the 14.04 scripts with the one used in 13.10.

$sudo apt-get Install git
$sudo git clone https://github.com/metral/restore_networking.git
$CD restore_networking/
$sudo./restore_networking.sh

miguel@u1404server:~$ sudo service networking restart
Networking stop/waiting
Networking start/running

Or not replaced, use the following command instead:

sudo ifdown--exclude=lo-a && sudo ifup--exclude=lo-a

Write it to the script file each time you execute the script file:


Note: If the eth1 eht2 respectively corresponds to the external network and the intranet, its settings correspond to DHCP and manual, the intranet gateway does not set up, otherwise, because two gateways ( a DHCP acquisition-set to automatic acquisition, a manual setting ), the system will not be able to connect the network ...


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.