2.png 

說明:此Lab練習將OSPF Redistribute到EIGRP並利用Prefix-List與Route-map

   Redistribute到EIGRP或RIP,預設Metric為無限大,所以需設定Metric


實作條件:

一、OSPF Redistribute into EIGRP 100

二、EIGRP 100 Redistribute into OSPF

  只允許 Private Network Redistribute 進入

  並設定OSPF Cast=100、Type=E1、Tag=100

三、OSPF External AD=130

四、IP SLA

  Router A 建立 Default Route 兩條

  Track ROB兩個介面(10.12.12.2、20.12.12.2)

  優先走20.12.12.2,當Track Fail時走10.12.12.2


RO_A Show Run設定如下:

RO_A#sh run

Building configuration...

Current configuration : 1551 bytes

!

version 12.4

service timestamps debug datetime msec

service timestamps log datetime msec

no service password-encryption

!

hostname RO_A

!

boot-start-marker

boot-end-marker

!

no aaa new-model

no network-clock-participate slot 1

no network-clock-participate wic 0

ip cef

!

ip auth-proxy max-nodata-conns 3

ip admission max-nodata-conns 3

!

ip sla monitor 100

type echo protocol ipIcmpEcho 20.12.12.2 source-interface FastEthernet0/1

timeout 2000

frequency 3

建立一條IP SLA Monitor號碼為100,每3秒從F0/1介面發ping到20.12.12.2

ip sla monitor schedule 100 life forever start-time now

設定ip sla 100的排程從現在開始並一直執行

ip sla monitor 200

type echo protocol ipIcmpEcho 10.12.12.2 source-interface Serial0/1

timeout 2000

frequency 3

建立一條IP SLA Monitor號碼為200,每3秒從S0/1介面發ping到10.12.12.2

ip sla monitor schedule 200 life forever start-time now

設定ip sla 200的排程從現在開始並一直執行

!

track 1 rtr 100 reachability

track 2 rtr 200 reachability

!

interface FastEthernet0/0

ip address 192.168.12.254 255.255.255.0

duplex auto

speed auto

!

interface Serial0/0

no ip address

shutdown

!

interface FastEthernet0/1

ip address 20.12.12.1 255.255.255.0

duplex auto

speed auto

!

interface Serial0/1

ip address 10.12.12.1 255.255.255.0

clock rate 128000

!

router ospf 100

log-adjacency-changes

network 10.12.12.0 0.0.0.255 area 0

network 20.12.12.0 0.0.0.255 area 0

network 192.168.12.0 0.0.0.255 area 0

distance ospf external 130 外部進OSPF的AD值設成130

!

ip forward-protocol nd

ip route 0.0.0.0 0.0.0.0 20.12.12.2 track 1

經過Track 1判斷後成功才會有這條路由並預設AD值為1

ip route 0.0.0.0 0.0.0.0 10.12.12.2 2 track 2

經過Track 2判斷後成功才會有這條路由並預設AD值為2

!

no ip http server

no ip http secure-server

!

control-plane

!

line con 0

line aux 0

line vty 0 4

login

!

End


RO_B Show Run設定如下:

RO_B(config-if)#do sh run

Building configuration...

Current configuration : 1390 bytes

!

version 12.4

service timestamps debug datetime msec

service timestamps log datetime msec

no service password-encryption

!

hostname RO_B

!

boot-start-marker

boot-end-marker

!

no aaa new-model

no network-clock-participate slot 1

no network-clock-participate wic 0

ip cef

!

ip auth-proxy max-nodata-conns 3

ip admission max-nodata-conns 3

!

interface FastEthernet0/0

no ip address

shutdown

duplex auto

speed auto

!

interface Serial0/0

ip address 10.140.2.2 255.255.255.0

!

interface FastEthernet0/1

ip address 20.12.12.2 255.255.255.0

duplex auto

speed auto

!

interface Serial0/1

ip address 10.12.12.2 255.255.255.0

!

router eigrp 100

redistribute ospf 100 metric 1 1 1 1 1

將OSPF 100 Redistribute進EIGRP(預設Metric為∞)並將調整設定metric

network 10.140.2.2 0.0.0.0

no auto-summary

!

router ospf 100

log-adjacency-changes

redistribute eigrp 100 subnets route-map ospf_to_eigrp

參照Route-Map ospf_to_eigrp,將EIGRP 100 Redistribute到OSPF

Subnets是將有切割過的子網段皆可Redistribute,若沒加,只能Redistribute Classful Subnets

network 10.12.12.2 0.0.0.0 area 0

network 20.12.12.2 0.0.0.0 area 0

!

ip forward-protocol nd

!

no ip http server

no ip http secure-server

!

ip prefix-list A seq 5 permit 10.0.0.0/8 le 32 只允許A Class的Private Network

ip prefix-list A seq 10 permit 172.16.0.0/12 le 32 只允許B Class的Private Network

ip prefix-list A seq 15 permit 192.168.0.0/16 le 32 只允許C Class的Private Network

!

route-map ospf_to_eigrp permit 10

match ip address prefix-list A

set metric 100

set metric-type type-1

set tag 100

建立一條Route-map,名稱為ospf_to_eigrp

符合Prefix-List A的ip add,設定metric=100、type=E1、tag=100

!

control-plane

!

line con 0

line aux 0

line vty 0 4

login

!

End

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 EdisonChang 的頭像
    EdisonChang

    Coolking's CCNP 筆記

    EdisonChang 發表在 痞客邦 留言(0) 人氣()