NOKIA VSR的MPLS L3VPN


------------------------------------------PE1上的操作------------------------------------------

接口预配置

configure card 1 card-type "iom3-xp-b"

configure card 1 mda 1 mda-type "m5-1gb-sfp-b"

configure port 1/1/[1..5] no shutdown

admin save

接口配置

configure system name pe1

configure router interface "to-pe2" address 192.168.12.1/24

configure router interface "to-pe2"  port 1/1/1

configure router interface "to-pe3" address 192.168.13.1/24

configure router interface "to-pe3"  port 1/1/3

configure router interface lo0 address 10.10.10.10/32

configure router interface "lo0" loopback

configure router interface "system" address 1.1.1.1/32

ospf配置

configure router    router-id 10.10.10.10

configure  router  ospf traffic-engineering

configure router ospf router-id 10.10.10.10

configure router ospf area 0.0.0.0 interface "lo0" passive

configure router ospf area 0.0.0.0 interface system  passive

configure router ospf area 0.0.0.0 interface "to-pe2"  interface-type point-to-point

configure router ospf area 0.0.0.0 interface "to-pe3"  interface-type point-to-point

configure router ospf area 0.0.0.0 interface "to-pe2"  authentication-type message-digest

configure router ospf area 0.0.0.0 interface "to-pe2"  message-digest-key 1 md5 "lab123"

configure router ospf area 0.0.0.0 interface "to-pe3"  authentication-type message-digest

configure router ospf area 0.0.0.0 interface "to-pe3"  message-digest-key 1 md5 "lab123"

admin save

LDP配置

configure  router ldp interface-parameters interface "to-pe2" dual-stack ipv4 no sh

configure  router ldp interface-parameters interface "to-pe2" no sh

configure  router ldp interface-parameters interface "to-pe3" dual-stack ipv4 no sh

configure  router ldp interface-parameters interface "to-pe3" no sh

configure  router ldp  targeted-session no disable-targeted-session

configure  router ldp  no shutdown

admin save

BGP配置

configure router  autonomous-system 65000

configure router bgp group "PE-PE" family ipv4 vpn-ipv4

configure router bgp group "PE-PE" type internal

configure router bgp group "PE-PE"  neighbor 2.2.2.2 type internal

configure router bgp group "PE-PE"  neighbor 3.3.3.3 type internal

admin save

创建VRF

configure port 1/1/5 shutdown

configure port 1/1/5 ethernet mode access

configure port 1/1/5 no shutdown

configure service customer 1234 create  desc "TO-CE-VRF"

configure service vprn 1234 customer 1234 create route-distinguisher 10.10.10.10:1

configure service vprn 1234 customer 1234 create auto-bind-tunnel resolution-filter ldp

configure service vprn 1234 customer 1234 create auto-bind-tunnel resolution filter

configure service vprn 1234 customer 1234 create vrf-target target:65000:1

configure service vprn 1234 customer 1234 create  interface "to-ce1" create  address 192.168.101.254/24 

configure service vprn 1234 customer 1234 create  interface "to-ce1" create  sap 1/1/5 create description "to-ce1"

configure service vprn 1234 customer 1234 create  no shutdown

configure service vprn 1234 customer 1234  autonomous-system 65000

configure service vprn 1234 customer 1234 bgp group TO-CE type external

configure service vprn 1234 customer 1234 bgp group TO-CE neighbor 192.168.101.1 peer-as 65001

configure service vprn 1234 customer 1234 bgp group TO-CE no shutdown

configure service vprn 1234 customer 1234 bgp  no shutdown

admin save

------------------------------------------PE2上的操作------------------------------------------

接口预配置

configure card 1 card-type "iom3-xp-b"

configure card 1 mda 1 mda-type "m5-1gb-sfp-b"

configure port 1/1/[1..5] no shutdown

admin save

接口配置

configure system name pe2

configure router interface "to-pe1" address 192.168.12.2/24

configure router interface "to-pe1"  port 1/1/1

configure router interface "to-pe3" address 192.168.23.2/24

configure router interface "to-pe3"  port 1/1/2

configure router interface lo0 address 20.20.20.20/32

configure router interface "lo0" loopback

configure router interface "system" address 2.2.2.2/32

ospf配置

configure router    router-id 20.20.20.20

configure  router  ospf traffic-engineering

