Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- JavaScript
- 단축키
- Mac
- GIT
- bash
- find
- netsh
- profile
- VirtualBox
- Quartz
- port
- web.xml
- Windows
- 네트워크
- ssh
- 줄바꿈 문자
- Windows 10
- vscode
- Eclipse
- Source
- tomcat
- IntelliJ
- xargs
- plugin
- context
- grep
- maVen
- import
- resource
- lsof
Archives
- Today
- Total
develog
[mac] routing table 등록/삭제 본문
Dynamic Routing
- 임시 적용
- 리부팅시 초기화
## 라우팅 테이블 확인
## -n Show network addresses as numbers
## -r Show the routing tables
$ netstat -nr
## 라우팅 정보 등록
## 192.168.150 대역을 192.168.154.1 로 라우팅
$ sudo route add 192.168.150.0/24 192.168.154.1
## 등록됐는지 확인
$ netstat -nr | grep 192.168.150
## 접속되는지 확인
$ ping 192.168.150.3
## 라우팅 정보 삭제
$ sudo route delete 192.168.150.0/24 192.168.154.1
$ sudo route delete 192.168.150.0/24 # gateway 생략 가능
Static Routing
- 영구 적용
## 네트워크 서비스 리스트 확인
$ networksetup -listallnetworkservices
An asterisk (*) denotes that a network service is disabled.
Wi-Fi
Ethernet
FireWire
Bluetooth PAN
Thunderbolt Bridge
## ethernet 네트워크 설정정보 확인
$ networksetup -getinfo wi-fi
$ networksetup -getinfo ethernet
## 등록된 라우팅 정보있는지 확인
$ networksetup -getadditionalroutes ethernet
## 라우팅 정보 등록
$ sudo networksetup -setadditionalroutes ethernet 192.168.20.0 255.255.255.0 192.168.10.1
## 라우팅 정보 등록됐는지 확인
$ networksetup -getadditionalroutes ethernet
## 라우팅 등록정보 삭제
$ networksetup -setadditionalroutes ethernet
Comments