mpls实验
[color=Red]实验拓扑[/color]:[attach]172[/attach][color=Red]Dynamips参数[/color]:后续补上
[color=Red]实验要求[/color]:掌握MPLS基本配置
[color=Red]实验配置[/color]:运营商骨干网准备工作
首先说说运营商骨干网准备工作,配置主要分以下几个部分:
1、在PE和P上配置IGP,使骨干网连通。
2、在PE和P上配置MPLS,启动标签交换。
1、在PE和P上配置IGP。
在此选择EIGRP/OSPF/RIP/ISIS中任意一款路由协议均可,此例中使用EIGRP。
R3:
R3(config)# router eigrp 100
R3(config-router)# network 3.3.3.3 0.0.0.0 !R3的loopback 0为3.3.3.3/32
R3(config-router)# network 10.1.1.0 0.0.0.3
R4:
R4(config)# router eigrp 100
R4(config-router)# network 10.1.1.0 0.0.0.3
R4(config-router)# network 10.1.1.4 0.0.0.3
R5:
R3(config)# router eigrp 100
R3(config-router)# network 5.5.5.5 0.0.0.0 !R5的loopback 0为5.5.5.5/32
R3(config-router)# network 10.1.1.4 0.0.0.3
2、在PE和P上配置MPLS
R3:
R3(config)# inte***ce s1/2.1 point-to-point
R3(config-if)# description connect to R4
R3(config-if)# mpls ip
R4:
R4(config)# inte***ce s1/2.1 point-to-point
R4(config-if)# description connect to R3
R4(config-if)# mpls ip
R4(config)# inte***ce s1/2.2 point-to-point
R4(config-if)# description connect to R5
R4(config-if)# mpls ip
R5:
R5(config)# inte***ce s1/2.1 point-to-point
R5(config-if)# description connect to R4
R5(config-if)# mpls ip
骨干网准备工作配置完毕!
客户端(CE)配置
接着来谈谈CE的配置,CE需要将客户的网络接入运营商,同时将自己的路由通告给PE,然后由PE通过骨干网将路由通告给该客户的其他CE。
在此例中,有两个客户:Customer_A和Customer_B,在通过MPLSVPN时,它们彼此的路由信息不会互相干扰。
CE和PE之间可以采用RIP/EIGRP/OSPF/静态路由等方式互相通告路由,CE上的配置也很简单,只需要按照以往一样启动路由协议就够了。例如:R1和R3之间运行RIPv2,那么R1的配置如下:
R1(config)# router rip
R1(config-router)# version 2
R1(config-router)# no auto-summary
R1(config-router)# nework 172.16.0.0
R1(config-router)# nework 10.0.0.0
CE的配置在此不再敷述了。
在后面的示例中,我将在两种情况下讲述PE的配置:
1、CE和PE之间运行RIPv2
2、CE和PE之间运行OSPF
PE的配置(CE与PE之间运行RIPv2)
PE的配置主要分为以下几个步骤:(以R3配置为例,R5配置不再敷述)
1、创建VRF。
2、在相应的将接口加入VRF。
3、配置与CE间的路由协议。
4、配置与其他PE之间的MP-BGP。
5、配置重发布。
1、创建VRF。
R3(config)# ip vrf comA
R3(config-vrf)# rd 1:27
R3(config-vrf)# route-target export 100:27
R3(config-vrf)# route-target import 100:27
R3(config)# ip vrf comB
R3(config-vrf)# rd 1:37
R3(config-vrf)# route-target export 100:37
R3(config-vrf)# route-target import 100:37
2、在相应的将接口加入VRF。
R3(config)# inte***ce Serial1/2.2 point-to-point
R3(config-if)# ip vrf forwarding comA
R3(config)# inte***ce Serial1/2.3 point-to-point
R3(config-if)# ip vrf forwarding comB
3、配置与CE间的路由协议。
R3(config)# router rip
R3(config-router)# version 2
!
R3(config-router)# address-family ipv4 vrf comB
R3(config-router-af)# network 10.0.0.0
R3(config-router-af)# no auto-summary
R3(config-router-af)# version 2
R3(config-router-af)# exit-address-family
!
R3(config-router)# address-family ipv4 vrf comA
R3(config-router-af)# network 10.0.0.0
R3(config-router-af)# no auto-summary
R3(config-router-af)# version 2
R3(config-router-af)# exit-address-family
此时可以使用show ip route vrf XXX查看虚拟路由表是否学习到客户的路由。
4、配置与R5之间的MP-BGP。
R3(config)# router bgp 100
R3(config-router)# no synchronization
R3(config-router)# neighbor 5.5.5.5 remote-as 100
R3(config-router)# neighbor 5.5.5.5 update-source Loopback0
R3(config-router)# no auto-summary
!
R3(config-router)# address-family vpnv4
R3(config-router-af)# neighbor 5.5.5.5 activate
R3(config-router-af)# neighbor 5.5.5.5 send-community both
R3(config-router-af)# exit-address-family
!
R3(config-router)# address-family ipv4 vrf comB
R3(config-router-af)# no auto-summary
R3(config-router-af)# no synchronization
R3(config-router-af)# exit-address-family
!
R3(config-router)# address-family ipv4 vrf comA
R3(config-router-af)# no auto-summary
R3(config-router-af)# no synchronization
R3(config-router-af)# exit-address-family
5、配置重发布。
R3(config)# router rip
R3(config-router)# address-family ipv4 vrf comB
R3(config-router-af)# redistribute bgp 100 metric 5
!
R3(config-router)# address-family ipv4 vrf comA
R3(config-router-af)# redistribute bgp 100 metric 5
!
R3(config)# router bgp 100
R3(config-router)# address-family ipv4 vrf comB
R3(config-router-af)# redistribute rip
!
R3(config-router)# address-family ipv4 vrf comA
R3(config-router-af)# redistribute rip
所有配置完毕。
PE的配置(CE与PE之间运行OSPF)
基本配置思想与楼上相同,这里就简单说说PE的OSPF配置和MP-BGP配置的不同点吧。
R3的OSPF与MP-BGP配置如下:
R3(config)# router ospf 1 vrf comA
R3(config-router-af)# redistribute bgp 100 subnets
R3(config-router-af)# network 10.1.1.8 0.0.0.3 area 0
!
R3(config)# router ospf 1 vrf comB
R3(config-router-af)# redistribute bgp 100 subnets
R3(config-router-af)# network 10.1.1.12 0.0.0.3 area 0
R3(config)# router bgp 100
R3(config-router)# no synchronization
R3(config-router)# neighbor 5.5.5.5 remote-as 100
R3(config-router)# neighbor 5.5.5.5 update-source Loopback0
R3(config-router)# no auto-summary
!
R3(config-router)# address-family vpnv4
R3(config-router-af)# neighbor 5.5.5.5 activate
R3(config-router-af)# neighbor 5.5.5.5 send-community both
R3(config-router-af)# exit-address-family
!
R3(config-router)# address-family ipv4 vrf comA
R3(config-router-af)# redistribute ospf 1
R3(config-router-af)# no auto-summary
R3(config-router-af)# no synchronization
R3(config-router-af)# exit-address-family
!
R3(config-router)# address-family ipv4 vrf comB
R3(config-router-af)# redistribute ospf 1
R3(config-router-af)# no auto-summary
R3(config-router-af)# no synchronization
R3(config-router-af)# exit-address-family
[color=Red]实验验证[/color]:OK都这样配的 和我们公司那个一样 哈哈 把。net文件发上来一下啊。。
谢谢。 学习了,这个东西一直没有实践。 顶!就是把net 文件发上来就更好了。 net文件?是什么?哪儿有? 用dynamips GUI 自己做就好啊,又不是很难的拓扑 呵呵,有没有bat,把你的bat发上来,我喜欢用bat的方式!!! Dynamips参数,什么时候补上等待 牛人一个,强漏 不错的,呵呵,谢谢 先看看配置再说 了! 有做好的拓扑图吗 这个拓扑图没标断口类型,我就不会做连接图了
哪位大哥发个作好的或者标个断口号啊
[[i] 本帖最后由 111111 于 2007-6-3 16:08 编辑 [/i]] 的确是非常实用的配置 哈哈 学习中。。。。。。 期待Dynamips参数~管理员,超级斑猪快来补上啊,好想亲手配置下啊
结果到Dynamips参数就卡住了 R3(config)# interface s1/2.1 point-to-point
R3(config-if)# description connect to R4
R3(config-if)# mpls ip
这里有子接口s1/2.1该如何写拓扑图?
请问一下 这是那个 ios 版本 急用!!!!!
请问一下 这是那个 ios 版本 DDDDDDDDDDDD 先看看配置再说 了! [quote]原帖由 [i]111111[/i] 于 2007-6-7 00:17 发表 [url=http://www.netemu.cn/bbs/redirect.php?goto=findpost&pid=16353&ptid=218][img]http://www.netemu.cn/bbs/images/common/back.gif[/img][/url]R3(config)# interface s1/2.1 point-to-point
R3(config-if)# description connect to R4
R3(config-if)# mpls ip
这里有子接口s1/2.1该如何写拓扑图? [/quote]
子接口s1/2.1是物理接口虚拟的实际上是s1/2
比如s1/2下接三个网段我可以分成三个子接口
子接口s1/2.1 10.0.1.0
子接口s1/2.2 10.0.2.0
子接口s1/2.3 10.0.3.0 谢谢楼主分享!y101 多谢分享!!!!!!!!!!!!!1 大哥!您真是好人哪!正缺少这方面的资料呢!太感谢楼主了! 此帖一定要顶。。 那里有参数哦,老大辛苦了 希望把bat实验包发上来,谢谢!
good
gooooooooooooooodthank you very much. good, 楼主是个好人。
页:
[1]