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 |
Tags
- tomcat
- Mac
- 줄바꿈 문자
- plugin
- port
- Eclipse
- GIT
- VirtualBox
- 네트워크
- 단축키
- IntelliJ
- Windows
- import
- maVen
- context
- Quartz
- netsh
- ssh
- Windows 10
- vscode
- Source
- grep
- web.xml
- bash
- resource
- profile
- lsof
- JavaScript
- xargs
- find
Archives
- Today
- Total
develog
[linux] routing table 등록/삭제 본문
route 등록/삭제 방법
# 라우팅 테이블 확인
$ route -n
# default gateway 등록/삭제
sudo route add default gw 192.168.56.1 metric 200 dev enp0s8
sudo route del default gw 192.168.56.1 metric 200 dev enp0s8
# 네트워크 대역 등록/삭제
sudo route add -net 192.168.56.0 netmask 255.255.255.0 metric 200 dev enp0s8
sudo route del -net 192.168.56.0 netmask 255.255.255.0 metric 200 dev enp0s8
# 단일 호스트 등록/삭제
sudo route add -host 192.168.56.100 gw 192.168.56.1
sudo route del -host 192.168.56.100 gw 192.168.56.1
route 내용 보기
출력 화면 설명
OUTPUT
The output of the kernel routing table is organized in the following columns
Destination
The destination network or destination host.
Gateway
The gateway address or '*' if none set.
Genmask
The netmask for the destination net; '255.255.255.255' for a host destination and '0.0.0.0' for the default route.
Flags Possible flags include
U (route is up)
H (target is a host)
G (use gateway)
R (reinstate route for dynamic routing)
D (dynamically installed by daemon or redirect)
M (modified from routing daemon or redirect)
A (installed by addrconf)
C (cache entry)
! (reject route)
Metric The 'distance' to the target (usually counted in hops).
Ref Number of references to this route. (Not used in the Linux kernel.)
Use Count of lookups for the route. Depending on the use of -F and -C this will be either route cache misses (-F) or hits (-C).
Iface Interface to which packets for this route will be sent.
Comments