OSPF多区域,重分发实操

it2023-04-10  79

OSPF多区域,重分发实验

分析:从图中可以看出,一共有4各区域,分为OSPF和RIP区域,其中OSPF,area0为骨干区域,其余为非骨干区域,图中area3连接到area0骨干区域需要跨越area2,所以必须建立虚链路(注:虚链路只能帮助一个骨干区域跨越非骨干区域,虚链路属于区域0),AR5路由器属于ASBR路由器,AR5需要将自己路由表告诉OSPF和RIP内路由,这里需要双向重分发命令,实现全网互通。

下面是每个路由器的命令:

AR1:

# sysname R1 # aaa authentication-scheme default authorization-scheme default accounting-scheme default domain default domain default_admin local-user admin password cipher OOCM4m($F4ajUn1vMEIBNUw# local-user admin service-type http # firewall zone Local priority 16 # interface Ethernet0/0/0 # interface Ethernet0/0/1 # interface Serial0/0/0 link-protocol ppp # interface Serial0/0/1 link-protocol ppp # interface Serial0/0/2 link-protocol ppp # interface Serial0/0/3 link-protocol ppp # interface GigabitEthernet0/0/0 ip address 12.1.1.1 255.255.255.0 ####(配置端口地址) # interface GigabitEthernet0/0/1 # interface GigabitEthernet0/0/2 # interface GigabitEthernet0/0/3 # wlan # interface NULL0 # interface LoopBack0 ip address 1.1.1.1 255.255.255.255 ####(配置环回地址) # ospf 1 router-id 1.1.1.1 area 0.0.0.1 network 12.1.1.0 0.0.0.255 ####(宣告直连网段) network 1.1.1.1 0.0.0.0 ####(宣告环回网段) # user-interface con 0 idle-timeout 0 0 user-interface vty 0 4 user-interface vty 16 20 # return

AR2:

# sysname R2 # aaa authentication-scheme default authorization-scheme default accounting-scheme default domain default domain default_admin local-user admin password cipher OOCM4m($F4ajUn1vMEIBNUw# local-user admin service-type http # firewall zone Local priority 16 # interface Ethernet0/0/0 # interface Ethernet0/0/1 # interface Serial0/0/0 link-protocol ppp # interface Serial0/0/1 link-protocol ppp # interface Serial0/0/2 link-protocol ppp # interface Serial0/0/3 link-protocol ppp # interface GigabitEthernet0/0/0 ip address 12.1.1.2 255.255.255.0 ####(配置端口地址) # interface GigabitEthernet0/0/1 ip address 23.1.1.2 255.255.255.0 ####(配置端口地址) # interface GigabitEthernet0/0/2 # interface GigabitEthernet0/0/3 # wlan # interface NULL0 # interface LoopBack0 ip address 2.2.2.2 255.255.255.255 ####(配置环回地址) # ospf 1 router-id 2.2.2.2 area 0.0.0.0 network 23.1.1.0 0.0.0.255 ####(宣告直连网段) network 2.2.2.2 0.0.0.0 ####(宣告环回网段) area 0.0.0.1 network 12.1.1.0 0.0.0.255 ####(宣告直连网段) area 0.0.0.2 # user-interface con 0 idle-timeout 0 0 user-interface vty 0 4 user-interface vty 16 20 # return

AR3:

# sysname R3 # aaa authentication-scheme default authorization-scheme default accounting-scheme default domain default domain default_admin local-user admin password cipher OOCM4m($F4ajUn1vMEIBNUw# local-user admin service-type http # firewall zone Local priority 16 # interface Ethernet0/0/0 # interface Ethernet0/0/1 # interface Serial0/0/0 link-protocol ppp # interface Serial0/0/1 link-protocol ppp # interface Serial0/0/2 link-protocol ppp # interface Serial0/0/3 link-protocol ppp # interface GigabitEthernet0/0/0 ip address 23.1.1.3 255.255.255.0 ####(配置端口地址) # interface GigabitEthernet0/0/1 ip address 34.1.1.3 255.255.255.0 ####(配置端口地址) # interface GigabitEthernet0/0/2 # interface GigabitEthernet0/0/3 # wlan # interface NULL0 # interface LoopBack0 ip address 3.3.3.3 255.255.255.255 ####(配置环回地址) # ospf 1 router-id 3.3.3.3 area 0.0.0.0 network 23.1.1.0 0.0.0.255 ####(宣告直连网段) network 3.3.3.3 0.0.0.0 ####(宣告环回网段) area 0.0.0.2 network 34.1.1.0 0.0.0.255 ####(宣告直连网段) vlink-peer 4.4.4.4 ####(建立虚链路对端router-id) # user-interface con 0 idle-timeout 0 0 user-interface vty 0 4 user-interface vty 16 20 # return

