IT猫扑社区's Archiver

LinkTang 发表于 2008-12-1 21:20

EIGRP与RIP的重发布

EIGRP与RIP的重发布
[table][tr][td]实验拓扑图:

[img]http://hiphotos.baidu.com/linkt/pic/item/ad5c05ce72f2051f92457ea9.jpg[/img]
路由器A,B,C运行EIGRP,A,D,E运行RIP。
实验配置:
1[b].路由A配置:[/b]

A#show run
Building configuration...
Current configuration : 2112 bytes
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname A
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
ip subnet-zero
!
!
ip cef
!
ip audit po max-events 100
ipv6 unicast-routing
!
!         
!
!
interface Ethernet0/0
ip address 172.16.254.1 255.255.255.252
full-duplex
ipv6 address 2001:DB8:0:FE::1/64
ipv6 enable
ipv6 ospf 100 area 0
!         
interface Ethernet0/1
ip address 172.16.253.1 255.255.255.252
full-duplex
!
interface Ethernet0/2
ip address 172.16.252.1 255.255.255.252
full-duplex
!
interface Ethernet0/3
ip address 172.16.251.1 255.255.255.252
full-duplex
ipv6 address 2001:DB8:0:FB::1/64
ipv6 enable
ipv6 rip ripngr1 enable
!
router eigrp 1
redistribute rip metric 10000 1000 255 1 1500
passive-interface Ethernet0/2
passive-interface Ethernet0/3
network 172.16.0.0
[color=#ff0000]distribute-list 4 out Ethernet0/0[/color]
auto-summary
!         
router rip
version 2
redistribute eigrp 1 metric 3
passive-interface Ethernet0/0
passive-interface Ethernet0/1
network 172.16.0.0
[color=#0000ff]distribute-list 3 out eigrp 1
distribute-list 2 out Ethernet0/2
distribute-list 1 in Ethernet0/3[/color]
!
ip http server
no ip http secure-server
ip classless
!
!
access-list 1 deny   172.16.12.0
access-list 1 permit any
access-list 2 deny   172.16.10.0
access-list 2 permit any
access-list 3 permit 172.16.8.0
access-list 3 permit 172.16.9.0
access-list 3 permit 172.16.2.0
access-list 4 deny   172.16.4.0 0.0.0.255
access-list 4 deny   172.16.5.0 0.0.0.255
access-list 4 deny   172.16.6.0 0.0.0.255
access-list 4 deny   172.16.10.0 0.0.0.255
access-list 4 deny   172.16.11.0 0.0.0.255
access-list 4 deny   172.16.251.0 0.0.0.255
access-list 4 deny   172.16.252.0 0.0.0.255
access-list 4 permit any
[color=#00ff00]ipv6 router ospf 100[/color]
log-adjacency-changes
distribute-list prefix-list 1 out rip ripngr1
redistribute rip ripngr1 metric 100
!
[color=#00ff00]ipv6 router rip ripngr1
[/color]redistribute ospf 100 metric 3
!
!
!
ipv6 prefix-list 1 seq 5 permit 2001:DB8:0:C::/64
!
!
!
!
!         
!
!
line con 0
logging synchronous
line aux 0
line vty 0 4
login
!
!
end
[b]2,路由器B和C配置:[/b]
[color=#0000ff][b]B#show run[/b][/color]
Building configuration...
Current configuration : 1068 bytes
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname B
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
ip subnet-zero
!
!
ip cef
!
ip audit po max-events 100
ipv6 unicast-routing
!
!         
!
!
!
interface Ethernet0/0
ip address 172.16.254.2 255.255.255.252
full-duplex
ipv6 address 2001:DB8:0:FE::2/64
ipv6 ospf 100 area 0
!
interface Ethernet0/1
ip address 172.16.1.1 255.255.255.0
full-duplex
ipv6 address 2001:DB8:0:1::2/64
ipv6 ospf 100 area 0
!
interface Ethernet0/2
ip address 172.16.2.1 255.255.255.0
full-duplex
ipv6 address 2001:DB8:0:2::2/64
ipv6 ospf 100 area 0
!
interface Ethernet0/3
ip address 172.16.3.1 255.255.255.0
full-duplex
ipv6 address 2001:DB8:0:3::2/64
ipv6 ospf 100 area 0
!
router eigrp 1
network 172.16.0.0
auto-summary
!
ip http server
no ip http secure-server
ip classless
!
!
ipv6 router ospf 100
log-adjacency-changes
!
!
!
!
!
!
!
!
!
line con 0
logging synchronous
line aux 0
line vty 0 4
login
!
!
end
         
B#

[color=#0000ff][b]C#show run[/b][/color]
Building configuration...
Current configuration : 847 bytes
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname C
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
ip subnet-zero
!
!
ip cef
!
ip audit po max-events 100
ipv6 unicast-routing
!
!         
!
!
!
interface Ethernet0/0
ip address 172.16.253.2 255.255.255.252
full-duplex
!
interface Ethernet0/1
ip address 172.16.7.1 255.255.255.0
full-duplex
!
interface Ethernet0/2
ip address 172.16.8.1 255.255.255.0
full-duplex
!
interface Ethernet0/3
ip address 172.16.9.1 255.255.255.0
full-duplex
!
router eigrp 1
network 172.16.0.0
auto-summary
!
ip http server
no ip http secure-server
ip classless
!
!
ipv6 router ospf 100
log-adjacency-changes
!
!
!         
!
!
!
!
!
!
line con 0
logging synchronous
line aux 0
line vty 0 4
login
!
!
end
C#
[b]3.路由器D和E配置:[/b]

D>en
[color=#0000ff][b]D#show run[/b][/color]
Building configuration...
Current configuration : 820 bytes
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname D
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
ip subnet-zero
!
!
ip cef
!
ip audit po max-events 100
ipv6 unicast-routing
!
!         
!
interface Ethernet0/0
ip address 172.16.252.2 255.255.255.252
full-duplex
!
interface Ethernet0/1
ip address 172.16.4.1 255.255.255.0
full-duplex
!
interface Ethernet0/2
ip address 172.16.5.1 255.255.255.0
full-duplex
!
interface Ethernet0/3
ip address 172.16.6.1 255.255.255.0
full-duplex
!
router rip
version 2
network 172.16.0.0
!
ip http server
no ip http secure-server
ip classless
!
!
ipv6 router rip ripngr1
!
!
!
!         
!
!
!
!
!
line con 0
logging synchronous
line aux 0
line vty 0 4
login
!
!
end
D#

E>en
[color=#0000ff][b]E#show run[/b][/color]
Building configuration...
Current configuration : 1120 bytes
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname E
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
ip subnet-zero
!
!
ip cef
!
ip audit po max-events 100
ipv6 unicast-routing
!
!
!
!
interface Ethernet0/0
ip address 172.16.251.2 255.255.255.252
full-duplex
ipv6 address 2001:DB8:0:FB::2/64
ipv6 enable
ipv6 rip ripngr1 enable
!         
interface Ethernet0/1
ip address 172.16.10.1 255.255.255.0
full-duplex
ipv6 address 2001:DB8:0:A::1/64
ipv6 rip ripngr1 enable
!
interface Ethernet0/2
ip address 172.16.11.1 255.255.255.0
full-duplex
ipv6 address 2001:DB8:0:B::1/64
ipv6 rip ripngr1 enable
!
interface Ethernet0/3
ip address 172.16.12.1 255.255.255.0
full-duplex
ipv6 address 2001:DB8:0:C::1/64
ipv6 rip rirngr1 enable
ipv6 rip ripngr1 enable
!
router rip
version 2
network 172.16.0.0
!         
ip http server
no ip http secure-server
ip classless
!
!
ipv6 router rip ripngr1
!
ipv6 router rip rirngr1
!
!
!
!
!
!
!
!
!
line con 0
logging synchronous
line aux 0
line vty 0 4
login
!         
!
end
E#
[b]实验说明:[/b]
1.路由器A中的 distribute-list 1 in Ethernet0/3命令防止网络172.16.12.0/24发布到除E以外的路由器
下2图是发布命令distribute-list 1 in Ethernet0/3前D、B中的路由信息
图1:
[img]http://hiphotos.baidu.com/linkt/pic/item/69934144dacfe350510ffe91.jpg[/img]
图2:

[img]http://hiphotos.baidu.com/linkt/pic/item/508a005c5706aa5ffbf2c098.jpg[/img]
图3、4是distribute-list 1 in Ethernet0/3发布后D和B的路由条目
图3:
[img]http://hiphotos.baidu.com/linkt/pic/item/b7bbc8f4a0905472dcc47467.jpg[/img]
图4:
[img]http://hiphotos.baidu.com/linkt/pic/item/cec4c54fa4b70e2aaec3ab62.jpg[/img]
可以看到B和D都不存在172.16.12.0/24这条路由条目。
2。A中的命令 distribute-list 2 out Ethernet0/2是防止D学到网络172.16.10.0/24
发布命令 distribute-list 2 out Ethernet0/2后D中的路由信息如图5:
图5:
[img]http://hiphotos.baidu.com/linkt/pic/item/19794b1060bec01d203f2e71.jpg[/img]
3.A中的 distribute-list 3 out eigrp 1只将EIGRP中的172.16.2.0/24,172.16.8.0/24,172.16.9.9/24发布到RIP中如图6,
图6:
[img]http://hiphotos.baidu.com/linkt/pic/item/449f7e0e1e88adfb37d12246.jpg[/img]
4.A中eigrp中的distribute-list 4 out Ethernet0/0防止B学到RIP中的任何路由如图7
图7:
[img]http://hiphotos.baidu.com/linkt/pic/item/449f7e0e1e83adfb37d12249.jpg[/img]
[b]ps:犹豫篇幅原因本实验中还包括了OSPFv3和RIPng的重发布[/b]
[b]                                                                                                                                         作者: LinkTang[/b]
[b]                                                          欢迎光临我的博客:[url=http://hi.baidu.com/linkt]http://hi.baidu.com/linkt[/url][/b]








[/td][/tr][/table]

[[i] 本帖最后由 LinkTang 于 2008-12-1 21:22 编辑 [/i]]

LinkTang 发表于 2008-12-7 18:57

日,图片显示不出来,到我空间里去看吧

stanfu 发表于 2008-12-8 21:26

能不能把图片从新传一遍啊楼主

页: [1]

Powered by Discuz! Archiver 6.1.0  © 2001-2007 Comsenz Inc.