OSPF:LSA Type-5 转发地址探究实验

1.何时产生

1.1实验拓扑

1.2实验需求

1)按拓扑完成基本配置

2R2R3间运行OSPFR2上写一条静态路由,ip route 10.10.10.0 255.255.255.0,并重分发进OPSF进程

3)指定其下一跳为31.31.12.100,观察AS External LSA中的Forwarding Address

4)将R2所连31.31.12.0网段宣告进OSPF进程,观察实验现象

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

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

7R2上创建loopback 0 2.2.2.2/24,并且在OSPF进程中重分发直连,观察实验现象

1.3实验步骤

1静态路由

R2(config)#ip route 10.10.10.0 255.255.255.0 31.31.12.100

 

R2(config-router)#redistribute static subnets

 

R2#show ip ospf database external | in Forward  

        Forward Address: 0.0.0.0

此时,值被置为0.0.0.0

 

2接口参与OSPF

R2(config-router)#network 31.31.12.2 0.0.0.0 a 0

 

R2#show ip ospf database external | include Forward

        Forward Address: 31.31.12.100

此时,LSA Type 5中的Forward Address继承了静态路由中该网络的下一跳,即便实际中该下一跳不存在

 

3静态路由只指定出口

R2(config)#no ip route 10.10.10.0 255.255.255.0

R2(config)#ip route 10.10.10.0 255.255.255.0 fa0/0

 

R2#show ip ospf database external | include Forward

        Forward Address: 0.0.0.0

此时,转发地址在此被置为0.0.0.0

 

4出口加上下一跳

R2(config)#no ip route 10.10.10.0 255.255.255.0

R2(config)#ip route 10.10.10.0 255.255.255.0 fa0/0 31.31.12.100

 

R2#show ip ospf database external | include Forward

        Forward Address: 31.31.12.100

再次继承

 

5创建环回口网络,重分发直连

R2(config)#inter lo 0

R2(config-if)#ip add 2.2.2.2 255.255.255.0

R2(config)#router ospf 1

R2(config-router)#redistribute connected subnets

 

R2#show ip ospf database external

 

            OSPF Router with ID (2.2.2.2) (Process ID 1)

 

                Type-5 AS External Link States

 

  LS age: 9

  Options: (No TOS-capability, DC)

  LS Type: AS External Link

  Link State ID: 2.2.2.0 (External Network Number )

  Advertising Router: 2.2.2.2

  LS Seq Number: 80000001

  Checksum: 0x632F

  Length: 36

  Network Mask: /24

        Metric Type: 2 (Larger than any link state path)

        TOS: 0

        Metric: 20

        Forward Address: 0.0.0.0

        External Route Tag: 0

 

  LS age: 129

  Options: (No TOS-capability, DC)

  LS Type: AS External Link

  Link State ID: 10.10.10.0 (External Network Number )

  Advertising Router: 2.2.2.2

  LS Seq Number: 80000001

  Checksum: 0x28A3

  Length: 36

  Network Mask: /24

        Metric Type: 2 (Larger than any link state path)

        TOS: 0

        Metric: 20

        Forward Address: 31.31.12.100

        External Route Tag: 0

1.4实验结论

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

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

②如果存在下一跳:

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

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

 

 

2.原路由负载均衡

2.1实验拓扑

2.2实验需求

1)按拓扑完成基本配置

2R1上将EIGRP网络重分发进OSPF进程,观察LSA Type 5中的Forward Address

3R1上将连接EIGRP域的接口加入到OSPF进程中,观察实验现象

2.3实验步骤

1重分发EIGRP

R1#show ip route eigrp

     10.0.0.0/24 is subnetted, 1 subnets

D       10.10.10.0 [90/156160] via 31.31.123.3, 00:00:49, FastEthernet0/0

                             [90/156160] via 31.31.123.2, 00:00:49, FastEthernet0/0

R1去往10.10.10.0网络负载均衡

 

R1(config)#router ospf 1

R1(config-router)#redistribute eigrp 1 subnets

 

