捕获.JPG

PE1

system-view
sysname PE1
int G 0/0/2
ip address 10.1.1.1 30
int G 0/0/1
ip address 10.1.0.1 24
int loopback0
ip add 1.1.1.1 32
ospf 1 router-id 1.1.1.1
area 0
network 10.1.0.0 0.0.0.255
network 10.1.1.0 0.0.0.3
net 1.1.1.1 0.0.0.0

P1

system-view
sysname P1
vlan batch 2 to 3
int Vlanif 1
ip address 10.1.1.2 30
int Vlanif 2
ip address 10.1.1.5 30
int G 0/0/2
port link-type access
port default vlan 1
int g 0/0/3
port link-type access
port default vlan 2
int loopback 0
ip address 2.2.2.2 32
ospf 1 router-id 2.2.2.2
area 0
network 10.1.1.0 0.0.0.3
network 10.1.1.4 0.0.0.3
net 2.2.2.2 0.0.0.0

P2

system-view
sysname P2
vlan batch 2 to 3
int Vlanif 2
ip address 10.1.1.6 30
int Vlanif 3
ip address 10.1.1.9 30
int G 0/0/3
port link-type access
port default vlan 2
int g 0/0/4
port link-type access
port default vlan 3
int loopback 0
ip address 3.3.3.3 32
ospf 1 router-id 3.3.3.3
area 0
network 10.1.1.4 0.0.0.3
network 10.1.1.8 0.0.0.3
net 3.3.3.3 0.0.0.0

PE2

system-view
sysname PE2
int G 0/0/2
ip address 10.1.1.10 30
int G 0/0/1
ip address 10.2.0.2 24
int loopback 0
ip address 4.4.4.4 32
ospf 1 router-id 4.4.4.4
area 0
network 10.1.1.8 0.0.0.3
network 10.2.0.0 0.0.0.255
net 4.4.4.4 0.0.0.0
display ip routing-table

CE1

system-view
sysname CE1
vlan batch 2 to 3
int Vlanif 3
ip address 10.1.0.2 24
int g0/0/1
port link-type access
port default vlan 3
int loopback0
ip add 5.5.5.5 32

CE3

system-view
sysname CE3
int Vlanif 1
ip address 10.2.0.1 24
int loopback 0
ip address 6.6.6.6 32

PE1

mpls lsr-id 1.1.1.1
mpls
lsp-trigger all
mpls ldp
quit
int g 0/0/2
mpls
mpls ldp
quit

P1

mpls lsr-id 2.2.2.2
mpls
lsp-trigger all
mpls ldp
quit
int Vlanif 1
mpls
mpls ldp
quit
int Vlanif 2
mpls
mpls ldp

P2

mpls lsr-id 3.3.3.3
mpls
lsp-trigger all
mpls ldp
quit
int Vlanif 2
mpls
mpls ldp
quit
int Vlanif 3
mpls
mpls ldp

PE2

mpls lsr-id 4.4.4.4
mpls
lsp-trigger all
mpls ldp
quit
int G 0/0/2
mpls
mpls ldp
quit
display mpls ldp session

PE1

system-view
bgp 100
peer 4.4.4.4 as-number 100
peer 4.4.4.4 connect-interface loopback 0
ipv4-family vpnv4
peer 4.4.4.4 enable
q
display bgp vpnv4 all peer

PE2

system-view
bgp 100
peer 1.1.1.1 as-number 100
peer 1.1.1.1 connect-interface loopback 0
ipv4-family vpnv4
peer 1.1.1.1 enable
q
display bgp vpnv4 all peer

PE1

system-view
ip vpn-instance vpna
ipv4-family
route-distinguisher 100:1
vpn-target 111:1 both
quit
quit
ip vpn-instance vpnb
ipv4-family
route-distinguisher 100:2
vpn-target 222:2 both
quit
quit
int G 0/0/1
ip binding vpn-instance vpna
ip address 10.1.0.1 24
quit
int G 0/0/0
ip binding vpn-instance vpnb
ip address 10.2.1.2 24
quit
display ip vpn-instance verbose
ping -vpn-instance vpna 10.1.0.2

PE2

system-view
ip vpn-instance vpna
ipv4-family
route-distinguisher 100:1
vpn-target 111:1 both
quit
quit
ip vpn-instance vpnb
ipv4-family
route-distinguisher 100:2
vpn-target 222:2 both
quit
quit
int G 0/0/1
ip binding vpn-instance vpna
ip address 10.2.0.2 24
quit
int G 0/0/0
ip binding vpn-instance vpnb
ip address 10.4.1.2 24
quit
display ip vpn-instance verbose

PE1

system-view
bgp 100
ipv4-family vpn-instance vpna
peer 10.1.0.2 as-number 65410
import-route direct
quit
ipv4-family vpn-instance vpnb
peer 10.2.1.1 as-number 65420
import-route direct
quit
display bgp vpnv4 vpn-instance vpna peer

PE2

bgp 100
ipv4-family vpn-instance vpna
peer 10.2.0.1 as-number 65430
import-route direct
quit
ipv4-family vpn-instance vpnb
peer 10.2.1.1 as-number 65420
import-route direct
quit

CE1

system-view
bgp 65410
peer 10.1.0.1 as-number 100
import-route direct

CE3

system-view
bgp 65430
peer 10.2.0.2 as-number 100
import-route direct

PE1

display ip routing-table vpn-instance vpna
display ip routing-table vpn-instance vpnb

CE1

ping 10.2.0.1

1.Base

PE1,P1,P2,PE2
display ip routing-table

2.MPLS LDP

display mpls ldp session
dis mpls ldp peer
dis mpls lsp incl 10.1.1.8 30 verb

3.MP-IBGP

display bgp vpnv4 all peer

4.PE-VPN

display ip vpn-instance verbose

5.PE-CE

PE1,PE2

display bgp vpnv4 vpn-instance vpna peer
display ip routing-table vpn-instance vpna
display ip routing-table vpn-instance vpnb

CE3

dis ip int br

CE1

ping 6.6.6.6
tracert 6.6.6.6

最后修改:2023 年 05 月 02 日
如果觉得我的文章对你有用,请随意赞赏