AR4:

# sysname R4 # aaa authentication-scheme default authorization-scheme default accounting-scheme default domain default domain default_admin local-user admin password cipher OOCM4m($F4ajUn1vMEIBNUw# local-user admin service-type http # firewall zone Local priority 16 # interface Ethernet0/0/0 # interface Ethernet0/0/1 # interface Serial0/0/0 link-protocol ppp # interface Serial0/0/1 link-protocol ppp # interface Serial0/0/2 link-protocol ppp # interface Serial0/0/3 link-protocol ppp # interface GigabitEthernet0/0/0 ip address 34.1.1.4 255.255.255.0 ####(配置端口地址) # interface GigabitEthernet0/0/1 ip address 45.1.1.4 255.255.255.0 ####(配置端口地址) # interface GigabitEthernet0/0/2 # interface GigabitEthernet0/0/3 # wlan # interface NULL0 # interface LoopBack0 ip address 4.4.4.4 255.255.255.255 ####(配置环回地址) # ospf 1 router-id 4.4.4.4 area 0.0.0.2 network 34.1.1.0 0.0.0.255 ####(宣告直连网段) network 4.4.4.4 0.0.0.0 ####(宣告环回网段) vlink-peer 3.3.3.3 ####(建立虚链路对端router-id) area 0.0.0.3 network 45.1.1.0 0.0.0.255 ####(宣告直连网段) # user-interface con 0 idle-timeout 0 0 user-interface vty 0 4 user-interface vty 16 20 # return

AR5:

# sysname R5 # aaa authentication-scheme default authorization-scheme default accounting-scheme default domain default domain default_admin local-user admin password cipher OOCM4m($F4ajUn1vMEIBNUw# local-user admin service-type http # firewall zone Local priority 16 # interface Ethernet0/0/0 # interface Ethernet0/0/1 # interface Serial0/0/0 link-protocol ppp # interface Serial0/0/1 link-protocol ppp # interface Serial0/0/2 link-protocol ppp # interface Serial0/0/3 link-protocol ppp # interface GigabitEthernet0/0/0 ip address 45.1.1.5 255.255.255.0 ####(配置端口地址) # interface GigabitEthernet0/0/1 ip address 56.1.1.5 255.255.255.0 ####(配置端口地址) # interface GigabitEthernet0/0/2 # interface GigabitEthernet0/0/3 # wlan # interface NULL0 # interface LoopBack0 ip address 5.5.5.5 255.255.255.255 ####(配置环回地址) # ospf 1 router-id 5.5.5.5 import-route rip 1 cost 10 ####(ospf里设置rip重分发) area 0.0.0.3 network 5.5.5.5 0.0.0.0 ####(宣告环回网段) network 45.1.1.0 0.0.0.255 ####(宣告直连网段) # rip 1 undo summary ####(关闭自动聚合) version 2 ####(设置版本ripv2) network 56.0.0.0 ####(宣告直连网段) import-route ospf 1 cost 0 ####(rip里设置ospf重分发) # user-interface con 0 idle-timeout 0 0 user-interface vty 0 4 user-interface vty 16 20 # return

AR6:

# sysname R6 # aaa authentication-scheme default authorization-scheme default accounting-scheme default domain default domain default_admin local-user admin password cipher OOCM4m($F4ajUn1vMEIBNUw# local-user admin service-type http # firewall zone Local priority 16 # interface Ethernet0/0/0 # interface Ethernet0/0/1 # interface Serial0/0/0 link-protocol ppp # interface Serial0/0/1 link-protocol ppp # interface Serial0/0/2 link-protocol ppp # interface Serial0/0/3 link-protocol ppp # interface GigabitEthernet0/0/0 ip address 56.1.1.6 255.255.255.0 ####(配置端口地址) # interface GigabitEthernet0/0/1 # interface GigabitEthernet0/0/2 # interface GigabitEthernet0/0/3 # wlan # interface NULL0 # interface LoopBack0 ip address 6.6.6.6 255.255.255.255 ####(配置环回地址) # rip 1 undo summary ####(关闭自动聚合) version 2 network 6.0.0.0 ####(宣告环回网段) network 56.0.0.0 ####(宣告直连网段) # user-interface con 0 idle-timeout 0 0 user-interface vty 0 4 user-interface vty 16 20 # return
最新回复(0)