"리눅스 route 확인"의 두 판 사이의 차이

잔글 (봇: 자동으로 텍스트 교체 (-</source> +</syntaxhighlight>, -<source +<syntaxhighlight ))
 
(사용자 2명의 중간 판 18개는 보이지 않습니다)
1번째 줄: 1번째 줄:
;OS 라우트 확인, OS 라우팅 확인
;OS 라우트 확인, OS 라우팅 확인
;route
;리눅스 게이트웨이 확인
;netstat -r


==방법==
==방법 1: route==
;명령어
{{참고|리눅스 route}}
<source lang='bash'>
<syntaxhighlight lang='console'>
route
[root@zetawiki ~]# route
</source>
Kernel IP routing table
<source lang='bash'>
Destination    Gateway        Genmask        Flags Metric Ref    Use Iface
netstat -r
175.246.80.0    *              255.255.255.0  U    0      0        0 eth0
</source>
169.254.0.0    *              255.255.0.0    U    0      0        0 eth0
:→ 두 명령어의 결과는 거의 같다.
default        175.246.80.1    0.0.0.0        UG    0      0        0 eth0
 
</syntaxhighlight>
;실행예시
<syntaxhighlight lang='console'>
<source lang='dos'>
[root@zetawiki ~]# route -n
[root@jmnote ~]# route
Kernel IP routing table
Kernel IP routing table
Destination    Gateway        Genmask        Flags Metric Ref    Use Iface
Destination    Gateway        Genmask        Flags Metric Ref    Use Iface
192.168.0.0    *              255.255.255.0   U    1     0        0 eth1
175.246.80.0    *              255.255.255.0  U    0      0        0 eth0
default         192.168.0.1     0.0.0.0        UG    0      0        0 eth1
169.254.0.0    *              255.255.0.0     U    0     0        0 eth0
</source>
0.0.0.0         175.246.80.1   0.0.0.0        UG    0      0        0 eth0
</syntaxhighlight>


<source lang='dos'>
==방법 2: netstat==
[root@jmnote ~]# netstat -r
{{참고|리눅스 netstat}}
<syntaxhighlight lang='console'>
[root@zetawiki ~]# netstat -r
Kernel IP routing table
Destination    Gateway        Genmask        Flags  MSS Window  irtt Iface
175.246.80.0    *              255.255.255.0  U        0 0          0 eth0
169.254.0.0    *              255.255.0.0    U        0 0          0 eth0
default        175.246.80.1    0.0.0.0        UG        0 0          0 eth0
</syntaxhighlight>
<syntaxhighlight lang='console'>
[root@zetawiki ~]# netstat -rn
Kernel IP routing table
Kernel IP routing table
Destination    Gateway        Genmask        Flags  MSS Window  irtt Iface
Destination    Gateway        Genmask        Flags  MSS Window  irtt Iface
192.168.0.0     *              255.255.255.0  U        0 0          0 eth1
175.246.80.0   *              255.255.255.0  U        0 0          0 eth0
default         192.168.0.1     0.0.0.0        UG        0 0          0 eth1
169.254.0.0    *              255.255.0.0    U         0 0          0 eth0
</source>
0.0.0.0         175.246.80.1   0.0.0.0        UG        0 0          0 eth0
</syntaxhighlight>
 
==방법 3: ip==
{{참고|리눅스 ip}}
<syntaxhighlight lang='console'>
[root@zetawiki ~]# ip route list
175.246.80.0/24 dev eth0  proto kernel  scope link  src 175.246.80.11
169.254.0.0/16 dev eth0  scope link
default via 175.246.80.1 dev eth0
</syntaxhighlight>


==같이 보기==
==같이 보기==
*[[리눅스 게이트웨이 확인]]
*[[리눅스 기본 게이트웨이 변경]]
*[[리눅스 기본 게이트웨이 변경]]
*[[리눅스 스태틱 라우팅 설정]]
*[[리눅스 스태틱 라우팅 설정]]
*[[리눅스 route]]
*[[리눅스 ifconfig]]
*[[리눅스 ip]]
*[[게이트웨이]]


[[분류: 리눅스 네트워크]]
[[분류: 리눅스 네트워크]]
[[분류: 라우팅]]

2021년 9월 24일 (금) 23:18 기준 최신판

OS 라우트 확인, OS 라우팅 확인
리눅스 게이트웨이 확인

1 방법 1: route[ | ]

[root@zetawiki ~]# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
175.246.80.0    *               255.255.255.0   U     0      0        0 eth0
169.254.0.0     *               255.255.0.0     U     0      0        0 eth0
default         175.246.80.1    0.0.0.0         UG    0      0        0 eth0
[root@zetawiki ~]# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
175.246.80.0    *               255.255.255.0   U     0      0        0 eth0
169.254.0.0     *               255.255.0.0     U     0      0        0 eth0
0.0.0.0         175.246.80.1    0.0.0.0         UG    0      0        0 eth0

2 방법 2: netstat[ | ]

[root@zetawiki ~]# netstat -r
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
175.246.80.0    *               255.255.255.0   U         0 0          0 eth0
169.254.0.0     *               255.255.0.0     U         0 0          0 eth0
default         175.246.80.1    0.0.0.0         UG        0 0          0 eth0
[root@zetawiki ~]# netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
175.246.80.0    *               255.255.255.0   U         0 0          0 eth0
169.254.0.0     *               255.255.0.0     U         0 0          0 eth0
0.0.0.0         175.246.80.1    0.0.0.0         UG        0 0          0 eth0

3 방법 3: ip[ | ]

[root@zetawiki ~]# ip route list
175.246.80.0/24 dev eth0  proto kernel  scope link  src 175.246.80.11 
169.254.0.0/16 dev eth0  scope link 
default via 175.246.80.1 dev eth0

4 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}