Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

In our office we have both LAN and Wi-Fi network. say i have now connected to both LAN and WiFi. now when i give ipconfig. It is showing both LAN IP and also WiFi IP. I want to know, to which network i'm really connected. The 'Network connections icon' on laptop is showing that i'm connected to WiFi, when i have both WiFi and LAN connection. But if i remove LAN connection.. My network is getting interrupted and taking time to connect to WiFi again.

How to find to which network i'm really connected??

share|improve this question

closed as off topic by EEAA, Dave M, mdpc, Khaled, mulaz Mar 14 '13 at 10:58

Questions on Server Fault are expected to relate to professional server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

3 Answers 3

You are connected to both. What you are really asking (I think) is which connection am I using to send data. This is shown from the routing table.

For example:

[dave@rclogin ~]$ /sbin/route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
139.222.85.0    0.0.0.0         255.255.255.0   U     0      0        0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U     0      0        0 eth0
0.0.0.0         139.222.85.1    0.0.0.0         UG    0      0        0 eth0

Shows the current routes, in my case everything goes to eth0.

Routing works from top-to-bottom so for example if I had:

139.222.85.0  0.0.0.0  255.255.255.0  U  0  0  0 eth0
139.222.85.0  0.0.0.0  255.255.255.0  U  0  0  0 wlan0

Then it would use eth0 as a route was found before wlan0 was reached.

The reason I think you are getting connectivity problems when disconnecting is perhaps caused by both interfaces sharing the same IP range (which I'm guessing is the case?), so connections to that network are being torn down before being re-established.

share|improve this answer
    
These are my Ips >> LAN - 111.18.60.173 || WIFI - 111.18.160.238 –  Dot Mar 12 '13 at 13:31
    
' so connections to that network are being torn down before being re-established.' can u explain this statement in detail ? –  Dot Mar 12 '13 at 14:01
    
I did say "think" at the start of that sentence, I would need to model it properly to be certain. However when you have two interfaces that have exactly the same network/routing information things can easily get confused when routing is being updated (such as a link being removed). You mentioned your Wifi reconnecting - is this actually the case e.g. do you see the wireless interface loose connection and then re-negotiate with the base station, or rather do you just see interruption to data? If just interruption I think the network+default routes are being removed and need re-created. –  Dave Mar 12 '13 at 16:50
    
i can see my Wi-Fi is getting disconnected. (losing connection) –  Dot Mar 13 '13 at 10:17

Run a tracert to an external source, like 8.8.8.8, and find out which gateway it is leaving out of. This can verify if it left via your LAN address or your WiFi address (unless they are on the same subnet, in which case it wouldn't matter :) )

share|improve this answer

Run the ip route print command. It will show you the routing table of your computer. You will be able to find the networks that you are connected to and the default gateway then. It should reveal you what you want to know.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.