(図3) コンピュータBにおける操作のようす
ComputerB# ifconfig -a                               存在するインターフェースをすべて表示する
sl0: flags=8011<UP,POINTOPOINT,MULTICAST> mtu 552    コンピュータA-B間のSLIP(sl0)と
        inet 10.0.0.2 --> 10.0.0.1 netmask 0xff000000 
sl1: flags=8011<UP,POINTOPOINT,MULTICAST> mtu 552    コンピュータB-C間のSLIP(sl1)がある
        inet 10.0.0.3 --> 10.0.0.4 netmask 0xff000000 
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
        inet 127.0.0.1 netmask 0xff000000 


ComputerB# netstat -rn                               ルーティングテーブルを表示する
Routing tables

Internet:
Destination        Gateway            Flags     Refs     Use     Netif Expire
10.0.0.1           10.0.0.2           UH          0        0       sl0      コンピュータA,Cともにルーテ
10.0.0.4           10.0.0.3           UH          0        0       sl1      ィングが自動的に設定されている
127.0.0.1          127.0.0.1          UH          0        0       lo0              


ComputerB# ping 10.0.0.1                             コンピュータAと通信できるかどうかを確認する
PING 10.0.0.1 (10.0.0.1): 56 data bytes
64 bytes from 10.0.0.1: icmp_seq=0 ttl=255 time=187.556 ms
64 bytes from 10.0.0.1: icmp_seq=1 ttl=255 time=187.510 ms
64 bytes from 10.0.0.1: icmp_seq=2 ttl=255 time=187.471 ms
^C
--- 10.0.0.1 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max/stddev = 187.471/187.512/187.556/0.035 ms


ComputerB# ping 10.0.0.4                             コンピュータCと通信できるかどうかを確認する
PING 10.0.0.4 (10.0.0.4): 56 data bytes
64 bytes from 10.0.0.4: icmp_seq=0 ttl=255 time=187.536 ms
64 bytes from 10.0.0.4: icmp_seq=1 ttl=255 time=187.537 ms
^C
--- 10.0.0.4 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max/stddev = 187.536/187.536/187.537/0.001 ms

コンピュータBでは,コンピュータA,コンピュータCのどちらとも直接つながっているため,
ルーティングを追加せずとも,通信することができた.


 CQ出版 TOP OPENDESIGN TOPOPENDESIGN Online目次に戻る
  
Copyright CQ Publishing Co.,Ltd. 1997-2001