1 / 31

網路伺服器應用 Linux Server

網路伺服器應用 Linux Server. Andres, Wen-Yuan Liao Department of Computer Science and Engineering De Lin Institute of Technology andres@dlit.edu.tw http://www.cse.dlit.edu.tw/~andres. Chapter 5 Linux 常用網路指令介紹. 5.1 參數設定指令 5.2 網路偵錯指令 5.3 網路觀察與查詢 5.4 遠端連線使用指令 5.5 文字界面網頁瀏覽 5.6 終端機的中文顯示.

craig
Download Presentation

網路伺服器應用 Linux Server

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 網路伺服器應用Linux Server Andres, Wen-Yuan Liao Department of Computer Science and Engineering De Lin Institute of Technology andres@dlit.edu.tw http://www.cse.dlit.edu.tw/~andres

  2. Chapter 5 Linux 常用網路指令介紹 5.1 參數設定指令 5.2 網路偵錯指令 5.3 網路觀察與查詢 5.4 遠端連線使用指令 5.5 文字界面網頁瀏覽 5.6 終端機的中文顯示

  3. 5.1 參數設定指令 • ifconfig • interface configure • 設定網路參數 • ifup • interface up • ifdown • interface down • 啟動與關閉某個網路介面卡 • route • 顯示/修改route table

  4. ifconfig interfaceifconfig interface [options]

  5. Example

  6. eth0:網路卡的代號 • lo:內部迴圈 IP • HWaddr:是網路卡的硬體位址MAC • inet addr:網路卡的 IP • Bcast:廣播( broadcast ) 的位址 • Mask:子網路遮罩啦 • MTU:Maximum Trasmission Unit 最大傳輸單元(位元組),即此介面一次所能傳輸的最大封包 • RX:網路由啟動到目前為止的接收情形 • TX:網路由啟動到目前為止的傳送情形 • collisions:網路訊號碰撞的情況說明

  7. route [-nee]route add [-net|-host] 目標主機或網域 [netmask] [gw|dev]route del [-net|-host] 目標主機或網域 [netmask] [gw|dev]

  8. Example

  9. Example

  10. Destination:目標,可以是 IP 也可以是網域, 沒有規定到的,則是以 default 來表示 • Gateway :該目標要經由哪一個網關傳送 • Genmask :就是該 Destination 的 netmask • Flages:旗標: • U (route is up):該路由已經啟動 • H (target is a host):目標是一個主機( IP ) • G (use gateway):用來作為 gateway 的設定 • Iface:該設定使用的 interface 為何?

  11. Example

  12. Example

  13. 5.2 網路偵錯指令 • ping • 送一個 ICMP 的封包給某部主機 • traceroute • 查詢連接到某部主機時,每個節點的連線速度

  14. 5.3 網路觀察與查詢 • netstat • host • 顯示主機名稱( domain name ) • nslookup • 查詢主機名稱對應的 IP

  15. netstat [-r] [-i interface] netstat [-antulp]

  16. Example

  17. Example

  18. Proto: 通訊協定: tcp , udp Local Address 本地端的 IP 與 Port 號 如果 /etc/services 存在對應服務名稱,就以服務名稱顯示 Foreign Address 監聽哪一個地區與 port state: LISTEN:亦即監聽狀態中的 port ESTABLISHED:已建立連線的連線情況 TIME_WAIT:該連線在目前已經是等待的狀態

  19. host [-a] domain_name

  20. Example

  21. nslookup [domain_name|IP

  22. Example

  23. 5.4 遠端連線使用指令 • telnet • Remote login • ftp • File Transfer Protocol • ncftp • 登入匿名ftp主機

  24. telnet [-8] [host|IP] [port]

  25. Example

  26. ftp [-p] host [port]

  27. Example

  28. Example

  29. ncftp [host] ncftp [ftp://domain.name/path]

  30. 遠端主機的一些服務指令

  31. 本地端主機的一些服務指令

More Related