Stichting-MINIX-Research-Foundation / minix

Official MINIX sources - Automatically replicated from gerrit.minix3.org
Other
2.99k stars 969 forks source link

Configure two network cards #328

Open pat0x0 opened 2 years ago

pat0x0 commented 2 years ago

Hello! I've been trying for hours and still can't find the right option. I'm running Minix3.4 RC6 on VMware Cloud Director and everything is working like a charm, except for something that for sure is my error in the configuration: I have configured 2 network cards, one with internet access (10.X.X.X) and the other only for internal use (172.16.X.X). When I put the one that has internet access as the main one, absolutely everything works, WAN and LAN, but when I do it the other way around, the one for internal use as the main one, I can only ping the LAN, without an internet connection. Is there any way to fix this? I am sure it is a problem of a bad configuration and not of Minix. Thanks!

pat0x0 commented 2 years ago

UPDATE: I just tried using ifconfig metrics and it doesn't work either... This learning got interesting 🥲

petershh commented 2 years ago

Hello, How did you configure these cards in Cloud Director (is it NAT, or bridged network, or whatever)?

pat0x0 commented 2 years ago

Hello Peter! The cards are configured in NAT. Unfortunately my provider does not offer me more options.

petershh commented 2 years ago

Did you try to reconfigure interfaces from scratch? You might need to reboot the system.

pat0x0 commented 2 years ago

Yes, I deleted them and reconfigured them from scratch, then restart the network service and it's the same. I also deleted them again, reconfiguring everything from scratch, but this time restarting minix and I got the same result. But there is something that catches my attention: when I run the command to define the metric:

ifconfig emX metric n

the command shows no errors, however when I look at the interface file in /etc/ifconfig.emX, it makes no mention of the metric. Shouldn't it be defined within the file?

pat0x0 commented 2 years ago

I answer to myself: yes, it is misconfigured. You have to add the metric manually to the file idiot!!!. Well, I did, I restarted the server and...

#ping google.com
ping: Cannot resolve "google.com" (Host name lookup failure)

But no, it's not that because the resolv.conf is well configured

petershh commented 2 years ago

Don't call yourself an idiot. I think that command should set specified metric, and I'll investigate that later.

Can you ping, for example, 1.1.1.1?

pat0x0 commented 2 years ago

Ping does not resolve neither by domain nor by IP, except for the IP range configured with the other card. It's weird... I'm starting to believe it's more of a VMware issue than Minix