个人理解,时间关系,写的比较乱,还请包涵。
拓扑:
R2为ASBR,在R1上看到R2发过来的LSA5类的FA不为零,为一个单播地址
关键配置:
[R1]dis cur
#
sysname R1
#
router id 91.1.1.1
#
interface GigabitEthernet0/0/0
ip address123.1.1.1 255.255.255.0
#
interface LoopBack0
ip address1.1.1.1 255.255.255.0
#
ospf 10
area 0.0.0.0
network1.1.1.1 0.0.0.0
network123.1.1.1 0.0.0.0
#
ip route-static 0.0.0.0 0.0.0.0GigabitEthernet0/0/0
#
dis cur
#
sysname R2
#
router id 92.2.2.2
#
interface GigabitEthernet0/0/0
ip address 123.1.1.2 255.255.255.0
undo icmp redirect send
#
interface LoopBack0
ip address 2.2.2.2 255.255.255.0
#
ospf 10
import-route static
area 0.0.0.0
network 2.2.2.2 0.0.0.0
network 123.1.1.2 0.0.0.0
#
ip route-static 3.3.3.3255.255.255.255 123.1.1.3
#
[R3]dis cur
#
sysname R3
#
router id 93.3.3.3
#
interface GigabitEthernet0/0/0
ip address 123.1.1.3 255.255.255.0
#
interface LoopBack0
ip address 3.3.3.3 255.255.255.0
#
ip route-static 0.0.0.0 0.0.0.0GigabitEthernet0/0/0
#
主要的配置写在R2上,其中
interface GigabitEthernet0/0/0
ip address 123.1.1.2 255.255.255.0
undo icmp redirect send
关掉ICMP重定向只是说明IP重定向和OSPF的FA之间没有太大联系
其它就是注意一点,FA地址非零条件之一就是要为它产生一个单播地址:
ip route-static 3.3.3.3255.255.255.255 123.1.1.3
这个123.1.1.3就是为FA产生的单播地址,会把它写入LSA5类的FA中,以此指导R1的最优路由
下面是对比R2把123.1.1.3地址写入FA前后:
[R1]dis ospf lsdb ase
OSPF Process 10 with Router ID 91.1.1.1
Link State Database
Type : External
Ls id : 3.3.3.3
Advrtr : 92.2.2.2
Ls age : 86
Len : 36
Options : E
seq# : 80000001
chksum : 0xb57
Netmask : 255.255.255.255
TOS 0 Metric: 1
E type : 2
Forwarding Address : 0.0.0.0
Tag : 1
Priority : Medium
[R1]dis ospf lsdb ase
OSPFProcess 10 with Router ID 91.1.1.1
Link State Database
Type : External
Ls id : 3.3.3.3
Advrtr : 92.2.2.2
Ls age : 11
Len : 36
Options : E
seq# : 80000001
chksum : 0x9c45
Netmask : 255.255.255.255
TOS 0 Metric: 1
E type : 2
Forwarding Address : 123.1.1.3
Tag : 1
Priority : Medium
当R1收到ASBR的R2发来的LSA5类地址有FA不为零时,R1去访问该地址时,首先封装ARP,去以太网上找这到FA对应的MAC地址,当收到对方回复后,IP包的封装就成功了后面的通信就OK了,如下wireshark抓包演示,在R2上ping3.3.3.3的通信抓包:
本文出自 “网络大怪兽” 博客,请务必保留此出处http://happyln.blog.51cto.com/9258760/1653448
原文地址:http://happyln.blog.51cto.com/9258760/1653448