• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.
Xin chào ! Nếu đây là lần đầu tiên bạn đến với diễn đàn, xin vui lòng danh ra một phút bấm vào đây để đăng kí và tham gia thảo luận cùng VnPro.

Announcement

Collapse
No announcement yet.

CCNP Encor Lab 7 - Implement VRF-Lite

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • CCNP Encor Lab 7 - Implement VRF-Lite

    Lab - Implement VRF-Lite

    SƠ ĐỒ


    BẢNG PHÂN HOẠCH IP
Device Interface IPv4 Address
R1 E0/0 10.1.2.1/24
R1 E0/2.5 10.1.2.1/24
R1 E0/2.8 10.1.3.1/24
R1 E0/1 10.1.3.1/24
R2 E0/0 10.1.2.2/24
R2 Loopback0 192.168.2.1/24
R3 E0/0 10.1.3.2/24
4 Loopback0 192.168.3.1/24
D1 E0/0 10.1.2.2/24
D1 VLAN 11 192.168.2.1/24
D2 E0/0 10.1.3.2/24
D2 VLAN 11 192.168.3.1/24
MỤC TIÊU
Phần 1: Kết nối và cấu hình cơ bản
Phần 2: Cấu hình và kiểm tra VRF
Phần 3: Cấu hình và kiểm tra Static Route cho IP VRF


NGỮ CẢNH
Mặc định, tất cả các cổng của router thuộc về 1 bảng định tuyến global. Các ISP phải bật tính năng ảo hóa router để tạo ra nhiều bảng định tuyến ảo. Virtual Routing and Forwarding (VRF) có thể làm điều đó. VRF-Lite không bao gồm thành phần MPLS.
Trong bài lab này, R1 sẽ là router của ISP hỗ trợ định tuyến cho 2 khách hàng A và B có cùng địa chỉ. VRF cho phép 2 cổng khác nhau có thể đặt địa chỉ trùng nhau. Tuy nhiên lúc này 2 cổng thuộc về 2 VRF khác nhau nên không ảnh hưởng.

HƯỚNG DẪN THỰC HIỆN
Phần 1: Kết nối và cấu hình cơ bản
Trên R1:
Code:
Router(config)#hostname R1
R1(config)#no ip domain lookup
R1(config)#ipv6 unicast-routing
R1(config)#banner motd # R1, Implement VRF-Lite #
R1(config)#line con 0
R1(config-line)# exec-timeout 0 0
R1(config-line)# logging synchronous
R1(config-line)# exit
R1(config)#line vty 0 4
R1(config-line)# privilege level 15
R1(config-line)# password cisco123
R1(config-line)# exec-timeout 0 0
R1(config-line)# logging synchronous
R1(config-line)# login
R1(config-line)# exit
R1(config)#end
Trên R2:
Code:
R(config)#hostname R2
R2(config)#no ip domain lookup
R2(config)#ipv6 unicast-routing
R2(config)#banner motd # R2, Implement VRF-Lite #
R2(config)#line con 0
R2(config-line)# exec-timeout 0 0
R2(config-line)# logging synchronous
R2(config-line)# exit
R2(config)#line vty 0 4
R2(config-line)# privilege level 15
R2(config-line)# password cisco123
R2(config-line)# exec-timeout 0 0
R2(config-line)# logging synchronous
R2(config-line)# login
R2(config-line)# exit
R2(config)#end
R2(config)#interface E0/0
R2(config-if)# ip address 10.1.2.2 255.255.255.0
R2(config-if)# no shutdown
R2(config-if)# exit
R2(config)#interface loopback 0
R2(config-if)# ip address 192.168.2.1 255.255.255.0
R2(config-if)# no shutdown
R2(config-if)# exit

R2(config)#ip route 0.0.0.0 0.0.0.0 E0/0 10.1.2.1
Trên R3:
Code:
R(config)#hostname R3
R3(config)#no ip domain lookup
R3(config)#ipv6 unicast-routing
R3(config)#banner motd # R3, Implement VRF-Lite #
R3(config)#line con 0
R3(config-line)# exec-timeout 0 0
R3(config-line)# logging synchronous
R3(config-line)# exit
R3(config)#line vty 0 4
R3(config-line)# privilege level 15
R3(config-line)# password cisco123
R3(config-line)# exec-timeout 0 0
R3(config-line)# logging synchronous
R3(config-line)# login
R3(config-line)# exit
R3(config)#interface E0/0
R3(config-if)# ip address 10.1.3.2 255.255.255.0
R3(config-if)# no shutdown
R3(config-if)# exit
R3(config)#interface loopback 0
R3(config-if)# ip address 192.168.3.1 255.255.255.0
R3(config-if)# no shutdown
R3(config-if)# exit

