If I now have both access to wired (Ethernet) and wireless networks, how I know which network I'm using currently without the help of NetworkManager (I had disabled the NetworkManager ...
-
How to detect whether I'm using Ethernet or wireless without NetworkManager?
If I now have both access to wired (Ethernet) and wireless networks, how I know which network I'm using currently without the help of NetworkManager (I had disabled the NetworkManager application). From where I can check it? Or which command I can used in terminal to know about it?
Thanks in advance
-
Just Joined!
su ifconfig -a
(enter root password)
this will tell you which adapter has a valid IP address, which will be the adapter you are currently connecting with.
-
but my both interface eth0 and eth1 also have a valid IP address.
Code:
christyyim@christyyim-laptop:~$ ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:1D:92:51:AF:27
inet addr:192.168.1.124 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::21d:92ff:fe51:af27/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1380 errors:0 dropped:0 overruns:0 frame:0
TX packets:142 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:487944 (476.5 KB) TX bytes:22067 (21.5 KB)
Interrupt:17 Base address:0x2000
eth1 Link encap:Ethernet HWaddr 00:1C:BF:98:B1:60
inet addr:192.168.1.8 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::21c:bfff:fe98:b160/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3308 errors:0 dropped:446 overruns:0 frame:0
TX packets:3125 errors:0 dropped:0 overruns:0 carrier:1
collisions:0 txqueuelen:1000
RX bytes:7472253 (7.1 MB) TX bytes:1527526 (1.4 MB)
Interrupt:18 Base address:0xe000 Memory:fdeff000-fdefffff so how?
-
Super Moderator

Originally Posted by
christyyim
but my both interface eth0 and eth1 also have a valid IP address.
Code:
christyyim@christyyim-laptop:~$ ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:1D:92:51:AF:27
inet addr:192.168.1.124 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::21d:92ff:fe51:af27/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1380 errors:0 dropped:0 overruns:0 frame:0
TX packets:142 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:487944 (476.5 KB) TX bytes:22067 (21.5 KB)
Interrupt:17 Base address:0x2000
eth1 Link encap:Ethernet HWaddr 00:1C:BF:98:B1:60
inet addr:192.168.1.8 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::21c:bfff:fe98:b160/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3308 errors:0 dropped:446 overruns:0 frame:0
TX packets:3125 errors:0 dropped:0 overruns:0 carrier:1
collisions:0 txqueuelen:1000
RX bytes:7472253 (7.1 MB) TX bytes:1527526 (1.4 MB)
Interrupt:18 Base address:0xe000 Memory:fdeff000-fdefffff so how?
eth0 (476.5 KB)
eth1 (7.1 MB)
I think it safe to say eth1 is doing all the work here.
-
Just Joined!
Strange... I'm not able to duplicate that on my SUSE machine.
Connected LAN:
ath0 Link encap:Ethernet HWaddr 00:14:A4:61:16:EC
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:2587 errors:0 dropped:0 overruns:0 frame:0
TX packets:2878 errors:3 dropped:3 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1802457 (1.7 Mb) TX bytes:619314 (604.7 Kb)
eth0 Link encap:Ethernet HWaddr 00:C0:9F:EB:4C:05
inet addr:10.1.2.2 Bcast:10.1.2.255 Mask:255.255.255.0
inet6 addr: fe80::2c0:9fff:feeb:4c05/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:150306 errors:1 dropped:0 overruns:0 frame:1
TX packets:98315 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:150393927 (143.4 Mb) TX bytes:14468536 (13.7 Mb)
Interrupt:20
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:3299 errors:0 dropped:0 overruns:0 frame:0
TX packets:3299 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:218851 (213.7 Kb) TX bytes:218851 (213.7 Kb)
wifi0 Link encap:UNSPEC HWaddr 00-14-A4-61-16-EC-30-30-00-00-00-00-00-00-00-00
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:58232 errors:0 dropped:0 overruns:0 frame:20536
TX packets:3086 errors:0 dropped:3 overruns:0 carrier:0
collisions:0 txqueuelen:199
RX bytes:10657796 (10.1 Mb) TX bytes:745421 (727.9 Kb)
Interrupt:22
Connected wlan:
ath0 Link encap:Ethernet HWaddr 00:14:A4:61:16:EC
inet addr:10.1.2.4 Bcast:10.1.2.255 Mask:255.255.255.0
inet6 addr: fe80::214:a4ff:fe61:16ec/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2632 errors:0 dropped:0 overruns:0 frame:0
TX packets:2942 errors:4 dropped:4 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1820023 (1.7 Mb) TX bytes:627615 (612.9 Kb)
eth0 Link encap:Ethernet HWaddr 00:C0:9F:EB:4C:05
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:150327 errors:1 dropped:0 overruns:0 frame:1
TX packets:98321 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:150396411 (143.4 Mb) TX bytes:14469256 (13.7 Mb)
Interrupt:20
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:3299 errors:0 dropped:0 overruns:0 frame:0
TX packets:3299 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:218851 (213.7 Kb) TX bytes:218851 (213.7 Kb)
wifi0 Link encap:UNSPEC HWaddr 00-14-A4-61-16-EC-30-30-00-00-00-00-00-00-00-00
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:59106 errors:0 dropped:0 overruns:0 frame:20747
TX packets:3371 errors:0 dropped:4 overruns:0 carrier:0
collisions:0 txqueuelen:199
RX bytes:10817033 (10.3 Mb) TX bytes:766369 (748.4 Kb)
Interrupt:22
Not able to get both to connect simultaneously...
What distro are you running?
Hardware?
-
Super Moderator