configure router ospf router-id 20.20.20.20

configure router ospf area 0.0.0.0 interface "lo0" passive

configure router ospf area 0.0.0.0 interface system  passive

configure router ospf area 0.0.0.0 interface "to-pe1"  interface-type point-to-point

configure router ospf area 0.0.0.0 interface "to-pe3"  interface-type point-to-point

configure router ospf area 0.0.0.0 interface "to-pe1"  authentication-type message-digest

configure router ospf area 0.0.0.0 interface "to-pe1"  message-digest-key 1 md5 "lab123"

configure router ospf area 0.0.0.0 interface "to-pe3"  authentication-type message-digest

configure router ospf area 0.0.0.0 interface "to-pe3"  message-digest-key 1 md5 "lab123"

admin save

LDP配置

configure  router ldp interface-parameters interface "to-pe1" dual-stack ipv4 no sh

configure  router ldp interface-parameters interface "to-pe1" no sh

configure  router ldp interface-parameters interface "to-pe3" dual-stack ipv4 no sh

configure  router ldp interface-parameters interface "to-pe3" no sh

configure  router ldp  targeted-session no disable-targeted-session

configure  router ldp  no shutdown

admin save

BGP配置

configure router  autonomous-system 65000

configure router bgp group "PE-PE" family ipv4 vpn-ipv4

configure router bgp group "PE-PE" type internal

configure router bgp group "PE-PE"  neighbor 1.1.1.1 type internal

configure router bgp group "PE-PE"  neighbor 3.3.3.3 type internal

admin save

创建VRF

configure port 1/1/5 shutdown

configure port 1/1/5 ethernet mode access

configure port 1/1/5 no shutdown

configure service customer 1234 create  desc "TO-CE-VRF"

configure service vprn 1234 customer 1234 create route-distinguisher 20.20.20.20:1

configure service vprn 1234 customer 1234 create auto-bind-tunnel resolution-filter ldp

configure service vprn 1234 customer 1234 create auto-bind-tunnel resolution filter

configure service vprn 1234 customer 1234 create vrf-target target:65000:1

configure service vprn 1234 customer 1234 create  interface "to-ce2" create  address 192.168.102.254/24 

configure service vprn 1234 customer 1234 create  interface "to-ce2" create  sap 1/1/5 create description "to-ce2"

configure service vprn 1234 customer 1234 create  no shutdown

configure service vprn 1234 customer 1234  autonomous-system 65000

configure service vprn 1234 customer 1234 bgp group TO-CE type external

configure service vprn 1234 customer 1234 bgp group TO-CE neighbor 192.168.102.1 peer-as 65002

configure service vprn 1234 customer 1234 bgp group TO-CE no shutdown

configure service vprn 1234 customer 1234 bgp  no shutdown

admin save

------------------------------------------PE3上的操作------------------------------------------

接口预配置

configure card 1 card-type "iom3-xp-b"

configure card 1 mda 1 mda-type "m5-1gb-sfp-b"

configure port 1/1/[1..5] no shutdown

admin save

接口配置

configure system name pe3

configure router interface "to-pe1" address 192.168.13.3/24

configure router interface "to-pe1"  port 1/1/3

configure router interface "to-pe2" address 192.168.23.3/24

configure router interface "to-pe2"  port 1/1/2

configure router interface lo0 address 30.30.30.30/32

configure router interface "lo0" loopback

configure router interface "system" address 3.3.3.3/32

ospf配置

configure router    router-id 30.30.30.30

configure  router  ospf traffic-engineering

configure router ospf router-id 30.30.30.30

configure router ospf area 0.0.0.0 interface "lo0" passive

configure router ospf area 0.0.0.0 interface system  passive

configure router ospf area 0.0.0.0 interface "to-pe1"  interface-type point-to-point

configure router ospf area 0.0.0.0 interface "to-pe2"  interface-type point-to-point

configure router ospf area 0.0.0.0 interface "to-pe1"  authentication-type message-digest

configure router ospf area 0.0.0.0 interface "to-pe1"  message-digest-key 1 md5 "lab123"

configure router ospf area 0.0.0.0 interface "to-pe2"  authentication-type message-digest

configure router ospf area 0.0.0.0 interface "to-pe2"  message-digest-key 1 md5 "lab123"

admin save

