用VMX实践EVPN-VXLAN

PE1和PE2的fxp0为管理设置

root@PE1> show configuration | display set | except system

set version 17.1R1.8

set chassis network-services enhanced-ip

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

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

set interfaces ge-0/0/0 unit 2100 encapsulation vlan-bridge

set interfaces ge-0/0/0 unit 2100 vlan-id 2100

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

set interfaces fxp0 unit 0 family inet address 10.5.17.106/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.17.254

set routing-options router-id 1.1.1.1

set protocols bgp group internal type internal

set protocols bgp group internal local-address 1.1.1.1

set protocols bgp group internal family inet-vpn unicast

set protocols bgp group internal family evpn signaling

set protocols bgp group internal neighbor 2.2.2.2

set protocols ospf area 0.0.0.0 interface lo0.0 passive

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

set routing-instances EVPN-A vtep-source-interface lo0.0

set routing-instances EVPN-A instance-type virtual-switch

set routing-instances EVPN-A route-distinguisher 1.1.1.1:2000

set routing-instances EVPN-A vrf-target target:65000:2000

set routing-instances EVPN-A protocols evpn encapsulation vxlan

set routing-instances EVPN-A protocols evpn extended-vni-list 5100

set routing-instances EVPN-A bridge-domains BR-2100 vlan-id none

set routing-instances EVPN-A bridge-domains BR-2100 interface ge-0/0/0.2100

set routing-instances EVPN-A bridge-domains BR-2100 vxlan vni 5100

set routing-instances EVPN-A bridge-domains BR-2100 vxlan ingress-node-replication

root@PE2> show configuration | display set | except system

set version 17.1R1.8

set chassis network-services enhanced-ip

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

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

set interfaces ge-0/0/0 unit 2100 encapsulation vlan-bridge

set interfaces ge-0/0/0 unit 2100 vlan-id 2100

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

set interfaces fxp0 unit 0 family inet address 10.5.17.107/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.17.254

set routing-options router-id 2.2.2.2

set protocols bgp group internal type internal

set protocols bgp group internal local-address 2.2.2.2

set protocols bgp group internal family inet-vpn unicast

set protocols bgp group internal family evpn signaling

set protocols bgp group internal neighbor 1.1.1.1

set protocols ospf area 0.0.0.0 interface lo0.0 passive

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

set routing-instances EVPN-B vtep-source-interface lo0.0

set routing-instances EVPN-B instance-type virtual-switch

set routing-instances EVPN-B route-distinguisher 2.2.2.2:2000

set routing-instances EVPN-B vrf-target target:65000:2000

set routing-instances EVPN-B protocols evpn encapsulation vxlan

set routing-instances EVPN-B protocols evpn extended-vni-list 5100

set routing-instances EVPN-B bridge-domains BR-2100 vlan-id none

set routing-instances EVPN-B bridge-domains BR-2100 interface ge-0/0/0.2100

set routing-instances EVPN-B bridge-domains BR-2100 vxlan vni 5100

set routing-instances EVPN-B bridge-domains BR-2100 vxlan ingress-node-replication

验证:

root@PE1> show evpn database extensive

Instance: EVPN-A

VN Identifier: 5100, MAC address:: 00:00:00:01:01:01

Source: ge-0/0/0.2100, Rank: 1, Status: Active

Timestamp: Apr 11 06:47:04 (0x58ec7be8)

State: 

VN Identifier: 5100, MAC address:: 00:00:00:02:02:02

Source: ge-0/0/0.2100, Rank: 1, Status: Active

Timestamp: Apr 11 06:47:13 (0x58ec7bf1)

State: 

VN Identifier: 5100, MAC address:: 00:00:00:03:03:03

Source: 2.2.2.2, Rank: 1, Status: Active

Timestamp: Apr 11 06:47:39 (0x58ec7c0b)

State: 

VN Identifier: 5100, MAC address:: 00:00:00:04:04:04

Source: 2.2.2.2, Rank: 1, Status: Active

Timestamp: Apr 11 06:47:05 (0x58ec7be9)

