• 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.

LISP - Lab 1: Khảo sát sơ đồ, các thành phần của LISP

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

  • LISP - Lab 1: Khảo sát sơ đồ, các thành phần của LISP

    Ở bài lab này, ta sẽ khảo sát sơ đồ và các thành phần của LISP Mapping Services.

    Sơ đồ bài lab:



    Trong sơ đồ mạng trên, router R111 và R112 nằm trong vùng LISP Site 1 , R116 và R117 nằm trong vùng LISP Site 2. Mô hình này giúp ta mô phỏng một sơ đồ mạng thực tế giữa 2 doanh nghiệp (Enterprise sites) hoặc hai site của một mạng doanh nghiệp. Riêng bài lab này, chúng ta mô phỏng một mạng chạy LISP trên môi trường Internet tổng quát. Router R113 làm router Internet (Core).

    Theo lý thuyết của LISP, các vai trò của Router trong sơ đồ này như sau:
    • R111 và R117 làm thiết bị đầu cuối End_Host, với R111 là host1 của Site 1, R117 là host2 của Site 2.
    • R112 và R116 làm xTR router, tức router đóng gói/ mở gói (ITR/ETR – Ingress tunnel router/Egress tunnel router).
    • R113 làm router Core - sẽ làm ranh giới giữa miền LISP và miền non-LISP (Internet).
    • R114 làm Router ánh xạ và phân giải ( Mapping Server/ Mapping Resolver – MSMR).
    • R115 làm Proxy Router.
    Mô tả:

    Trong bài 1, chúng ta sẽ tìm hiểu sơ đồ mạng cơ bản, khảo sát cấu hình căn bản của router Core và nắm được các cấu hình định tuyến cơ bản (Phần định tuyến có thể dùng IGP OSPF, EIGRP… hoặc BGP của môi trường mạng “vật lý” (underlying). Chúng ta cũng sẽ khảo sát các cấu hình LISP trên R114 (Mapping Server) và router Proxy R115.

    Mục tiêu:

    Mục tiêu của bài Lab này để giúp chúng ta làm quen với một sơ đồ mạng tổng thể và các cấu hình cũng như việc định tuyến của một mạng LISP thực tế. Các cấu hình cơ bản như đặt địa chỉ IP, định tuyến cơ bản và cả cấu hình LISP MSMR và PxTR (router ánh xạ/phân giải và router Proxy) đã được thực hiện sẵn.

    Hoàn thành bài tập này, chúng ta sẽ hiểu được các cấu trúc, cấu hình nền tảng và các đặc tính chuyển tiếp gói tin của từng router trong mô hình. Bài lab còn cung cấp cho chúng ta những kiến thức về việc triển khai LISP một cách tổng quát.

    Hướng dẫn làm lab:

    Bước 1: Kiểm tra địa chỉ IPv4 và IPv6, dùng lệnh xem cấu hình, trạng thái kết nối trên R111, R112 (LISP Site 1) và R116, R117 (LISP Site 2)
    • LISP Site 1:
    R111 được dùng làm host và được đánh địa chỉ theo subnet của địa chỉ định danh đầu cuối (EID) ở Site 1. Nó sẽ được dùng cho việc kiểm tra kết nối và ping về sau. R111 có 4 cổng loopback, mỗi cổng gán 1 địa chỉ IPv4/32 và 1 địa chỉ IPv6/128 từ không gian địa chỉ định danh đầu cuối cho LISP Site 1. R111 có một kết nối với R112, có địa chỉ IPv4 là 172.16.1.1/24 và IPv6 là 2001:db8:a:2::1/64.

    Ta dùng lệnh show ip interface brief | exlude up|down để xem thông tin của các interface vật lý.

    Lưu ý: Cần đảm bảo các cổng có ip theo sơ đồ và ở trạng thái up / up.
    Code:
    R111-Host1#[B]show ip interface brief | exclude un|down[/B]
    
    Interface            IP-Address     OK?   Method  Status    Protocol
    Ethernet0/0          [B]172.16.1.1 [/B]    YES   TFTP   [B] up           up[/B]
    Loopback1            [B]192.168.1.1[/B]    YES   TFTP   [B] up           up[/B]
    Loopback2           [B] 192.168.1.2 [/B]   YES   TFTP    [B]up           up[/B]
    Loopback3            [B]192.168.1.3[/B]    YES   TFTP    [B]up           up[/B]
    Loopback4            [B]192.168.1.4 [/B]   YES   TFTP    [B]up           up[/B]
    
    R111-Host1#[B]show ipv6 interface brief | exclude un|down|FE[/B]
    
    Ethernet0/0            [B][up/up][/B]
        [B]2001:DB8:A:2::1[/B]
    Loopback1              [B][up/up][/B]
        [B]2001:DB8:A:1::1[/B]
    Loopback2              [B][up/up]
        2001:DB8:A:1::2[/B]
    Loopback3              [B][up/up]
        2001:DB8:A:1::3[/B]
    Loopback4              [B][up/up]
        2001:DB8:A:1::4[/B]
    
    R111-Host1#
    R112 sẽ làm router đóng gói / mở gói (ITR/ETR) trong LISP. R112 có 2 đường uplink đến router Core R113 và 1 đường kết nối (E0/0) tới R111. Đường uplink đến R113 (E1/1 và E1/2) sẽ được dùng cho việc định vị (RLOCs) và chỉ có IPv4. Lưu ý rằng Loopback 0 cũng được cấu hình địa chỉ EID IPv4 và IPv6.
    Code:
    R112-xTR# [B]show ip interface brief | exclude admin|un|Int[/B]
    
    Ethernet0/0                [B]172.16.1.2   [/B]   YES TFTP   [B]up                    up[/B]
    Ethernet1/1                [B]10.0.1.2 [/B]       YES TFTP  [B] up                    up[/B]
    Ethernet1/2                [B]10.0.2.2 [/B]       YES TFTP [B]  up                    up[/B]
    Loopback0                 [B] 192.168.1.254[/B]   YES TFTP   [B]up                    up[/B]
    
    R112-xTR# [B]show ipv6 interface brief | exclude un|down|FE[/B]
    
    Ethernet0/0            [B][up/up][/B]
        [B]2001:DB8:A:2::2[/B]
    Ethernet1/1            [up/up]
    Ethernet1/2            [up/up]
    [B]Loopback0              [up/up]
        2001:DB8:A:1::254[/B]
    
    R112-xTR#
    Sau những bước cấu hình trên, từ R111 và R112 chúng ta chỉ có thể ping đến các địa chỉ được dùng trong cục bộ (vd 172.16.1.0/24 và 2001:db8:a:2::/64), cũng như những địa chỉ EID của LISP Site 1 ( vd 192.168.1.1 hoặc .2 hoặc .3 hoặc .4 và .254).

    Từ R112, chúng ta cũng chỉ có thể ping được đến những địa chỉ thuộc dãy mạng 10/8. Chúng ta không thể ping đến địa chỉ EID trong Site 2, chẳng hạn 192.168.7.0/24. Cùng xem kết quả bên dưới.
    Code:
    R112-xTR# [B]ping 10.0.100.2 source 10.0.1.2[/B]
    
    Type escape sequence to abort.
    Sending 5, 100-byte ICMP Echos to 10.0.100.2, timeout is 2 seconds:
    Packet sent with a source address of 10.0.1.2
    !!!!!
    [B]Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/5 ms[/B]
    
    R112-xTR# [B]ping 10.0.101.2 source 10.0.1.2[/B]
    
    Type escape sequence to abort.
    Sending 5, 100-byte ICMP Echos to 10.0.101.2, timeout is 2 seconds:
    Packet sent with a source address of 10.0.1.2
    !!!!!
    [B]Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms[/B]
    
    R112-xTR# [B]ping 10.0.9.2 source 10.0.1.2[/B]
    
    Type escape sequence to abort.
    Sending 5, 100-byte ICMP Echos to 10.0.9.2, timeout is 2 seconds:
    Packet sent with a source address of 10.0.1.2
    !!!!!
    
    [B]Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms[/B]
    
    R112-xTR# [B]ping 192.168.7.254 source 192.168.1.254[/B]
    
    Type escape sequence to abort.
    Sending 5, 100-byte ICMP Echos to 192.168.7.254, timeout is 2 seconds:
    Packet sent with a source address of 192.168.1.254
    .....
    [B]Success rate is 0 percent (0/5)[/B]
    
    R112-xTR#
    • LISP Site 2:
    R117 được dùng như là host và được đánh địa chỉ theo subnet của địa chỉ định danh đầu cuối (EID) ở Site 2. R117 có 4 cổng loopback, mỗi cổng được gán với 1 địa chỉ IPv4/32 và 1 địa chỉ IPv6/128 từ không gian định danh địa chỉ đầu cuối cho Site 2 (192.168.7.0/24, 2001:db8:B:1::/64). R117 có 1 đường vật lý (E0/0) kết nối đến R116 với địa chỉ 172.16.7.1/24 và 2001:DB8:B:2::1/64.

    Code:
    R117-Host2# [B]show ip interface brief | exclude un|down[/B]
    
    Interface                  IP-Address      OK? Method Status                Protocol
    Ethernet0/0                [B]172.16.7.1  [/B]    YES TFTP   [B]up                    up[/B]
    Loopback1                [B]  192.168.7.1     [/B]YES TFTP   [B]up                    up[/B]
    Loopback2                 [B] 192.168.7.2[/B]     YES TFTP   [B]up                    up[/B]
    Loopback3                [B]  192.168.7.3 [/B]    YES TFTP   [B]up                    up[/B]
    Loopback4               [B]   192.168.7.4 [/B]    YES TFTP   [B]up                    up[/B]
    
    R117-Host2# [B]show ipv6 interface brief | exclude un|down|FE[/B]
    
    Ethernet0/0            [B][up/up]
        2001:DB8:B:2::1[/B]
    Loopback1             [B] [up/up]
        2001:DB8:B:1::1[/B]
    Loopback2              [B][up/up]
        2001:DB8:B:1::2[/B]
    Loopback3             [B] [up/up]
        2001:DB8:B:1::3[/B]
    Loopback4              [B][up/up]
        2001:DB8:B:1::4[/B]
    
    R117-Host2#
    Ở bài tập sau, R116 sẽ làm router xTR (Ingress tunnel router / Egress tunnel router) trong LISP ở Site 2. R116 có 1 đường uplink kết nối nó với router Core R113 và 1 đường kết nối đến R117. Đường uplink đến R113 (E0/1) sẽ được dùng cho việc định vị của LISP trong bài tập sau. Lưu ý rằng Loopback0 cũng được cấu hình địa chỉ theo không gian định danh địa chỉ đầu cuối của EID; điều này sẽ hữu dụng cho việc xác định nguồn những gói tin gán với dãy prefix xuyên suốt quá trình thử nghiệm ở bài tập sau.
    Code:
    R116-xTR# [B]show ip interface brief | exc ad|d[/B]
    
    Ethernet0/0               [B] 172.16.7.2[/B]           YES     TFTP       [B]up                    up[/B]
    Ethernet0/1                [B]10.0.9.2   [/B]             YES     TFTP     [B]  up                    up[/B]
    Loopback0                  [B]192.168.7.254    [/B] YES     TFTP    [B]   up                    up[/B]
    
    R116-xTR# [B]show ipv6 interface brief | exclude un|do|FE[/B]
    
    Ethernet0/0          [B]  [up/up][/B]
      [B]  2001:DB8:B:2::2[/B]
    Ethernet0/1            [up/up]
    Loopback0            [B]  [up/up][/B]
      [B]  2001:DB8:B:1::254[/B]
    
    R116-xTR#
    Sau những cấu hình trên, từ R116 và R117 chúng ta chỉ có thể ping đến các địa chỉ được dùng trong cục bộ (vd 172.16.7.0/24 và 2001:DB8:B:2::/64), cũng như những địa chỉ EID của LISP Site 2 ( vd 192.168.7.1 hoặc .2 hoặc .3 hoặc .4 và .254). Từ R116, chúng ta cũng chỉ có thể ping được đến những địa chỉ thuộc dãy mạng 10/8. Chúng ta không thể ping đến địa chỉ thuộc EID của Site 1, chẳng hạn 192.168.1.0/24. Cùng xem kết quả bên dưới:
    Code:
    R116-xTR# [B]ping 10.0.100.2 source 10.0.9.2[/B]
    
    Type escape sequence to abort.
    Sending 5, 100-byte ICMP Echos to 10.0.100.2, timeout is 2 seconds:
    Packet sent with a source address of 10.0.9.2
    !!!!!
    [B]Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/4 ms[/B]
    
    R116-xTR# [B]ping 10.0.101.2 source 10.0.9.2[/B]
    
    Type escape sequence to abort.
    Sending 5, 100-byte ICMP Echos to 10.0.101.2, timeout is 2 seconds:
    Packet sent with a source address of 10.0.9.2
    !!!!!
    [B]Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms[/B]
    
    R116-xTR#[B] ping 10.0.1.2 source 10.0.9.2[/B]
    
    Type escape sequence to abort.
    Sending 5, 100-byte ICMP Echos to 10.0.1.2, timeout is 2 seconds:
    Packet sent with a source address of 10.0.9.2
    !!!!!
    [B]Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms[/B]
    
    R116-xTR# [B]ping 192.168.1.254 source 192.168.7.254[/B]
    
    Type escape sequence to abort.
    Sending 5, 100-byte ICMP Echos to 192.168.1.254, timeout is 2 seconds:
    Packet sent with a source address of 192.168.7.254
    .....
    [B]Success rate is 0 percent (0/5)[/B]
    
    R116-xTR#
    Bước 2: Kiểm tra địa chỉ Ipv4, các cấu hình và kết nối của router Core - R113

    Core Router:

    Router R113 đóng vai trò làm router “Core” đại diện cho Internet (với IPv4 và IPv6) trong sơ đồ mạng trên. Ngoài những kết nối đến router xTR R112 và R116, router R113 cũng có những kết nối đến Mapping server/ Mapping Resolver (MSMR) – R114 và Router Proxy (PxTR) – R115. Router R113 cũng được cấu hình cổng loopback 1 – đại diện cho host với địa chỉ IPv4 “non-LISP” (địa chỉ đi Internet). Việc này dùng để kiểm tra ở bài tập sau.
    Code:
    R113-Core#[B] show ip interface brief | exclude un|down[/B]
    
    Interface                  IP-Address      OK? Method Status                Protocol
    Ethernet0/0                [B]10.0.100.1  [/B]    YES TFTP [B]  up                    up[/B]
    Ethernet0/1               [B] 10.0.101.1   [/B]   YES TFTP   [B]up                    up[/B]
    Ethernet0/2                [B]10.0.9.1     [/B]   YES TFTP   [B]up                    up[/B]
    Ethernet1/1                [B]10.0.1.1    [/B]    YES TFTP [B]  up                    up[/B]
    Ethernet1/2            [B]    10.0.2.1    [/B]    YES TFTP  [B] up                    up[/B]
    Loopback1               [B]   10.200.1.1 [/B]     YES TFTP   [B]up                    up[/B]
    
    R113-Core# [B]show ipv6 interface brief | exclude un|down|FE[/B]
    
    Ethernet0/0           [B] [up/up]
        2001:DB8:3:4::1[/B]
    Ethernet0/1            [B][up/up]
        2001:DB8:3:5::1[/B]
    Ethernet0/2            [up/up]
    Ethernet1/1            [up/up]
    Ethernet1/2            [up/up]
    Loopback1              [up/up]
    
    R113-Core#
    Từ R113 chúng ta có thể ping đến thiết bị có nhóm địa chỉ thuộc dãy mạng 10/8 bao gồm: R112, R116, R114 , Router LISP MS/MR, R115 và Router LISP PxTR. Tương tự với IPv6.

    Bài lab này tập trung vào LISP từ góc nhìn 1 doanh nghiệp; do đó, sự hiện diện của 1 router “LISP Mapping Service Provider” (router thuộc nhà cung cấp dịch vụ làm vai trò ánh xạ trong LISP) là giả định. Vì thế, tất cả các router Mapping Services và Proxy Services (router ánh xạ và router Proxy) được xem như đã được cấu hình trước trong lab này. Như một phần của việc cấu hình, R113 được cấu hình BGP peer với R115 – Router LISP PxTR. Yêu cầu này không bắt buộc. Tuy nhiên, việc này đại diện cho một cách cấu hình điển hình – Router Proxy đóng gói (Proxy Ingress Tunnel Router - PITR) sẽ dùng để quảng bá không gian định danh EID của LISP vào vùng mạng Core. Router PITR phải quảng bá các địa chỉ summary IPv4 của LISP EID vào router Core để các router khác ngoài miền Internet (non-LISP) có thể truy cập đến các prefix này. Sau đó LISP đóng gói những lưu lượng này và chuyển đến LISP Sites. Đó là mục đích cho việc cấu hình BGP ở trên.

    Code:
    R113-Core# show run | sec router bgp
    router bgp 3
     bgp asnotation dot
     bgp log-neighbor-changes
     neighbor 10.0.101.2 remote-as 5
     neighbor 2001:DB8:3:5::2 remote-as 5
     !
     address-family ipv4
      neighbor 10.0.101.2 activate
      no neighbor 2001:DB8:3:5::2 activate
     exit-address-family
     !
     address-family ipv6
      neighbor 2001:DB8:3:5::2 activate
     exit-address-family
    R113-Core#
    Bước 3: Kiểm tra địa chỉ IP và trạng thái kết nối trên MSMR-R114 và Proxy xTR-R115

    LISP Mapping-Server/Map-Resolver (MSMR):

    R114 được cấu hình các tính năng của LISP MSMR trong bài lab này. R114 có 1 kết nối đến Core (R113), và sử dụng địa chỉ IPv4/IPv6.
    Code:
    R114-MSMR# [B]show ip int brief | exc un|do[/B]
    
    Interface                  IP-Address      OK? Method Status                Protocol
    Ethernet0/0                [B]10.0.100.2  [/B]    YES TFTP   [B]up                    up[/B]
    
    R114-MSMR# [B]show ipv6 int brief | exc un|do|FE[/B]
    Ethernet0/0            [up/up]
      [B]  2001:DB8:3:4::2[/B]
    R114-MSMR#
    LISP Proxy ITR/ETR (PxTR):

    R115 đóng vai trò làm router proxy đóng/mở gói (Proxy Ingress Tunnel Router/Proxy Egress Tunnel Router(PxTR). R115 có 1 kết nối đến Core-R113, và cũng sử dụng địa chỉ IPv4/v6.
    Code:
    [B]R115-PxTR# show ip int brief | exc un|do[/B]
    
    Interface                  IP-Address      OK? Method Status                Protocol
    Ethernet0/0                [B]10.0.101.2 [/B]     YES TFTP  [B] up                    up[/B]
    
    R115-PxTR# [B]show ipv6 int brief | exc un|do|FE[/B]
    Ethernet0/0           [B] [up/up]
        2001:DB8:3:5::2[/B]
    LISP0                  [up/up]
    
    R115-PxTR#
    Từ R114 và R115 , chúng ta có thể ping đến các địa chỉ mạng 10/8.

    Bước 4: Kiểm tra cấu hình LISP trên các router MSMR-R114 và PxTR-R115

    LISP Mapping-Server/Map-Resolver (MSMR):

    Các cấu hình LISP đều đã được thực hiện trong bài lab này. Cùng xem lại cấu hình như sau:

    Code:
    R114-MSMR# [B]show run | section lisp|ip route|ipv6 route[/B]
    [B]router lisp[/B]
    [B]site site1[/B]
     [B] description LISP Site 1 - GOLD Lab
      authentication-key SITE1KEY
      eid-prefix 192.168.1.0/24
      eid-prefix 2001:DB8:A::/48[/B]
      exit
     !
    [B]site site2[/B]
    [B] description Site 2 - GOLD Lab
      authentication-key SITE2KEY
      eid-prefix 192.168.7.0/24
      eid-prefix 2001:DB8:B::/48[/B]
      exit
     !
    [B]ipv4 map-server
     ipv4 map-resolver
     ipv6 map-server
     ipv6 map-resolver[/B]
     exit
    ip route 0.0.0.0 0.0.0.0 10.0.100.1
    ipv6 route ::/0 2001:DB8:3:4::1
    R114-MSMR#
    Khai báo thông tin cho Site 1 :
    • authentication-key SITE1KEY
    • eid-prefix 192.168.1.0/24
    Khai báo thông tin cho Site 2 :
    • authentication-key SITE2KEY
    • eid-prefix 192.168.7.0/24
    Bật tính năng map-server và map-resolver bằng lệnh ipv4 (ipv6) map-serveripv4 (ipv6) map-resolver.

    Như đã thể hiện trong cấu hình R114, các cấu hình LISP “site” cho Site 1 và Site 2 được định rõ. Chúng phải được cấu hình để các site này được ghi nhận và tham gia vào việc kết nối và ánh xạ trong LISP.

    LISP Proxy ITR/ETR (PxTR):

    R115 đóng vài trò làm router proxy đóng/mở gói (Proxy ITR/ETR – PxTR). Các cấu hình LISP đều được thực hiện trong bài lab này. Cùng xem lại các cấu hình như sau.
    Code:
    R115-PxTR# [B]show run | sec router lisp|router bgp|route-map|ip route|ipv6 route[/B]
    
    [COLOR=#0000FF][B]router lisp[/B]
     eid-table default instance-id 0
     [B] ipv4 route-import map-cache static route-map EID-space
      ipv6 route-import map-cache static route-map EID-space[/B]
      exit
     !
     ipv4 map-request-source 10.0.101.2
     no ipv4 map-cache-persistent
     ipv4 map-cache-limit 100000
     ipv4 proxy-etr
     ipv4 proxy-itr 10.0.101.2 2001:DB8:3:5::2
     ipv4 itr map-resolver 10.0.100.2
     ipv6 map-request-source 2001:DB8:3:5::2
     no ipv6 map-cache-persistent
     ipv6 map-cache-limit 100000
     ipv6 proxy-etr
     ipv6 proxy-itr 2001:DB8:3:5::2 10.0.101.2
     ipv6 itr map-resolver 10.0.100.2
     exit
    [B]router bgp 5[/B]
     bgp asnotation dot
     bgp log-neighbor-changes
     neighbor 10.0.101.1 remote-as 3
     neighbor 2001:DB8:3:5::1 remote-as 3
     !
     address-family ipv4
      redistribute static route-map pop-EID
      neighbor 10.0.101.1 activate
      no neighbor 2001:DB8:3:5::1 activate
     exit-address-family
     !
     address-family ipv6
      redistribute static route-map pop-EID
      neighbor 2001:DB8:3:5::1 activate[/COLOR]
     exit-address-family
    ip route 0.0.0.0 0.0.0.0 10.0.101.1
    ip route 192.168.0.0 255.255.0.0 Null0 tag 111
    ipv6 route 2001:DB8:A::/47 Null0 tag 111
    ipv6 route ::/0 2001:DB8:3:5::1
    route-map EID-space permit 10
     match tag 111
    route-map pop-EID permit 10
     match tag 111
     set origin igp
     set community 7274501
    R115-PxTR#
    Như các cấu hình của R115 ở trên, có 2 chức năng quan trọng được cấu hình trên router này. Đầu tiên,router này hoạt động như 1 router proxy đóng và mở gói (PITR và PETR). Việc kích hoạt các tính năng PETR không mấy quan trọng. Tuy nhiên PITR phải được cấu hình với không gian EID-prefix mà nó chịu trách nhiệm vai trò proxy. Thứ 2 (sẽ được mô tả chi tiết ở lab sau), router PITR phải quảng bá các địa chỉ summary IPv4/v6 của LISP EID vào router Core. Điều này là cần thiết vậy nên lưu lượng từ các nguồn non-LISP được gửi tới đích đến là LISP site tức các nguồn lần đầu tiên được “thu hút” đến PITR, sau đó LISP sẽ đóng gói lưu lượng này và gửi đến LISP site. Chức năng kết nối này cung cấp một lợi thế “day-one” (ý nói sự thuận lợi trong lần đầu tiên kết nối) đến các LISP site. Đó là lý do cần cấu hình BGP.

    Lưu ý: Khi triển khai LISP thực tế, 1 router “cung cấp dịch vụ” LISP sẽ cung cấp tất cả các ánh xạ và dịch vụ proxy. Bài lab này giả lập 1 kịch bản, do đó các dịch vụ đã được cấu hình sẵn để thực hiện bài lab.





    Last edited by Tín Phan; 22-10-2019, 01:45 PM.
    Phan Trung Tín
    Email: phantrungtin@vnpro.org
    .
Trung Tâm Tin Học VnPro
149/1D Ung Văn Khiêm, P.25, Q.Bình Thạnh, Tp.HCM
Tel: (028) 35124257 (028) 36222234
Fax: (028) 35124314

Home Page: http://www.vnpro.vn
Forum: http://www.vnpro.org
Twitter: https://twitter.com/VnVnpro
LinkedIn: https://www.linkedin.com/in/VnPro
- Chuyên đào tạo quản trị mạng và hạ tầng Internet
- Phát hành sách chuyên môn
- Tư vấn và tuyển dụng nhân sự IT
- Tư vấn thiết kế và hỗ trợ kỹ thuật hệ thống mạng

Videos: http://www.dancisco.com
Blog: http://www.vnpro.org/blog
Facebook: http://facebook.com/VnPro
Zalo: https://zalo.me/1005309060549762169
​​​​​​

  • #2
    CẤU HÌNH CỦA CÁC ROUTER







    R111-Host1:
    Code:
    [SPOILER]
    !
    ! Last configuration change at 16:34:00 EET Sat Oct 26 2019
    !
    version 15.4
    service timestamps debug datetime msec
    service timestamps log datetime msec
    no service password-encryption
    !
    hostname R111-Host1
    !
    boot-start-marker
    boot-end-marker
    !
    !
    !
    no aaa new-model
    clock timezone EET 2 0
    mmi polling-interval 60
    no mmi auto-configure
    no mmi pvc
    mmi snmp-timeout 180
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    no ip domain lookup
    ip cef
    ipv6 unicast-routing
    ipv6 cef
    !
    multilink bundle-name authenticated
    !
    !
    !
    !
    !
    !
    !
    !
    !
    redundancy
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    interface Loopback1
     no shutdown
     ip address 192.168.1.1 255.255.255.255
     ipv6 address 2001:DB8:A:1::1/128
     ipv6 ospf 6 area 0
    !
    interface Loopback2
     no shutdown
     ip address 192.168.1.2 255.255.255.255
     ipv6 address 2001:DB8:A:1::2/128
     ipv6 ospf 6 area 0
    !
    interface Loopback3
     no shutdown
     ip address 192.168.1.3 255.255.255.255
     ipv6 address 2001:DB8:A:1::3/128
     ipv6 ospf 6 area 0
    !
    interface Loopback4
     no shutdown
     ip address 192.168.1.4 255.255.255.255
     ipv6 address 2001:DB8:A:1::4/128
     ipv6 ospf 6 area 0
    !
    interface Ethernet0/0
     no shutdown
     ip address 172.16.1.1 255.255.255.0
     ip ospf 1 area 0
     ipv6 address 2001:DB8:A:2::1/64
     ipv6 ospf 6 area 0
    !
    interface Ethernet0/1
     no shutdown
     no ip address
     shutdown
    !
    interface Ethernet0/2
     no shutdown
     no ip address
     shutdown
    !
    interface Ethernet0/3
     no shutdown
     no ip address
     shutdown
    !
    router ospf 1
     network 192.168.1.0 0.0.0.255 area 0
    !
    ip forward-protocol nd
    !
    !
    no ip http server
    no ip http secure-server
    !
    ipv6 router ospf 6
    !
    !
    !
    !
    control-plane
    !
    !
    !
    !
    !
    !
    !
    !
    line con 0
     logging synchronous
    line aux 0
    line vty 0 4
     login
     transport input none
    !
    !
    end
    [/SPOILER]
    R112-xTR:
    Code:
    [SPOILER]
    !
    ! Last configuration change at 16:00:16 EET Sat Oct 26 2019
    !
    version 15.4
    service timestamps debug datetime msec
    service timestamps log datetime msec
    no service password-encryption
    !
    hostname R112-xTR
    !
    boot-start-marker
    boot-end-marker
    !
    !
    !
    no aaa new-model
    clock timezone EET 2 0
    mmi polling-interval 60
    no mmi auto-configure
    no mmi pvc
    mmi snmp-timeout 180
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    no ip domain lookup
    ip cef
    ipv6 unicast-routing
    ipv6 cef
    !
    multilink bundle-name authenticated
    !
    !
    !
    !
    !
    !
    !
    !
    !
    redundancy
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    interface Loopback0
     no shutdown
     ip address 192.168.1.254 255.255.255.255
     ipv6 address 2001:DB8:A:1::254/128
     ipv6 ospf 6 area 0
    !
    interface Ethernet0/0
     no shutdown
     ip address 172.16.1.2 255.255.255.0
     ip ospf 1 area 0
     ipv6 address 2001:DB8:A:2::2/64
     ipv6 ospf 6 area 0
    !
    interface Ethernet0/1
     no shutdown
     no ip address
     shutdown
    !
    interface Ethernet0/2
     no shutdown
     no ip address
     shutdown
    !
    interface Ethernet0/3
     no shutdown
     no ip address
     shutdown
    !
    interface Ethernet1/0
     no shutdown
     no ip address
     shutdown
    !
    interface Ethernet1/1
     no shutdown
     ip address 10.0.1.2 255.255.255.252
    !
    interface Ethernet1/2
     no shutdown
     ip address 10.0.2.2 255.255.255.252
    !
    interface Ethernet1/3
     no shutdown
     no ip address
     shutdown
    !
    router ospf 1
     default-information originate
    !
    ip forward-protocol nd
    !
    !
    no ip http server
    no ip http secure-server
    ip route 0.0.0.0 0.0.0.0 10.0.1.1
    ip route 0.0.0.0 0.0.0.0 10.0.2.1
    !
    ipv6 route ::/0 2001:DB8:2:3::1
    ipv6 router ospf 6
     default-information originate always
    !
    !
    !
    !
    control-plane
    !
    !
    !
    !
    !
    !
    !
    !
    line con 0
     logging synchronous
    line aux 0
    line vty 0 4
     login
     transport input none
    !
    !
    end
    [/SPOILER]
    R113-Core:
    Code:
    [SPOILER]!
    ! Last configuration change at 16:08:42 EET Sat Oct 26 2019
    !
    version 15.4
    service timestamps debug datetime msec
    service timestamps log datetime msec
    no service password-encryption
    !
    hostname R113-Core
    !
    boot-start-marker
    boot-end-marker
    !
    !
    !
    no aaa new-model
    clock timezone EET 2 0
    mmi polling-interval 60
    no mmi auto-configure
    no mmi pvc
    mmi snmp-timeout 180
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    no ip domain lookup
    ip cef
    ipv6 unicast-routing
    ipv6 cef
    !
    multilink bundle-name authenticated
    !
    !
    !
    !
    !
    !
    !
    !
    !
    redundancy
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    interface Loopback1
     no shutdown
     ip address 10.200.1.1 255.255.255.0
    !
    interface Ethernet0/0
     no shutdown
     description Connection to MSMR
     ip address 10.0.100.1 255.255.255.252
     ipv6 address 2001:DB8:3:4::1/64
    !
    interface Ethernet0/1
     no shutdown
     description Connection to PxTR
     ip address 10.0.101.1 255.255.255.252
     ipv6 address 2001:DB8:3:5::1/64
    !
    interface Ethernet0/2
     no shutdown
     description Connection to LISP Site 2 (RTR 116)
     ip address 10.0.9.1 255.255.255.252
    !
    interface Ethernet0/3
     no shutdown
     no ip address
     shutdown
    !
    interface Ethernet1/0
     no shutdown
     no ip address
     shutdown
    !
    interface Ethernet1/1
     no shutdown
     description Connection to LISP Site 1 (RTR 112)
     ip address 10.0.1.1 255.255.255.252
    !
    interface Ethernet1/2
     no shutdown
     description Connection to LISP Site 1 (RTR 112)
     ip address 10.0.2.1 255.255.255.252
    !
    interface Ethernet1/3
     no shutdown
     no ip address
     shutdown
    !
    router bgp 3
     bgp asnotation dot
     bgp log-neighbor-changes
     neighbor 10.0.101.2 remote-as 5
     neighbor 2001:DB8:3:5::2 remote-as 5
     !
     address-family ipv4
      neighbor 10.0.101.2 activate
      no neighbor 2001:DB8:3:5::2 activate
     exit-address-family
     !
     address-family ipv6
      neighbor 2001:DB8:3:5::2 activate
     exit-address-family
    !
    ip forward-protocol nd
    !
    ip bgp-community new-format
    !
    no ip http server
    no ip http secure-server
    !
    !
    !
    !
    control-plane
    !
    !
    !
    !
    !
    !
    !
    !
    line con 0
     logging synchronous
    line aux 0
    line vty 0 4
     login
     transport input none
    !
    !
    end
    [/SPOILER]
    R114-MSMR:
    Code:
    [SPOILER]
    !
    ! Last configuration change at 16:02:28 EET Sat Oct 26 2019
    !
    version 15.4
    service timestamps debug datetime msec
    service timestamps log datetime msec
    no service password-encryption
    !
    hostname R114-MSMR
    !
    boot-start-marker
    boot-end-marker
    !
    !
    !
    no aaa new-model
    clock timezone EET 2 0
    mmi polling-interval 60
    no mmi auto-configure
    no mmi pvc
    mmi snmp-timeout 180
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    no ip domain lookup
    ip cef
    ipv6 unicast-routing
    ipv6 cef
    !
    multilink bundle-name authenticated
    !
    !
    !
    !
    !
    !
    !
    !
    !
    redundancy
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    interface Ethernet0/0
     no shutdown
     ip address 10.0.100.2 255.255.255.252
     ipv6 address 2001:DB8:3:4::2/64
    !
    interface Ethernet0/1
     no shutdown
     no ip address
     shutdown
    !
    interface Ethernet0/2
     no shutdown
     no ip address
     shutdown
    !
    interface Ethernet0/3
     no shutdown
     no ip address
     shutdown
    !
    router lisp
     site site1
      description LISP Site 1 - GOLD Lab
      authentication-key SITE1KEY
      eid-prefix 192.168.1.0/24
      eid-prefix 2001:DB8:A::/48
      exit
     !
     site site2
      description Site 2 - GOLD Lab
      authentication-key SITE2KEY
      eid-prefix 192.168.7.0/24
      eid-prefix 2001:DB8:B::/48
      exit
     !
     ipv4 map-server
     ipv4 map-resolver
     ipv6 map-server
     ipv6 map-resolver
     exit
    !
    ip forward-protocol nd
    !
    !
    no ip http server
    no ip http secure-server
    ip route 0.0.0.0 0.0.0.0 10.0.100.1
    !
    ipv6 route ::/0 2001:DB8:3:4::1
    !
    !
    !
    control-plane
    !
    !
    !
    !
    !
    !
    !
    !
    line con 0
     logging synchronous
    line aux 0
    line vty 0 4
     login
     transport input none
    !
    !
    end
    [/SPOILER]
    R115-PxTR:
    Code:
    [SPOILER]
    !
    ! Last configuration change at 16:14:54 EET Sat Oct 26 2019
    !
    version 15.4
    service timestamps debug datetime msec
    service timestamps log datetime msec
    no service password-encryption
    !
    hostname R115-PxTR
    !
    boot-start-marker
    boot-end-marker
    !
    !
    !
    no aaa new-model
    clock timezone EET 2 0
    mmi polling-interval 60
    no mmi auto-configure
    no mmi pvc
    mmi snmp-timeout 180
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    no ip domain lookup
    ip cef
    ipv6 unicast-routing
    ipv6 cef
    !
    multilink bundle-name authenticated
    !
    !
    !
    !
    !
    !
    !
    !
    !
    redundancy
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    interface LISP0
     no shutdown
    !
    interface Ethernet0/0
     no shutdown
     ip address 10.0.101.2 255.255.255.252
     ipv6 address 2001:DB8:3:5::2/64
    !
    interface Ethernet0/1
     no shutdown
     no ip address
     shutdown
    !
    interface Ethernet0/2
     no shutdown
     no ip address
     shutdown
    !
    interface Ethernet0/3
     no shutdown
     no ip address
     shutdown
    !
    router lisp
     eid-table default instance-id 0
      ipv4 route-import map-cache static route-map EID-space
      ipv6 route-import map-cache static route-map EID-space
      exit
     !
     ipv4 map-request-source 10.0.101.2
     no ipv4 map-cache-persistent
     ipv4 map-cache-limit 100000
     ipv4 proxy-etr
     ipv4 proxy-itr 10.0.101.2 2001:DB8:3:5::2
     ipv4 itr map-resolver 10.0.100.2
     ipv6 map-request-source 2001:DB8:3:5::2
     no ipv6 map-cache-persistent
     ipv6 map-cache-limit 100000
     ipv6 proxy-etr
     ipv6 proxy-itr 2001:DB8:3:5::2 10.0.101.2
     ipv6 itr map-resolver 10.0.100.2
     exit
    !
    router bgp 5
     bgp asnotation dot
     bgp log-neighbor-changes
     neighbor 10.0.101.1 remote-as 3
     neighbor 2001:DB8:3:5::1 remote-as 3
     !
     address-family ipv4
      redistribute static route-map pop-EID
      neighbor 10.0.101.1 activate
      no neighbor 2001:DB8:3:5::1 activate
     exit-address-family
     !
     address-family ipv6
      redistribute static route-map pop-EID
      neighbor 2001:DB8:3:5::1 activate
     exit-address-family
    !
    ip forward-protocol nd
    !
    !
    no ip http server
    no ip http secure-server
    ip route 0.0.0.0 0.0.0.0 10.0.101.1
    ip route 192.168.0.0 255.255.0.0 Null0 tag 111
    !
    ipv6 route 2001:DB8:A::/47 Null0 tag 111
    ipv6 route ::/0 2001:DB8:3:5::1
    !
    route-map EID-space permit 10
     match tag 111
    !
    route-map pop-EID permit 10
     match tag 111
     set origin igp
     set community 7274501
    !
    !
    !
    control-plane
    !
    !
    !
    !
    !
    !
    !
    !
    line con 0
     logging synchronous
    line aux 0
    line vty 0 4
     login
     transport input none
    !
    !
    end
    [/SPOILER]
    R116-xTR:
    Code:
    [SPOILER]!
    ! Last configuration change at 16:16:57 EET Sat Oct 26 2019
    !
    version 15.4
    service timestamps debug datetime msec
    service timestamps log datetime msec
    no service password-encryption
    !
    hostname R116-xTR
    !
    boot-start-marker
    boot-end-marker
    !
    !
    !
    no aaa new-model
    clock timezone EET 2 0
    mmi polling-interval 60
    no mmi auto-configure
    no mmi pvc
    mmi snmp-timeout 180
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    ip cef
    ipv6 unicast-routing
    ipv6 cef
    !
    multilink bundle-name authenticated
    !
    !
    !
    !
    !
    !
    !
    !
    !
    redundancy
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    interface Loopback0
     no shutdown
     ip address 192.168.7.254 255.255.255.255
     ipv6 address 2001:DB8:B:1::254/128
    !
    interface Ethernet0/0
     no shutdown
     description Conn to Inside (hosts)
     ip address 172.16.7.2 255.255.255.0
     ip ospf 1 area 0
     ipv6 address 2001:DB8:B:2::2/64
     ipv6 ospf 6 area 0
    !
    interface Ethernet0/1
     no shutdown
     description Conn to CORE (RLOC for LISP)
     ip address 10.0.9.2 255.255.255.252
    !
    interface Ethernet0/2
     no shutdown
     no ip address
     shutdown
    !
    interface Ethernet0/3
     no shutdown
     no ip address
     shutdown
    !
    router ospf 1
     default-information originate always
    !
    ip forward-protocol nd
    !
    !
    no ip http server
    no ip http secure-server
    ip route 0.0.0.0 0.0.0.0 10.0.9.1
    !
    ipv6 router ospf 6
     router-id 172.16.7.2
     default-information originate always
    !
    !
    !
    !
    control-plane
    !
    !
    !
    !
    !
    !
    !
    !
    line con 0
     logging synchronous
    line aux 0
    line vty 0 4
     login
     transport input none
    !
    !
    end
    [/SPOILER]
    R117-Host2:
    Code:
    [SPOILER]
    !
    ! Last configuration change at 16:20:55 EET Sat Oct 26 2019
    !
    version 15.4
    service timestamps debug datetime msec
    service timestamps log datetime msec
    no service password-encryption
    !
    hostname R117-Host2
    !
    boot-start-marker
    boot-end-marker
    !
    !
    !
    no aaa new-model
    clock timezone EET 2 0
    mmi polling-interval 60
    no mmi auto-configure
    no mmi pvc
    mmi snmp-timeout 180
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    ip cef
    ipv6 unicast-routing
    ipv6 cef
    !
    multilink bundle-name authenticated
    !
    !
    !
    !
    !
    !
    !
    !
    !
    redundancy
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    interface Loopback1
     no shutdown
     ip address 192.168.7.1 255.255.255.255
     ipv6 address 2001:DB8:B:1::1/128
     ipv6 ospf 6 area 0
    !
    interface Loopback2
     no shutdown
     ip address 192.168.7.2 255.255.255.255
     ipv6 address 2001:DB8:B:1::2/128
     ipv6 ospf 6 area 0
    !
    interface Loopback3
     no shutdown
     ip address 192.168.7.3 255.255.255.255
     ipv6 address 2001:DB8:B:1::3/128
     ipv6 ospf 6 area 0
    !
    interface Loopback4
     no shutdown
     ip address 192.168.7.4 255.255.255.255
     ipv6 address 2001:DB8:B:1::4/128
     ipv6 ospf 6 area 0
    !
    interface Ethernet0/0
     no shutdown
     ip address 172.16.7.1 255.255.255.0
     ip ospf 1 area 0
     ipv6 address 2001:DB8:B:2::1/64
     ipv6 ospf 6 area 0
    !
    interface Ethernet0/1
     no shutdown
     no ip address
     shutdown
    !
    interface Ethernet0/2
     no shutdown
     no ip address
     shutdown
    !
    interface Ethernet0/3
     no shutdown
     no ip address
     shutdown
    !
    router ospf 1
     network 192.168.7.0 0.0.0.255 area 0
    !
    ip forward-protocol nd
    !
    !
    no ip http server
    no ip http secure-server
    !
    ipv6 router ospf 6
    !
    !
    !
    !
    control-plane
    !
    !
    !
    !
    !
    !
    !
    !
    line con 0
     logging synchronous
    line aux 0
    line vty 0 4
     login
     transport input none
    !
    !
    end
    [/SPOILER]

    Comment

    • Working...
      X