1.OSPF 转发地址 ForwardingAddress初探

1.1实验拓扑

OSPF 转发地址 Forwarding Address初探_lsa



1.2实验需求

(1)按拓扑完成基本配置,AR2、AR3间运行OSPF

AR1

interfaceGigabitEthernet0/0/1

 ip address 10.1.12.1 255.255.255.0

interface LoopBack0

 ip address 1.1.1.1 255.255.255.255

 

AR2

interfaceGigabitEthernet0/0/0

 ip address 10.1.23.2 255.255.255.0

#

interfaceGigabitEthernet0/0/2

 ip address 10.1.12.2 255.255.255.0

#

interface LoopBack0

 ip address 2.2.2.2 255.255.255.255

#

ospf 1

area 0.0.0.0

  network 10.1.23.0 0.0.0.255

#

AR3:

interfaceGigabitEthernet0/0/0

 ip address 10.1.23.3 255.255.255.0

ospf 1

 area 0.0.0.0

  network 10.1.23.0 0.0.0.255

#

 

(2)AR2上写一条静态路由,ip route 1.1.1.1 32 10.1.12.1 ,并重分发进OPSF进程,观察AS External LSA中的Forwarding Address

AR2:

ip route-static1.1.1.1 255.255.255.255 10.1.12.1

#ospf 1

import-route static

OSPF 转发地址 Forwarding Address初探_ospf_02

(3)将R2所连10.1.12.0网段宣告进OSPF进程,观察实验现象

AR2

#ospf 1

Area 0

network 10.1.12.2255.255.255.255

OSPF 转发地址 Forwarding Address初探_ospf_03

 

(4)将静态路由只指定出口,观察实验现象

Undo iproute-static 1.1.1.1 32 10.1.12.1

Ip route-static1.1.1.1 32 g0/0/2

<AR2>dis ospflsdb ase | in Forwarding

 

     OSPFProcess 1 with Router ID 10.1.23.2

         Link State Database

 

  Forwarding Address : 0.0.0.0

 

<AR2>

 

(5)静态路由指定出口加上下一跳,观察实验现象

Undo Iproute-static 1.1.1.1 32 g0/0/2

ip route-static1.1.1.1 255.255.255.255 g0/0/2 10.1.12.1


[AR2]dis ospf lsdbase | in Forwarding

 

     OSPFProcess 1 with Router ID 10.1.23.2

         Link State Database

 

  Forwarding Address : 10.1.12.1

 

[AR2]

(6)AR2上创建loopback 0 2.2.2.2/32,并且在OSPF进程中重分发直连,观察实验现象

Ospf 1

Import direct


[AR2-ospf-1]dis ospf lsdb ase

 

     OSPFProcess 1 with Router ID 10.1.23.2

         Link State Database

 

  Type     : External

  Ls id    : 10.1.23.0

  Adv rtr  : 10.1.23.2 

  Ls age   : 33

  Len      : 36

  Options  :  E 

  seq#     : 80000001

  chksum   : 0x6228

  Net mask : 255.255.255.0

  TOS 0 Metric: 1

  E type   : 2

  Forwarding Address : 0.0.0.0

  Tag      : 1

  Priority : Low

 

  Type     : External

  Ls id    : 2.2.2.2

  Adv rtr  : 10.1.23.2 

  Ls age   : 33

  Len      : 36

  Options  :  E 

  seq#     : 80000001

  chksum   : 0x9212

  Net mask : 255.255.255.255

  TOS 0 Metric: 1

  E type   : 2

  Forwarding Address : 0.0.0.0

  Tag      : 1

  Priority : Low

 

  Type     : External

  Ls id    : 10.1.12.0

  Adv rtr  : 10.1.23.2 

  Ls age   : 34

  Len      : 36

  Options  :  E 

  seq#     : 80000001

  chksum   : 0xdbb9

  Net mask : 255.255.255.0

  TOS 0 Metric: 1

  E type   : 2

  Forwarding Address : 0.0.0.0

  Tag      : 1

  Priority : Low

 

  Type     : External

  Ls id    : 1.1.1.1

  Adv rtr  : 10.1.23.2 

  Ls age   : 166

  Len      : 36

  Options  :  E 

  seq#     : 80000001

  chksum   : 0xe5aa

  Net mask : 255.255.255.255

  TOS 0 Metric: 1

  E type   : 2

  Forwarding Address : 10.1.12.1

  Tag      : 1

  Priority : Low

 

[AR2-ospf-1]

 

 

1.4实验结论

(1)重分发进OSPF进程的外部网络

①如果原本不存在下一跳,则Forward Address为0.0.0.0,表示为通告者ASBR本身

②如果存在下一跳:

a.如果下一跳所在网段参与OSPF进程,则Forward Address将继承该下一跳

b.如果下一跳所在网段未参与OSPF进程,则Forward Address为0.0.0.0