우분투에서 2개 이상의 네트워크 인터페이스를 사용한다면 다음과 같이 우선순위를 설정할 수 있다.
[출처] : https://superuser.com/questions/331720/how-do-i-set-the-priority-of-network-connections-in-ubuntu
'ifmetric'를 설치하여 설정한다.
$ sudo apt-get install ifmetric
$ route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 10.42.0.1 0.0.0.0 UG 100 0 0 eth0
0.0.0.0 10.42.0.2 0.0.0.0 UG 600 0 0 wlan0
위와 같이 wlan0의 우선순위가 600이어서 순위가 eth0보다 낮다면 다음과 같이 수정하여 순위를 바꿀 수 있다.
$ sudo ifmetric wlan0 50
순위가 바뀐것을 확인할 수 있다.
$ route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 10.42.0.2 0.0.0.0 UG 50 0 0 wlan0
0.0.0.0 10.42.0.1 0.0.0.0 UG 100 0 0 eth0
'Linux > Ubuntu' 카테고리의 다른 글
SSH로 X-Window 실행하기 (0) | 2018.03.23 |
---|---|
Ubuntu Oracle JDK 7 is NOT installed 해결법 (0) | 2017.11.24 |
USB 테터링으로 네트워크 인터페이스를 할당 받을 경우 mac address 고정하기 (0) | 2017.11.21 |
ubuntu 16.04에서 network interface의 이름이 'eth0'가 아닌경우 (0) | 2017.11.21 |
계정 추가 (0) | 2016.08.11 |