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

3번째 줄: 3번째 줄:
;netstat -r
;netstat -r


==방법==
==방법 1: route==
;명령어
<source lang='bash'>
route
</source>
<source lang='bash'>
netstat -r
</source>
:→ 두 명령어의 결과는 거의 같다. 어느 것을 써도 OK.
 
;실행예시
<source lang='dos'>
<source lang='dos'>
[root@jmnote ~]# route
[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
default        175.246.80.1   0.0.0.0        UG    0      0        0 eth0
</source>
</source>


==방법 2: netstat==
<source lang='dos'>
<source lang='dos'>
[root@jmnote ~]# netstat -r
[root@jmnote ~]# netstat -r
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
default        175.246.80.1   0.0.0.0        UG        0 0          0 eth0
</source>
 
==방법 3: ip==
<source lang='dos'>
[root@jmnote ~]# 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
</source>
</source>



2013년 7월 30일 (화) 21:59 판

OS 라우트 확인, OS 라우팅 확인
route
netstat -r

1 방법 1: route

[root@jmnote ~]# 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

2 방법 2: netstat

[root@jmnote ~]# 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

3 방법 3: ip

[root@jmnote ~]# 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 }}