R3(config)#ip route 0.0.0.0 0.0.0.0 E0/0 10.1.3.1
Trên SW D1:
Code:
Switch(config)#hostname D1
D1(config)#no ip domain lookup
D1(config)#ip routing
D1(config)#ipv6 unicast-routing
D1(config)#banner motd # D1, Implement VRF-Lite #
D1(config)#line con 0
D1(config-line)# exec-timeout 0 0
D1(config-line)# logging synchronous
D1(config-line)# exit
D1(config)#line vty 0 4
D1(config-line)# privilege level 15
D1(config-line)# password cisco123
D1(config-line)# exec-timeout 0 0
D1(config-line)# logging synchronous
D1(config-line)# login
D1(config-line)# exit
D1(config)#interface E0/0
D1(config-if)# no switchport
D1(config-if)# ip address 10.1.2.2 255.255.255.0
D1(config-if)# no shutdown
D1(config-if)# exit
D1(config)#vlan 11
D1(config-vlan)# name LOCAL_VLAN
D1(config-vlan)# exit
D1(config)#interface vlan 11
D1(config-if)# ip address 192.168.2.1 255.255.255.0
D1(config-if)# no shutdown
D1(config-if)# exit
D1(config)#interface E0/1
D1(config-if)# switchport mode access
D1(config-if)# switchport access vlan 11
D1(config-if)# no shutdown
D1(config-if)# exit

D1(config)#ip route 0.0.0.0 0.0.0.0 E0/0 10.1.2.1
Trên SW D2:
Code:
SW(config)#hostname D2
D2(config)#no ip domain lookup
D2(config)#ip routing
D2(config)#ipv6 unicast-routing
D2(config)#banner motd # D2, Implement VRF-Lite #
D2(config)#line con 0
D2(config-line)# exec-timeout 0 0
D2(config-line)# logging synchronous
D2(config-line)# exit
D2(config)#line vty 0 4
D2(config-line)# privilege level 15
D2(config-line)# password cisco123
D2(config-line)# exec-timeout 0 0
D2(config-line)# logging synchronous
D2(config-line)# login
D2(config-line)# exit
D2(config)#interface E0/0
D2(config-if)# no switchport
D2(config-if)# ip address 10.1.3.2 255.255.255.0
D2(config-if)# no shutdown
D2(config-if)# exit
D2(config)#vlan 11
D2(config-vlan)# name LOCAL_VLAN
D2(config-vlan)# exit
D2(config)#interface vlan 11
D2(config-if)# ip address 192.168.3.1 255.255.255.0
D2(config-if)# no shutdown
D2(config)#interface E0/1
D2(config-if)# switchport mode access
D2(config-if)# switchport access vlan 11

D2(config-if)#ip route 0.0.0.0 0.0.0.0 E0/0 10.1.3.1
Trên SW A1:
Code:
SW(config)#hostname A1
A1(config)#no ip domain lookup
A1(config)#banner motd # A1, Implement VRF-Lite #
A1(config)#line con 0
A1(config-line)# exec-timeout 0 0
A1(config-line)# logging synchronous
A1(config-line)# exit
A1(config)#line vty 0 4
A1(config-line)# privilege level 15
A1(config-line)# password cisco123
A1(config-line)# exec-timeout 0 0
A1(config-line)# logging synchronous
A1(config-line)# login
A1(config-line)# exit
A1(config)#vlan 5
A1(config-vlan)# name D1
A1(config-vlan)# exit
A1(config)#vlan 8
A1(config-vlan)# name D2
A1(config-vlan)# exit
A1(config)#interface E0/0
A1(config-if)# switchport trunk encapsulation dot1q
A1(config-if)# switchport mode trunk
A1(config-if)# switchport nonegotiate
A1(config-if)# no shutdown
A1(config-if)# exit
A1(config)#interface E0/1
A1(config-if)# switchport mode access
A1(config-if)# switchport access vlan 5
A1(config-if)# no shutdown
A1(config-if)# exit
A1(config)#interface E0/2
A1(config-if)# switchport mode access
A1(config-if)# switchport access vlan 8
A1(config-if)# no shutdown
Phần 2: Cấu hình và kiểm tra VRF trên R1
Bước 1: Tạo Customer_A và Customer_B VRF viết hoa
Code:
R1(config)#vrf definition Customer_A
R1(config-vrf)#address-family ipv4
R1(config-vrf-af)#exit
R1(config-vrf)#exit
R1(config)#vrf definition Customer_B
R1(config-vrf)#address-family ipv4
R1(config-vrf-af)#exit
R1(config-vrf)#exit
Bước 2: Cấu hình interface E0/0 và E0/1 hỗ trợ cho Customer_B
Code:
R1(config)#int e0/0
R1(config-if)#vrf forwarding Customer_A
R1(config-if)#ip address 10.1.2.1 255.255.255.0
R1(config-if)#no shut
R1(config-if)#exit
R1(config)#int e0/1
R1(config-if)#vrf forwarding Customer_A
R1(config-if)#ip address 10.1.3.1 255.255.255.0
R1(config-if)#no shut
R1(config-if)#exit
Bước 3: Cấu hình E0/2 hỗ trợ Customer_B. Cổng E0/2 sẽ hỗ trợ định tuyến VLAN cho VLAN 5 và 8:
Code:
R1(config)#int e0/2
R1(config-if)#no shut
R1(config-if)#exit
R1(config)#int e0/2.5
R1(config-subif)#encapsulation dot1Q 5
R1(config-subif)#vrf forwarding Customer_B
R1(config-subif)#ip address 10.1.2.1 255.255.255.0
R1(config-subif)#exit
R1(config)#int e0/2.8
R1(config-subif)#encapsulation do
R1(config-subif)#encapsulation dot1Q 8
R1(config-subif)#vrf forwarding Customer_B
R1(config-subif)#ip address 10.1.3.1 255.255.255.0
R1(config-subif)#end
Bước 4: Kiểm tra VRF








