리눅스 게이트웨이 확인

1 개요[ | ]

리눅스 디폴트 게이트웨이 확인
리눅스 기본 게이트웨이 확인
리눅스 게이트웨이 확인
  • 윈도우에서는 ipconfig 명령어로 확인 가능하지만, 리눅스 ifconfig는 게이트웨이를 보여주지 않는다.
  • 대신 route 명령어 또는 netstat 명령어를 통해 확인할 수 있다.

2 방법 1: route[ | ]

[root@zetawiki ~]# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
172.27.0.0      *               255.255.0.0     U     0      0        0 eth0
link-local      *               255.255.0.0     U     1002   0        0 eth0
default         172.27.0.1      0.0.0.0         UG    0      0        0 eth0
이더넷 인터페이스는 1개(eth0)이며, 게이트웨이는 172.27.0.1

3 방법 2: netstat[ | ]

[root@zetawiki ~]# netstat -r
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
172.27.0.0      *               255.255.0.0     U         0 0          0 eth0
link-local      *               255.255.0.0     U         0 0          0 eth0
default         172.27.0.1      0.0.0.0         UG        0 0          0 eth0
→ 이더넷 인터페이스는 1개(eth0)이며, 게이트웨이는 172.27.0.1

4 방법 3: ip[ | ]

root@zetawiki:~# ip route
default via 172.27.0.1 dev eth0 
172.27.0.0/16 dev eth0  proto kernel  scope link  src 172.27.0.123
→ 게이트웨이는 172.27.0.1

5 같이 보기[ | ]

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