Professional Documents
Culture Documents
1
H1 Loopback 0 1.1.1.1/32
Vlanif 11 192.168.11.0/24 192.168.11.2
Vlanif 13 192.168.13.0/24 192.168.13.1
H2 Loopback 0 2.2.2.2/32
Vlanif 23 192.168.23.0/24 192.168.23.1
Vlanif 22 192.168.22.0/24 192.168.22.2
H3 Loopback 0 3.3.3.3/32
Vlanif 13 192.168.13.0/24 192.168.13.2
Vlanif 23 192.168.23.0/24 192.168.23.2
MX2 Lo0.0 20.20.20.20/32
Ae22.22 192.168.22.0/24 192.168.22.1
Lo0.1 10.1.0.0/16 10.1.0.1/32
Lo0.2 10.254.0.0/16 10.254.0.1/32
Yêu cầu:
- Cấu hình được IGP (OSPF) giữa các thiết bị
- Cấu hình được MPLS, LDP giữa các thiết bị
- Cấu hình được MP-BGP giữa các router chạy VPN (PE)
- Ping thông giữa các site thuộc cùng khách hàng
- Các site của 2 khách hàng khác nhau không ping được nhau
3. Thao tác
Sinh viên tiến hành các bước sau:
Công Nội dung Hướng dẫn thao tác Kết quả trông đợi
việc
1 Chuẩn bị 1.1. Khởi động các thiết bị Thiết bị UP, đèn
Switch và Router theo như sơ thiết bị sáng bình
đồ đính kèm thường
1.2. Shutdown port xg0/0/11,
xg0/0/12, xg0/0/13, xg0/0/14
trên H3, xg0/0/1 và xg0/0/2 trên
H1 và H2
1.3. Thực hiện đấu nối các kênh
như sơ đồ
2 Cấu hình cơ bản 2.1. Các bước thực hiện tương Ping được giữa 2 P
(LACP, đặt IP), tự bài Lab Chuyển mạch nhãn router (MX), kết
định tuyến MPLS quả trace thể hiện rõ
2
OSPF, chuyển (Xem phụ lục hướng dẫn cấu label được gán cho
mạch nhãn hình) từng hop
MPLS LDP
3 Cấu hình MP- 3.1. Cấu hình iBGP cho MX1 2 MX lên thiết lập
BGP cho các PE và MX2, với peer là MX đối được phiên iBGP,
(MX1, MX2) diện, update-source là IP bật VPNv4
loopback 0 unit 0, AS 2345
3.2. Bật tính năng VPNv4
4 Tạo VRF cho 4.1. Tạo VRF customerA và VRF được tạo với
từng khách hàng customerB trên MX1, MX2 đúng RD, RT
4.2. Cấu hình RT, RD theo quy import/export
hoạch, import route của site đối Interface được đặt
diện vào đúng VRF
4.3. Gán các interface loopback
như đã quy hoạch vào VRF
5 Kiểm tra kết nối 5.1. Ping test giữa 2 interface Site thuộc cùng 1
irb thuộc cùng khách hàng khách hàng ping
5.2. Ping test giữa 2 interface được đến nhau và
irb thuộc 2 khách hàng khác không ping được tới
nhau site của khách hàng
khác
3
Sau buổi thí nghiệm, sinh viên được yêu cầu trả lời các câu hỏi sau:
Stt Câu hỏi Trả lời của sinh viên Điểm
1 Giải thích ngắn gọn cơ quá trình
thiết lập 1 kênh L3VPN giữa 2 site
khách hàng
2 Cơ chế nào giúp các site khách hàng
khác nhau không ping được đến
nhau?
#MX2
configure
set interfaces ae22 vlan-tagging //Cấu hình encapsulation theo chuẩn 802.1Q
set interfaces ae22 unit 22 vlan-id 22 // Tag vlan 22 với subinterface unit 22
set interfaces ae22 unit 22 family inet address 192.168.22.1/24 //Đặt ip address cho
subinterface
set interfaces lo0 unit 0 family inet address 20.20.20.20/32 //Đặt ip address cho interface
loopback 0 unit 0
4
#H1
system-view
interface XGigabitEthernet0/0/1
shutdown //Shutdown interface
quit
interface XGigabitEthernet0/0/2
shutdown //Shutdown interface
quit
interface vlan 11
ip address 192.168.11.2 255.255.255.0 //Đặt ip cho interface vlan
quit
interface vlan 13
ip address 192.168.13.1 255.255.255.0 //Đặt ip cho interface vlan
quit
interface Eth-Trunk 11
port link-type trunk
port trunk allow-pass vlan 11 //Allow vlan 11 trên Eth-Trunk
quit
interface Eth-Trunk 13
port trunk allow-pass vlan 13 //Allow vlan 13 trên Eth-Trunk
quit
interface LoopBack0
ip address 1.1.1.1 255.255.255.255
5
quit
#H2
system-view
interface XGigabitEthernet0/0/1
shutdown //Shutdown interface
quit
interface XGigabitEthernet0/0/2
shutdown //Shutdown interface
quit
interface vlan 22
ip address 192.168.22.2 255.255.255.0 //Đặt ip cho interface vlan
quit
interface vlan 23
ip address 192.168.23.1 255.255.255.0 //Đặt ip cho interface vlan
quit
interface Eth-Trunk 22
port link-type trunk
port trunk allow-pass vlan 22 //Allow vlan 22 trên Eth-Trunk
quit
interface Eth-Trunk 23
port trunk allow-pass vlan 23 //Allow vlan 23 trên Eth-Trunk
quit
interface LoopBack0
6
ip address 2.2.2.2 255.255.255.255
quit
#H3
system-view
vlan batch 13 23 //tạo vlan
interface vlan 13
ip address 192.168.13.2 255.255.255.0 //Đặt ip cho interface vlan
quit
interface vlan 23
ip address 192.168.23.2 255.255.255.0 //Đặt ip cho interface vlan
quit
interface Eth-Trunk 13
port trunk allow-pass vlan 13 //Allow vlan 13 trên Eth-Trunk
quit
interface Eth-Trunk 23
port trunk allow-pass vlan 23 //Allow vlan 23 trên Eth-Trunk
quit
interface LoopBack0
ip address 3.3.3.3 255.255.255.255
quit
7
set protocols ospf area 0 interface lo0.0
commit
#MX2
set routing-options router-id 20.20.20.20
set protocols ospf area 0 interface ae22.22
set protocols ospf area 0 interface lo0.0
commit
#H1
ospf 1 router-id 1.1.1.1
area 0
network 1.1.1.1 0.0.0.0
network 192.168.11.0 0.0.0.255
network 192.168.13.0 0.0.0.255
quit
quit
quit
reset ospf process graceful-restart
#H2
ospf 1 router-id 2.2.2.2
area 0
network 2.2.2.2 0.0.0.0
network 192.168.23.0 0.0.0.255
network 192.168.22.0 0.0.0.255
quit
quit
quit
8
reset ospf process graceful-restart
#H3
ospf 1 router-id 3.3.3.3
area 0
network 3.3.3.3 0.0.0.0
network 192.168.23.0 0.0.0.255
network 192.168.13.0 0.0.0.255
quit
quit
quit
reset ospf process graceful-restart
Phụ lục 3: Cấu hình MPLS LDP trên các cổng đấu nối PE và P
#MX1
set interfaces ae11 unit 11 family mpls //Enable mpls
set protocol ldp interface ae11.11 //Enable ldp trên từng interface
set protocol ldp interface lo0.0
set protocol mpls interface ae11.11 //Enable mpls trên từng interface
set protocol mpls interface lo0.0
commit
#MX2
set interfaces ae22 unit 22 family mpls //Enable mpls
set protocol ldp interface ae22.22 //Enable ldp trên từng interface
set protocol ldp interface lo0.0
set protocol mpls interface ae22.22 //Enable mpls trên từng interface
set protocol mpls interface lo0.0
commit
9
commit
#H1
mpls lsr-id 1.1.1.1
mpls //Enable mpls
quit
mpls ldp //Enable mpls ldp
quit
interface vlan 13
mpls
mpls ldp //Enable mpls và mpls ldp trên interface vlan 13
interface vlan 11
mpls
mpls ldp //Enable mpls và mpls ldp trên interface vlan 11
quit
#H2
mpls lsr-id 2.2.2.2
mpls //Enable mpls
quit
mpls ldp //Enable mpls ldp
quit
interface vlan 23
mpls
mpls ldp //Enable mpls và mpls ldp trên interface vlan 23
10
interface vlan 22
mpls
mpls ldp //Enable mpls và mpls ldp trên interface vlan 22
quit
route recursive-lookup tunnel //Enable iterate static routes cho MPLS LSPs
#H3
mpls lsr-id 3.3.3.3
mpls //Enable mpls
quit
mpls ldp //Enable mpls ldp
quit
interface vlan 13
mpls
mpls ldp //Enable mpls và mpls ldp trên interface vlan 13
quit
interface vlan 23
mpls
mpls ldp //Enable mpls và mpls ldp trên interface vlan 23
quit
11
dis mpls ldp lsp all //kiểm tra LDP database
dis mpls lsp //kiểm tra LSP trên các switch phân đoạn core
<H2> tracert lsp -a 1.1.1.1 ip 2.2.2.2 32 //trace route từ H2 tới H1 để xem LSP
Trên Juniper:
show ospf neighbor //kiểm tra neighbor ospf
show ldp database //kiểm tra bảng nhãn tới các route
<MX1> ping mpls lsp-end-point 20.20.20.20 source 10.10.10.10 detail //ping từ
loopback0 của MX1 sang MX2, option detail cho thấy label được gán
<MX1> traceroute mpls ldp 20.20.20.20 source 10.10.10.10 no-res //trace từ loopback0
của MX1 sang MX2, thấy rõ được các hop và label được gán cho từng hop
commit
#MX2
Configure
12
set protocols bgp group MPBGP local-address 20.20.20.20
set protocols bgp group MPBGP family inet-vpn any
set protocols bgp group MPBGP peer-as 2345
set protocols bgp group MPBGP neighbor 10.10.10.10
commit
#MX2
configure
13
set interfaces lo0 unit 1 family inet address 10.1.0.1/16
set interfaces lo0 unit 2 family inet address 10.254.0.1/16
14
<MX1> traceroute 10.1.0.1 interface lo0.1 //trace tới địa chỉ lo0.1 (nằm trong VRF
customerA) của MX2, với source là lo0.1 (nằm trong VRF customerA) của MX1, kết quả gồm
các hop và label tương ứng được gán
<MX1> traceroute 10.1.0.1 interface lo0.2 //ping giữa 2 site của 2 khách hàng khác nhau
15