ネットワークエンジニアへの道しるべ

IPルーティング

IPルーティングの種類とその方法

このチャプターではルータ操作におけるIPルーティングの種類とその設定方法を学びます。
一連の操作学習はIPを使用するすべてのルータ及びコンフィグレーションに関わってきますのでよく理解する必要があります。

 

 

IPルーティングとは

IPルーティングとは、あるネットワークから別のネットワークまで、そのパケットを移動(送信)させるプロセスになります。
このチャプターでは3つのCiscoルータを用いたIPルーティングの設定およびその確認の方法を解説します。

 

 

ルータの初期設定

それぞれのルータの名前をRouterA RouterB RouterCとした以下のようなネットワーク構成を考えます。

ネットワークエンジニア,ccna,nat,ipaddress,IPルーティング

 

このような状態になるように設定していきます。

 

 

 

RouterAの設定

RouterAに接続して以下のような設定をします。
ホスト名、パスワード、バナー、インターフェイスdescription、各インターフェイスのIPアドレスのそれぞれの設定。
Router> enable
Router# config terminal
Router(config)# hostname RouterA
RouterA(config)# enable secret admini
RouterA(config)# line console 0
RouterA(config-line)# password admini
RouterA(config-line)# login
RouterA(config-line)# line aux 0
RouterA(config-line)# password admini
RouterA(config-line)# login
RouterA(config-line)# line vty 0 4
RouterA(config-line)# password admini
RouterA(config-line)# login
RouterA(config-line)# interface fastethernet 0/0
RouterA(config-if)# ip address 172.16.40.1 255.255.255.0
RouterA(config-if)# description LAN_40 Connection
RouterA(config-if)# no shutdown
RouterA(config-if)# interface serial 0/0
RouterA(config-if)# ip address 172.16.20.2 255.255.255.0
RouterA(config-if)# description Connection RouterB
RouterA(config-if)# no shutdown
RouterA(config-if)# exit
RouterA(config)# banner motd #
this is the RouterA
#
RouterA(config)# exit
RouterA# copy run start
RouterA#

 

 

RouterBの設定

RouterBに接続しホスト名、パスワード、インターフェイスdescription、バナー表示、各インターフェイスのIPアドレスのそれぞれの設定。
Router> enable
Router# config terminal
Router(config)# hostname RouterB
RouterB(config)# enable secret admini
RouterB(config)# line console 0
RouterB(config-line)# password admini
RouterB(config-line)# login
RouterB(config-line)# line aux 0
RouterB(config-line)# password admini
RouterB(config-line)# line vty 0 4
RouterB(config-line)# password admini
RouterB(config-line)# login
RouterB(config-line)# interface fastethernet 0/0
RouterB(config-if)# ip address 172.16.10.1 255.255.255.0
RouterB(config-if)# description LAN_10 Connection
RouterB(config-if)# no shutdown
RouterB(config-if)# interface serial 0/0
RouterB(config-if)# ip address 172.16.20.1 255.255.255.0
RouterB(config-if)# description Connection RouterA
RouterB(config-if)# no shutdown
RouterB(config-if)# clock rate 64000
RouterB(config-if)# interface serial 0/1
RouterB(config-if)# ip address 172.16.30.1 255.255.255.0
RouterB(config-if)# description Connection RouterC
RouterB(config-if)# clock rate 64000
RouterB(config-if)# no shutdown
RouterB(config-if)# exit
RouterB(config)# banner motd #
this is the RouterB
#
RouterB(config)# exit
RouterB# copy run start
RouterB#

 

 

 

 

RouterCの設定

