2010年1月16日 星期六

EIGRP redistribute LAB

在企業中常會遇到一些特殊的架構或需求,所以在這個LAB加入了我在工作上遇到的一些問題,順便一起放進這個LAB中,有興趣的人可以參考看看!!!

Basic Config :


LAB Topology :






LAB Topic :

1. R1 static route 172.31.2.0/24 to R2 for Loopback IP 。
2. R2 default route 0.0.0.0/0 to R1 。
3. R3 有一筆host route to R1 (ip route 172.31.2.1 255.255.255.255 10.3.1.1)
4. 將RIPv2 redistribute進EIGRP 1。
5. 將EIGRP 2 redistribute進EIGRP 1。
6. 將R6 Loopback IP 做summary到R5。
7. All Loopback IP 需都可互ping通。
8. 在R3上將static route redistribute 進EIGRP中。
9. R1~R4要往R5、R6時,先走R3上的Serial0/0。
10. R5、R6要往R1~R4時,先走Serial0/0。
11. R6 to R2建立Tunnel,(網段為172.32.1.0/30)。

===================================
以下為.net檔案的設定,IOS用c2691-advipservicesk9-mz.124-19.bin

###########################
# Define Router Default Instances
###########################
autostart=false
ghostios = true
model = 2691
[localhost]

[[2691]]
 image = C:\lab\IOS\c2691-advipservicesk9-mz.124-19.bin
 ram=128
 nvram = 64
 mmap = false
 disk0 = 16
 idlepc = 0x60a2ca20
###########################
# Define LAB Router Instances
###########################

 [[Router R1]]
  f0/1= R3 f0/1
  f0/0= R2 f0/0
  cnfg = .\R1.cfg
 
 [[Router R2]]
#  f0/0= R1 f0/0
  cnfg = .\R2.cfg
 
 [[Router R3]]
  f0/0= R5 f0/0
  s0/0= R5 s0/0
  s0/1= R4 s0/1
  cnfg = .\R3.cfg

 [[Router R4]]
#  s0/1= R4 s0/1
  cnfg = .\R4.cfg
 
 [[Router R5]]
#  f0/0= R3 f0/0
  f0/1= R6 f0/1
#  s0/0= R3 s0/0
  cnfg = .\R5.cfg

 [[Router R6]]
#  f0/1= R5 f0/1
  cnfg = .\R6.cfg

# [[Router Agent1]]
#  cnfg = .\Agent1.txt
# [[Router Agent2]]
#  cnfg = .\Agent2.txt
# [[ethsw S1]]
# 1 = access 1
# 2 = access 1
# 3 = access 2
# 4 = access 2
# 3 = dot1q 1
# Note, replace the interface below with a valid interface
# on your system or Dynamips will crash!
#  5 = dot1q 1 NIO_gen_eth:\Device\NPF_{8117E346-E938-4A6C-85DD-C14861DF7B8F} 

# END OF CONFIGURATION FILE.
=========================================
R1的config :(不重要的config省略)
!
hostname R1
!
interface Loopback0
 ip address 172.31.1.1 255.255.255.255
!
interface FastEthernet0/0
 ip address 10.3.0.1 255.255.255.252
 duplex auto
 speed auto
!
interface FastEthernet0/1
 ip address 10.3.1.1 255.255.255.252
 duplex auto
 speed auto
!
router eigrp 1
 network 10.3.0.0 0.0.0.3
 network 10.3.1.0 0.0.0.3
 network 172.31.1.1 0.0.0.0
 no auto-summary
!
ip forward-protocol nd
ip route 172.31.2.0 255.255.255.0 10.3.0.2
=========================================
R2的config :(不重要的config省略)
!
hostname R2
!
interface Loopback0
 ip address 172.31.2.1 255.255.255.255
!
interface Tunnel0
 bandwidth 2048
 ip address 172.32.1.1 255.255.255.252
 ip mtu 1476
 delay 500
 keepalive 10 2
 tunnel source Loopback0
 tunnel destination 172.31.64.1
!
interface FastEthernet0/0
 ip address 10.3.0.2 255.255.255.252
 duplex auto
 speed auto
!
interface FastEthernet0/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
router eigrp 1
 network 172.31.1.1 0.0.0.0
 auto-summary
!
ip forward-protocol nd
ip route 0.0.0.0 0.0.0.0 10.3.0.1

=========================================
R3的config :(不重要的config省略)
!
hostname R3
!
interface Loopback0
 ip address 172.31.3.1 255.255.255.255
!
interface FastEthernet0/0
 ip address 10.3.3.1 255.255.255.252
 duplex auto
 speed auto
!
interface Serial0/0
 ip address 10.3.4.1 255.255.255.252
 fair-queue
 clock rate 2000000
!
interface FastEthernet0/1
 ip address 10.3.1.2 255.255.255.252
 duplex auto
 speed auto
