Netemu 虚拟化先锋 's Archiver

simon 发表于 2007-4-4 08:14

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都这样配的 和我们公司那个一样 哈哈

ybh19868888 发表于 2007-4-4 22:26

把。net文件发上来一下啊。。
谢谢。

afxmfc 发表于 2007-4-5 09:07

学习了,这个东西一直没有实践。

hopeybw 发表于 2007-4-5 21:46

顶!就是把net 文件发上来就更好了。

nasching 发表于 2007-4-7 18:31

net文件?是什么?哪儿有?

redboynono 发表于 2007-4-12 15:27

用dynamips GUI 自己做就好啊,又不是很难的拓扑

wanzxj 发表于 2007-4-19 02:02

呵呵,有没有bat,把你的bat发上来,我喜欢用bat的方式!!!

jhgzs2000 发表于 2007-4-25 19:14

Dynamips参数,什么时候补上等待

haixinli 发表于 2007-5-7 23:32

牛人一个,强漏

lijingen 发表于 2007-5-9 18:22

不错的,呵呵,谢谢

da_wuya 发表于 2007-5-31 19:12

先看看配置再说 了!

zhengllg 发表于 2007-6-1 01:01

有做好的拓扑图吗

111111 发表于 2007-6-3 16:07

这个拓扑图没标断口类型,我就不会做连接图了
哪位大哥发个作好的或者标个断口号啊

[[i] 本帖最后由 111111 于 2007-6-3 16:08 编辑 [/i]]

fke7023 发表于 2007-6-3 20:44

的确是非常实用的配置 哈哈  学习中。。。。。。

111111 发表于 2007-6-3 21:02

期待Dynamips参数~管理员,超级斑猪快来补上啊,好想亲手配置下啊
结果到Dynamips参数就卡住了

111111 发表于 2007-6-7 00:17

R3(config)# interface s1/2.1 point-to-point
R3(config-if)# description connect to R4
R3(config-if)# mpls ip

这里有子接口s1/2.1该如何写拓扑图?

quansheng 发表于 2007-9-25 23:57

请问一下 这是那个 ios 版本 急用!!!!!

请问一下  这是那个 ios 版本

wenhao_lu 发表于 2007-10-14 01:24

DDDDDDDDDDDD

guangyishikong 发表于 2007-10-14 05:05

先看看配置再说 了!

心跳男人 发表于 2007-10-14 12:42

[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

2008小周 发表于 2007-10-14 20:25

谢谢楼主分享!y101

wenhao_lu 发表于 2007-10-16 15:58

多谢分享!!!!!!!!!!!!!1

nimersis 发表于 2008-5-31 20:08

大哥!您真是好人哪!正缺少这方面的资料呢!太感谢楼主了!

fleay 发表于 2008-11-5 16:51

此帖一定要顶。。

iorislayer 发表于 2008-11-14 14:30

那里有参数哦,老大辛苦了

cheche 发表于 2008-11-16 21:54

希望把bat实验包发上来,谢谢!

posih 发表于 2008-12-1 15:55

good

goooooooooooooood
thank you very much.

gzmt 发表于 2010-7-13 10:01

good, 楼主是个好人。

页: [1]

Powered by Discuz! Archiver 7.0.0  © 2001-2009 Comsenz Inc.