RouterCに接続しホスト名、パスワード、インターフェイスdescription、バナー表示、各インターフェイスのIPアドレスのそれぞれの設定。
Router> enable
Router# config terminal
Router(config)# hostname RouterC
RouterC(config)# enable secret admini
RouterC(config)# line console 0
RouterC(config-line)# password admini
RouterC(config-line)# login
RouterC(config-line)# line aux 0
RouterC(config-line)# password admini
RouterC(config-line)# line vty 0 4
RouterC(config-line)# password admini
RouterC(config-line)# login
RouterC(config-line)# interface fastethernet 0/0
RouterC(config-if)# ip address 172.16.50.1 255.255.255.0
RouterC(config-if)# description LAN_50 Connection
RouterC(config-if)# no shutdown
RouterC(config-if)# interface serial 0/0
RouterC(config-if)# ip address 172.16.30.2 255.255.255.0
RouterC(config-if)# description Connection RouterB
RouterC(config-if)# no shutdown
RouterC(config-if)# exit
RouterC(config)# banner motd #
this is the RouterC
#
RouterC(config)# exit
RouterC# copy run start
RouterC#

 

 

コンフィグレーションの確認

3つのルータに対して行った設定を確認してみましょう。
まずルータAで次のように入力します。
RouterA# show running-config

 

 

RouterA# show ip route

 

つづいてルータB、ルータCに対しても同じように設定の確認をしてみましょう。
show running-config を行うとルータ全体の設定が表示されます。
show ip route はその対象ルータのルーティングテーブルを表示させることができます。

 

 

ルータはルータ自身に接続されているネットワークのみそのルーティングテーブルを表示させることができます。
ルーティングテーブルにないネットワークにパケット送信する場合はそのネットワークのルーティングテーブルを設定して、リモートネットワークに到達するための設定をする必要があります。

 

 

 

nextupprevious

前の2つのセクションにおいて設定したスタティックルートまたはデフォルトルートは、それのみのネットワーク構築というのは実際はあまりありません。
このセクションで設定するRIP(Routing Information Protocol)というのはダイナミックルーティングと呼ばれるもので、このダイナミックルーティングはルーティングテーブルが更新され、ネットワーク内のすべてのルータがルーティング情報を共有します。
またIPなどのルーテッドプロトコルはインターネットワーク内においてユーザデータを送ることができ、さらにこのダイナミックルーティングは小規模から中規模のネットワーク構築において適しています。

ネットワークエンジニア,ccna,nat,ipaddress,IPルーティング,RIPルーティング

続きを読む≫ 2021/08/28 11:59:28

デフォルトルーティングとはルーティングテーブルに存在しないリモートネットワークを宛先とするパケットを、ネクストホップルータに送信するためのプロセスになります。

 

 

ルータでデフォルトルートを設定するということは、ルータをデフォルトゲートウェイのイメージで設定することになります。
それはルータそのものにデフォルトゲートウェイを設定するということではありませんがGateway Last of Resort(最終ゲートウェイ)を設定することは可能という意味です。
さらには、デフォルトゲートウェイを設定できるのはスタブネットワーク接続されているルータのみになり、それは出口ポートを1つしか持たないネットワーク上だけで使用できるものになります。

 

デフォルトルーティング

続きを読む≫ 2021/08/27 19:42:27

スタティックルーティングとは、IPルーティングにおいてルーティングテーブルにないネットワーク情報を管理者が手動でルータに設定する方法になります。
そのためルーティングプロトコルの設定の有無は関係がありません。

 

ネットワークエンジニア,ccna,nat,ipaddress,IPルーティング,スタティックルーティング

 

各ルータにおいて手動でスタティックルーティングテーブルを設定していきます。

 

先ほどの3つのルータの設定では隣接しているルータ同士の通信であれば可能でしたが、この設定を行えば直接つながれていないルータ間であってもネットワーク全体に対しての通信が可能になります。

 

ちなみにこのスタティックルートすべてが設定されていないとこのルーティングは動作しません。

続きを読む≫ 2021/08/26 21:47:26

ホーム RSS購読 サイトマップ
TOP 線形代数 ベクトル解析 慣性モーメント 解析力学 微分方程式 NEへの道しるべ