현재 활성화 된 네트워크 인터페이스 (예 : eth0, wlan0)의 이름, 즉 현재 트래픽을 송수신하는 이름을 가져와야합니다. WiFi에 연결되면 wlan0이되지만 직접 연결되면 eth0이됩니다. 또는 시스템의 네트워크 장치와 활성 상태에 따라 다른 것입니다. 어떻게 알 수 있습니까?
터미널을 열고 다음 명령을 실행하십시오.
ifconfig
활성 인터페이스에는 IP 주소와 전송 및 수신 된 바이트가 있습니다. 다음은 그 예입니다.
eth0 Link encap:Ethernet HWaddr xx:a8:6b:fe:06:xx
inet addr:192.168.1.14 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::eea8:6bff:fefe:696/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:449232 errors:0 dropped:0 overruns:0 frame:0
TX packets:309483 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:633900275 (633.9 MB) TX bytes:27944824 (27.9 MB)
이더넷 인터페이스가 사용되는지 확인하십시오.
ping -c3 -I eth0 www.google.com
ping: Warning: source address might be selected on device other than eth0.
PING www.google.com (74.125.228.145) from 192.168.1.100 eth0: 56(84) bytes of data.Wi-Fi
From Think410 (192.168.1.100) icmp_seq=1 Destination Host Unreachable
From Think410 (192.168.1.100) icmp_seq=2 Destination Host Unreachable
From Think410 (192.168.1.100) icmp_seq=3 Destination Host Unreachable
무선 인터페이스가 사용되는지 확인합니다.
ping -c3 -I wlan0 www.google.com
PING www.google.com (74.125.228.148) from 192.168.1.100 wlan0: 56(84) bytes of data.
64 bytes from iad23s17-in-f20.1e100.net (74.125.228.148): icmp_seq=1 ttl=50 time=37.5 ms
64 bytes from iad23s17-in-f20.1e100.net (74.125.228.148): icmp_seq=2 ttl=50 time=36.8 ms
64 bytes from iad23s17-in-f20.1e100.net (74.125.228.148): icmp_seq=3 ttl=50 time=35.9 ms
따라서 현재 인터넷 트래픽은 내 무선 인터페이스 인 wlan0을 통해 라우팅됩니다.
이더넷과 무선을 동시에 연결할 수 있습니다. 일반적으로 Network Manager는 일반적으로 더 빠르고 안전하기 때문에 무선보다 이더넷을 선호하여이를 허용하지 않습니다. LAN에 이더넷을 사용하고 WAN (인터넷)에 무선을 사용하려면 일반적으로 NM을 제거하고 / etc / network / interfaces에서 모든 세부 정보를 수동으로 설정합니다.
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다