Hi all,
I am really a newbie, so this can look like a basic question, however I still have not found the answer googling it.
I can access two different networks:
* One from my company using eth0
* Another one in wifi using wlan0
The main idea is to be able to correctly use both interfaces at the same time.
Because with the eth0 interface, I cannot access the network outside my company, and with wlan0 I cannot access the network inside my company
So I want to be able to access some domains in both networks.
Usually, I connect wlan0 using the network manager:
Code:
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.46 netmask 255.255.255.0 broadcast 192.168.1.255
Then, I manually set a static IP for eth0:
Code:
sudo ifconfig eth0 10.45.121.21 netmask 255.255.254.0 broadcast 10.45.121.255
Now, my route table:
Code:
sudo ip route
default via 192.168.1.1 dev wlan0 proto static
10.45.120.0/23 dev eth0 proto kernel scope link src 10.45.121.21
192.168.1.0/24 dev wlan0 proto kernel scope link src 192.168.1.46
Because, all IP adresses on my company starts with 10.*, I replace the current gateway (it may be a bad idea):
Code:
sudo ip route del 10.45.120.0/23
sudo ip route add 10.0.0.0/8 dev eth0 proto kernel scope link src 10.45.121.21
So my route table looks like this:
Code:
sudo ip route
default via 192.168.1.1 dev wlan0 proto static
10.0.0.0/8 dev eth0 proto kernel scope link src 10.45.121.21
192.168.1.0/24 dev wlan0 proto kernel scope link src 192.168.1.46
Finally my /etc/resolv.conf:
Code:
# Generated by NetworkManager
nameserver 192.168.1.1
This way, I can ping IP addresses that begin with 10.*.
I can also ping google.com.
But as my resolv.conf suggests, I am not able to ping a domain on the 'eth0' network, so this is kind of annoying.
I already know that if I set eth0 as the default network using the Network manager, the resolv.conf is:
Code:
# Generated by NetworkManager
nameserver 10.45.20.3
So I was hoping that maybe someone had a better idea setting the two networks together more easily