State: 

root@PE1> show route

inet.0: 8 destinations, 8 routes (8 active, 0 holddown, 0 hidden)

+ = Active Route, - = Last Active, * = Both

1.1.1.1/32         *[Direct/0] 01:06:40

> via lo0.0

2.2.2.2/32         *[OSPF/10] 01:05:16, metric 1

> to 10.0.12.2 via ge-0/0/9.0

10.0.12.0/24       *[Direct/0] 01:06:40

> via ge-0/0/9.0

10.0.12.1/32       *[Local/0] 01:06:40

Local via ge-0/0/9.0

10.5.0.0/16        *[Static/5] 01:20:47

> to 10.5.17.254 via fxp0.0

10.5.17.0/24       *[Direct/0] 01:20:47

> via fxp0.0

10.5.17.106/32     *[Local/0] 01:20:47

Local via fxp0.0

224.0.0.5/32       *[OSPF/10] 01:06:40, metric 1

MultiRecv

inet6.0: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden)

+ = Active Route, - = Last Active, * = Both

ff02::2/128        *[INET6/0] 01:20:48

MultiRecv

bgp.evpn.0: 3 destinations, 3 routes (3 active, 0 holddown, 0 hidden)

+ = Active Route, - = Last Active, * = Both

2:2.2.2.2:2000::5100::00:00:00:03:03:03/304 MAC/IP

*[BGP/170] 00:03:15, localpref 100, from 2.2.2.2

AS path: I, validation-state: unverified

> to 10.0.12.2 via ge-0/0/9.0

2:2.2.2.2:2000::5100::00:00:00:04:04:04/304 MAC/IP

*[BGP/170] 00:10:24, localpref 100, from 2.2.2.2

AS path: I, validation-state: unverified

> to 10.0.12.2 via ge-0/0/9.0

3:2.2.2.2:2000::5100::2.2.2.2/304 IM

*[BGP/170] 00:48:19, localpref 100, from 2.2.2.2

AS path: I, validation-state: unverified

> to 10.0.12.2 via ge-0/0/9.0

EVPN-A.evpn.0: 6 destinations, 6 routes (6 active, 0 holddown, 0 hidden)

+ = Active Route, - = Last Active, * = Both

2:1.1.1.1:2000::5100::00:00:00:01:01:01/304 MAC/IP

*[EVPN/170] 00:10:24

Indirect

2:1.1.1.1:2000::5100::00:00:00:02:02:02/304 MAC/IP

*[EVPN/170] 00:00:06

Indirect

2:2.2.2.2:2000::5100::00:00:00:03:03:03/304 MAC/IP

*[BGP/170] 00:03:15, localpref 100, from 2.2.2.2

AS path: I, validation-state: unverified

> to 10.0.12.2 via ge-0/0/9.0

2:2.2.2.2:2000::5100::00:00:00:04:04:04/304 MAC/IP

*[BGP/170] 00:10:24, localpref 100, from 2.2.2.2

AS path: I, validation-state: unverified

> to 10.0.12.2 via ge-0/0/9.0

3:1.1.1.1:2000::5100::1.1.1.1/304 IM

*[EVPN/170] 00:57:52

Indirect

3:2.2.2.2:2000::5100::2.2.2.2/304 IM

*[BGP/170] 00:48:19, localpref 100, from 2.2.2.2

AS path: I, validation-state: unverified

> to 10.0.12.2 via ge-0/0/9.0

root@PE1> show interfaces vtep.32768

Logical interface vtep.32768 (Index 336) (SNMP ifIndex 530)

Flags: Up SNMP-Traps 0x4000 Encapsulation: ENET2

Ethernet segment value: 00:00:00:00:00:00:00:00:00:00, Mode: single-homed, Multi-homed status: Forwarding

VXLAN Endpoint Type: Source, VXLAN Endpoint Address: 1.1.1.1, L2 Routing Instance: EVPN-A, L3 Routing Instance: default

Input packets : 0

Output packets: 0