Phần 3: Cấu hình và kiểm tra Static Route cho IP VRF
Bước 1: Kiểm tra chưa thể PING được từ R1 sang Lo0 của R2 và R3 do chưa tạo static route.
Code:
[FONT=Courier New]R1# [B]ping vrf Customer_A 192.168.2.1[/B][/FONT]
[FONT=Courier New]Type escape sequence to abort.[/FONT]
[FONT=Courier New]Sending 5, 100-byte ICMP Echos to 192.168.2.1, timeout is 2 seconds:[/FONT]
[FONT=Courier New].....[/FONT]
[FONT=Courier New]Success rate is 0 percent (0/5)[/FONT]
[FONT=Courier New]R1# [B]ping vrf Customer_A 192.168.3.1[/B][/FONT]
[FONT=Courier New]Type escape sequence to abort.[/FONT]
[FONT=Courier New]Sending 5, 100-byte ICMP Echos to 192.168.3.1, timeout is 2 seconds:[/FONT]
[FONT=Courier New].....[/FONT]
[FONT=Courier New]Success rate is 0 percent (0/5)[/FONT]
Code:
[FONT=Courier New]R1# [B]ping vrf Customer_B 192.168.2.1[/B][/FONT]
[FONT=Courier New]Type escape sequence to abort.[/FONT]
[FONT=Courier New]Sending 5, 100-byte ICMP Echos to 192.168.2.1, timeout is 2 seconds:[/FONT]
[FONT=Courier New].....[/FONT]
[FONT=Courier New]Success rate is 0 percent (0/5)[/FONT]
[FONT=Courier New]R1# [B]ping vrf Customer_B 192.168.3.1[/B][/FONT]
[FONT=Courier New]Type escape sequence to abort.[/FONT]
[FONT=Courier New]Sending 5, 100-byte ICMP Echos to 192.168.3.1, timeout is 2 seconds:[/FONT]
[FONT=Courier New].....[/FONT]
[FONT=Courier New]Success rate is 0 percent (0/5)[/FONT]
Bước 2: Cấu hình static route VRF: Muốn đi sang Lo0 của R2 thì đẩy sang nexthop10.1.2.2 và sang lo0 của R3 thì đẩy sang nexthop10.1.3.2. Tương tự các VLAN 11 trên D1, D2 thì đẩy sang nexthop là các routed port.
Code:
R1(config)#ip route vrf Customer_A 192.168.2.0 255.255.255.0 Ethernet0/0 10.1.2.2
R1(config)#ip route vrf Customer_A 192.168.3.0 255.255.255.0 Ethernet0/1 10.1.3.2
R1(config)#ip route vrf Customer_B 192.168.2.0 255.255.255.0 Ethernet0/2.5 10.1.2.2
R1(config)#ip route vrf Customer_B 192.168.3.0 255.255.255.0 Ethernet0/2.8 10.1.3.2
Bước 3: Kiểm tra
Đứng từ R2 Ping sang R3

Đứng từ D1 Ping sang D2
Tác giả,

Võ Văn Kết - VnPro's Instructor
Last edited by topeka; 09-08-2020, 11:13 PM.
Tags:

Working...
X