R1#show ip ospf database external            

 

            OSPF Router with ID (1.1.1.1) (Process ID 1)

 

                Type-5 AS External Link States

 

  LS age: 76

  Options: (No TOS-capability, DC)

  LS Type: AS External Link

  Link State ID: 10.10.10.0 (External Network Number )

  Advertising Router: 1.1.1.1

  LS Seq Number: 80000001

  Checksum: 0x601E

  Length: 36

  Network Mask: /24

        Metric Type: 2 (Larger than any link state path)

        TOS: 0

        Metric: 20

        Forward Address: 0.0.0.0

        External Route Tag: 0

 

  LS age: 76

  Options: (No TOS-capability, DC)

  LS Type: AS External Link

  Link State ID: 31.31.123.0 (External Network Number )

  Advertising Router: 1.1.1.1

  LS Seq Number: 80000001

  Checksum: 0x7171

  Length: 36

  Network Mask: /24

        Metric Type: 2 (Larger than any link state path)

        TOS: 0

        Metric: 20

        Forward Address: 0.0.0.0

        External Route Tag: 0

此时的Forward Address值为0.0.0.0

 

2接口参与OSPF

R1(config)#router ospf 1

R1(config-router)#network 31.31.123.1 0.0.0.0 a 0

 

R1#sho ip rou ei

     10.0.0.0/24 is subnetted, 1 subnets

D       10.10.10.0 [90/156160] via 31.31.123.3, 00:00:01, FastEthernet0/0

                             [90/156160] via 31.31.123.2, 00:00:01, FastEthernet0/0

 

R1#show ip ospf database external

 

            OSPF Router with ID (1.1.1.1) (Process ID 1)

 

                Type-5 AS External Link States

 

  LS age: 25

  Options: (No TOS-capability, DC)

  LS Type: AS External Link

  Link State ID: 10.10.10.0 (External Network Number )

  Advertising Router: 1.1.1.1

  LS Seq Number: 80000002

  Checksum: 0x9927

  Length: 36

  Network Mask: /24

        Metric Type: 2 (Larger than any link state path)

        TOS: 0

        Metric: 20

        Forward Address: 31.31.123.3

        External Route Tag: 0

此时只带有一个转发地址

2.4实验结论

当原路由有多个下一跳时,选择IP地址最大的作为转发地址

 

 

3.转发地址与接口网络类型

3.1实验拓扑

3.2实验需求

1)按拓扑完成基本配置

2R1开启OSPF进程,宣告直连网络进入OSPF,重分发RIP进入OSPF,观察LSDB

3)修改接口网络类型为Non-Broadcast,观察LSDB

4)修改接口网络类型为Point-to-Point,观察LSDB

5)修改接口网络类型为Point-to-Multipoint,观察LSDB

3.3实验步骤

1完成需求(2

R1#show ip ospf interface f0/0 | include Network

  Process ID 1, Router ID 1.1.1.1, Network Type BROADCAST, Cost: 1

 

R1#show ip ospf database external | in Forward

        Forward Address: 31.31.12.2

当接口网络类型为广播时,外部路由会带上转发地址

 

2完成需求(3

R1(config-if)#ip ospf network non-broadcast

 

R1#show ip ospf interface f0/0 | include Network

  Process ID 1, Router ID 1.1.1.1, Network Type NON_BROADCAST, Cost: 1

 

R1#show ip ospf database external | in Forward

        Forward Address: 31.31.12.2

当接口网络类型为非广播时,外部路由会带上转发地址

 

3完成需求(4

R1(config-if)#ip ospf network point-to-point

 

R1#show ip ospf interface f0/0 | include Network

  Process ID 1, Router ID 1.1.1.1, Network Type POINT_TO_POINT, Cost: 1

 

R1#show ip ospf database external | in Forward

        Forward Address: 0.0.0.0

当接口网络类型为点到点时,外部路由转发地址为0.0.0.0

 

4完成需求(5

R1(config-if)#ip ospf network point-to-multipoint

 

R1#show ip ospf interface f0/0 | include Network

  Process ID 1, Router ID 1.1.1.1, Network Type POINT_TO_MULTIPOINT, Cost: 1

 

R1#show ip ospf database external | in Forward

        Forward Address: 0.0.0.0

当接口网络类型为点到多点时,外部路由转发地址为0.0.0.0

 

注意:

当修改为点到多点非广播类型时,现象与点到多点相同

3.4实验结论

当接口网络类型为点到多点以及点到点时,不会携带非0转发地址

你可能感兴趣的:(AS,Address,external,5,ospf,forwarding,转发地址,LSA,LSA)