Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

vikasu

macrumors newbie
Original poster
Nov 6, 2007
12
0
i want to know through shell, which network service is currently used to connect to network, I mean my pc is connected through which service i.e. is there any way to get connected status of all the network services configured in Network Settings.

I tried the shell command networksetup -listallnetworkservices, which gave output as :
********
An asterisk (*) denotes that a network service is disabled.
Ethernet
FireWire
AirPort
********

Now I am connected to network through ethernet, and this command tells the enable-disable status only, so can I know through command that I am connected to network through Ethernet network service and not through Firewire or Airport???
 

vikasu

macrumors newbie
Original poster
Nov 6, 2007
12
0
no I am telling about the network services, like Ethernet, Firewire, or Airport.

Now i have configured IP, DNS etc. in ethernet i.e. I am connected to network through a DNS server through LAN (ethernet). hence in network settings, on clicking Ethernet, it shows Status as "Connected", and on clicking Firewire, it shows Status as "Not Connected" and same for Airport, although all three services are enabled.

Now i want to know through command line that I am connected through Ethernet Service.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.