
Originally Posted by
November02
anh check dùm em cấu hình MPLS VPN xem sao nó ko chạy.
Ping từ CE1 tới CE2 ko đc, em show bgp trên PE1 thì đã thấy học được route rồi
Cấu hình trên PE1
conf t
hostname PE1
enable password cisco
line con 0
logg s
exit
line vty 0 4
password cisco
login
exit
int loopback 0
ip address 11.1.1.1 255.255.255.255
exit
int fa0/0
desc "Connect to CE1"
ip address 10.252.1.1 255.255.255.252
no shut
exit
int fa0/1
desc "Connect to P1"
ip address 150.1.1.2 255.255.255.252
mpls ip
no shut
exit
ip cef
mpls label protocol ldp
mpls ldp router-id loopback 0
!-- Cau hinh VRF tren PE1
ip vrf CustomerA
rd 1:100
route-target export 1:100
route-target import 1:100
!
interface fa0/0
ip vrf forwarding CustomerA
exit
!
interface loopback1
ip vrf forwarding CustomerA
ip address 172.16.100.1 255.255.255.255
no shut
exit
!
router ospf 100
network 150.1.1.0 0.0.0.3 area 0
network 11.1.1.1 0.0.0.0 area 0
exit
!
router bgp 100
neighbor 14.1.1.1 remote-as 100
neighbor 14.1.1.1 update-source loopback 0
address-family vpnv4
neighbor 14.1.1.1 activate
neighbor 14.1.1.1 send-community extended
exit
address-family ipv4 vrf CustomerA
redistribute connected
exit-address-family
exit
do wr
!
Một số lưu ý khi cấu hình VPN
1. Trên PE, khi chuyển 1 interface vào vrf thì IP sẽ bị remove nên cần thiết phải cấu hình lại IP
2. Giữa CE & PE có thể chọn static, rip, ospf, eigrp, isis, bgp để cấu hình. Khi cấu hình xong thì nhớ redistribute trong vrf (ngoại trừ bgp)
3. Thuộc tính next-hop-self đóng vai trò không nhỏ trong việc học route hay không
4. Trong add-family ipv4 vrf CustomerA
redistribute connected hay không là do ý muốn chủ quan của bạn. Thông thường không ảnh hưởng đến kết nối giữa LAN CE1 & LAN CE2
5. Một số command hổ trợ
- sh ip bgp vpnv4 all sum
- sh ip bgp vpvn4 all label
- sh ip route vrf ABC
- sh ip bgp vpnv4 vrf ABC sum
Nếu cần gì thì cứ post lên
> Ping CCNA
Sending to CISCO.....Please wait.....
Cho thuê CCIE LAB RS & SEC online giá rẻ đây (250k/6h for RS & 350k/6h for SEC)
RS: R2611, R1841, SW3550/3560
SEC: R2611, R2811, ASA5510 (Sec plus), IPS4235, SW3560
Timeslots (GMT+7) - Vietnam (8h00 - 7h50+1)
TS1.VN : 08h00 - 13h50
TS2.VN : 14h00 - 19h50
TS3.VN : 20h00 - 01h50
TS4.VN : 02h00 -07h50
Mọi chi tiết xin liên hệ vulevy (at) yahoo (dot) fr