[PE1]dis ip routing-table //查看是否学到路由
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 8 Routes : 8
Destination/Mask Proto Pre Cost Flags NextHop Interface
1.1.1.9/32 Direct 0 0 D 127.0.0.1 LoopBack0
2.2.2.9/32 OSPF 10 1 D 10.1.1.2 GigabitEthernet0
/0/0
3.3.3.9/32 OSPF 10 2 D 10.1.1.2 GigabitEthernet0
/0/0
10.1.1.0/24 Direct 0 0 D 10.1.1.1 GigabitEthernet0
/0/0
10.1.1.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0
/0/0
20.1.1.0/24 OSPF 10 2 D 10.1.1.2 GigabitEthernet0
/0/0
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
LDP Peer Information in Public network
A '*' before a peer means the peer is being deleted.
------------------------------------------------------------------------------
PeerID TransportAddress DiscoverySource
------------------------------------------------------------------------------
2.2.2.9:0 2.2.2.9 GigabitEthernet0/0/0
------------------------------------------------------------------------------
TOTAL: 1 Peer(s) Found.
[PE1]dis mpls ldp session //查看LDP回话的建立情况
LDP Session(s) in Public Network
Codes: LAM(Label Advertisement Mode), SsnAge Unit(DDDD:HH:MM)
A '*' before a session means the session is being deleted.
------------------------------------------------------------------------------
PeerID Status LAM SsnRole SsnAge KASent/Rcv
------------------------------------------------------------------------------
2.2.2.9:0 Operational DU Passive 0000:00:12 49/49
------------------------------------------------------------------------------
TOTAL: 1 session(s) Found.
[PE1]dis mpls ldp lsp //查看LDP LSP的建立情况
LDP LSP Information
-------------------------------------------------------------------------------
DestAddress/Mask In/OutLabel UpstreamPeer NextHop OutInterface
-------------------------------------------------------------------------------
1.1.1.9/32 3/NULL 2.2.2.9 127.0.0.1 InLoop0
*1.1.1.9/32 Liberal/1024 DS/2.2.2.9
2.2.2.9/32 NULL/3 - 10.1.1.2 GE0/0/0
2.2.2.9/32 1024/3 2.2.2.9 10.1.1.2 GE0/0/0
3.3.3.9/32 NULL/1025 - 10.1.1.2 GE0/0/0
3.3.3.9/32 1025/1025 2.2.2.9 10.1.1.2 GE0/0/0
-------------------------------------------------------------------------------
TOTAL: 5 Normal LSP(s) Found.
TOTAL: 1 Liberal LSP(s) Found.
TOTAL: 0 Frr LSP(s) Found.
A '*' before an LSP means the LSP is not established
A '*' before a Label means the USCB or DSCB is stale
A '*' before a UpstreamPeer means the session is stale
A '*' before a DS means the session is stale
A '*' before a NextHop means the LSP is FRR LSP
[PE1]ping lsp ip 3.3.3.9 32 //检查到PE2的可达性
LSP PING FEC: IPV4 PREFIX 3.3.3.9/32/ : 100 data bytes, press CTRL_C to break
Reply from 3.3.3.9: bytes=100 Sequence=1 time=90 ms
Reply from 3.3.3.9: bytes=100 Sequence=2 time=60 ms
Reply from 3.3.3.9: bytes=100 Sequence=3 time=70 ms
Reply from 3.3.3.9: bytes=100 Sequence=4 time=50 ms
Reply from 3.3.3.9: bytes=100 Sequence=5 time=60 ms
--- FEC: IPV4 PREFIX 3.3.3.9/32 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 50/66/90 ms
[PE1]dis ip vpn-instance 查看vpn实例的配置情况
Total VPN-Instances configured : 2
VPN-Instance Name Address-family
vpn1 ipv4
vpn2 ipv4
[PE1]ping -vpn-instance vpn1 11.1.1.2 ping测PE接入的CE
PING 11.1.1.2: 56 data bytes, press CTRL_C to break
Reply from 11.1.1.2: bytes=56 Sequence=1 ttl=255 time=80 ms
Reply from 11.1.1.2: bytes=56 Sequence=2 ttl=255 time=20 ms
Reply from 11.1.1.2: bytes=56 Sequence=3 ttl=255 time=40 ms
Reply from 11.1.1.2: bytes=56 Sequence=4 ttl=255 time=50 ms
Reply from 11.1.1.2: bytes=56 Sequence=5 ttl=255 time=40 ms
--- 11.1.1.2 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 20/46/80 ms
[PE1]dis bgp vpnv4 vpn-instance vpn1 peer 查看PE与CE间的对等体关系
BGP local router ID : 1.1.1.9
Local AS number : 100
VPN-Instance vpn1, Router ID 1.1.1.9:
Total number of peers : 1 Peers in established state : 1
Peer V AS MsgRcvd MsgSent OutQ Up/Down State Pref
Rcv
11.1.1.2 4 65410 8 7 0 00:04:12 Established
2
[PE1-bgp]display bgp peer 查看PE对等体
BGP local router ID : 1.1.1.9
Local AS number : 100
Total number of peers : 1 Peers in established state : 1
Peer V AS MsgRcvd MsgSent OutQ Up/Down State Pref
Rcv
3.3.3.9 4 100 6 8 0 00:00:47 Established
0
[PE1-bgp]display bgp vpnv4 all peer 查看vpnv4对等体
BGP local router ID : 1.1.1.9
Local AS number : 100
Total number of peers : 3 Peers in established state : 3
Peer V AS MsgRcvd MsgSent OutQ Up/Down State Pref
Rcv
3.3.3.9 4 100 7 9 0 00:01:52 Established
4
Peer of IPv4-family for vpn instance :
VPN-Instance vpn1, Router ID 1.1.1.9:
11.1.1.2 4 65410 24 25 0 00:20:11 Established
2
VPN-Instance vpn2, Router ID 1.1.1.9:
22.1.1.2 4 65420 22 23 0 00:18:13 Established
2
[PE1]display ip routing-table vpn-instance vpn1 查看PE1去往vpn1 的路由
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: vpn1
Destinations : 5 Routes : 5
Destination/Mask Proto Pre Cost Flags NextHop Interface
1.1.1.1/32 EBGP 255 0 D 11.1.1.2 Ethernet0/0/0
3.3.3.3/32 IBGP 255 0 RD 3.3.3.9 GigabitEthernet0
/0/0
11.1.1.0/24 Direct 0 0 D 11.1.1.1 Ethernet0/0/0
11.1.1.1/32 Direct 0 0 D 127.0.0.1 Ethernet0/0/0
33.1.1.0/24 IBGP 255 0 RD 3.3.3.9 GigabitEthernet0
/0/0
CE1:
ip地址已配置完毕
[CE1]bgp 65410
[CE1-bgp]peer 11.1.1.1 as-number 100
[CE1-bgp]import-route direct
[CE1-bgp]q
<CE1>ping 3.3.3.3 CE1可以ping 通 CE3
PING 3.3.3.3: 56 data bytes, press CTRL_C to break
Reply from 3.3.3.3: bytes=56 Sequence=1 ttl=253 time=110 ms
Reply from 3.3.3.3: bytes=56 Sequence=2 ttl=253 time=140 ms
Reply from 3.3.3.3: bytes=56 Sequence=3 ttl=253 time=80 ms
Reply from 3.3.3.3: bytes=56 Sequence=4 ttl=253 time=100 ms
Reply from 3.3.3.3: bytes=56 Sequence=5 ttl=253 time=120 ms
--- 3.3.3.3 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 80/110/140 ms