Switching between ethernet and WiFi

I am using m3 pro with mac OS Sonoma 14.5 and I am facing a weird issue when switching between ethernet and WiFi, it is really frustrating...


This happens in my institute and I understand it is completely a problem related to the specific network, but I appreciate if someone can suggest a solution for this. This doesn't happens with my desktop (Ubuntu 22.04) or with my old laptop (windows 11). I can brief the issue with appropriate title for better understanding. !!


1. The Network:

Okay, so there is a login portal where we have to enter our credentials to access the internet at my institute and we have both ethernet and WiFi with two different IPs. The time limit for a login is 24hours. Now, when I enter the institute the mac automatically gets connected to the WiFi and it stays connected all the time, so to access the internet I can login with my credentials one time a day. Simple. !!


2. The Problem:

The problem comes when I have to connect to ethernet. This is required to access to other local systems such as HPC, workstation and my own desktop etc.


3. Expected Scenario

When I connect the ethernet, the IP should change and I should be able to login to the network access portal with my credentials again, but for a new IP this time. This is how it works in Ubuntu and Windows. Once I disconnect the ethernet, the system will continue use the WiFi and there will be internet access to the IP corresponding to wifi and I will be able to use the internet for the rest of time of my login. Now, Once I login to the portal from WiFi and Ethernet once in a day, I should be able to use internet irrespective of whether I am connected to ethernet or WiFi.


4. Issue with mac

But this isn't the case with mac. When I login for WiFi and then connect the ethernet, I wont be able to access internet, but the login page will remain logged in. !! Then I will be forced to logout from WiFi IP and then login again for ethernet IP. So, basically I will have login to the internet access portal every time I switch between ethernet and WiFi.



First of all, I don't understand the network details shown when executing command 'ifconfig'. Its too complicated and there is lot more inactive networks shown (lo0, gif0, stf0, anpi0, anpi1, en 0 - 5, bridge0, ap1, awdl0, llw0, utun 0-3, en7 ). when connected with the ethernet en0, awdl0 and en7 are active and when disconnected from the ethernet, en0 and awdl0 are active. Also, I noticed something different in the network settings of mac. It seems that they prefer WiFi over any other network !!


Since its not happening with windows and ubuntu, am sure there should be some solution that i can do at my mac side.


Thank you so much for your time.


regards,

musaid

MacBook Pro 14″, macOS 14.5

Posted on Aug 4, 2024 10:18 PM

Reply
7 replies

Aug 5, 2024 1:09 AM in response to musaidpp

In the Network System Settings, reorder the Network Services to put Ethernet above Wi-Fi. The order determines which service provides Internet if both have internet available. For other things, it will use whichever provides a route to the destination.


Ethernet and Wi-Fi are both en interfaces. There is nothing that requires one to be en0 or any other. However, I have only ever seen Ethernet on en0 and Wi-Fi is always something else, usually en1. it looks like yours is en7.

awdl is an interface for peer-to-peer connections for their services, like AirDrop. Apple Wireless Direct Link.


Aug 5, 2024 2:05 AM in response to musaidpp

musaidpp wrote:

Thanks Barney-15E for your prompt response.

Here is a snap of my network service order. As you see the ethernet is on top.


https://discussions.apple.com/content/attachment/0a2774d6-3829-4f9d-a5f5-5a7594385ea1


In my case, en0 must be wifi and en7 should be ethernet, Since en7 was not listed when I disconnected the ethernet cable.

I must have misread that.


But the real problem is not with order I think, but something with "may be a preferred IP", if there is anything like that exists!!!

The only preference I know is for internet routing.


Because, when I connect ethernet, the system prefer ethernet. but when I get in to the network login portal of my institute, it shows the network access page for WiFi, which I must have already logged in. Then I need to logout from that page and login again. This is same for the other wise also, switching from Ethernet to WiFi.

Are the both on the same subnet? You would be primarily be using Wi-Fi when trying to login to an Ethernet network. If Wi-Fi is active and can get to the login page on that subnet, it will be trying to do that on the Wi-Fi network.


I can’t tell what is going on with the network, but you may need to turn Wi-Fi off when you try to login in.


Aug 5, 2024 2:30 AM in response to Barney-15E

Are the both on the same subnet?

If I understood the subnet you mentioned in its sense, They are not on same subnet.

Ethernet IP is 10.1.xxx.yy and that of WiFi is 10.9.x.yy


You would be primarily be using Wi-Fi when trying to login to an Ethernet network. If Wi-Fi is active and can get to the login page on that subnet, it will be trying to do that on the Wi-Fi network

I will be using the WiFi all the time. But I wouldn't be able to access internet when ethernet connected over WiFi. But when entered to the network login page, it would be showing my left over time (for last login from WiFi). In Ubuntu and Windows, Usually when we connect ethernet, a network page will pop up for login. if that doesn't happen, then we can go to the url and then it will ask for credentials to login.



I can’t tell what is going on with the network, but you may need to turn Wi-Fi off when you try to login in.


Yes. turning off is possible. But I prefer not to or rather why can't it be possible in mac while windows can!! ?





Aug 5, 2024 1:57 AM in response to Barney-15E

Thanks Barney-15E for your prompt response.


Here is a snap of my network service order. As you see the ethernet is on top.




In my case, en0 must be wifi and en7 should be ethernet, Since en7 was not listed when I disconnected the ethernet cable.


But the real problem is not with order I think, but something with "may be a preferred IP", if there is anything like that exists!!!


Because, when I connect ethernet, the system prefer ethernet. but when I get in to the network login portal of my institute, it shows the network access page for WiFi, which I must have already logged in. Then I need to logout from that page and login again. This is same for the other wise also, switching from Ethernet to WiFi.



This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Switching between ethernet and WiFi

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.