1

Now I'm trying to use two ethernet device. One is for Internet. The other one is for Embedded Target Board NFS. Internet is connected by Wifi device.(wlan0) NFS is connected by LAN CABLE.(eth1)

The problem is when I enable both devices, Ubuntu try to connect internet by eth1(LAN CABLE). So, I cannot use internet & NFS at once. Can I set wlan0 to connect internet by force?

Baruian
  • 13

2 Answers2

1

I am assuming you are using NetworkManager,

First Disable the Ethernet device.

sudo service network-manager stop

Then go to network manager and select edit connections and then the ethernet device running on its own LAN.

Go to the IPV4 tab

Select "Routes"

Check the "Use this connection only for resources on its network". Make sure it is selected

Finally:

sudo service network-manager start
0

By editing the routing table.

First of all take a look at your routing table:

sudo route -n

You should execute the following command:

sudo route add default gw 'your_wifi_router_ip' dev wlan0

And you should execute this command to avoid having two internet gw (sometimes this can be a problem):

sudo route del default gw 'ethernet_gateway' dev eth0
migrc
  • 416