EVPN Type5实验

Route type-5 IP prefix Route—An IP prefix route provides encoding for inter-subnet forwarding. In the control plane, EVPN type-5 routes are used to advertise IP prefixes for inter-subnet connectivity across data centers. To reach a tenant using connectivity provided by the EVPN type-5 IP prefix route, data packets are sent as Layer 2 Ethernet frames encapsulated in the VXLAN header over the IP network across the data centers.

实验拓扑

CE1 lo0.0为11.0.0.1/24

CE2 lo0.0为22.0.0.1/24

CE3 lo0.0为33.0.0.1/24

PE1 lo0.0为1.1.1.1/32

PE2 lo0.0为2.2.2.2/32

PE3 lo0.0为3.3.3.3/32

10.5.39.0/24段为管理段

查看PE1接收了3.3.3.3的evpn路由(注意type 2,type 3,type5,http://bgphelp.com/2017/05/22/evpn-route-types/)


PE1的配置:

root@PE1> show configuration | display set

set version 17.2R1.13

set system host-name PE1

set chassis fpc 0 pic 0 tunnel-services bandwidth 1g

set chassis network-services enhanced-ip

set interfaces ge-0/0/6 unit 0 family inet address 192.168.13.1/24

set interfaces ge-0/0/6 unit 0 family mpls

set interfaces ge-0/0/8 unit 0 family inet address 192.168.12.1/24

set interfaces ge-0/0/8 unit 0 family mpls

set interfaces ge-0/0/9 flexible-vlan-tagging

set interfaces ge-0/0/9 encapsulation flexible-ethernet-services

set interfaces ge-0/0/9 unit 10 encapsulation vlan-bridge

set interfaces ge-0/0/9 unit 10 vlan-id 10

set interfaces fxp0 unit 0 family inet address 10.5.39.241/24

set interfaces irb unit 10 family inet address 192.168.10.1/24

set interfaces lo0 unit 0 family inet address 1.1.1.1/32

set routing-options static route 10.5.0.0/16 next-hop 10.5.39.254

set routing-options router-id 1.1.1.1

set routing-options autonomous-system 65000

set protocols mpls interface ge-0/0/6.0

set protocols mpls interface ge-0/0/8.0

set protocols bgp group IBGP type internal

set protocols bgp group IBGP local-address 1.1.1.1

set protocols bgp group IBGP family evpn signaling

set protocols bgp group IBGP neighbor 2.2.2.2

set protocols bgp group IBGP neighbor 3.3.3.3

set protocols ospf area 0.0.0.0 interface ge-0/0/6.0

set protocols ospf area 0.0.0.0 interface lo0.0

set protocols ospf area 0.0.0.0 interface ge-0/0/8.0

set protocols ldp interface ge-0/0/6.0

set protocols ldp interface ge-0/0/8.0

set routing-instances BD10 instance-type evpn

set routing-instances BD10 vlan-id 10

set routing-instances BD10 interface ge-0/0/9.10

set routing-instances BD10 routing-interface irb.10

set routing-instances BD10 route-distinguisher 1.1.1.1:10

set routing-instances BD10 vrf-target target:10:10

set routing-instances BD10 protocols evpn

set routing-instances BD10-L3 instance-type vrf

set routing-instances BD10-L3 interface irb.10

set routing-instances BD10-L3 route-distinguisher 1.1.1.1:11

set routing-instances BD10-L3 vrf-target target:10:10

set routing-instances BD10-L3 vrf-table-label

set routing-instances BD10-L3 routing-options static route 11.0.0.0/24 next-hop 192.168.10.11

set routing-instances BD10-L3 protocols evpn ip-prefix-routes advertise direct-nexthop

PE2的配置

root@PE2> show configuration | display set

set version 17.2R1.13

set system host-name PE2

set chassis fpc 0 pic 0 tunnel-services bandwidth 1g

set chassis network-services enhanced-ip

set interfaces ge-0/0/7 unit 0 family inet address 192.168.23.2/24

set interfaces ge-0/0/7 unit 0 family mpls

set interfaces ge-0/0/8 unit 0 family inet address 192.168.12.2/24

set interfaces ge-0/0/8 unit 0 family mpls

set interfaces ge-0/0/9 flexible-vlan-tagging

set interfaces ge-0/0/9 encapsulation flexible-ethernet-services

set interfaces ge-0/0/9 unit 20 encapsulation vlan-bridge

set interfaces ge-0/0/9 unit 20 vlan-id 20

set interfaces fxp0 unit 0 family inet address 10.5.39.242/24

set interfaces irb unit 20 family inet address 192.168.20.2/24

set interfaces lo0 unit 0 family inet address 2.2.2.2/32

set routing-options static route 10.5.0.0/16 next-hop 10.5.39.254

set routing-options router-id 2.2.2.2

set routing-options autonomous-system 65000

set protocols mpls interface ge-0/0/8.0

set protocols mpls interface ge-0/0/7.0

set protocols bgp group IBGP type internal

set protocols bgp group IBGP local-address 2.2.2.2

set protocols bgp group IBGP family evpn signaling

set protocols bgp group IBGP neighbor 1.1.1.1

set protocols bgp group IBGP neighbor 3.3.3.3

set protocols ospf area 0.0.0.0 interface ge-0/0/8.0

set protocols ospf area 0.0.0.0 interface ge-0/0/7.0

set protocols ospf area 0.0.0.0 interface lo0.0

set protocols ldp interface ge-0/0/7.0

set protocols ldp interface ge-0/0/8.0

set routing-instances BD20 instance-type evpn

set routing-instances BD20 vlan-id 20

set routing-instances BD20 interface ge-0/0/9.20

set routing-instances BD20 routing-interface irb.20

set routing-instances BD20 route-distinguisher 2.2.2.2:10

set routing-instances BD20 vrf-target target:10:10

set routing-instances BD20 protocols evpn

set routing-instances BD20-L3 instance-type vrf

set routing-instances BD20-L3 interface irb.20

set routing-instances BD20-L3 route-distinguisher 2.2.2.2:11

set routing-instances BD20-L3 vrf-target target:10:10

set routing-instances BD20-L3 vrf-table-label

set routing-instances BD20-L3 routing-options static route 22.0.0.0/24 next-hop 192.168.20.22

set routing-instances BD20-L3 protocols evpn ip-prefix-routes advertise direct-nexthop

PE3的配置

root@PE3> show configuration | display set

set version 17.2R1.13

set system host-name PE3

set chassis fpc 0 pic 0 tunnel-services bandwidth 1g

set chassis network-services enhanced-ip

set interfaces ge-0/0/7 unit 0 family inet address 192.168.23.3/24

set interfaces ge-0/0/7 unit 0 family mpls

set interfaces ge-0/0/8 unit 0 family inet address 192.168.13.3/24

set interfaces ge-0/0/8 unit 0 family mpls

set interfaces ge-0/0/9 flexible-vlan-tagging

set interfaces ge-0/0/9 encapsulation flexible-ethernet-services

set interfaces ge-0/0/9 unit 30 encapsulation vlan-bridge

set interfaces ge-0/0/9 unit 30 vlan-id 30

set interfaces fxp0 unit 0 family inet address 10.5.39.243/24

set interfaces irb unit 30 family inet address 192.168.30.3/24

set interfaces lo0 unit 0 family inet address 3.3.3.3/32

set routing-options static route 10.5.0.0/16 next-hop 10.5.39.254

set routing-options router-id 3.3.3.3

set routing-options autonomous-system 65000

set protocols mpls interface ge-0/0/6.0

set protocols mpls interface ge-0/0/7.0

set protocols bgp group IBGP type internal

set protocols bgp group IBGP local-address 3.3.3.3

set protocols bgp group IBGP family evpn signaling

set protocols bgp group IBGP neighbor 2.2.2.2

set protocols bgp group IBGP neighbor 1.1.1.1

set protocols ospf area 0.0.0.0 interface ge-0/0/6.0

set protocols ospf area 0.0.0.0 interface ge-0/0/7.0

set protocols ospf area 0.0.0.0 interface lo0.0

set protocols ldp interface ge-0/0/6.0

set protocols ldp interface ge-0/0/7.0

set routing-instances BD30 instance-type evpn

set routing-instances BD30 vlan-id 30

set routing-instances BD30 interface ge-0/0/9.30

set routing-instances BD30 routing-interface irb.30

set routing-instances BD30 route-distinguisher 3.3.3.3:10

set routing-instances BD30 vrf-target target:10:10

set routing-instances BD30 protocols evpn

set routing-instances BD30-L3 instance-type vrf

set routing-instances BD30-L3 interface irb.30

set routing-instances BD30-L3 route-distinguisher 3.3.3.3:11

set routing-instances BD30-L3 vrf-target target:10:10

set routing-instances BD30-L3 vrf-table-label

set routing-instances BD30-L3 routing-options static route 33.0.0.0/24 next-hop 192.168.30.33

set routing-instances BD30-L3 protocols evpn ip-prefix-routes advertise direct-nexthop

CE1的配置

root@CE1> show configuration | display set

set version 14.1R4.8

set system host-name CE1

set interfaces ge-0/0/9 vlan-tagging

set interfaces ge-0/0/9 unit 10 vlan-id 10

set interfaces ge-0/0/9 unit 10 family inet address 192.168.10.11/24

set interfaces fxp0 unit 0 family inet address 10.5.39.245/24

set interfaces lo0 unit 0 family inet address 11.0.0.1/24

set routing-options static route 10.5.0.0/16 next-hop 10.5.39.254

set routing-options static route 0.0.0.0/0 next-hop 192.168.10.1

CE2的配置

root@CE2> show configuration | display set

set version 14.1R4.8

set system host-name CE2

set interfaces ge-0/0/9 vlan-tagging

set interfaces ge-0/0/9 unit 20 vlan-id 20

set interfaces ge-0/0/9 unit 20 family inet address 192.168.20.22/24

set interfaces fxp0 unit 0 family inet address 10.5.39.246/24

set interfaces lo0 unit 0 family inet address 22.0.0.1/24

set routing-options static route 10.5.0.0/16 next-hop 10.5.39.254

set routing-options static route 0.0.0.0/0 next-hop 192.168.20.2

CE3的配置

root@CE3> show configuration | display set

set version 14.1R4.8

set system host-name CE3

set interfaces ge-0/0/9 vlan-tagging

set interfaces ge-0/0/9 unit 30 vlan-id 30

set interfaces ge-0/0/9 unit 30 family inet address 192.168.30.33/24

set interfaces fxp0 unit 0 family inet address 10.5.39.247/24

set interfaces lo0 unit 0 family inet address 33.0.0.1/24

set routing-options static route 10.5.0.0/16 next-hop 10.5.39.254

set routing-options static route 0.0.0.0/0 next-hop 192.168.30.3

REF

http://bgphelp.com/2017/04/17/evpn-type-5-ip-prefix-route-explained/

http://bgphelp.com/2017/04/23/evpn-type-5-configuration-example-juniper-mx/

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 204,293评论 6 478
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 85,604评论 2 381
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 150,958评论 0 337
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 54,729评论 1 277
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 63,719评论 5 366
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 48,630评论 1 281
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 38,000评论 3 397
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 36,665评论 0 258
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 40,909评论 1 299
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 35,646评论 2 321
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 37,726评论 1 330
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 33,400评论 4 321
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 38,986评论 3 307
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 29,959评论 0 19
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 31,197评论 1 260
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 44,996评论 2 349
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 42,481评论 2 342

推荐阅读更多精彩内容