0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Ciscoルータのルーティング(経路選択)について

Last updated at Posted at 2023-11-22

CCNA勉強のためのメモです。

概要

Ciscoルータは、大体3つの値を元にルーティング(経路選択)を行います。
1.プレフィックス長
2.AD値(アドミニストレーティブディスタンス)
3.メトリック値

1. プレフィックス長

プレフィックス長とは、IPアドレスに付いてる192.168.10.1/24の/24のことです。
プレフィックス長が大きいルートがまず選択されます。

(例)

C 192.168.1.0/24 is directly connected, FastEthernet1 #プレフィックス長は24
C 192.168.1.0/28 is directly connected, FastEthernet0 #プレフィックス長は28

この場合、プレフィックス長がより大きいFastEthernet0が選択されます。

2. AD値(アドミニストレーティブディスタンス)

プレフィックス長が同じ場合、AD値が小さいルートが選択されます。
AD値は下記の場合、120です。

                 ##これ
R	192.168.1.0/24 [120/1] via 192.168.1.254 00:00:06 FastEthernet1

directlyの場合、AD値は0になります。

#directlyがあれば、AD値は0
C 192.168.1.0/24 is directly connected, FastEtherne1

(例)

R	192.168.1.0/24 [120/1] via 192.168.1.254 00:00:06 FastEthernet1 #AD値は120
C   192.168.1.0/24 is directly connected, FastEthernet2 #AD値は0

この場合、AD値が小さいFastEthernet2が選択されます。

3. メトリック値

プレフィックス長もAD値も同じ場合、メトリック値が小さいルートが選択されます。
メトリック値は、AD値の右の数字です。
下記の場合、メトリック値は100になります。

                       #これ
R	192.168.1.0/24 [120/100] via 192.168.1.254 00:00:06 FastEthernet1

(例)

R	192.168.1.0/24 [120/100] via 192.168.1.254 00:00:06 FastEthernet1 #メトリック値は100
R	192.168.1.0/24 [120/200] via 192.168.1.253 00:00:06 FastEthernet2 #メトリック値は200

この場合、メトリック値が小さいFastEthernet1が選択されます。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?