LDP配置

configure  router ldp interface-parameters interface "to-pe1" dual-stack ipv4 no sh

configure  router ldp interface-parameters interface "to-pe1" no sh

configure  router ldp interface-parameters interface "to-pe2" dual-stack ipv4 no sh

configure  router ldp interface-parameters interface "to-pe2" no sh

configure  router ldp  targeted-session no disable-targeted-session

configure  router ldp  no shutdown

admin save

BGP配置

configure router  autonomous-system 65000

configure router bgp group "PE-PE" family ipv4 vpn-ipv4

configure router bgp group "PE-PE" type internal

configure router bgp group "PE-PE"  neighbor 1.1.1.1 type internal

configure router bgp group "PE-PE"  neighbor 2.2.2.2 type internal

admin save

创建VRF

configure port 1/1/5 shutdown

configure port 1/1/5 ethernet mode access

configure port 1/1/5 no shutdown

configure service customer 1234 create  desc "TO-CE-VRF"

configure service vprn 1234 customer 1234 create route-distinguisher 30.30.30.30:1

configure service vprn 1234 customer 1234 create auto-bind-tunnel resolution-filter ldp

configure service vprn 1234 customer 1234 create auto-bind-tunnel resolution filter

configure service vprn 1234 customer 1234 create vrf-target target:65000:1

configure service vprn 1234 customer 1234 create  interface "to-ce3" create  address 192.168.103.254/24 

configure service vprn 1234 customer 1234 create  interface "to-ce3" create  sap 1/1/5 create description "to-ce3"

configure service vprn 1234 customer 1234 create  no shutdown

configure service vprn 1234 customer 1234  autonomous-system 65000

configure service vprn 1234 customer 1234 bgp group TO-CE type external

configure service vprn 1234 customer 1234 bgp group TO-CE neighbor 192.168.103.1 peer-as 65003

configure service vprn 1234 customer 1234 bgp group TO-CE no shutdown

configure service vprn 1234 customer 1234 bgp  no shutdown

admin save

----------------------------------VMX-CE1的配置-----------------------------------------------

set interfaces ge-0/0/0 unit 0 family inet address 192.168.101.1/24

set interfaces lo0 unit 0 family inet address 10.1.255.1/32

set routing-options router-id 10.1.255.1

set routing-options autonomous-system 65001

set protocols bgp group TO-PE type external

set protocols bgp group TO-PE export export-lo0

set protocols bgp group TO-PE neighbor 192.168.101.254 peer-as 65000

set policy-options policy-statement export-lo0 term 1 from interface lo0.0

set policy-options policy-statement export-lo0 term 1 then accept

set policy-options policy-statement export-lo0 term last then reject

----------------------------------VMX-CE2的配置-----------------------------------------------

set interfaces ge-0/0/0 unit 0 family inet address 192.168.102.1/24

set interfaces lo0 unit 0 family inet address 10.1.255.2/32

set routing-options router-id 10.1.255.2

set routing-options autonomous-system 65002

set protocols bgp group TO-PE type external

set protocols bgp group TO-PE export export-lo0

set protocols bgp group TO-PE neighbor 192.168.102.254 peer-as 65000

set policy-options policy-statement export-lo0 term 1 from interface lo0.0

set policy-options policy-statement export-lo0 term 1 then accept

set policy-options policy-statement export-lo0 term last then reject

----------------------------------VMX-CE3的配置-----------------------------------------------

set interfaces ge-0/0/0 unit 0 family inet address 192.168.103.1/24

set interfaces lo0 unit 0 family inet address 10.1.255.3/32

set routing-options router-id 10.1.255.3

set routing-options autonomous-system 65003

set protocols bgp group TO-PE type external

set protocols bgp group TO-PE export export-lo0

set protocols bgp group TO-PE neighbor 192.168.103.254 peer-as 65000

set policy-options policy-statement export-lo0 term 1 from interface lo0.0

set policy-options policy-statement export-lo0 term 1 then accept

set policy-options policy-statement export-lo0 term last then reject

在PE1,PE2,PE3上导出vpnv4-into-ce

configure router policy-options

          begin

          policy-statement "export-vpnv4-into-ce"

                entry 10

                    from

                        protocol bgp-vpn

                    exit

                    action accept

                    exit

                exit

            exit

          commit

          exit

configure service vprn 1234 bgp export "export-vpnv4-into-ce"


在PE上验证

show service id 1234 base

A:pe3# show service id 1234 base

===============================================================================

Service Basic Information

===============================================================================

Service Id        : 1234                Vpn Id            : 0

Service Type      : VPRN

Name              : (Not Specified)

Description      : (Not Specified)

Customer Id      : 1234                Creation Origin  : manual

Last Status Change: 04/07/2021 13:53:48

Last Mgmt Change  : 04/07/2021 13:53:48

Admin State      : Up                  Oper State        : Up

Route Dist.      : 30.30.30.30:1      VPRN Type        : regular

Oper Route Dist  : 30.30.30.30:1

Oper RD Type      : configured

AS Number        : 65000              Router Id        : 30.30.30.30

ECMP              : Enabled            ECMP Max Routes  : 1

Auto Bind Tunnel

Resolution        : filter

Filter Protocol  : ldp

Max IPv6 Routes  : No Limit

Ignore NH Metric  : Disabled

Hash Label        : Disabled

Vrf Target        : target:65000:1

Vrf Import        : None

Vrf Export        : None

MVPN Vrf Target  : None

MVPN Vrf Import  : None

MVPN Vrf Export  : None

Car. Sup C-VPN    : Disabled

Label mode        : vrf

BGP VPN Backup    : Disabled

BGP Export Inacti*: Disabled

SAP Count        : 1                  SDP Bind Count    : 0

-------------------------------------------------------------------------------

Service Access & Destination Points

-------------------------------------------------------------------------------

Identifier                              Type        AdmMTU  OprMTU  Adm  Opr

-------------------------------------------------------------------------------

sap:1/1/5                                null        1514    1514    Up  Up

===============================================================================

* indicates that the corresponding row element may have been truncated.

show router bgp routes vpn-ipv4

A:pe3#  show router bgp routes vpn-ipv4

===============================================================================

BGP Router ID:30.30.30.30      AS:65000      Local AS:65000

===============================================================================

Legend -

Status codes  : u - used, s - suppressed, h - history, d - decayed, * - valid

                l - leaked

Origin codes  : i - IGP, e - EGP, ? - incomplete, > - best, b - backup

===============================================================================

BGP VPN-IPv4 Routes

===============================================================================

Flag  Network                                            LocalPref  MED

      Nexthop (Router)                                  Path-Id    Label

      As-Path

-------------------------------------------------------------------------------

u*>i  10.10.10.10:1:10.1.255.1/32                        100        None

      1.1.1.1                                            None        131070

      65001

u*>i  10.10.10.10:1:192.168.101.0/24                    100        None

      1.1.1.1                                            None        131070

      No As-Path

u*>i  20.20.20.20:1:10.1.255.2/32                        100        None

      2.2.2.2                                            None        131070

      65002

u*>i  20.20.20.20:1:192.168.102.0/24                    100        None

      2.2.2.2                                            None        131070

      No As-Path

-------------------------------------------------------------------------------

Routes : 4

===============================================================================

show router 1234 route-table

A:pe3# show router 1234 route-table

===============================================================================

Route Table (Service: 1234)

===============================================================================

Dest Prefix[Flags]                            Type    Proto    Age        Pref

      Next Hop[Interface Name]                                    Metric

-------------------------------------------------------------------------------

10.1.255.1/32                                Remote  BGP VPN  00h27m35s  170

      1.1.1.1 (tunneled)                                          0

10.1.255.2/32                                Remote  BGP VPN  00h27m25s  170

      2.2.2.2 (tunneled)                                          0

10.1.255.3/32                                Remote  BGP      00h28m18s  170

      192.168.103.1                                                0

192.168.101.0/24                              Remote  BGP VPN  00h27m35s  170

      1.1.1.1 (tunneled)                                          0

192.168.102.0/24                              Remote  BGP VPN  00h27m25s  170

      2.2.2.2 (tunneled)                                          0

192.168.103.0/24                              Local  Local    00h28m25s  0

      to-ce3                                                      0

-------------------------------------------------------------------------------

No. of Routes: 6

Flags: n = Number of times nexthop is repeated

      B = BGP backup route available

      L = LFA nexthop available

      S = Sticky ECMP requested

===============================================================================

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

推荐阅读更多精彩内容