root@PE1> show route advertising-protocol bgp 2.2.2.2 table EVPN-A.evpn.0

EVPN-A.evpn.0: 6 destinations, 6 routes (6 active, 0 holddown, 0 hidden)

Prefix                  Nexthop              MED     Lclpref    AS path

2:1.1.1.1:2000::5100::00:00:00:01:01:01/304 MAC/IP

*                         Self                         100        I

2:1.1.1.1:2000::5100::00:00:00:02:02:02/304 MAC/IP

*                         Self                         100        I

3:1.1.1.1:2000::5100::1.1.1.1/304 IM

*                         Self                         100        I

root@PE1> show route advertising-protocol bgp 2.2.2.2 table EVPN-A.evpn.0 match-prefix "3:*" detail

EVPN-A.evpn.0: 6 destinations, 6 routes (6 active, 0 holddown, 0 hidden)

* 3:1.1.1.1:2000::5100::1.1.1.1/304 IM (1 entry, 1 announced)

BGP group internal type Internal

Route Distinguisher: 1.1.1.1:2000

Route Label: 5100

PMSI: Flags 0x0: Label 5100: Type INGRESS-REPLICATION 1.1.1.1

Nexthop: Self

Flags: Nexthop Change

Localpref: 100

AS path: [65000] I

Communities: target:65000:2000 encapsulation:vxlan(0x8)

PMSI: Flags 0x0: Label 318: Type INGRESS-REPLICATION 1.1.1.1

root@PE1> show route receive-protocol bgp 2.2.2.2 table EVPN-A.evpn.0 detail

EVPN-A.evpn.0: 3 destinations, 3 routes (3 active, 0 holddown, 0 hidden)

* 3:2.2.2.2:2000::5100::2.2.2.2/304 IM (1 entry, 1 announced)

Import Accepted

Route Distinguisher: 2.2.2.2:2000

Nexthop: 2.2.2.2

Localpref: 100

AS path: I

Communities: target:65000:2000 encapsulation:vxlan(0x8)

PMSI: Flags 0x0: Label 318: Type INGRESS-REPLICATION 2.2.2.2

root@PE1> show route forwarding-table vpn EVPN-A

Routing table: EVPN-A.evpn-vxlan

VPLS:

Destination        Type RtRef Next hop           Type Index    NhRef Netif

default            perm     0                    dscd      583     1

vtep.32769         intf     0                    comp      592     6

Routing table: EVPN-A.evpn-vxlan

Bridging domain: BR-2100.evpn-vxlan

VPLS:

Enabled protocols: Bridging, ACKed by all peers, EVPN VXLAN,

Destination        Type RtRef Next hop           Type Index    NhRef Netif

00:00:00:01:01:01/48 user     0                  ucst      587     5 ge-0/0/0.2100

00:00:00:02:02:02/48 user     0                  ucst      587     5 ge-0/0/0.2100

00:00:00:03:03:03/48 user     0                  comp      592     6

00:00:00:04:04:04/48 user     0                  comp      592     6

0x30003/51         user     0                    comp      594     2

ge-0/0/0.2100      intf     0                    ucst      587     5 ge-0/0/0.2100

0x30002/51         user     0                    comp      591     2

0x30001/51         user     0                    comp      590     2

root@PE1> show route forwarding-table extensive destination 00:00:00:03:03:03/48

Routing table: EVPN-A.evpn-vxlan [Index 8]

Bridging domain: BR-2100.evpn-vxlan [Index 2]

VPLS:

Enabled protocols: Bridging, ACKed by all peers, EVPN VXLAN,

Destination:  00:00:00:03:03:03/48

Learn VLAN: 0                        Route type: user

Route reference: 0                   Route interface-index: 338

Multicast RPF nh index: 0

P2mpidx: 0

IFL generation: 129                  Epoch: 0

Sequence Number: 0                   Learn Mask: 0x4000000000000000000000000000000000000000

L2 Flags: control_dyn

Flags: sent to PFE

Nexthop:

Next-hop type: composite             Index: 592      Reference: 6



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

推荐阅读更多精彩内容