Originally Posted by
mhanan
Strange... I'm not able to duplicate that on my SUSE machine.
Connected LAN:
ath0 Link encap:Ethernet HWaddr 00:14:A4:61:16:EC
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:2587 errors:0 dropped:0 overruns:0 frame:0
TX packets:2878 errors:3 dropped:3 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1802457 (1.7 Mb) TX bytes:619314 (604.7 Kb)
eth0 Link encap:Ethernet HWaddr 00:C0:9F:EB:4C:05
inet addr:10.1.2.2 Bcast:10.1.2.255 Mask:255.255.255.0
inet6 addr: fe80::2c0:9fff:feeb:4c05/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:150306 errors:1 dropped:0 overruns:0 frame:1
TX packets:98315 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:150393927 (143.4 Mb) TX bytes:14468536 (13.7 Mb)
Interrupt:20
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:3299 errors:0 dropped:0 overruns:0 frame:0
TX packets:3299 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:218851 (213.7 Kb) TX bytes:218851 (213.7 Kb)
wifi0 Link encap:UNSPEC HWaddr 00-14-A4-61-16-EC-30-30-00-00-00-00-00-00-00-00
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:58232 errors:0 dropped:0 overruns:0 frame:20536
TX packets:3086 errors:0 dropped:3 overruns:0 carrier:0
collisions:0 txqueuelen:199
RX bytes:10657796 (10.1 Mb) TX bytes:745421 (727.9 Kb)
Interrupt:22
Connected wlan:
ath0 Link encap:Ethernet HWaddr 00:14:A4:61:16:EC
inet addr:10.1.2.4 Bcast:10.1.2.255 Mask:255.255.255.0
inet6 addr: fe80::214:a4ff:fe61:16ec/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2632 errors:0 dropped:0 overruns:0 frame:0
TX packets:2942 errors:4 dropped:4 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1820023 (1.7 Mb) TX bytes:627615 (612.9 Kb)
eth0 Link encap:Ethernet HWaddr 00:C0:9F:EB:4C:05
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:150327 errors:1 dropped:0 overruns:0 frame:1
TX packets:98321 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:150396411 (143.4 Mb) TX bytes:14469256 (13.7 Mb)
Interrupt:20
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:3299 errors:0 dropped:0 overruns:0 frame:0
TX packets:3299 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:218851 (213.7 Kb) TX bytes:218851 (213.7 Kb)
wifi0 Link encap:UNSPEC HWaddr 00-14-A4-61-16-EC-30-30-00-00-00-00-00-00-00-00
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:59106 errors:0 dropped:0 overruns:0 frame:20747
TX packets:3371 errors:0 dropped:4 overruns:0 carrier:0
collisions:0 txqueuelen:199
RX bytes:10817033 (10.3 Mb) TX bytes:766369 (748.4 Kb)
Interrupt:22
Not able to get both to connect simultaneously...
What distro are you running?
Hardware?
I didn't think it could be done very easily, I have never been able to do it. I don't even know if it's good or bad?!?!
-
Just Joined!

