1 개요[ | ]
- 리눅스 디폴트 게이트웨이 확인
- 리눅스 기본 게이트웨이 확인
- 리눅스 게이트웨이 확인
- 윈도우에서는 ipconfig 명령어로 확인 가능하지만, 리눅스 ifconfig는 게이트웨이를 보여주지 않는다.
- 대신 route 명령어 또는 netstat 명령어를 통해 확인할 수 있다.
2 방법 1: route[ | ]
Console
Copy
[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[ | ]
Console
Copy
[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[ | ]
Console
Copy
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 같이 보기[ | ]
편집자 Jmnote 175.123.120.197
로그인하시면 댓글을 쓸 수 있습니다.
- 분류 댓글:
- 리눅스 네트워크 (5)
리눅스 hosts 파일 ― 올해대박리눅스 hosts 파일 ― Jmnote리눅스 nc 포트 열기 ― …우분투 절전모드 해제시 와이파이 안되는 문제 ― D4RT우분투 절전모드 해제시 와이파이 안되는 문제 ― Beyondthelimit