1 / 6

Step.1 Linux と IP コマンド

Step.1 Linux と IP コマンド. CLI ( Command Line Interface ). ifconfig [-a] [ インタフェース名 ] arp [-n] ping [-c 回数 ] IP アドレス ( ホスト名) traceroute [-n] IP アドレス ( ホスト名) route -n route add ... route del ... netstat [-n] --protocol= inet telnet IP アドレス ( ホスト名)

vilina
Download Presentation

Step.1 Linux と IP コマンド

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. Step.1 LinuxとIPコマンド CLI (Command Line Interface) • ifconfig [-a] [インタフェース名] • arp [-n] • ping [-c 回数] IPアドレス(ホスト名) • traceroute [-n] IPアドレス(ホスト名) • route -n • route add ... • route del ... • netstat [-n] --protocol=inet • telnet IPアドレス(ホスト名) • sshIPアドレス(ホスト名) [ -l ユーザ名] • sshIPアドレス(ホスト名) コマンドや引数 • ftp IPアドレス(ホスト名) • scp [-p] [-r] ファイル名 IPアドレス(ホスト名): • scp [-p] [-r] IPアドレス(ホスト名):ファイル名ディレクトリ名 • tcpdump -iインタフェース名 • wireshark

  2. Linux デスクトップの例 メニューからアプリケーションの実行や、シャットダウンを行う ウィンドウ画面の保存(スクリーンキャプチャ)を行うときは、「PrtSc」キーを押す よく使うアプリケーションのショートカット コマンドのマニュアル(ヘルプ)は、man xxxx のようにして探すことができる 端末を起動し、そのシェルからコマンドを実行する 2つのデスクトップを使い分けられる(クリックすると切り替わる)

  3. ifconfigコマンドの実行例 $ ifconfig eth0 Link encap:イーサネット ハードウェアアドレス 00:24:81:c2:08:ce • inetアドレス:192.168.0.1 ブロードキャスト:192.168.0.255 マスク:255.255.255.0 inet6アドレス: fe80::224:81ff:fec2:8ce/64 範囲:リンク UP BROADCAST RUNNING MULTICAST MTU:1500 メトリック:1 RXパケット:366680 エラー:0 損失:0 オーバラン:0 フレーム:0 TXパケット:19654 エラー:0 損失:0 オーバラン:0 キャリア:0 衝突(Collisions):0 TXキュー長:100 RXバイト:30043647 (30.0 MB) TXバイト:6391030 (6.3 MB) メモリ:f0500000-f0520000 lo Link encap:ローカルループバック inetアドレス:127.0.0.1 マスク:255.0.0.0 inet6アドレス: ::1/128 範囲:ホスト UP LOOPBACK RUNNING MTU:16436 メトリック:1 RXパケット:1733 エラー:0 損失:0 オーバラン:0 フレーム:0 TXパケット:1733 エラー:0 損失:0 オーバラン:0 キャリア:0 衝突(Collisions):0 TXキュー長:0 RXバイト:3964792 (3.9 MB) TXバイト:3964792 (3.9 MB) MACアドレス インタフェース名 IPアドレス ネットマスク

  4. ping コマンドの実行例 $ ping www.iij.ad.jp PING www.iij.ad.jp (210.130.137.80) 56(84) bytes of data. • 64 bytes from www-v4.iij.ad.jp (210.130.137.80): icmp_seq=1 ttl=63 time=31.1 ms • 64 bytes from www-v4.iij.ad.jp (210.130.137.80): icmp_seq=2 ttl=63 time=25.9 ms • 64 bytes from www-v4.iij.ad.jp (210.130.137.80): icmp_seq=3 ttl=63 time=25.9 ms • 64 bytes from www-v4.iij.ad.jp (210.130.137.80): icmp_seq=4 ttl=63 time=26.8 ms ^C (ずっと続くので、Ctrl-Cで終了させた) --- twww.ipc.hiroshima-cu.ac.jp ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 3015ms rtt min/avg/max/mdev = 25.973/27.491/31.130/2.141 ms 目的のホストの正式なホスト名(FQDN)とIPアドレス このホストまでのRTT RTTの最小値、平均値、最大値、標準偏差(ばらつき具合)

  5. tracerouteコマンドの実行例 $ traceroute www.pref.hiroshima.lg.jp traceroute to www.pref.hiroshima.lg.jp (61.122.3.2), 30 hops max, 60 byte packets 1 165.242.1.1 (165.242.1.1) 0.387 ms 0.453 ms 0.519 ms • 2 * * * • 3 * * * 4 hiroshima1-dc-RM-GE-7-2-0-101.sinet.ad.jp (150.99.188.1) 0.929 ms 0.971 ms 1.011 ms 5 kyoto-dc-RM-AE-1-11.sinet.ad.jp (150.99.203.54) 9.502 ms 9.438 ms 9.532 ms 6 osaka-dc-RM-AE-1-11.sinet.ad.jp (150.99.203.33) 12.929 ms 13.089 ms 12.929 ms 7 nagoya-dc-RM-AE-1-11.sinet.ad.jp (150.99.203.29) 15.894 ms 15.871 ms 15.897 ms 8 tokyo1-dc-RM-AE-1-11.sinet.ad.jp (150.99.203.25) 21.242 ms 21.144 ms 21.265 ms 9 TYO3-IX1-XGE-3-1.sinet.ad.jp (150.99.189.126) 21.443 ms 21.505 ms 21.348 ms 10 AS7670.ix.jpix.ad.jp (210.171.224.168) 34.541 ms 34.538 ms 34.529 ms 11 ps-eac11-po11.ctnet.ad.jp (210.166.33.163) 34.526 ms 34.669 ms 34.656 ms 12 hiroshima-pref-781901-eth-gw.ctnet.ad.jp (210.166.34.150) 35.528 ms 35.743 ms 35.734 ms 13 ns1.pref.hiroshima.jp (61.122.3.2) 36.905 ms 36.710 ms 36.198 ms 目的のホストの正式なホスト名(FQDN)とIPアドレス 途中のルータのホスト名とIPアドレス このルータまでのRTT(3回分) これは県庁の上位プロバイダかも。どこだろう?

  6. netstatコマンドの実行例 $ netstat -n --protocol=inet 稼働中のインターネット接続 (w/oサーバ) Proto 受信-Q 送信-Q 内部アドレス 外部アドレス 状態 • tcp 24 0 192.168.0.2:57370 192.168.0.3:389 CLOSE_WAIT • tcp 0 0 192.168.0.2:22192.168.0.3:3388ESTABLISHED TCP接続は終了し、資源の解放待ちの意味 接続の相手のIPアドレスとポート番号 使用プロトコル TCP接続中の意味 接続先(このコンピュータ)のIPアドレスとポート番号(22 = ssh) • 2行目は、他のコンピュータ(192.168.0.3)から、 • sshで接続されたときの状態を表す

More Related