CISCO 路由器OSPF协议快速配置

#文章首发挑战赛#

cisco路由协议ospf怎么设置,cisco路由器设置ppp协议

拓扑说明:如图六台路由器组网,OSPF协议区域、EIGRP协议区域、接口IP如图所示。

要求:全网互通,全网通过R1LO1口连接互联网,A1 A3区域只有R5 R6外挂网段的汇总路由,R5上EIGRP、OSPF双向引入,R3R2做虚链路解决A3区域没有与A0相连的问题。

配置:

R1

hostname R1

interface Loopback0

ip address 1.1.1.1 255.255.255.255

interface Loopback1

ip address 10.0.0.1 255.255.255.255

//LO1模拟外部互联网接口

interface GigabitEthernet0/1

ip address 12.0.0.1 255.255.255.0

interface GigabitEthernet0/2

ip address 15.0.0.1 255.255.255.0

router ospf 110

router-id 1.1.1.1

area 2 range 100.0.0.0 255.255.252.0

//区域2的100段路由汇总

network 1.1.1.1 0.0.0.0 area 0

network 12.0.0.1 0.0.0.0 area 0

network 15.0.0.1 0.0.0.0 area 2

default-information originate

//下发默认路由

ip route 0.0.0.0 0.0.0.0 Loopback1

//默认路由指出接口

R5

hostname R5

interface Loopback0

ip address 5.5.5.5 255.255.255.255

interface Loopback1

ip address 100.0.1.1 255.255.255.0

interface Loopback2

ip address 100.0.2.1 255.255.255.0

interface Loopback3

ip address 100.0.3.1 255.255.255.0

interface GigabitEthernet0/0

ip address 56.0.0.1 255.255.255.0

interface GigabitEthernet0/1

ip address 15.0.0.2 255.255.255.0

router eigrp 90

no auto-summary

network 56.0.0.1 0.0.0.0

redistribute ospf 110 metric 1500 100 255 1 1500

//OSPF路由重分布进Eigrp,metric值包含5个部分:带宽、延迟、可靠性、负载、MTU,对标的1500 100 255 1 1500是思科的建议值。

router ospf 110

router-id 5.5.5.5

summary-address 200.0.0.0 255.255.252.0

//外部引入的200路由进行汇总

redistribute eigrp 90 subnets

//Eigrp重分布进OSPF

network 5.5.5.5 0.0.0.0 area 2

network 15.0.0.2 0.0.0.0 area 2

network 100.0.1.1 0.0.0.0 area 2

network 100.0.2.1 0.0.0.0 area 2

network 100.0.3.1 0.0.0.0 area 2

R6

hostname R6

interface Loopback0

ip address 6.6.6.6 255.255.255.255

interface Loopback1

ip address 200.0.1.1 255.255.255.0

interface Loopback2

ip address 200.0.2.1 255.255.255.0

interface Loopback3

ip address 200.0.3.1 255.255.255.0

interface GigabitEthernet0/0

ip address 56.0.0.2 255.255.255.0

router eigrp 90

no auto-summary

network 6.6.6.6 0.0.0.0

network 56.0.0.2 0.0.0.0

network 200.0.1.1 0.0.0.0

network 200.0.2.1 0.0.0.0

network 200.0.3.1 0.0.0.0

R2

hostname R2

interface Loopback0

ip address 2.2.2.2 255.255.255.255

interface GigabitEthernet0/0

ip address 12.0.0.2 255.255.255.0

interface GigabitEthernet0/1

ip address 23.0.0.1 255.255.255.0

router ospf 110

router-id 2.2.2.2

area 1 virtual-link 3.3.3.3

//在区域A1下与R3建立v-link

network 2.2.2.2 0.0.0.0 area 0

network 12.0.0.2 0.0.0.0 area 0

network 23.0.0.1 0.0.0.0 area 1

R3

hostname R3

interface Loopback0

ip address 3.3.3.3 255.255.255.255

interface GigabitEthernet0/0

ip address 34.0.0.1 255.255.255.0

interface GigabitEthernet0/1

ip address 23.0.0.2 255.255.255.0

router ospf 110

router-id 3.3.3.3

area 1 virtual-link 2.2.2.2

//在区域A1下与R2建立v-link

network 3.3.3.3 0.0.0.0 area 1

network 23.0.0.2 0.0.0.0 area 1

network 34.0.0.1 0.0.0.0 area 3

R4

hostname R4

interface Loopback0

ip address 4.4.4.4 255.255.255.255

interface GigabitEthernet0/0

ip address 34.0.0.2 255.255.255.0

router ospf 110

router-id 4.4.4.4

network 4.4.4.4 0.0.0.0 area 3

network 34.0.0.2 0.0.0.0 area 3

配置完成后检查R4 R6路由表,可以看到R4收到100 200两条汇总路由和全网其他路由

R6收到全网路由,互通完成。

cisco路由协议ospf怎么设置,cisco路由器设置ppp协议

cisco路由协议ospf怎么设置,cisco路由器设置ppp协议