!
interface Serial0/1
 ip address 192.168.1.1 255.255.255.252
 clock rate 2000000
!
router eigrp 1
 redistribute static route-map re-static     #將static route redistribue進EIGRP中
redistribute rip metric 100000 10 255 255 1500
 offset-list 10 out 2000000 FastEthernet0/0
 offset-list 10 out 10000 Serial0/0
 network 10.3.1.0 0.0.0.3
 network 10.3.3.0 0.0.0.3
 network 10.3.4.0 0.0.0.3
 network 172.31.3.1 0.0.0.0
 distribute-list prefix filter out FastEthernet0/1   #為了避免route loop,所以要將往R2的IP filter掉
 no auto-summary
!
router rip
 version 2
 redistribute static route-map re-static
 redistribute eigrp 1 metric 0
 network 192.168.1.0
 default-metric 10
 no auto-summary
!
ip forward-protocol nd
ip route 172.31.2.1 255.255.255.255 10.3.1.1
!
ip prefix-list allow-static-route seq 5 permit 172.31.2.1/32
!
ip prefix-list filter seq 5 deny 172.31.2.1/32
ip prefix-list filter seq 10 permit 0.0.0.0/0 le 32
access-list 10 permit 192.168.2.1
access-list 10 permit 172.31.2.1
access-list 10 permit 172.31.3.1
access-list 10 permit 172.31.1.1
access-list 10 permit 10.3.0.0 0.0.0.3
access-list 10 permit 10.3.1.0 0.0.0.3
access-list 10 permit 192.168.1.0 0.0.0.3
!
route-map re-static permit 10
 match ip address prefix-list allow-static-route
=========================================
R4的config :(不重要的config省略)
!
hostname R4
!
interface Loopback0
 ip address 192.168.2.1 255.255.255.255
!
interface FastEthernet0/0
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface Serial0/0
 no ip address
 shutdown
 no fair-queue
 clock rate 2000000
!
interface FastEthernet0/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface Serial0/1
 ip address 192.168.1.2 255.255.255.252
 clock rate 2000000
!
router rip
 version 2
 network 192.168.1.0
 network 192.168.2.0
 default-metric 10
 no auto-summary
=========================================
R5的config :(不重要的config省略)
!
hostname R5
!
interface Loopback0
 ip address 172.31.5.1 255.255.255.255
!
interface FastEthernet0/0
 ip address 10.3.3.2 255.255.255.252
 duplex auto
 speed auto
!
interface Serial0/0
 ip address 10.3.4.2 255.255.255.252
 fair-queue
 clock rate 2000000
!
interface FastEthernet0/1
 ip address 10.3.5.1 255.255.255.252
 duplex auto
 speed auto
!
interface Serial0/1
 no ip address
 shutdown
 clock rate 2000000
!
router eigrp 1
 redistribute eigrp 2 metric 100000 10 255 255 1500
 offset-list 10 out 2000000 FastEthernet0/0
 offset-list 10 out 10000 Serial0/0
 network 10.3.3.0 0.0.0.3
 network 10.3.4.0 0.0.0.3
 network 172.31.5.1 0.0.0.0
 no auto-summary
!
router eigrp 2
 redistribute eigrp 1 metric 100000 10 255 255 1500
 network 10.3.5.0 0.0.0.3
 no auto-summary
!
access-list 10 permit 172.31.5.1
access-list 10 permit 172.31.64.0 0.0.0.7
access-list 10 permit 10.3.5.0 0.0.0.3
=========================================
R6的config :(不重要的config省略)
!
hostname R6
!
interface Loopback0
 ip address 172.31.64.1 255.255.255.0
!
interface Loopback1
 ip address 172.31.65.1 255.255.255.0
!
interface Loopback2
 ip address 172.31.66.1 255.255.255.0
!
interface Loopback3
 ip address 172.31.67.1 255.255.255.0
!
interface Loopback4
 ip address 172.31.68.1 255.255.255.0
!
interface Loopback5
 ip address 172.31.69.1 255.255.255.0
!
interface Tunnel0
 bandwidth 2048
 ip address 172.32.1.2 255.255.255.252
 ip mtu 1476
 delay 500
 keepalive 10 2
 tunnel source Loopback0
 tunnel destination 172.31.2.1
!
interface FastEthernet0/0
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface FastEthernet0/1
 ip address 10.3.5.2 255.255.255.252
 ip summary-address eigrp 2 172.31.64.0 255.255.248.0 5
 duplex auto
 speed auto
!
router eigrp 2
 network 10.3.5.0 0.0.0.3
 network 172.31.64.1 0.0.0.0
 network 172.31.65.1 0.0.0.0
 network 172.31.66.1 0.0.0.0
 network 172.31.67.1 0.0.0.0
 network 172.31.68.1 0.0.0.0
 network 172.31.69.1 0.0.0.0
 no auto-summary

沒有留言:

張貼留言