OSPF例2
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
[[CISCO入門]]
#setlinebreak(on)
バージョン: &Version; &br;
オンラインユーザー数: &online;
閲覧数表示 本日/トータル: &counter(today); / &counter(to...
最終更新:&lastmod();&br;
*OSPFルータの種類 [#v5d2122a]
,内部ルータ,全てのIFが同じエリアに所属している
,バックボーンルータ,1つ以上のIFがバックボーンエリア(Area0)に所属している
,ABR(Area Border Router),エリア境界ルータ、複数のエリアを相互に接...
,ASBR(Autonomous System Boundary Router),自律システム境界ルータ...
※内部ルータかつバックボーンルータや、バックボーンルータかつABR/ASBRは当然...
*LSAタイプ [#u2b7c27e]
LSAにはいくつかのタイプが存在する
,LSAタイプ,名前,確認コマンド,概要
,タイプ1,ルータLSA,sh ip ospf database router,直接接続している...
,タイプ2,ネットワークLSA,sh ip ospf database network,マルチアクセスNW上...
,タイプ3,ネットワーク集約LAS,sh ip ospf database summary,他のエリア...
,タイプ4,ASBR集約LSA,sh ip ospf database asbr-summary,ASBR...
,タイプ5,AS外部LSA,sh ip ospf database external,非OSPF NWへ...
,タイプ7,NSSA外部LSA,sh ip ospf database nssa-external,非OS...
-タイプ1(ルータLSA)
全OSPFルータが生成
自身が接続しているリンク情報を通知
接続しているリンク情報を含む
エリア内だけにフラッディング
エリア内ルート『0』のコード
-タイプ2(ネットワークLSA)
DRが生成
マルチエリアアクセスネットワークの情報を通知
DRのIPアドレス、サブネットマスク、接続しているルータのリストを含む
エリア内だけにフラッディング
-タイプ3(ネットワーク集約LSA)
ABRが生成
エリア間のルート情報を通知
所属するエリア内のネットワークアドレス、サブネットマスク、メトリックを含む
AS全体にフラッディング
エリア間ルート『O IA』
-タイプ4(ASBR集約LSA)
ABRが生成
ASBRに関する情報を通知
ASBRのルータID、メトリックを含む
AS全体にフラッディング
-タイプ5(AS外部LSA)
ASBRが生成
非OSPFネットワークのルート情報を通知
ネットワークアドレス、サブネットマスク、メトリック、転送アドレスを含む
AS全体にフラッディング
OSPF外部ルート『OE1』又は『OE2』のコード
※E1:OSPFドメイン内コストが外部コストに加算される。内部のコストを加算...
※E2:OSPFドメイン内コストが外部コストに加算されない(Def)内部のコスト...
-タイプ7(NSSA外部LSA)
NSSAのASBRが生成
非OSPFネットワークのルート情報を通知
ネットワークアドレス、サブネットマスク、メトリック、転送アドレスを含む
NSSAエリア内だけにフラッディング(ABRでタイプ5に変換し、AS全体にフラッテ...
OSPF外部ルート『NE1』又は『NE2』のコード
*RIPと混ぜてみた [#c92af329]
AREA1 │AREA0 │AREA2 ...
│ │ ...
┏━━━┓FE0 ┏━┷━┓FE1 ┏━┷━┓ │ ...
┃ ┣━━┫ R1 ┣━━┫ ┃ │ ...
┏━━━┓ ┃ID:150┃ ┗━━━┛ ┃ID:140┃FE0 ┏━┷━┓FE1 ...
┃ PC ┣━┫ ┃ ID:250 ┃ ┣━━┫ R3 ...
┗━━━┛ ┃ ┃ ID:200 ┃ ┃ ┗━┯━┛ ...
┃L3SW-1┃FE0 ┏━━━┓FE1 ┃L3SW-2┃ ID:100│ ...
10.10.10.0/24 ┃ ┣━━┫ R2 ┣━━┫ ┃ │ ...
VLAN10 ┗━━━┛ ┗━┯━┛ ┗━┯━┛ │ ...
10.1.1.0/24 │10.2.2.0/24 │10.3.3....
VLAN100 │ VLAN200 │ VLAN3...
PC:10.10.10.10 R1 FE0/0:10.1.1.254/24 ...
L3SW1 VLAN10:10.10.10.254 R1 FE0/1:10.2.2.253/24 ...
L3SW1 VLAN100:10.1.1.1 R2 FE0/0:10.1.1.253/24 ...
L3SW2 VLAN200:10.2.2.1/24 R2 FE0/1:10.2.2.254/24 ...
L3SW2 VLAN300:10.3.3.254/24
**R1設定例 [#h0197c23]
R1#show running-config
!
version 12.4
!
hostname R1
!
enable secret 5 $1$xXgJ$Wmvi1LlOnaxNSsQLiYbjV0
!
ip cef
!
no ip domain lookup
!
interface FastEthernet0/0
ip address 10.1.1.254 255.255.255.0
ip ospf 100 area 1
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 10.2.2.253 255.255.255.0
ip ospf 100 area 0
duplex auto
speed auto
!
router ospf 100
router-id 1.1.1.250
log-adjacency-changes
auto-cost reference-bandwidth 1000
network 10.1.1.0 0.0.0.255 area 1
network 10.2.2.0 0.0.0.255 area 0
!
line con 0
password cisco
logging synchronous
login
line aux 0
line vty 0 4
password cisco
logging synchronous
login
!
!
end
R1#
**R3設定例 [#oec87c36]
R3#show running-config
!
version 12.4
!
hostname R3
!
ip cef
!
no ip domain lookup
!
interface FastEthernet0/0
ip address 10.3.3.1 255.255.255.0
ip ospf priority 0
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 10.4.4.254 255.255.255.0
duplex auto
speed auto
!
router ospf 100
router-id 1.1.1.100
log-adjacency-changes
auto-cost reference-bandwidth 1000
redistribute rip subnets
passive-interface FastEthernet0/1
network 10.3.3.0 0.0.0.255 area 2
!
router rip
version 2
redistribute ospf 100 metric 5
passive-interface FastEthernet0/0
network 10.0.0.0
no auto-summary
!
ip forward-protocol nd
!
line con 0
password cisco
logging synchronous
login
line aux 0
line vty 0 4
password cisco
logging synchronous
login
!
!
end
R3#
**show 出力させてみた [#lcbca77b]
R1#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile...
D - EIGRP, EX - EIGRP external, O - OSPF, IA -...
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA...
E1 - OSPF external type 1, E2 - OSPF external ...
i - IS-IS, su - IS-IS summary, L1 - IS-IS leve...
ia - IS-IS inter area, * - candidate default, ...
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
10.0.0.0/24 is subnetted, 6 subnets
O E2 10.20.20.0 [110/20] via 10.2.2.1, 01:02:11, F...
O 10.10.10.0 [110/11] via 10.1.1.1, 01:18:24, F...
O E2 10.4.4.0 [110/20] via 10.2.2.1, 01:02:11, Fas...
O IA 10.3.3.0 [110/11] via 10.2.2.1, 01:13:30, Fas...
C 10.2.2.0 is directly connected, FastEthernet0/1
C 10.1.1.0 is directly connected, FastEthernet0/0
R1#
R1#show ip ospf neighbor
Neighbor ID Pri State Dead Time Add...
1.1.1.140 1 FULL/DROTHER 00:00:33 10....
1.1.1.200 1 FULL/BDR 00:00:38 10....
1.1.1.150 1 FULL/DROTHER 00:00:31 10....
1.1.1.200 1 FULL/BDR 00:00:32 10....
R1#
-show ip ospf database
R3#show ip ospf database ←LSDBの要約情報を表示
OSPF Router with ID (1.1.1.100) (Process ...
Router Link States (Area 2) ←LSAタイプ1...
Link ID ADV Router Age Seq# ...
1.1.1.100 1.1.1.100 543 0x8000000...
1.1.1.140 1.1.1.140 388 0x8000000...
Net Link States (Area 2) ←LSAタイプ2...
Link ID ADV Router Age Seq# ...
10.3.3.254 1.1.1.140 388 0x8000000...
Summary Net Link States (Area 2)←LSAタ...
Link ID ADV Router Age Seq# ...
10.1.1.0 1.1.1.140 1153 0x8000000...
10.2.2.0 1.1.1.140 1153 0x8000000...
10.10.10.0 1.1.1.140 1153 0x8000000...
Type-5 AS External Link States←LSAタイプ5
Link ID ADV Router Age Seq# ...
10.4.4.0 1.1.1.100 543 0x8000000...
10.20.20.0 1.1.1.100 545 0x8000000...
R3#
-show ip ospf database router
R3#show ip ospf database router ←LSAタイプ1の詳細情...
OSPF Router with ID (1.1.1.100) (Process ...
Router Link States (Area 2) ←LSAタイプ1...
LS age: 751
Options: (No TOS-capability, DC)
LS Type: Router Links
Link State ID: 1.1.1.100 ←LSAを生成したル...
Advertising Router: 1.1.1.100 ←LSAを生成したル...
LS Seq Number: 80000003 ←LSAのシーケンス番号
Checksum: 0x45F1
Length: 36
AS Boundary Router
Number of Links: 1 ←リンク数
Link connected to: a Transit Network ←リンク...
(Link ID) Designated Router address: 10.3.3.254 ...
(Link Data) Router Interface address: 10.3.3.1 ...
Number of TOS metrics: 0
TOS 0 Metrics: 10
Routing Bit Set on this LSA
LS age: 596
Options: (No TOS-capability, DC)
LS Type: Router Links
Link State ID: 1.1.1.140 ←LSAを生成したル...
Advertising Router: 1.1.1.140
LS Seq Number: 80000008
Checksum: 0xF6F6
Length: 36
Area Border Router ←自身がABRであることを示してい...
Number of Links: 1 ←リンク数
Link connected to: a Transit Network
(Link ID) Designated Router address: 10.3.3.254
(Link Data) Router Interface address: 10.3.3.254
Number of TOS metrics: 0
TOS 0 Metrics: 1
R3#
,リンクタイプ1,ポイントツーポイント,一対一
,リンクタイプ2,トランジットネットワーク,複数のOSPFルータと接続しているNW
,リンクタイプ3,スタブネットワーク,他にOSPFルータが存在しないNWを指す
,リンクタイプ4,仮想リンク(バーチャルリンク),
-show ip ospf database network
R3#show ip ospf database network
OSPF Router with ID (1.1.1.100) (Process ...
Net Link States (Area 2) ←LSAタイプ2(...
Routing Bit Set on this LSA
LS age: 1260
Options: (No TOS-capability, DC)
LS Type: Network Links
Link State ID: 10.3.3.254 (address of Designated Ro...
Advertising Router: 1.1.1.140 ...
LS Seq Number: 80000002
Checksum: 0xB3EF
Length: 32
Network Mask: /24 ...
Attached Router: 1.1.1.140 ...
Attached Router: 1.1.1.100 ...
R3#
*仮想リンクを張ってみる [#y0e6f2fe]
AREA0につながっていないAREA3(R4)はルート交換が出来ないので
L3やR1-2はR4の情報を持たないし、R4はR3より左の情報を持た...
AREA1 │AREA0 │AREA2 ...
│ │ ...
┏━━━┓FE0 ┏━┷━┓FE1 ┏━┷━┓ │ ...
┃ ┣━━┫ R1 ┣━━┫ ┃ │ ...
┏━━━┓ ┃ID:150┃ ┗━━━┛ ┃ID:140┃FE0 ┏━┷━┓FE1 ...
┃ PC ┣━┫ ┃ ID:250 ┃ ┣━━┫ R3 ...
┗━━━┛ ┃ ┃ ID:200 ┃ ┃ ┗━┯━┛ ...
┃L3SW-1┃FE0 ┏━━━┓FE1 ┃L3SW-2┃ ID:100│ ...
10.10.10.0/24 ┃ ┣━━┫ R2 ┣━━┫ ┃ │ ...
VLAN10 ┗━━━┛ ┗━┯━┛ ┗━┯━┛ │ ...
10.1.1.0/24 │10.2.2.0/24 │10.3.3....
VLAN100 │ VLAN200 │ VLAN3...
PC:10.10.10.10 R1 FE0/0:10.1.1.254/24 ...
L3SW1 VLAN10:10.10.10.254 R1 FE0/1:10.2.2.253/24 ...
L3SW1 VLAN100:10.1.1.1 R2 FE0/0:10.1.1.253/24 ...
L3SW2 VLAN200:10.2.2.1/24 R2 FE0/1:10.2.2.254/24 ...
L3SW2 VLAN300:10.3.3.254/24
-AREA0の入り口OSPFルータ(L3SW-2)とAREA3の入り口OSPFルータ(R3)の...
-L3SW2のConfig抜粋 (virtual-linkは対向のルータIDを記載)
!
router ospf 100
router-id 1.1.1.140
log-adjacency-changes
auto-cost reference-bandwidth 1000
area 2 virtual-link 1.1.1.100
network 10.2.2.0 0.0.0.255 area 0
network 10.3.3.0 0.0.0.255 area 2
!
-R3のConfig抜粋 (virtual-linkは対向のルータIDを記載)
!
router ospf 100
router-id 1.1.1.100
log-adjacency-changes
auto-cost reference-bandwidth 1000
area 2 virtual-link 1.1.1.140
network 10.3.3.0 0.0.0.255 area 2
network 10.4.4.0 0.0.0.255 area 3
!
-R4でO IAとして学習している
R4#show ip route
Gateway of last resort is not set
10.0.0.0/24 is subnetted, 6 subnets
C 10.20.20.0 is directly connected, Ethernet0
O IA 10.10.10.0 [110/32] via 10.4.4.254, 00:15:00,...
C 10.4.4.0 is directly connected, FastEthernet0
O IA 10.3.3.0 [110/20] via 10.4.4.254, 00:15:53, F...
O IA 10.2.2.0 [110/21] via 10.4.4.254, 00:15:00, F...
O IA 10.1.1.0 [110/31] via 10.4.4.254, 00:15:00, F...
R4#
-SW2でvirtual-linksの状態確認
SW2#show ip ospf virtual-links
Virtual Link OSPF_VL1 to router 1.1.1.100 is up ...
Run as demand circuit
DoNotAge LSA allowed.
Transit area 2, via interface Vlan300, Cost of usin...
Transmit Delay is 1 sec, State POINT_TO_POINT, ...
Timer intervals configured, Hello 10, Dead 40, Wait...
Hello due in 00:00:08
Adjacency State FULL (Hello suppressed) ...
Index 3/4, retransmission queue length 0, number ...
First 0x0(0)/0x0(0) Next 0x0(0)/0x0(0)
Last retransmission scan length is 0, maximum is 0
Last retransmission scan time is 0 msec, maximum ...
SW2#
-R3で状態の確認
R3#show ip ospf
Routing Process "ospf 100" with ID 1.1.1.100
~省略~
Number of areas in this router is 3. 3 normal 0 stub...
Number of areas transit capable is 1 ...
External flood list length 0
Area BACKBONE(0) ...
Number of interfaces in this area is 1
~省略~
Area 2
Number of interfaces in this area is 1
This area has transit capability: Virtual Lin...
~省略~
Area 3
Number of interfaces in this area is 1
~省略~
R3#
*OSPFの集約をしてみる [#e276d331]
AREA1 │AREA0 │AREA2 ...
│ │ ...
┏━━━┓FE0 ┏━┷━┓FE1 ┏━┷━┓ ID:100 ...
┃ ┣━━┫ R1 ┣━━┫ ┃ ...
┏━━━┓ ┃ID:150┃ ┗━━━┛ ┃ID:140┃FE0 ┏━━━┓FE1 ...
┃ PC ┣━┫ ┃ ID:250 ┃ ┣━━┫ R3 ...
┗━━━┛ ┃ ┃ ID:200 ┃ ┃ ┗━━━┛ ...
┃L3SW-1┃FE0 ┏━━━┓FE1 ┃L3SW-2┃ ...
10.10.10.0/24 ┃ ┣━━┫ R2 ┣━━┫ ┃ ...
VLAN10 ┗━━━┛ ┗━┯━┛ ┗━┯━┛ ...
10.1.1.0/24 │10.2.2.0/24 │10.3.3....
VLAN100 │ VLAN200 │ VLAN3...
PC:10.10.10.10 R1 FE0/0:10.1.1.254/24 ...
L3SW1 VLAN10:10.10.10.254 R1 FE0/1:10.2.2.253/24 ...
L3SW1 VLAN100:10.1.1.1 R2 FE0/0:10.1.1.253/24 ...
L3SW2 VLAN200:10.2.2.1/24 R2 FE0/1:10.2.2.254/24 ...
L3SW2 VLAN300:10.3.3.254/24
-SW2でAREA2のR3,4のアドレス(10.4.4.0/24と10.5.5.0/24)を無理...
!
router ospf 100
router-id 1.1.1.140
log-adjacency-changes
auto-cost reference-bandwidth 1000
area 2 range 10.4.0.0 255.254.0.0
network 10.2.2.0 0.0.0.255 area 0
network 10.3.3.0 0.0.0.255 area 2
!
-SW2を見るとNull0が作成されている
SW2#show ip route
~省略~
10.0.0.0/8 is variably subnetted, 7 subnets, 2 m...
O IA 10.10.10.0/24 [110/12] via 10.2.2.254, 00:00:...
[110/12] via 10.2.2.253, 00:00:...
O 10.5.5.0/24 [110/111] via 10.3.3.1, 00:05:47,...
O 10.4.4.0/24 [110/11] via 10.3.3.1, 00:05:47, ...
C 10.3.3.0/24 is directly connected, Vlan300
C 10.2.2.0/24 is directly connected, Vlan200
O IA 10.1.1.0/24 [110/11] via 10.2.2.254, 00:00:24...
[110/11] via 10.2.2.253, 00:00:24...
O 10.4.0.0/15 is a summary, 00:05:47, Null0
SW2#
-showコマンドでSW1で見ても集約されている
SW1#show ip route ospf
10.0.0.0/8 is variably subnetted, 5 subnets, 2 m...
O IA 10.3.3.0/24 [110/12] via 10.1.1.254, 00:05:43...
[110/12] via 10.1.1.253, 00:05:43...
O IA 10.2.2.0/24 [110/11] via 10.1.1.254, 00:05:43...
[110/11] via 10.1.1.253, 00:05:43...
O IA 10.4.0.0/15 [110/22] via 10.1.1.254, 00:05:43...
[110/22] via 10.1.1.253, 00:05:43...
SW1#
終了行:
[[CISCO入門]]
#setlinebreak(on)
バージョン: &Version; &br;
オンラインユーザー数: &online;
閲覧数表示 本日/トータル: &counter(today); / &counter(to...
最終更新:&lastmod();&br;
*OSPFルータの種類 [#v5d2122a]
,内部ルータ,全てのIFが同じエリアに所属している
,バックボーンルータ,1つ以上のIFがバックボーンエリア(Area0)に所属している
,ABR(Area Border Router),エリア境界ルータ、複数のエリアを相互に接...
,ASBR(Autonomous System Boundary Router),自律システム境界ルータ...
※内部ルータかつバックボーンルータや、バックボーンルータかつABR/ASBRは当然...
*LSAタイプ [#u2b7c27e]
LSAにはいくつかのタイプが存在する
,LSAタイプ,名前,確認コマンド,概要
,タイプ1,ルータLSA,sh ip ospf database router,直接接続している...
,タイプ2,ネットワークLSA,sh ip ospf database network,マルチアクセスNW上...
,タイプ3,ネットワーク集約LAS,sh ip ospf database summary,他のエリア...
,タイプ4,ASBR集約LSA,sh ip ospf database asbr-summary,ASBR...
,タイプ5,AS外部LSA,sh ip ospf database external,非OSPF NWへ...
,タイプ7,NSSA外部LSA,sh ip ospf database nssa-external,非OS...
-タイプ1(ルータLSA)
全OSPFルータが生成
自身が接続しているリンク情報を通知
接続しているリンク情報を含む
エリア内だけにフラッディング
エリア内ルート『0』のコード
-タイプ2(ネットワークLSA)
DRが生成
マルチエリアアクセスネットワークの情報を通知
DRのIPアドレス、サブネットマスク、接続しているルータのリストを含む
エリア内だけにフラッディング
-タイプ3(ネットワーク集約LSA)
ABRが生成
エリア間のルート情報を通知
所属するエリア内のネットワークアドレス、サブネットマスク、メトリックを含む
AS全体にフラッディング
エリア間ルート『O IA』
-タイプ4(ASBR集約LSA)
ABRが生成
ASBRに関する情報を通知
ASBRのルータID、メトリックを含む
AS全体にフラッディング
-タイプ5(AS外部LSA)
ASBRが生成
非OSPFネットワークのルート情報を通知
ネットワークアドレス、サブネットマスク、メトリック、転送アドレスを含む
AS全体にフラッディング
OSPF外部ルート『OE1』又は『OE2』のコード
※E1:OSPFドメイン内コストが外部コストに加算される。内部のコストを加算...
※E2:OSPFドメイン内コストが外部コストに加算されない(Def)内部のコスト...
-タイプ7(NSSA外部LSA)
NSSAのASBRが生成
非OSPFネットワークのルート情報を通知
ネットワークアドレス、サブネットマスク、メトリック、転送アドレスを含む
NSSAエリア内だけにフラッディング(ABRでタイプ5に変換し、AS全体にフラッテ...
OSPF外部ルート『NE1』又は『NE2』のコード
*RIPと混ぜてみた [#c92af329]
AREA1 │AREA0 │AREA2 ...
│ │ ...
┏━━━┓FE0 ┏━┷━┓FE1 ┏━┷━┓ │ ...
┃ ┣━━┫ R1 ┣━━┫ ┃ │ ...
┏━━━┓ ┃ID:150┃ ┗━━━┛ ┃ID:140┃FE0 ┏━┷━┓FE1 ...
┃ PC ┣━┫ ┃ ID:250 ┃ ┣━━┫ R3 ...
┗━━━┛ ┃ ┃ ID:200 ┃ ┃ ┗━┯━┛ ...
┃L3SW-1┃FE0 ┏━━━┓FE1 ┃L3SW-2┃ ID:100│ ...
10.10.10.0/24 ┃ ┣━━┫ R2 ┣━━┫ ┃ │ ...
VLAN10 ┗━━━┛ ┗━┯━┛ ┗━┯━┛ │ ...
10.1.1.0/24 │10.2.2.0/24 │10.3.3....
VLAN100 │ VLAN200 │ VLAN3...
PC:10.10.10.10 R1 FE0/0:10.1.1.254/24 ...
L3SW1 VLAN10:10.10.10.254 R1 FE0/1:10.2.2.253/24 ...
L3SW1 VLAN100:10.1.1.1 R2 FE0/0:10.1.1.253/24 ...
L3SW2 VLAN200:10.2.2.1/24 R2 FE0/1:10.2.2.254/24 ...
L3SW2 VLAN300:10.3.3.254/24
**R1設定例 [#h0197c23]
R1#show running-config
!
version 12.4
!
hostname R1
!
enable secret 5 $1$xXgJ$Wmvi1LlOnaxNSsQLiYbjV0
!
ip cef
!
no ip domain lookup
!
interface FastEthernet0/0
ip address 10.1.1.254 255.255.255.0
ip ospf 100 area 1
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 10.2.2.253 255.255.255.0
ip ospf 100 area 0
duplex auto
speed auto
!
router ospf 100
router-id 1.1.1.250
log-adjacency-changes
auto-cost reference-bandwidth 1000
network 10.1.1.0 0.0.0.255 area 1
network 10.2.2.0 0.0.0.255 area 0
!
line con 0
password cisco
logging synchronous
login
line aux 0
line vty 0 4
password cisco
logging synchronous
login
!
!
end
R1#
**R3設定例 [#oec87c36]
R3#show running-config
!
version 12.4
!
hostname R3
!
ip cef
!
no ip domain lookup
!
interface FastEthernet0/0
ip address 10.3.3.1 255.255.255.0
ip ospf priority 0
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 10.4.4.254 255.255.255.0
duplex auto
speed auto
!
router ospf 100
router-id 1.1.1.100
log-adjacency-changes
auto-cost reference-bandwidth 1000
redistribute rip subnets
passive-interface FastEthernet0/1
network 10.3.3.0 0.0.0.255 area 2
!
router rip
version 2
redistribute ospf 100 metric 5
passive-interface FastEthernet0/0
network 10.0.0.0
no auto-summary
!
ip forward-protocol nd
!
line con 0
password cisco
logging synchronous
login
line aux 0
line vty 0 4
password cisco
logging synchronous
login
!
!
end
R3#
**show 出力させてみた [#lcbca77b]
R1#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile...
D - EIGRP, EX - EIGRP external, O - OSPF, IA -...
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA...
E1 - OSPF external type 1, E2 - OSPF external ...
i - IS-IS, su - IS-IS summary, L1 - IS-IS leve...
ia - IS-IS inter area, * - candidate default, ...
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
10.0.0.0/24 is subnetted, 6 subnets
O E2 10.20.20.0 [110/20] via 10.2.2.1, 01:02:11, F...
O 10.10.10.0 [110/11] via 10.1.1.1, 01:18:24, F...
O E2 10.4.4.0 [110/20] via 10.2.2.1, 01:02:11, Fas...
O IA 10.3.3.0 [110/11] via 10.2.2.1, 01:13:30, Fas...
C 10.2.2.0 is directly connected, FastEthernet0/1
C 10.1.1.0 is directly connected, FastEthernet0/0
R1#
R1#show ip ospf neighbor
Neighbor ID Pri State Dead Time Add...
1.1.1.140 1 FULL/DROTHER 00:00:33 10....
1.1.1.200 1 FULL/BDR 00:00:38 10....
1.1.1.150 1 FULL/DROTHER 00:00:31 10....
1.1.1.200 1 FULL/BDR 00:00:32 10....
R1#
-show ip ospf database
R3#show ip ospf database ←LSDBの要約情報を表示
OSPF Router with ID (1.1.1.100) (Process ...
Router Link States (Area 2) ←LSAタイプ1...
Link ID ADV Router Age Seq# ...
1.1.1.100 1.1.1.100 543 0x8000000...
1.1.1.140 1.1.1.140 388 0x8000000...
Net Link States (Area 2) ←LSAタイプ2...
Link ID ADV Router Age Seq# ...
10.3.3.254 1.1.1.140 388 0x8000000...
Summary Net Link States (Area 2)←LSAタ...
Link ID ADV Router Age Seq# ...
10.1.1.0 1.1.1.140 1153 0x8000000...
10.2.2.0 1.1.1.140 1153 0x8000000...
10.10.10.0 1.1.1.140 1153 0x8000000...
Type-5 AS External Link States←LSAタイプ5
Link ID ADV Router Age Seq# ...
10.4.4.0 1.1.1.100 543 0x8000000...
10.20.20.0 1.1.1.100 545 0x8000000...
R3#
-show ip ospf database router
R3#show ip ospf database router ←LSAタイプ1の詳細情...
OSPF Router with ID (1.1.1.100) (Process ...
Router Link States (Area 2) ←LSAタイプ1...
LS age: 751
Options: (No TOS-capability, DC)
LS Type: Router Links
Link State ID: 1.1.1.100 ←LSAを生成したル...
Advertising Router: 1.1.1.100 ←LSAを生成したル...
LS Seq Number: 80000003 ←LSAのシーケンス番号
Checksum: 0x45F1
Length: 36
AS Boundary Router
Number of Links: 1 ←リンク数
Link connected to: a Transit Network ←リンク...
(Link ID) Designated Router address: 10.3.3.254 ...
(Link Data) Router Interface address: 10.3.3.1 ...
Number of TOS metrics: 0
TOS 0 Metrics: 10
Routing Bit Set on this LSA
LS age: 596
Options: (No TOS-capability, DC)
LS Type: Router Links
Link State ID: 1.1.1.140 ←LSAを生成したル...
Advertising Router: 1.1.1.140
LS Seq Number: 80000008
Checksum: 0xF6F6
Length: 36
Area Border Router ←自身がABRであることを示してい...
Number of Links: 1 ←リンク数
Link connected to: a Transit Network
(Link ID) Designated Router address: 10.3.3.254
(Link Data) Router Interface address: 10.3.3.254
Number of TOS metrics: 0
TOS 0 Metrics: 1
R3#
,リンクタイプ1,ポイントツーポイント,一対一
,リンクタイプ2,トランジットネットワーク,複数のOSPFルータと接続しているNW
,リンクタイプ3,スタブネットワーク,他にOSPFルータが存在しないNWを指す
,リンクタイプ4,仮想リンク(バーチャルリンク),
-show ip ospf database network
R3#show ip ospf database network
OSPF Router with ID (1.1.1.100) (Process ...
Net Link States (Area 2) ←LSAタイプ2(...
Routing Bit Set on this LSA
LS age: 1260
Options: (No TOS-capability, DC)
LS Type: Network Links
Link State ID: 10.3.3.254 (address of Designated Ro...
Advertising Router: 1.1.1.140 ...
LS Seq Number: 80000002
Checksum: 0xB3EF
Length: 32
Network Mask: /24 ...
Attached Router: 1.1.1.140 ...
Attached Router: 1.1.1.100 ...
R3#
*仮想リンクを張ってみる [#y0e6f2fe]
AREA0につながっていないAREA3(R4)はルート交換が出来ないので
L3やR1-2はR4の情報を持たないし、R4はR3より左の情報を持た...
AREA1 │AREA0 │AREA2 ...
│ │ ...
┏━━━┓FE0 ┏━┷━┓FE1 ┏━┷━┓ │ ...
┃ ┣━━┫ R1 ┣━━┫ ┃ │ ...
┏━━━┓ ┃ID:150┃ ┗━━━┛ ┃ID:140┃FE0 ┏━┷━┓FE1 ...
┃ PC ┣━┫ ┃ ID:250 ┃ ┣━━┫ R3 ...
┗━━━┛ ┃ ┃ ID:200 ┃ ┃ ┗━┯━┛ ...
┃L3SW-1┃FE0 ┏━━━┓FE1 ┃L3SW-2┃ ID:100│ ...
10.10.10.0/24 ┃ ┣━━┫ R2 ┣━━┫ ┃ │ ...
VLAN10 ┗━━━┛ ┗━┯━┛ ┗━┯━┛ │ ...
10.1.1.0/24 │10.2.2.0/24 │10.3.3....
VLAN100 │ VLAN200 │ VLAN3...
PC:10.10.10.10 R1 FE0/0:10.1.1.254/24 ...
L3SW1 VLAN10:10.10.10.254 R1 FE0/1:10.2.2.253/24 ...
L3SW1 VLAN100:10.1.1.1 R2 FE0/0:10.1.1.253/24 ...
L3SW2 VLAN200:10.2.2.1/24 R2 FE0/1:10.2.2.254/24 ...
L3SW2 VLAN300:10.3.3.254/24
-AREA0の入り口OSPFルータ(L3SW-2)とAREA3の入り口OSPFルータ(R3)の...
-L3SW2のConfig抜粋 (virtual-linkは対向のルータIDを記載)
!
router ospf 100
router-id 1.1.1.140
log-adjacency-changes
auto-cost reference-bandwidth 1000
area 2 virtual-link 1.1.1.100
network 10.2.2.0 0.0.0.255 area 0
network 10.3.3.0 0.0.0.255 area 2
!
-R3のConfig抜粋 (virtual-linkは対向のルータIDを記載)
!
router ospf 100
router-id 1.1.1.100
log-adjacency-changes
auto-cost reference-bandwidth 1000
area 2 virtual-link 1.1.1.140
network 10.3.3.0 0.0.0.255 area 2
network 10.4.4.0 0.0.0.255 area 3
!
-R4でO IAとして学習している
R4#show ip route
Gateway of last resort is not set
10.0.0.0/24 is subnetted, 6 subnets
C 10.20.20.0 is directly connected, Ethernet0
O IA 10.10.10.0 [110/32] via 10.4.4.254, 00:15:00,...
C 10.4.4.0 is directly connected, FastEthernet0
O IA 10.3.3.0 [110/20] via 10.4.4.254, 00:15:53, F...
O IA 10.2.2.0 [110/21] via 10.4.4.254, 00:15:00, F...
O IA 10.1.1.0 [110/31] via 10.4.4.254, 00:15:00, F...
R4#
-SW2でvirtual-linksの状態確認
SW2#show ip ospf virtual-links
Virtual Link OSPF_VL1 to router 1.1.1.100 is up ...
Run as demand circuit
DoNotAge LSA allowed.
Transit area 2, via interface Vlan300, Cost of usin...
Transmit Delay is 1 sec, State POINT_TO_POINT, ...
Timer intervals configured, Hello 10, Dead 40, Wait...
Hello due in 00:00:08
Adjacency State FULL (Hello suppressed) ...
Index 3/4, retransmission queue length 0, number ...
First 0x0(0)/0x0(0) Next 0x0(0)/0x0(0)
Last retransmission scan length is 0, maximum is 0
Last retransmission scan time is 0 msec, maximum ...
SW2#
-R3で状態の確認
R3#show ip ospf
Routing Process "ospf 100" with ID 1.1.1.100
~省略~
Number of areas in this router is 3. 3 normal 0 stub...
Number of areas transit capable is 1 ...
External flood list length 0
Area BACKBONE(0) ...
Number of interfaces in this area is 1
~省略~
Area 2
Number of interfaces in this area is 1
This area has transit capability: Virtual Lin...
~省略~
Area 3
Number of interfaces in this area is 1
~省略~
R3#
*OSPFの集約をしてみる [#e276d331]
AREA1 │AREA0 │AREA2 ...
│ │ ...
┏━━━┓FE0 ┏━┷━┓FE1 ┏━┷━┓ ID:100 ...
┃ ┣━━┫ R1 ┣━━┫ ┃ ...
┏━━━┓ ┃ID:150┃ ┗━━━┛ ┃ID:140┃FE0 ┏━━━┓FE1 ...
┃ PC ┣━┫ ┃ ID:250 ┃ ┣━━┫ R3 ...
┗━━━┛ ┃ ┃ ID:200 ┃ ┃ ┗━━━┛ ...
┃L3SW-1┃FE0 ┏━━━┓FE1 ┃L3SW-2┃ ...
10.10.10.0/24 ┃ ┣━━┫ R2 ┣━━┫ ┃ ...
VLAN10 ┗━━━┛ ┗━┯━┛ ┗━┯━┛ ...
10.1.1.0/24 │10.2.2.0/24 │10.3.3....
VLAN100 │ VLAN200 │ VLAN3...
PC:10.10.10.10 R1 FE0/0:10.1.1.254/24 ...
L3SW1 VLAN10:10.10.10.254 R1 FE0/1:10.2.2.253/24 ...
L3SW1 VLAN100:10.1.1.1 R2 FE0/0:10.1.1.253/24 ...
L3SW2 VLAN200:10.2.2.1/24 R2 FE0/1:10.2.2.254/24 ...
L3SW2 VLAN300:10.3.3.254/24
-SW2でAREA2のR3,4のアドレス(10.4.4.0/24と10.5.5.0/24)を無理...
!
router ospf 100
router-id 1.1.1.140
log-adjacency-changes
auto-cost reference-bandwidth 1000
area 2 range 10.4.0.0 255.254.0.0
network 10.2.2.0 0.0.0.255 area 0
network 10.3.3.0 0.0.0.255 area 2
!
-SW2を見るとNull0が作成されている
SW2#show ip route
~省略~
10.0.0.0/8 is variably subnetted, 7 subnets, 2 m...
O IA 10.10.10.0/24 [110/12] via 10.2.2.254, 00:00:...
[110/12] via 10.2.2.253, 00:00:...
O 10.5.5.0/24 [110/111] via 10.3.3.1, 00:05:47,...
O 10.4.4.0/24 [110/11] via 10.3.3.1, 00:05:47, ...
C 10.3.3.0/24 is directly connected, Vlan300
C 10.2.2.0/24 is directly connected, Vlan200
O IA 10.1.1.0/24 [110/11] via 10.2.2.254, 00:00:24...
[110/11] via 10.2.2.253, 00:00:24...
O 10.4.0.0/15 is a summary, 00:05:47, Null0
SW2#
-showコマンドでSW1で見ても集約されている
SW1#show ip route ospf
10.0.0.0/8 is variably subnetted, 5 subnets, 2 m...
O IA 10.3.3.0/24 [110/12] via 10.1.1.254, 00:05:43...
[110/12] via 10.1.1.253, 00:05:43...
O IA 10.2.2.0/24 [110/11] via 10.1.1.254, 00:05:43...
[110/11] via 10.1.1.253, 00:05:43...
O IA 10.4.0.0/15 [110/22] via 10.1.1.254, 00:05:43...
[110/22] via 10.1.1.253, 00:05:43...
SW1#
ページ名: