71-GRE和VPN結合使用典型配置舉例
本章節下載: 71-GRE和VPN結合使用典型配置舉例 (209.10 KB)
Copyright © 2018bobty下载软件 版權所有,保留一切權利。 非經本公司書麵許可,任何單位和個人不得擅自摘抄、複製本文檔內容的部分或全部, 並不得以任何形式傳播。本文檔中的信息可能變動,恕不另行通知。 |
|
目 錄
在MPLS VPN中,CE(Customer Edge,用戶網絡邊緣)和PE(Provider Edge,服務提供商網絡邊緣)之間往往需要通過直連(即同在一個網絡中)的方式進行連接,但是在實際組網中,有可能出現CE和PE之間距離相距甚遠的情況,無法做到兩者之間的直連。為了讓CE能夠與PE直連,可以在兩者之間配置GRE隧道,建立一條虛擬的點對點連接,這樣,就可以看成是CE和PE直連了。
本文檔中的配置均是在實驗室環境下進行的配置和驗證,配置前設備的所有參數均采用出廠時的缺省配置。如果您已經對設備進行了配置,為了保證配置效果,請確認現有配置和以下舉例中的配置不衝突。
本文檔假設您已了解MPLS L3VPN和GRE特性。
如圖1所示,Customer A和Customer B所在的分支機構屬於VPN1,現要求通過MPLS L3VPN技術,實現用戶數據可以通過VPN方式在各站點間安全傳輸,其中:
· PE1和PE2屬於MPLS骨幹網絡的邊界設備;
· CE1和CE2屬於VPN1的用戶網絡邊緣設備;
· CE1和PE1之間存在一個其他網絡的VPN2,且CE1和PE1之間路由可達。
圖1 GRE和VPN結合使用典型配置組網圖
· 為了使報文能夠通過MPLS網絡傳輸,需要在MPLS骨幹網絡中配置IGP路由協議,並利用LDP分發公網標簽,作為VPN報文的外層標簽。
· 在PE設備之間配置MP-BGP協議並建立對等體,用於傳輸VPN的私網路由信息並分發內層標簽,即私網標簽。
· 在CE1和PE1之間建立GRE隧道,在邏輯上使CE1和PE1直連。
本舉例是在S6800-CMW710-R2609版本上進行配置和驗證的。
由於在配置接口與VPN實例綁定後,接口上的IP地址等配置會清除,因此先配置接口與VPN實例的綁定關係,再進行其他配置。
(1) 配置PE 1
# 配置骨幹網接口以及環回口地址。
<PE1> system-view
[PE1] interface loopback 0
[PE1-LoopBack0] ip address 1.1.1.9 32
[PE1-LoopBack0] quit
[PE1] vlan 2
[PE1-vlan2] port ten-gigabitethernet 1/0/2
[PE1-vlan2] quit
[PE1] interface vlan-interface 2
[PE1-Vlan-interface2] ip address 10.1.1.1 24
[PE1-Vlan-interface2] quit
# 配置OSPF協議發布骨幹網側路由。
[PE1] ospf
[PE1-ospf-1] area 0
[PE1-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255
[PE1-ospf-1-area-0.0.0.0] network 1.1.1.9 0.0.0.0
[PE1-ospf-1-area-0.0.0.0] quit
[PE1-ospf-1] quit
(2) 配置P
# 配置骨幹網接口以及環回口地址。
<P> system-view
[P] interface loopback 0
[P-LoopBack0] ip address 2.2.2.9 32
[P-LoopBack0] quit
[P] vlan 2
[P-vlan2] port ten-gigabitethernet 1/0/2
[P-vlan2] quit
[P] vlan 5
[P-vlan5] port ten-gigabitethernet 1/0/3
[P-vlan5] quit
[P] interface vlan-interface 2
[P-Vlan-interface2] ip address 10.1.1.2 24
[P-Vlan-interface2] quit
[P] interface vlan-interface 5
[P-Vlan-interface5] ip address 10.1.4.1 24
[P-Vlan-interface5] quit
# 配置OSPF協議發布骨幹網側路由。
[P] ospf
[P-ospf-1] area 0
[P-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255
[P-ospf-1-area-0.0.0.0] network 10.1.4.0 0.0.0.255
[P-ospf-1-area-0.0.0.0] network 2.2.2.9 0.0.0.0
[P-ospf-1-area-0.0.0.0] quit
[P-ospf-1] quit
(3) 配置PE 2
# 配置骨幹網接口以及環回口地址。
<PE2> system-view
[PE2] interface loopback 0
[PE2-LoopBack0] ip address 3.3.3.9 32
[PE2-LoopBack0] quit
[PE2] vlan 5
[PE2-vlan5] port ten-gigabitethernet 1/0/1
[PE2-vlan5] quit
[PE2] interface vlan-interface 5
[PE2-Vlan-interface5] ip address 10.1.4.2 24
[PE2-Vlan-interface5] quit
# 配置OSPF協議發布骨幹網側路由。
[PE2] ospf
[PE2-ospf-1] area 0
[PE2-ospf-1-area-0.0.0.0] network 10.1.4.0 0.0.0.255
[PE2-ospf-1-area-0.0.0.0] network 3.3.3.9 0.0.0.0
[PE2-ospf-1-area-0.0.0.0] quit
[PE2-ospf-1] quit
配置完成後,PE 1、P、PE 2之間建立OSPF鄰居,執行display ospf peer命令可以看到鄰居達到Full狀態。執行display ip routing-table命令可以看到PE之間學習到對方的Loopback路由。
以PE 1為例:
[PE1] display ospf peer verbose
OSPF Process 1 with Router ID 1.1.1.9
Neighbors
Area 0.0.0.0 interface 10.1.1.1(Vlan-interface2)'s neighbors
Router ID: 2.2.2.9 Address: 10.1.1.2 GR State: Normal
State: Full Mode: Nbr is Master Priority: 1
DR: 10.1.1.2 BDR: 10.1.1.1 MTU: 0
Options is 0x02 (-|-|-|-|-|-|E|-)
Dead timer due in 38 sec
Neighbor is up for 17:30:25
Authentication Sequence: [ 0 ]
Neighbor state change count: 6
BFD status: Disabled
[PE1] display ip routing-table protocol ospf
Summary Count : 5
OSPF Routing table Status : <Active>
Summary Count : 3
Destination/Mask Proto Pre Cost NextHop Interface
2.2.2.9/32 OSPF 10 1 10.1.1.2 Vlan2
3.3.3.9/32 OSPF 10 2 10.1.1.2 Vlan2
10.1.4.0/24 OSPF 10 2 10.1.1.2 Vlan2
OSPF Routing table Status : <Inactive>
Summary Count : 2
Destination/Mask Proto Pre Cost NextHop Interface
1.1.1.9/32 OSPF 10 0 1.1.1.9 Loop0
10.1.1.0/24 OSPF 10 1 10.1.1.1 Vlan2
(1) 配置PE 1
[PE1] mpls lsr-id 1.1.1.9
[PE1] mpls ldp
[PE1-ldp] quit
[PE1] interface vlan-interface 2
[PE1-Vlan-interface2] mpls enable
[PE1-Vlan-interface2] mpls ldp enable
[PE1-Vlan-interface2] quit
(2) 配置P
[P] mpls lsr-id 2.2.2.9
[P] mpls ldp
[P-ldp] quit
[P] interface vlan-interface 2
[P-Vlan-interface2] mpls enable
[P-Vlan-interface2] mpls ldp enable
[P-Vlan-interface2] quit
[P] interface vlan-interface 5
[P-Vlan-interface5] mpls enable
[P-Vlan-interface5] mpls ldp enable
[P-Vlan-interface5] quit
(3) 配置PE 2
[PE2] mpls lsr-id 3.3.3.9
[PE2] mpls ldp
[PE2-ldp] quit
[PE2] interface vlan-interface 5
[PE2-Vlan-interface5] mpls enable
[PE2-Vlan-interface5] mpls ldp enable
[PE2-Vlan-interface5] quit
上述配置完成後,PE 1、P、PE 2之間應能建立LDP會話,執行display mpls ldp peer命令可以看到LDP會話的狀態為Operational。執行display mpls ldp lsp命令,可以看到LDP LSP的建立情況。
以PE 1為例:
[PE1] display mpls ldp peer
Total number of peers: 1
Peer LDP ID State Role GR MD5 KA Sent/Rcvd
2.2.2.9:0 Operational Passive Off Off 5/5
[PE1] display mpls ldp lsp
Status Flags: * - stale, L - liberal, B - backup
FECs: 4 Ingress: 1 Transit: 1 Egress: 3
FEC In/Out Label Nexthop OutInterface
1.1.1.9/32 3/-
-/1151(L)
2.2.2.9/32 -/3 10.1.1.2 Vlan2
1151/3 10.1.1.2 Vlan2
3.3.3.9/32 -/1150 10.1.1.2 Vlan2
1150/1150 10.1.1.2 Vlan2
(1) 配置PE1
# 在PE1上創建VPN實例,名為“VPN1”。
[PE1] ip vpn-instance vpn1
# 為該實例配置RD為100:1。
[PE1-vpn-instance-vpn1] route-distinguisher 100:1
# 為該VPN實例配置VPN Target屬性。
[PE1-vpn-instance-vpn1] vpn-target 100:1 import-extcommunity
[PE1-vpn-instance-vpn1] vpn-target 100:1 export-extcommunity
[PE1-vpn-instance-vpn1] quit
# 配置Vlan-interface100與VPN實例進行綁定。
[PE1] vlan 100
[PE1-vlan100] port ten-gigabitethernet 1/0/1
[PE1-vlan100] quit
[PE1] interface vlan-interface 100
[PE1-Vlan-interface100] ip binding vpn-instance vpn1
[PE1-Vlan-interface100] ip address 200.1.1.2 24
[PE1-Vlan-interface100] quit
(2) 配置CE1
# 在CE1上創建VPN實例,名為“VPN1”。
[CE1] ip vpn-instance vpn1
# 為該實例配置RD為100:1。
[CE1-vpn-instance-vpn1] route-distinguisher 100:1
# 為該VPN實例配置VPN Target屬性。
[CE1-vpn-instance-vpn1] vpn-target 100:1 import-extcommunity
[CE1-vpn-instance-vpn1] vpn-target 100:1 export-extcommunity
[CE1-vpn-instance-vpn1] quit
# 配置Vlan-interface101與VPN實例進行綁定。
[CE1] vlan 101
[CE1-vlan101] port ten-gigabitethernet 1/0/1
[CE1-vlan101] quit
[CE1] interface vlan-interface 101
[CE1-Vlan-interface101] ip binding vpn-instance vpn1
[CE1-Vlan-interface101] ip address 100.1.1.1 24
[CE1-Vlan-interface101] quit
(3) 配置CE1和PE1之間的GRE隧道
· 配置CE1
# 創建業務環回組1,並配置服務類型為Tunnel。
[CE1] service-loopback group 1 type tunnel
# 將接口Ten-gigabitethernet1/0/3加入業務環回組1。
[CE1] interface ten-gigabitethernet 1/0/3
[CE1-Ten-gigabitethernet1/0/3] port service-loopback group 1
[CE1-Ten-gigabitethernet1/0/3] quit
# 創建Tunnel0接口,並指定隧道模式為GRE over IPv4隧道。
[CE1] interface tunnel 0 mode gre
# 指定隧道源端地址所屬的VPN實例
[CE1-Tunnel0] ip binding vpn-instance vpn1
# 配置Tunnel0接口的IP地址。
[CE1-Tunnel0] ip address 20.1.1.1 255.255.255.0
# 配置Tunnel0接口的源端地址(CE1的Vlan-interface101的IP地址)。
[CE1-Tunnel0] source vlan-interface 101
# 配置Tunnel0接口的目的端地址(PE1的Vlan-interface100的IP地址)。
[CE1-Tunnel0] destination 200.1.1.2
# 配置隧道目的端地址所屬的VPN實例
[CE1-Tunnel0] tunnel vpn-instance vpn1
[CE1-Tunnel0] quit
# 配置Customer A經過Tunnel0接口到Customer B的靜態路由。
[CE1] ip route-static vpn-instance vpn1 172.2.0.0 24 tunnel 0
· 配置PE1
# 創建業務環回組1,並配置服務類型為Tunnel。
[PE1] service-loopback group 1 type tunnel
# 將接口Ten-gigabitethernet1/0/3加入業務環回組1。
[PE1] interface ten-gigabitethernet 1/0/3
[PE1-Ten-gigabitethernet1/0/3] port service-loopback group 1
[PE1-Ten-gigabitethernet1/0/3] quit
# 創建Tunnel0接口,並指定隧道模式為GRE over IPv4隧道。
[PE1] interface tunnel 0 mode gre
# 指定隧道源端地址所屬的VPN實例
[PE1-Tunnel0] ip binding vpn-instance vpn1
# 配置Tunnel0接口的IP地址。
[PE1-Tunnel0] ip address 20.1.1.2 255.255.255.0
# 配置Tunnel0接口的源端地址(PE1的Vlan-interface100的IP地址)。
[PE1-Tunnel0] source vlan-interface 100
# 配置Tunnel0接口的目的端地址(CE1的Vlan-interface101的IP地址)。
[PE1-Tunnel0] destination 100.1.1.1
# 配置隧道目的端地址所屬的VPN實例
[PE1-Tunnel0] tunnel vpn-instance vpn1
[PE1-Tunnel0] quit
# 配置Customer B經過Tunnel0接口到Customer A的靜態路由。
[PE1] ip route-static vpn-instance vpn1 172.1.0.0 24 Tunnel 0
(1) 配置PE2
# 在PE2上創建VPN實例,名為“vpn1”。
[PE2] ip vpn-instance vpn1
# 為該VPN實例配置RD。
[PE2-vpn-instance-vpn1] route-distinguisher 100:1
# 為該VPN實例配置VPN Target,需要注意的是接收和發送的屬性要分別與PE 1上配置的發送和接收的屬性保持一致。
[PE2-vpn-instance-vpn1] vpn-target 100:1 import-extcommunity
[PE2-vpn-instance-vpn1] vpn-target 100:1 export-extcommunity
[PE2-vpn-instance-vpn1] quit
# 將Vlan-interface101與vpn1實例進行綁定。
[PE2] vlan 101
[PE2-vlan101] port ten-gigabitethernet 1/0/2
[PE2-vlan101] quit
[PE2] interface vlan-interface 101
[PE2-Vlan-interface101] ip binding vpn-instance vpn1
[PE2-Vlan-interface101] ip address 101.1.1.1 24
[PE2-Vlan-interface101] quit
(2) 配置CE2
按圖1配置CE2的接口IP地址,配置過程略。
配置完成後,在PE2設備上執行display ip vpn-instance命令可以看到VPN實例的配置情況。PE2能ping通自己接入的CE2。
[PE2] display ip vpn-instance
Total VPN-Instances configured : 1
VPN-Instance Name RD Create time
vpn1 100:1 2016/06/22 13:20:08
[PE2] ping -vpn-instance vpn1 101.1.1.2
Ping 10.1.4.2 (101.1.1.2): 56 data bytes, press CTRL_C to break
56 bytes from 101.1.1.2: icmp_seq=0 ttl=255 time=1.000 ms
56 bytes from 101.1.1.2: icmp_seq=1 ttl=255 time=2.000 ms
56 bytes from 101.1.1.2: icmp_seq=2 ttl=255 time=0.000 ms
56 bytes from 101.1.1.2: icmp_seq=3 ttl=255 time=1.000 ms
56 bytes from 101.1.1.2: icmp_seq=4 ttl=255 time=0.000 ms
--- Ping statistics for 10.1.1.1 ---
5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss
round-trip min/avg/max/std-dev = 0.000/0.800/2.000/0.748 ms
(1) 配置PE1
# 在PE1上創建BGP進程100。
[PE1] bgp 100
# 將CE1指定為對等體,並將PE 1的直連路由引入到BGP-VPN實例路由表中。
[PE1-bgp-default] ip vpn-instance vpn1
[PE1-bgp-default-vpn1] peer 20.1.1.1 as-number 65410
[PE1-bgp-default-vpn1] address-family ipv4 unicast
[PE1-bgp-default-ipv4-vpn1] peer 20.1.1.1 enable
[PE1-bgp-default-ipv4-vpn1] import-route direct
[PE1-bgp-default-ipv4-vpn1] quit
[PE1-bgp-default-vpn1] quit
(2) 配置PE 2
# 在PE 2上創建BGP進程100。
[PE2] bgp 100
# 將CE 2指定為對等體,並將PE 2的直連路由引入到BGP-VPN實例路由表中。
[PE2-bgp-default] ip vpn-instance vpn1
[PE2-bgp-default-vpn1] peer 101.1.1.2 as-number 65410
[PE2-bgp-default-vpn1] address-family ipv4 unicast
[PE2-bgp-default-ipv4-vpn1] peer 101.1.1.2 enable
[PE2-bgp-default-ipv4-vpn1] import-route direct
[PE2-bgp-default-ipv4-vpn1] quit
[PE2-bgp-default-vpn1] quit
(3) 配置CE1
# CE1上創建BGP進程65410,並指定PE1為對等體,對等體自治係統號為100。
<CE1> system-view
[CE1] bgp 65410
[CE1-bgp-default] peer 20.1.1.2 as-number 100
# 使能CE1與對等體20.1.1.2交換IPv4單播路由信息的能力。
[CE1-bgp-default] address-family ipv4 unicast
[CE1-bgp-default-ipv4] peer 20.1.1.2 enable
# 將CE 1上連接站點的直連接口路由引入EBGP。
[CE1-bgp-default-ipv4] import-route direct
[CE1-bgp-default-ipv4] quit
[CE1-bgp-default] quit
(4) 配置CE2
# CE2上創建BGP進程65410,並指定PE2為對等體,對等體自治係統號為100。
<CE2> system-view
[CE2] bgp 65410
[CE2-bgp-default] peer 101.1.1.1 as-number 100
# 使能CE2與對等體101.1.1.1交換IPv4單播路由信息的能力。
[CE2-bgp-default] address-family ipv4 unicast
[CE2-bgp-default-ipv4] peer 101.1.1.1 enable
# 將CE2上連接站點的直連接口路由引入EBGP。
[CE2-bgp-default-ipv4] import-route direct
[CE2-bgp-default-ipv4] quit
[CE2-bgp-default] quit
配置完成後,在PE2設備上執行display bgp peer ipv4 vpn-instance命令,可以看到PE2與CE2之間的BGP對等體關係已建立,並達到Established狀態。
[PE2] display bgp peer ipv4 vpn-instance vpn1
BGP local router ID: 3.3.3.9
Local AS number: 100
Total number of peers: 1 Peers in established state: 1
Peer AS MsgRcvd MsgSent OutQ PrefRcv Up/Down State
101.1.1.2 65430 4 4 0 2 13:35:25 Established
(1) 配置PE 1
# 在PE 1上配置PE 2為BGP對等體,並指定連接時使用的接口為Loopback0接口。
[PE1] bgp 100
[PE1-bgp-default] peer 3.3.3.9 as-number 100
[PE1-bgp-default] peer 3.3.3.9 connect-interface loopback 0
# 進入BGP-VPNv4地址族視圖,指定PE 2為對等體。
[PE1-bgp-default] address-family vpnv4
[PE1-bgp-default-vpnv4] peer 3.3.3.9 enable
[PE1-bgp-default-vpnv4] quit
[PE1-bgp-default] quit
(2) 配置PE 2
# 在PE 2上配置PE 1為BGP對等體,並指定連接時使用的接口為Loopback0接口。
[PE2] bgp 100
[PE2-bgp-default] peer 1.1.1.9 as-number 100
[PE2-bgp-default] peer 1.1.1.9 connect-interface loopback 0
# 進入BGP-VPNv4地址族視圖,指定PE 1為對等體。
[PE2-bgp-default] address-family vpnv4
[PE2-bgp-default-vpnv4] peer 1.1.1.9 enable
[PE2-bgp-default-vpnv4] quit
[PE2-bgp-default] quit
配置完成後,在PE設備上執行display bgp peer vpnv4命令,可以看到PE之間的BGP對等體關係已建立,並達到Established狀態。
[PE1] display bgp peer vpnv4
BGP local router ID: 1.1.1.9
Local AS number: 100
Total number of peers: 1 Peers in established state: 1
Peer AS MsgRcvd MsgSent OutQ PrefRcv Up/Down State
3.3.3.9 100 8 8 0 0 00:00:08 Established
在PE設備上執行display ip routing-table vpn-instance命令,可以看到去往對端CE的路由。
以PE 1上的vpn1為例:
[PE1] display ip routing-table vpn-instance vpn1
Destinations : 13 Routes : 13
Destination/Mask Proto Pre Cost NextHop Interface
0.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0
20.1.1.0/24 Direct 0 0 20.1.1.2 Tun0
20.1.1.0/32 Direct 0 0 20.1.1.2 Tun0
20.1.1.2/32 Direct 0 0 127.0.0.1 InLoop0
200.1.1.0/24 Direct 0 0 200.1.1.2 Vlan100
200.1.1.0/32 Direct 0 0 200.1.1.2 Vlan100
200.1.1.2/32 Direct 0 0 127.0.0.1 InLoop0
200.1.1.255/32 Direct 0 0 100.1.1.2 Vlan100
101.1.1.0/24 BGP 255 0 3.3.3.9 Vlan2
127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0
127.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0
127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0
127.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0
224.0.0.0/4 Direct 0 0 0.0.0.0 NULL0
224.0.0.0/24 Direct 0 0 0.0.0.0 NULL0
255.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0
· PE 1
#
ip vpn-instance vpn1
route-distinguisher 100:1
vpn-target 100:1 import-extcommunity
vpn-target 100:1 export-extcommunity
#
service-loopback group 1 type tunnel
#
ospf 1
area 0.0.0.0
network 1.1.1.9 0.0.0.0
network 10.1.1.0 0.0.0.255
#
mpls lsr-id 1.1.1.9
#
vlan 2
#
vlan 100
#
mpls ldp
#
interface LoopBack0
ip address 1.1.1.9 255.255.255.255
#
interface Vlan-interface2
ip address 10.1.1.1 255.255.255.0
mpls enable
mpls ldp enable
#
interface Vlan-interface100
ip binding vpn-instance vpn1
ip address 200.1.1.2 255.255.255.0
#
interface Ten-GigabitEthernet1/0/1
port link-mode bridge
port access vlan 100
#
interface Ten-GigabitEthernet1/0/2
port link-mode bridge
port access vlan 2
#
#
interface Ten-GigabitEthernet1/0/3
port link-mode bridge
port service-loopback group 1
#
interface Tunnel0 mode gre
ip binding vpn-instance vpn1
ip address 20.1.1.2 255.255.255.0
source Vlan-interface100
tunnel vpn-instance vpn1
destination 100.1.1.1
#
bgp 100
peer 3.3.3.9 as-number 100
peer 3.3.3.9 connect-interface LoopBack0
#
address-family vpnv4
peer 3.3.3.9 enable
#
ip vpn-instance vpn1
peer 20.1.1.1 as-number 65410
#
address-family ipv4 unicast
import-route direct
peer 20.1.1.1 enable
#
ip route-static vpn-instance vpn1 172.1.0.0 24 Tunnel0
· P
#
ospf 1
area 0.0.0.0
network 2.2.2.9 0.0.0.0
network 10.1.1.0 0.0.0.255
network 10.1.4.0 0.0.0.255
#
mpls lsr-id 2.2.2.9
#
vlan 2
#
vlan 5
#
mpls ldp
#
interface LoopBack0
ip address 2.2.2.9 255.255.255.255
#
interface Vlan-interface2
ip address 10.1.1.2 255.255.255.0
mpls enable
mpls ldp enable
#
interface Vlan-interface5
ip address 10.1.4.1 255.255.255.0
mpls enable
mpls ldp enable
#
interface Ten-GigabitEthernet1/0/2
port link-mode bridge
port access vlan 2
#
interface Ten-GigabitEthernet1/0/3
port link-mode bridge
port access vlan 5
#
· PE 2
#
ip vpn-instance vpn1
route-distinguisher 100:1
vpn-target 100:1 import-extcommunity
vpn-target 100:1 export-extcommunity
#
ospf 1
area 0.0.0.0
network 3.3.3.9 0.0.0.0
network 10.1.4.0 0.0.0.255
#
mpls lsr-id 3.3.3.9
#
lldp global enable
#
vlan 5
#
vlan 101
#
mpls ldp
#
interface LoopBack0
ip address 3.3.3.9 255.255.255.255
#
interface Vlan-interface5
ip address 10.1.4.2 255.255.255.0
mpls enable
mpls ldp enable
#
interface Vlan-interface101
ip binding vpn-instance vpn1
ip address 101.1.1.1 255.255.255.0
#
interface Ten-GigabitEthernet1/0/1
port link-mode bridge
port access vlan 5
#
interface Ten-GigabitEthernet1/0/2
port link-mode bridge
port access vlan 101
#
bgp 100
peer 1.1.1.9 as-number 100
peer 1.1.1.9 connect-interface LoopBack0
#
address-family vpnv4
peer 1.1.1.9 enable
#
ip vpn-instance vpn1
peer 101.1.1.2 as-number 65410
#
address-family ipv4 unicast
import-route direct
peer 101.1.1.2 enable
#
· CE 1
#
ip vpn-instance vpn1
route-distinguisher 100:1
vpn-target 100:1 import-extcommunity
vpn-target 100:1 export-extcommunity
#
service-loopback group 1 type tunnel
#
vlan 101
#
interface Vlan-interface101
ip binding vpn-instance vpn1
ip address 100.1.1.1 255.255.255.0
#
interface Ten-GigabitEthernet1/0/1
port link-mode bridge
port access vlan 101
#
interface Ten-GigabitEthernet1/0/3
port link-mode bridge
port service-loopback group 1
#
interface Tunnel0 mode gre
ip binding vpn-instance vpn1
ip address 20.1.1.1 255.255.255.0
source Vlan-interface101
tunnel vpn-instance vpn1
destination 200.1.1.2
#
bgp 65410
peer 20.1.1.2 as-number 100
#
address-family ipv4 unicast
import-route direct
peer 20.1.1.2 enable
#
ip route-static vpn-instance vpn1 172.2.0.0 24 Tunnel0
#
· CE 2
#
vlan 101
#
interface Vlan-interface101
ip address 101.1.1.2 255.255.255.0
#
interface Ten-GigabitEthernet1/0/1
port link-mode bridge
port access vlan 101
#
bgp 65410
peer 101.1.1.1 as-number 100
#
address-family ipv4 unicast
import-route direct
peer 101.1.1.1 enable
#
· H3C S6800係列以太網交換機 MPLS配置指導-Release 26xx係列
· H3C S6800係列以太網交換機 MPLS命令參考-Release 26xx係列
· H3C S6800係列以太網交換機 三層技術-IP業務配置指導-Release 26xx係列
· H3C S6800係列以太網交換機 三層技術-IP業務命令參考-Release 26xx係列
不同款型規格的資料略有差異, 詳細信息請向具體銷售和400谘詢。H3C保留在沒有任何通知或提示的情況下對資料內容進行修改的權利!