Originally Posted by
MikeTbob
I didn't think it could be done very easily, I have never been able to do it. I don't even know if it's good or bad?!?!
Two adapters fighting over control... can't possibly be good.
-

Originally Posted by
MikeTbob
eth0 (476.5 KB)
eth1 (7.1 MB)
I think it safe to say eth1 is doing all the work here.
the big difference here is because I connected to wireless network at the begining. After a while i only conneced to both wired and wireless network. So i think this is not a suitable way to determine the current used network because the number of bytes received is being accumulated all the way and is not the instantaneous received bytes. It only can be reset when you restart your pc.

Originally Posted by
mhanan
Strange... I'm not able to duplicate that on my SUSE machine.
Connected LAN:
ath0 Link encap:Ethernet HWaddr 00:14:A4:61:16:EC
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:2587 errors:0 dropped:0 overruns:0 frame:0
TX packets:2878 errors:3 dropped:3 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1802457 (1.7 Mb) TX bytes:619314 (604.7 Kb)
eth0 Link encap:Ethernet HWaddr 00:C0:9F:EB:4C:05
inet addr:10.1.2.2 Bcast:10.1.2.255 Mask:255.255.255.0
inet6 addr: fe80::2c0:9fff:feeb:4c05/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:150306 errors:1 dropped:0 overruns:0 frame:1
TX packets:98315 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:150393927 (143.4 Mb) TX bytes:14468536 (13.7 Mb)
Interrupt:20
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:3299 errors:0 dropped:0 overruns:0 frame:0
TX packets:3299 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:218851 (213.7 Kb) TX bytes:218851 (213.7 Kb)
wifi0 Link encap:UNSPEC HWaddr 00-14-A4-61-16-EC-30-30-00-00-00-00-00-00-00-00
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:58232 errors:0 dropped:0 overruns:0 frame:20536
TX packets:3086 errors:0 dropped:3 overruns:0 carrier:0
collisions:0 txqueuelen:199
RX bytes:10657796 (10.1 Mb) TX bytes:745421 (727.9 Kb)
Interrupt:22
Connected wlan:
ath0 Link encap:Ethernet HWaddr 00:14:A4:61:16:EC
inet addr:10.1.2.4 Bcast:10.1.2.255 Mask:255.255.255.0
inet6 addr: fe80::214:a4ff:fe61:16ec/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2632 errors:0 dropped:0 overruns:0 frame:0
TX packets:2942 errors:4 dropped:4 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1820023 (1.7 Mb) TX bytes:627615 (612.9 Kb)
eth0 Link encap:Ethernet HWaddr 00:C0:9F:EB:4C:05
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:150327 errors:1 dropped:0 overruns:0 frame:1
TX packets:98321 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:150396411 (143.4 Mb) TX bytes:14469256 (13.7 Mb)
Interrupt:20
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:3299 errors:0 dropped:0 overruns:0 frame:0
TX packets:3299 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:218851 (213.7 Kb) TX bytes:218851 (213.7 Kb)
wifi0 Link encap:UNSPEC HWaddr 00-14-A4-61-16-EC-30-30-00-00-00-00-00-00-00-00
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:59106 errors:0 dropped:0 overruns:0 frame:20747
TX packets:3371 errors:0 dropped:4 overruns:0 carrier:0
collisions:0 txqueuelen:199
RX bytes:10817033 (10.3 Mb) TX bytes:766369 (748.4 Kb)
Interrupt:22
Not able to get both to connect simultaneously...
What distro are you running?
Hardware?
I think i can get both IP address is because i had disabled the NetworkManager application. With the NetworkManager enabled, I also get like what you get. Hence, I still no idea on how to determine whether I'm using wired or wireless networks without NetworkManager.
Any advices? Thanks
-
Just Joined!
a brute force way would be to run packet sniffer on both interfaces to see where the traffic is going realtime.
You could also use netstat to get a snapshot of active network connections. This will show by ip address (to/from) as well as ports and interfaces.
route -e will show you your servers routing tables.
CSR
-
Besides route command, got any other command? Because i not really understand how route command runs. 
Thanks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules