eth0 and Wi-Fi at the same time?
Both eth0 and wlan0 interfaces get IP addresses from DHCP.
Although, only wlan0 is reachable from other hosts in the network. Also, when I force to reach internet over eth0 it works: Code:
ubuntu@ubuntu:~$ ping -I eth0 8.8.8.8 Code:
ubuntu@ubuntu:~$ ping -I eth0 192.168.1.135 What am I doing here wrong? Shouldnt both interfaces be reachabled in LAN? Code:
ubuntu@ubuntu:~$ ifconfig |
On the routing table, you have a default route to 192.168.1.1 from both, a route to the 192.168.1.0 network from both, and a route to 192.168.1.1 from both.
I presume 192.168.1.1 is your modem. I'd turn off wifi, because you don't need both, and eth0 will be faster. Wifi works because the first default is to wifi. Routing tables are read from the top down. You can't have two default routes. One gets ignored. |
Hmmm... new situation:
- From any host in LAN except the router (192.168.1.1) I can reach it ONLY via wlan0 (192.168.1.185) - that is 2nd entry in the routing table. - However, from router (192.168.1.1), I can reach that host ONLY via eth0 (192.168.1.208) - that is 1st entry in the routing table. The reason why I want to keep both interfaces up is to have a backup link (in case one is down). |
Quote:
|
The default route with the lowest metric is the preferred default route ie eth0...
Code:
Destination Gateway Genmask Flags Metric Ref Use Iface |
Not the world's networking expert, but you need a route to 192.168.1.0 if you want to access your internal network. You don't want to be searching the web for your private network :-/.
|
No, that's not needed. For hosts on the same subnet, ARP is used.
https://www.geeksforgeeks.org/comput...ork-arp-works/ |
All times are GMT -5. The time now is 09:14 PM. |