今回はOSPFのMTU Ignoreと呼ばれる機能について解説します。
座学
MTUの不一致
OSPFネイバー確立する際、ルータ間でLSDBが同期されます。この際、ルータ間ではDBD(DataBase Discription)パケットを交換し、お互いのLSDBに存在しているLSAのヘッダ情報をやり取りします。このDBDパケットには、DBDパケットの送信元インタフェースのMTUが格納されています。
もし、ネイバーの確立を試みているルータ間でインタフェースのMTUが異なる場合、ネイバーの状態がExStartやExChangeで止まってしまいます。
何かしらの事情で、ルータ間のインタフェースのMTUが異なり、かつ、MTUが変更できない状況でも、OSPFネイバーを確立し、LSDBを同期させたい場合は、このMTUの確認を無視させることが可能で、この機能のことをMTU Ignoreと呼びます。
実機での動作確認
検証内容
R1のg2、R2のg2でOSPF Area 0を有効にします。
Network TypeにはPoint-to-Pointを使用します。
R1のg2のMTUを1100 Byte、R2のg2のMTUを1200 Byteに設定します。
R1でMTU Ignoreを有効にした場合の動作を確認します。
初期設定
interface GigabitEthernet2
ip address 10.1.1.1 255.255.255.0
mtu 1100
ip ospf network point-to-point
!
router ospf 1
router-id 1.1.1.1
network 10.1.1.0 0.0.0.255 area 0
interface GigabitEthernet2
ip address 10.1.1.2 255.255.255.0
mtu 1200
ip ospf network point-to-point
!
router ospf 1
router-id 2.2.2.2
network 10.1.1.0 0.0.0.255 area 0
インタフェースのMTUの確認
R1のg2でMTUが1100 Byteであることが確認できます。
R1#show ip interface GigabitEthernet2
GigabitEthernet2 is up, line protocol is up
Internet address is 10.1.1.1/24
Broadcast address is 255.255.255.255
Address determined by setup command
MTU is 1100 bytes
.
<一部省略>
R2のg2でMTUが1200 Byteであることが確認できます。
R2#show ip interface GigabitEthernet2
GigabitEthernet2 is up, line protocol is up
Internet address is 10.1.1.2/24
Broadcast address is 255.255.255.255
Address determined by setup command
MTU is 1200 bytes
.
<一部省略>
DBDパケットの確認
R1が送信したDBDパケットのInterface MTUフィールドに1100が格納されていることが確認できます。
R2が送信したDBDパケットのInterface MTUフィールドに1200が格納されていることが確認できます。
MTU Ignore設定前
OSPFネイバーの状態
R1において、R2の状態がExStartで止まっていることが確認できます。
R1#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
2.2.2.2 0 EXSTART/ - 00:00:38 10.1.1.2 GigabitEthernet2
R2において、R1の状態がExStartで止まっていることが確認できます。
R1#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
1.1.1.1 0 EXSTART/ - 00:00:35 10.1.1.1 GigabitEthernet2
OSPFのデバックの確認
R1において、R2の状態がExStartで止まっていることが確認できます。
R1#debug ip ospf hello
R1#debug ip ospf adj
*May 29 14:00:08.984: OSPF-1 ADJ Gi2: Interface going Up
*May 29 14:00:08.984: OSPF-1 HELLO Gi2: Send hello to 224.0.0.5 area 0 from 10.1.1.1
*May 29 14:00:08.985: OSPF-1 HELLO Gi2: Rcv hello from 2.2.2.2 area 0 10.1.1.2
*May 29 14:00:08.985: OSPF-1 ADJ Gi2: 2 Way Communication to 2.2.2.2, state 2WAY
*May 29 14:00:08.985: OSPF-1 ADJ Gi2: Nbr 2.2.2.2: Prepare dbase exchange
*May 29 14:00:08.985: OSPF-1 ADJ Gi2: Send DBD to 2.2.2.2 seq 0x1E58 opt 0x52 flag 0x7 len 32
*May 29 14:00:08.985: OSPF-1 HELLO Gi2: Send immediate hello to nbr 2.2.2.2, src address 10.1.1.2
*May 29 14:00:08.985: OSPF-1 HELLO Gi2: Send hello to 10.1.1.2 area 0 from 10.1.1.1
*May 29 14:00:08.986: OSPF-1 ADJ Gi2: Rcv DBD from 2.2.2.2 seq 0x1A32 opt 0x52 flag 0x7 len 32 mtu 1200 state EXSTART
*May 29 14:00:08.986: OSPF-1 ADJ Gi2: Nbr 2.2.2.2 has larger interface MTU
*May 29 14:00:13.768: OSPF-1 ADJ Gi2: Send DBD to 2.2.2.2 seq 0x1E58 opt 0x52 flag 0x7 len 32
*May 29 14:00:13.768: OSPF-1 ADJ Gi2: Retransmitting DBD to 2.2.2.2 [1]
*May 29 14:00:13.898: OSPF-1 ADJ Gi2: Rcv DBD from 2.2.2.2 seq 0x1A32 opt 0x52 flag 0x7 len 32 mtu 1200 state EXSTART
*May 29 14:00:13.898: OSPF-1 ADJ Gi2: Nbr 2.2.2.2 has larger interface MTU
*May 29 14:00:17.577: OSPF-1 HELLO Gi2: Rcv hello from 2.2.2.2 area 0 10.1.1.2
*May 29 14:00:18.400: OSPF-1 HELLO Gi2: Send hello to 224.0.0.5 area 0 from 10.1.1.1
*May 29 14:00:18.664: OSPF-1 ADJ Gi2: Send DBD to 2.2.2.2 seq 0x1E58 opt 0x52 flag 0x7 len 32
*May 29 14:00:18.664: OSPF-1 ADJ Gi2: Retransmitting DBD to 2.2.2.2 [2]
*May 29 14:00:18.682: OSPF-1 ADJ Gi2: Rcv DBD from 2.2.2.2 seq 0x1A32 opt 0x52 flag 0x7 len 32 mtu 1200 state EXSTART
*May 29 14:00:18.682: OSPF-1 ADJ Gi2: Nbr 2.2.2.2 has larger interface MTU
*May 29 14:00:23.296: OSPF-1 ADJ Gi2: Send DBD to 2.2.2.2 seq 0x1E58 opt 0x52 flag 0x7 len 32
*May 29 14:00:23.296: OSPF-1 ADJ Gi2: Retransmitting DBD to 2.2.2.2 [3]
*May 29 14:00:23.325: OSPF-1 ADJ Gi2: Rcv DBD from 2.2.2.2 seq 0x1A32 opt 0x52 flag 0x7 len 32 mtu 1200 state EXSTART
*May 29 14:00:23.325: OSPF-1 ADJ Gi2: Nbr 2.2.2.2 has larger interface MTU
*May 29 14:00:26.597: OSPF-1 HELLO Gi2: Rcv hello from 2.2.2.2 area 0 10.1.1.2
R2において、R1の状態がExStartで止まっていることが確認できます。
R2#debug ip ospf hello
R2#debug ip ospf adj
*May 29 14:00:09.179: OSPF-1 ADJ Gi2: Interface going Up
*May 29 14:00:09.179: OSPF-1 HELLO Gi2: Send hello to 224.0.0.5 area 0 from 10.1.1.2
*May 29 14:00:09.944: OSPF-1 HELLO Gi2: Rcv hello from 1.1.1.1 area 0 10.1.1.1
*May 29 14:00:09.944: OSPF-1 HELLO Gi2: Send immediate hello to nbr 1.1.1.1, src address 10.1.1.1
*May 29 14:00:09.944: OSPF-1 HELLO Gi2: Send hello to 10.1.1.1 area 0 from 10.1.1.2
*May 29 14:00:09.946: OSPF-1 HELLO Gi2: Rcv hello from 1.1.1.1 area 0 10.1.1.1
*May 29 14:00:09.946: OSPF-1 ADJ Gi2: 2 Way Communication to 1.1.1.1, state 2WAY
*May 29 14:00:09.946: OSPF-1 ADJ Gi2: Nbr 1.1.1.1: Prepare dbase exchange
*May 29 14:00:09.946: OSPF-1 ADJ Gi2: Send DBD to 1.1.1.1 seq 0x1A32 opt 0x52 flag 0x7 len 32
*May 29 14:00:09.946: OSPF-1 ADJ Gi2: Rcv DBD from 1.1.1.1 seq 0x1E58 opt 0x52 flag 0x7 len 32 mtu 1100 state EXSTART
*May 29 14:00:09.946: OSPF-1 ADJ Gi2: Nbr 1.1.1.1 has smaller interface MTU
*May 29 14:00:09.946: OSPF-1 ADJ Gi2: First DBD and we are not SLAVE
*May 29 14:00:14.729: OSPF-1 ADJ Gi2: Rcv DBD from 1.1.1.1 seq 0x1E58 opt 0x52 flag 0x7 len 32 mtu 1100 state EXSTART
*May 29 14:00:14.729: OSPF-1 ADJ Gi2: Nbr 1.1.1.1 has smaller interface MTU
*May 29 14:00:14.729: OSPF-1 ADJ Gi2: First DBD and we are not SLAVE
*May 29 14:00:14.858: OSPF-1 ADJ Gi2: Send DBD to 1.1.1.1 seq 0x1A32 opt 0x52 flag 0x7 len 32
*May 29 14:00:14.858: OSPF-1 ADJ Gi2: Retransmitting DBD to 1.1.1.1 [1]
*May 29 14:00:18.536: OSPF-1 HELLO Gi2: Send hello to 224.0.0.5 area 0 from 10.1.1.2
*May 29 14:00:19.361: OSPF-1 HELLO Gi2: Rcv hello from 1.1.1.1 area 0 10.1.1.1
*May 29 14:00:19.625: OSPF-1 ADJ Gi2: Rcv DBD from 1.1.1.1 seq 0x1E58 opt 0x52 flag 0x7 len 32 mtu 1100 state EXSTART
*May 29 14:00:19.625: OSPF-1 ADJ Gi2: Nbr 1.1.1.1 has smaller interface MTU
*May 29 14:00:19.625: OSPF-1 ADJ Gi2: First DBD and we are not SLAVE
*May 29 14:00:19.642: OSPF-1 ADJ Gi2: Send DBD to 1.1.1.1 seq 0x1A32 opt 0x52 flag 0x7 len 32
*May 29 14:00:19.642: OSPF-1 ADJ Gi2: Retransmitting DBD to 1.1.1.1 [2]
*May 29 14:00:24.257: OSPF-1 ADJ Gi2: Rcv DBD from 1.1.1.1 seq 0x1E58 opt 0x52 flag 0x7 len 32 mtu 1100 state EXSTART
*May 29 14:00:24.257: OSPF-1 ADJ Gi2: Nbr 1.1.1.1 has smaller interface MTU
MTU Ignore設定後
R1のg2でMTU Ignoreを有効にします。
追加した設定
MTU Ignoreはip ospf mtu-ignoreコマンドで有効化可能で、MTUが小さいルータに対してのみ設定すれば、ルータ間でOSPFネイバーが確立可能です。また、インタフェースにMTU Ignoreが設定されているかは、show ip ospf interfaceコマンドでは確認できません。
interface GigabitEthernet2
ip ospf mtu-ignore
OSPFネイバーの状態
R1において、R2の状態がFullまで進んでことが確認できます。
R1#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
2.2.2.2 0 FULL/ - 00:00:32 10.1.1.2 GigabitEthernet2
R2において、R1の状態がFullまで進んでことが確認できます。
R1#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
1.1.1.1 0 FULL/ - 00:00:39 10.1.1.1 GigabitEthernet2
OSPFのデバックの確認
R1において、R2の状態がFullまで進んでことが確認できます。
R1#debug ip ospf hello
R1#debug ip ospf adj
*May 29 14:11:16.657: OSPF-1 ADJ Gi2: Interface going Up
*May 29 14:11:16.657: OSPF-1 HELLO Gi2: Send hello to 224.0.0.5 area 0 from 10.1.1.1
*May 29 14:11:16.658: OSPF-1 HELLO Gi2: Rcv hello from 2.2.2.2 area 0 10.1.1.2
*May 29 14:11:16.658: OSPF-1 ADJ Gi2: 2 Way Communication to 2.2.2.2, state 2WAY
*May 29 14:11:16.658: OSPF-1 ADJ Gi2: Nbr 2.2.2.2: Prepare dbase exchange
*May 29 14:11:16.658: OSPF-1 ADJ Gi2: Send DBD to 2.2.2.2 seq 0xE88 opt 0x52 flag 0x7 len 32
*May 29 14:11:16.658: OSPF-1 HELLO Gi2: Send immediate hello to nbr 2.2.2.2, src address 10.1.1.2
*May 29 14:11:16.658: OSPF-1 HELLO Gi2: Send hello to 10.1.1.2 area 0 from 10.1.1.1
*May 29 14:11:16.659: OSPF-1 ADJ Gi2: Rcv DBD from 2.2.2.2 seq 0x2267 opt 0x52 flag 0x7 len 32 mtu 1200 state EXSTART
*May 29 14:11:16.659: OSPF-1 ADJ Gi2: NBR Negotiation Done. We are the SLAVE
*May 29 14:11:16.659: OSPF-1 ADJ Gi2: Nbr 2.2.2.2: Summary list built, size 1
*May 29 14:11:16.659: OSPF-1 ADJ Gi2: Send DBD to 2.2.2.2 seq 0x2267 opt 0x52 flag 0x2 len 52
*May 29 14:11:16.660: OSPF-1 ADJ Gi2: Rcv DBD from 2.2.2.2 seq 0x2268 opt 0x52 flag 0x1 len 52 mtu 1200 state EXCHANGE
*May 29 14:11:16.660: OSPF-1 ADJ Gi2: Exchange Done with 2.2.2.2
*May 29 14:11:16.660: OSPF-1 ADJ Gi2: Send LS REQ to 2.2.2.2 length 36
*May 29 14:11:16.660: OSPF-1 ADJ Gi2: Send DBD to 2.2.2.2 seq 0x2268 opt 0x52 flag 0x0 len 32
*May 29 14:11:16.661: OSPF-1 ADJ Gi2: Rcv LS UPD from Nbr ID 2.2.2.2 length 64 LSA count 1
*May 29 14:11:16.661: OSPF-1 ADJ Gi2: Synchronized with 2.2.2.2, state FULL
*May 29 14:11:16.661: %OSPF-5-ADJCHG: Process 1, Nbr 2.2.2.2 on GigabitEthernet2 from LOADING to FULL, Loading Done
*May 29 14:11:16.661: OSPF-1 ADJ Gi2: Rcv LS REQ from 2.2.2.2 length 36 LSA count 1
*May 29 14:11:24.791: OSPF-1 HELLO Gi2: Rcv hello from 2.2.2.2 area 0 10.1.1.2
*May 29 14:11:25.936: OSPF-1 HELLO Gi2: Send hello to 224.0.0.5 area 0 from 10.1.1.1
R2において、R1の状態がFullまで進んでことが確認できます。
R2#debug ip ospf hello
R2#debug ip ospf adj
*May 29 14:11:16.572: OSPF-1 ADJ Gi2: Interface going Up
*May 29 14:11:16.572: OSPF-1 HELLO Gi2: Send hello to 224.0.0.5 area 0 from 10.1.1.2
*May 29 14:11:17.618: OSPF-1 HELLO Gi2: Rcv hello from 1.1.1.1 area 0 10.1.1.1
*May 29 14:11:17.618: OSPF-1 HELLO Gi2: Send immediate hello to nbr 1.1.1.1, src address 10.1.1.1
*May 29 14:11:17.618: OSPF-1 HELLO Gi2: Send hello to 10.1.1.1 area 0 from 10.1.1.2
*May 29 14:11:17.619: OSPF-1 HELLO Gi2: Rcv hello from 1.1.1.1 area 0 10.1.1.1
*May 29 14:11:17.619: OSPF-1 ADJ Gi2: 2 Way Communication to 1.1.1.1, state 2WAY
*May 29 14:11:17.619: OSPF-1 ADJ Gi2: Nbr 1.1.1.1: Prepare dbase exchange
*May 29 14:11:17.619: OSPF-1 ADJ Gi2: Send DBD to 1.1.1.1 seq 0x2267 opt 0x52 flag 0x7 len 32
*May 29 14:11:17.619: OSPF-1 ADJ Gi2: Rcv DBD from 1.1.1.1 seq 0xE88 opt 0x52 flag 0x7 len 32 mtu 1100 state EXSTART
*May 29 14:11:17.619: OSPF-1 ADJ Gi2: Nbr 1.1.1.1 has smaller interface MTU
*May 29 14:11:17.619: OSPF-1 ADJ Gi2: First DBD and we are not SLAVE
*May 29 14:11:17.620: OSPF-1 ADJ Gi2: Rcv DBD from 1.1.1.1 seq 0x2267 opt 0x52 flag 0x2 len 52 mtu 1100 state EXSTART
*May 29 14:11:17.620: OSPF-1 ADJ Gi2: Nbr 1.1.1.1 has smaller interface MTU
*May 29 14:11:17.620: OSPF-1 ADJ Gi2: NBR Negotiation Done. We are the MASTER
*May 29 14:11:17.620: OSPF-1 ADJ Gi2: Nbr 1.1.1.1: Summary list built, size 1
*May 29 14:11:17.620: OSPF-1 ADJ Gi2: Send DBD to 1.1.1.1 seq 0x2268 opt 0x52 flag 0x1 len 52
*May 29 14:11:17.621: OSPF-1 ADJ Gi2: Rcv LS REQ from 1.1.1.1 length 36 LSA count 1
*May 29 14:11:17.621: OSPF-1 ADJ Gi2: Send LS UPD to 10.1.1.1 length 64 LSA count 1
*May 29 14:11:17.621: OSPF-1 ADJ Gi2: Rcv DBD from 1.1.1.1 seq 0x2268 opt 0x52 flag 0x0 len 32 mtu 1100 state EXCHANGE
*May 29 14:11:17.621: OSPF-1 ADJ Gi2: Nbr 1.1.1.1 has smaller interface MTU
*May 29 14:11:17.621: OSPF-1 ADJ Gi2: Exchange Done with 1.1.1.1
*May 29 14:11:17.621: OSPF-1 ADJ Gi2: Send LS REQ to 1.1.1.1 length 36
*May 29 14:11:17.622: OSPF-1 ADJ Gi2: Rcv LS UPD from Nbr ID 1.1.1.1 length 64 LSA count 1
*May 29 14:11:17.622: OSPF-1 ADJ Gi2: Synchronized with 1.1.1.1, state FULL
*May 29 14:11:17.622: %OSPF-5-ADJCHG: Process 1, Nbr 1.1.1.1 on GigabitEthernet2 from LOADING to FULL, Loading Done
*May 29 14:11:25.751: OSPF-1 HELLO Gi2: Send hello to 224.0.0.5 area 0 from 10.1.1.2
*May 29 14:11:26.897: OSPF-1 HELLO Gi2: Rcv hello from 1.1.1.1 area 0 10.1.1.1
*May 29 14:11:35.051: OSPF-1 HELLO Gi2: Send hello to 224.0.0.5 area 0 from 10.1.1.2
*May 29 14:11:36.833: OSPF-1 HELLO Gi2: Rcv hello from 1.1.1.1 area 0 10.1.1.1
コメント