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.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Lab – Multiarea OSPFv3

    Lab – Multiarea OSPFv3

    Sơ đồ:

    Click image for larger version

Name:	image.png
Views:	51
Size:	30.6 KB
ID:	431543
    Hình 1 – Sơ đồ bài Lab

    Mô tả:
    • Bài lab được dựng trên EVE gồm 3 Router và 2 Multilayer Switch được đấu nối với nhau và đặt địa chỉ IP như được chỉ ra trên hình 1.
    • File IOL sử dụng:
    + Router: 86BI_LINUX-ADVENTERPRISEK9-M (Version 15.5(2)T)
    + Multilayer Switch: I86BI_LINUXL2-ADVENTERPRISEK9-M, Version 15.2(CML_NIGHTLY_20151103)FLO_DSGS7 Yêu cầu:

    1. Cấu hình ban đầu
    • Đặt địa chỉ IP cho các interface trên thiết bị Router và Switch trong global configuration mode theo quy hoạch IP được chỉ ra trên hình.
    2. Cấu hình OSPFv3 kiểu truyền thống
    • Cấu hình định tuyến OSPFv3 theo kiểu truyền thống trên D1
    3. Cấu hình OSPFv3 cho Address Family IPv4 và Address Family IPv6
    • Cấu hình định tuyến OSPFv3 theo kiểu Address Family trên các thiết bị khác
    4. Hiệu chỉnh OSPFv3
    • Cấu hình passive interface.
    • Cấu hình summarization.
    • Sửa đổi các network type.
    • Quảng bá default route
    Thực hiện :

    1. Cấu hình ban đầu

    Trên R1:

    R1(config)#interface Ethernet0/0
    R1(config-if)#ip address 172.16.0.2 255.255.255.252
    R1(config-if)#ipv6 address fe80::1:2 link-local
    R1(config-if)#ipv6 address 2001:db8:acad:a001::2/64
    R1(config-if)#no shutdown
    R1(config-if)#exit
    R1(config)#interface Ethernet0/1
    R1(config-if)#ip address 10.10.0.1 255.255.255.252
    R1(config-if)#ipv6 address fe80::1:1 link-local
    R1(config-if)#ipv6 address 2001:db8:acad:1001::1/64
    R1(config-if)#no shutdown
    R1(config-if)#end
    R1#copy running-config startup-config

    Trên R2:

    R2(config)#interface Ethernet0/0
    R2(config-if)#ip address 172.16.0.1 255.255.255.252
    R2(config-if)#ipv6 address fe80::2:1 link-local
    R2(config-if)#ipv6 address 2001:db8:acad:a001::1/64
    R2(config-if)#no shutdown
    R2(config-if)#exit
    R2(config)#interface Ethernet0/1
    R2(config-if)#ip address 172.16.1.1 255.255.255.252
    R2(config-if)#ipv6 address fe80::2:2 link-local
    R2(config-if)#ipv6 address 2001:db8:acad:a002::1/64
    R2(config-if)#no shutdown
    R2(config-if)#end
    R2# copy running-config startup-config

    Trên R3:

    R3(config)#interface Ethernet0/0
    R3(config-if)#ip address 172.16.1.2 255.255.255.252
    R3(config-if)#ipv6 address fe80::3:2 link-local
    R3(config-if)#ipv6 address 2001:db8:acad:a002::2/64
    R3(config-if)#no shutdown
    R3(config-if)#exit
    R3(config)#interface Ethernet0/1
    R3(config-if)#ip address 10.10.4.1 255.255.255.252
    R3(config-if)#ipv6 address fe80::3:1 link-local
    R3(config-if)#ipv6 address 2001:db8:acad:2001::1/64
    R3(config-if)#no shutdown
    R3(config-if)#end
    R3#copy running-config startup-config

    Trên D1:

    D1(config)#ip routing
    D1(config)#interface Ethernet0/1
    D1(config-if)#no switchport
    D1(config-if)#ip address 10.10.0.2 255.255.255.252
    D1(config-if)#ipv6 address fe80::d1:2 link-local
    D1(config-if)#ipv6 address 2001:db8:acad:1001::2/64
    D1(config-if)#no shutdown
    D1(config-if)#exit
    D1(config)#interface Ethernet0/0
    D1(config-if)#no switchport
    D1(config-if)#ip address 10.10.1.1 255.255.255.0
    D1(config-if)#ipv6 address fe80::d1:1 link-local
    D1(config-if)#ipv6 address 2001:db8:acad:1002::1/64
    D1(config-if)#no shutdown
    D1(config-if)#end
    D1#copy running-config startup-config

    Trên D2:

    D2(config)#ip routing
    D2(config)#interface Ethernet0/1
    D2(config-if)#no switchport
    D2(config-if)#ip address 10.10.4.2 255.255.255.252
    D2(config-if)#ipv6 address fe80::d2:2 link-local
    D2(config-if)#ipv6 address 2001:db8:acad:2001::2/64
    D2(config-if)#no shutdown
    D2(config-if)#exit
    D2(config)# interface Ethernet0/0
    D2(config-if)#no switchport
    D2(config-if)#ip address 10.10.5.1 255.255.255.0
    D2(config-if)#ipv6 add fe80::d2:1 link-local
    D2(config-if)#ipv6 add 2001:db8:acad:2002::1/64
    D2(config-if)#no shutdown
    D2(config-if)#exit
    D2(config)#exit
    D2# copy running-config startup-config
    2. Cấu hình OSPFv3 kiểu truyền thống

    Địa chỉ IPv6 GUA và địa chỉ link-local được gán tĩnh trên mỗi interface đễ dễ dàng nhận biết hơn tự động tạo ra bởi EUI-64. Câu lệnh “ show ipv6 interface brief ” để kiểm tra địa chỉ IPv6 GUA và link-local trên các cổng của Router.

    D1# show ipv6 interface brief
    <output omitted>
    Ethernet0/1 [up/up]
    FE80::D1:2
    2001:DB8:ACAD:1001::2
    <output omitted>
    Ethernet0/0 [up/up]
    FE80::D1:1
    2001:DB8:ACAD:1002::1
    <output omitted>

    Mặc định tính năng định tuyến IPv6 bị tắt, bạn phải bật tính năng này lên với dòng lệnh ipv6 unicast-routing trong chế độ global configuration.

    D1(config)# ipv6 unicast-routing

    Đa số các phiên bản IOS mặc định điều bật tính năng IPv6 CEF khi bật định tuyến cho IPv6. Bạn có thể sử dụng dòng lệnh “ show ipv6 cef ” để kiểm tra xem tính năng này có bật hay chưa.

    D1# show ipv6 cef
    ::/0
    no route
    ::/127
    discard
    2001:DB8:ACAD:1001::/64
    attached to Ethernet0/1
    2001:DB8:ACAD:1001::2/128
    receive for Ethernet0/1
    2001:DB8:ACAD:1002::/64
    attached to Ethernet0/0
    2001:DB8:ACAD:1002::1/128
    receive for Ethernet0/0
    FE80::/10
    receive for Null0
    FF00::/8
    multicast

    Cấu hình OSPFv3 trên D1.

    D1(config)# ipv6 router ospf 123
    D1(config-rtr)# router-id 1.1.1.2
    D1(config-rtr)# exit
    D1(config)# interface e0/1
    D1(config-if)# ipv6 ospf 123 area 1
    D1(config-if)# exit
    D1(config)# interface e0/0
    D1(config-if)# ipv6 ospf 123 area 1
    D1(config-if)# exit

    Câu lệnh show ipv6 ospf có thể được sử dụng để kiểm tra router ID. Nếu router ID trong OSPFv3 không bị thay đổi bởi dòng lệnh router-id, bạn có thể reset router ID là với dòng lệnh “ clear ipv6 ospf pid process ” và kiểm tra lại với câu lệnh “show ipv6 ospf ”.

    D1# show ipv6 ospf
    Routing Process "ospfv3 123" with ID 1.1.1.2
    Supports NSSA (compatible with RFC 3101)
    Event-log enabled, Maximum number of events: 1000, Mode: cyclic
    Router is not originating router-LSAs with maximum metric
    Initial SPF schedule delay 5000 msecs
    Minimum hold time between two consecutive SPFs 10000 msecs
    Maximum wait time between two consecutive SPFs 10000 msecs
    Minimum LSA interval 5 secs
    Minimum LSA arrival 1000 msecs
    LSA group pacing timer 240 secs
    Interface flood pacing timer 33 msecs
    Retransmission pacing timer 66 msecs
    Retransmission limit dc 24 non-dc 24
    Number of external LSA 0. Checksum Sum 0x000000
    Number of areas in this router is 1. 1 normal 0 stub 0 nssa
    Graceful restart helper support enabled
    Reference bandwidth unit is 100 mbps
    RFC1583 compatibility enabled
    Area 1
    Number of interfaces in this area is 2
    SPF algorithm executed 1 times
    Number of LSA 4. Checksum Sum 0x0237B6
    Number of DCbitless LSA 0
    Number of indication LSA 0
    Number of DoNotAge LSA 0
    Flood list length 0

    Câu lệnh “ show ipv6 protocols ” sử dụng để xác minh tổng quát thông tin về OSPFv3 chẳng hạn như: area và enable interfaces.

    D1# show ipv6 protocols
    IPv6 Routing Protocol is "connected"
    IPv6 Routing Protocol is "ND"
    IPv6 Routing Protocol is "ospf 123"
    Router ID 1.1.1.2
    Number of areas: 1 normal, 0 stub, 0 nssa
    Interfaces (Area 1):
    Ethernet0/1
    Ethernet0/0
    Redistribution:
    None
    3. Cấu hình OSPFv3 cho Address Family IPv4 và Address Family IPv6

    Address family (AF) trong OSPFv3 phải được thống nhất trong cấu hình OSPF cho cả IPv4 và IPv6. Mỗi AF là một tiến trình, vì vậy bạn có thể có 2 tiến trình trên một interface, 1 tiến trình cho một AF. Các thông tin OSPFv3 được gửi trên IPv6 vì vậy nó yêu cầu bật tính năng định tuyến IPv6 và interface phải có địa chỉ IPv6 link-local. Đây là yêu cầu ngay cả khi bạn chỉ cấu hình IPv4 AF.
    3.1. Cấu hình OSPFv3 với AF trên R1.
    Sau khi bật tính năng IPv6 unicast routing, cấu hình OSPFv3 với AF trên R1 sử dụng dòng lệnh “ router ospfv3 pid ” Sử dụng ? để thấy các address family có sẵn
    Cấu hình trên R1:

    R1(config)# ipv6 unicast-routing
    R1(config)# router ospfv3 123
    R1(config-router)# address-family ?
    ipv4 Address family
    ipv6 Address family

    Chỉ ra AF cho IPv4 và sử dụng ? để nhìn những tùy chọn có sẵn.

    R1(config-router)# address-family ipv4 ?
    unicast Address Family modifier
    vrf Specify parameters for a VPN Routing/Forwarding instance
    <cr>

    Để bật AF cho IPv4 unicast bạn sử dụng lệnh “ address-family ipv4 unicast ”. và sử dụng ? để xem các tùy chọn cấu hình trong AF mode. Một vài cấu hình thông dụng được highlight bên dưới. Sử dụng lệnh router-id để cấu hình router ID cho IPv4 AF.

    R1(config-router)# address-family ipv4 unicast
    R1(config-router-af)# ?
    Router Address Family configuration commands:
    adjacency Control adjacency formation
    area OSPF area parameters
    authentication Authentication parameters
    auto-cost Calculate OSPF interface cost according to bandwidth
    auto-cost-determination Calculate OSPF interface cost according to bandwidth
    bfd BFD configuration commands
    compatible Compatibility list
    default Set a command to its defaults
    default-information Control distribution of default information
    default-metric Set metric of redistributed routes
    discard-route Enable or disable discard-route installation
    distance Define an administrative distance
    distribute-list Filter networks in routing updates
    event-log Event Logging
    exit-address-family Exit from Address Family configuration mode
    graceful-restart Graceful-restart options
    help Description of the interactive help system
    ignore Do not complain about specific event
    interface-id Source of the interface ID
    limit Limit a specific OSPF feature
    local-rib-criteria Enable or disable usage of local RIB as route
    criteria
    log-adjacency-changes Log changes in adjacency state
    manet Specify MANET OSPF parameters
    max-lsa Maximum number of non self-generated LSAs to accept
    max-metric Set maximum metric
    maximum-paths Forward packets over multiple paths
    mpls MPLS Traffic Engineering configs
    no Negate a command or set its defaults
    passive-interface Suppress routing updates on an interface
    prefix-suppression Enable prefix suppression
    process-min-time Percentage of quantum to be used before releasing
    CPU
    queue-depth Hello/Router process queue depth
    redistribute Redistribute information from another routing
    protocol
    router-id router-id for this OSPF process
    shutdown Shutdown the router process
    snmp Modify snmp parameters
    statistics Enable or disable OSPF statistics options
    summary-address Configure IP address summaries
    summary-prefix Configure IP address summaries
    timers Adjust routing timers
    R1(config-router-af)#
    R1(config-router-af)# router-id 1.1.1.1

    Thoát chế độ cấu hình IPv4 AF và đi vào chế độ cấu hình IPv6 AF. Lệnh “ exit-address-family” sử dụng để thoát chế độ cấu hình address family. Để bật IPv6 AF ta sử dụng câu lệnh “address-family ipv6 unicast”. Ta cũng sử dụng câu lệnh router-id để cấu hình Router ID.

    R1(config-router-af)# exit-address-family
    R1(config-router)# address-family ipv6 unicast
    R1(config-router-af)# router-id 1.1.1.1
    R1(config-router-af)# exit-address-family
    R1(config-router)# exit

    Sử dụng câu lệnh “ ospfv3 pid [ ipv4 | ipv6 ] area area-id ” trực tiếp trong mode interface để bật OSPFv3 cho IPv4 và IPv6.

    R1(config)# interface e0/0
    R1(config-if)# ospfv3 123 ipv4 area 0
    R1(config-if)# ospfv3 123 ipv6 area 0
    R1(config-if)# exit
    R1(config)# interface e0/1
    R1(config-if)# ospfv3 123 ipv4 area 1
    R1(config-if)# ospfv3 123 ipv6 area 1

    3.2. Cấu hình OSPFv3 với AF IPv4 và AF IPv6 trên R2.

    R2(config)# ipv6 unicast-routing
    R2(config)# router ospfv3 123
    R2(config-router)# address-family ipv4 unicast
    R2(config-router-af)# router-id 2.2.2.1
    R2(config-router-af)# exit-address-family
    R2(config-router)# address-family ipv6 unicast
    R2(config-router-af)# router-id 2.2.2.1
    R2(config-router-af)# exit-address-family
    R2(config-router)# exit

    R2(config)# interface e0/0
    R2(config-if)# ospfv3 123 ipv4 area 0
    R2(config-if)# ospfv3 123 ipv6 area 0
    R2(config-if)# exit
    R2(config)# interface e0/1
    R2(config-if)# ospfv3 123 ipv4 area 0
    R2(config-if)# ospfv3 123 ipv6 area 0

    3.3. Cấu hình OSPFv3 với AF IPv4 và AF IPv6 trên R3.

    R3(config)# ipv6 unicast-routing
    R3(config)# router ospfv3 123
    R3(config-router)# router-id 3.3.3.1
    R3(config-router)# address-family ipv4 unicast
    R3(config-router-af)# exit-address-family
    R3(config-router)# address-family ipv6 unicast
    R3(config-router-af)# exit-address-family
    R3(config-router)# exit

    R3(config)# interface e0/0
    R3(config-if)# ospfv3 123 ipv4 area 0
    R3(config-if)# ospfv3 123 ipv6 area 0
    R3(config-if)# exit
    R3(config)# interface e0/1
    R3(config-if)# ospfv3 123 ipv4 area 2
    R3(config-if)# ospfv3 123 ipv6 area 2

    3.4 Cấu hình OSPFv3 với AF trên D2:

    D2(config)# ipv6 unicast-routing
    D2(config)# router ospfv3 123
    D2(config-router)# address-family ipv4 unicast
    D2(config-router-af)# router-id 3.3.3.2
    D2(config-router-af)# exit-address-family
    D2(config-router)# address-family ipv6 unicast
    D2(config-router-af)# router-id 3.3.3.2
    D2(config-router-af)# exit-address-family
    D2(config-router)# exit

    D2(config)# interface e0/1
    D2(config-if)# ospfv3 123 ipv4 area 2
    D2(config-if)# ospfv3 123 ipv6 area 2
    D2(config-if)# exit
    D2(config)# interface e0/0
    D2(config-if)# ospfv3 123 ipv4 area 2
    D2(config-if)# ospfv3 123 ipv6 area 2
    Kiểm tra

    Các câu lệnh kiểm tra OSPFv3 và OSPFv3 với AF có thể khác nhau. Bởi vì câu lệnh OSPFv3 với AF bao gồm thông tin của IPv4 và IPv6 address family, trong khi OSPFv3 kiểu truyền thống chỉ dành cho IPv6
    Kiểm tra quảng bá từ láng giếng
    Sử dụng câu lệnh “ show ipv6 ospf neighbor” trên D1 để hiển thị OSPFv3 láng giềng. Câu lệnh này được sử dụng cho OSPFv3 cấu hình kiểu truyền thống. Lệnh tương đương cho OSPFv2 sẽ là “ show ip ospf neighbor ”.

    D1# show ipv6 ospf neighbor

    OSPFv3 Router with ID (1.1.1.2) (Process ID 123)

    Neighbor ID Pri State Dead Time Interface ID Interface
    1.1.1.1 1 FULL/BDR 00:00:39 4 Ethernet0/1

    Sử dụng câu lệnh tương tự trên Router đang chạy OSPFv3 với AF cho xuất ra tương tự. Ví dụ, trên R1 sử dụng câu lệnh “ show ipv6 ospf neighbor”, lưu ý rằng kết quả xuất ra chỉ là OSPFv3 cho IPv6 AF.

    R1# show ipv6 ospf neighbor

    OSPFv3 Router with ID (1.1.1.1) (Process ID 123)

    Neighbor ID Pri State Dead Time Interface ID Interface
    2.2.2.1 1 FULL/BDR 00:00:31 3 Ethernet0/0
    1.1.1.2 1 FULL/DR 00:00:38 7 Ethernet0/1

    Trên R1, câu lệnh “ show ospfv3 neighbor ” cho thông tin xuất ra của láng giềng bao gồm cả IPv4 và IPv6 address families.

    R1# show ospfv3 neighbor

    OSPFv3 123 address-family ipv4 (router-id 1.1.1.1)

    Neighbor ID Pri State Dead Time Interface ID Interface
    2.2.2.1 1 FULL/BDR 00:00:38 3 Ethernet0/0

    OSPFv3 123 address-family ipv6 (router-id 1.1.1.1)

    Neighbor ID Pri State Dead Time Interface ID Interface
    2.2.2.1 1 FULL/BDR 00:00:32 3 Ethernet0/0
    1.1.1.2 1 FULL/BDR 00:00:30 7 Ethernet0/1

    Tóm tắt các lệnh show như sau:
    • OSPFv2: Use show ip ospf (IPv4 only)
    • Traditional OSPFv3: Use show ipv6 ospf (IPv6 only)
    • OSPFv3 with AF: Use show ospfv3 (IPv4 and IPv6 AF) or show ipv6 ospf (IPv6 only)
    Kiểm tra bảng định tuyến IP
    Sử dụng câu lệnh “ show ipv6 route ospf ” trên D1 để hiển thị bảng định tuyến OSPFv3 trong bảng định tuyến IPv6

    D1# show ipv6 route ospf
    IPv6 Routing Table - default - 9 entries
    Codes: C - Connected, L - Local, S - Static, U - Per-user Static route
    B - BGP, R - RIP, H - NHRP, I1 - ISIS L1
    I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary, D - EIGRP
    EX - EIGRP external, ND - ND Default, NDp - ND Prefix, DCE -Destination
    NDr - Redirect, RL - RPL, O - OSPF Intra, OI - OSPF Inter
    OE1 - OSPF ext 1, OE2 - OSPF ext 2, ON1 - OSPF NSSA ext 1
    ON2 - OSPF NSSA ext 2, la - LISP alt, lr - LISP site-registrations
    ld - LISP dyn-eid, lA - LISP away, le - LISP extranet-policy
    OI 2001:DB8:ACAD:2001::/64 [110/40]
    via FE80::1:1, Ethernet0/1
    OI 2001:DB8:ACAD:2002::/64 [110/50]
    via FE80::1:1, Ethernet0/1
    OI 2001:DB8:ACAD:A001::/64 [110/20]
    via FE80::1:1, Ethernet0/1
    OI 2001:DB8:ACAD:A002::/64 [110/30]
    via FE80::1:1, Ethernet0/1

    Câu lệnh “ show ip route ospfv3” sử dụng để xem các routes OSPFv3 trong bảng định tuyến IPv4. Câu lệnh “ show ipv6 route ospf” sử dụng để xem các routes OSPFv3 trong bảng định tuyến IPv6. Câu lệnh “ show ipv6 route ospf” sử dụng để xem các routes OSPFv3 kiểu truyền thống trong bảng định tuyến IPv6.

    R1# show ip route ospf

    R1# show ip route ospfv3
    Gateway of last resort is not set

    10.0.0.0/8 is variably subnetted, 4 subnets, 3 masks
    O IA 10.10.4.0/30 [110/30] via 172.16.0.1, 00:17:34, Ethernet0/0
    O IA 10.10.5.0/24 [110/40] via 172.16.0.1, 00:17:34, Ethernet0/0
    172.16.0.0/16 is variably subnetted, 3 subnets, 2 masks
    O 172.16.1.0/30 [110/20] via 172.16.0.1, 00:17:34, Ethernet0/0

    R1# show ipv6 route ospfv3
    ^
    % Invalid input detected at '^' marker.

    R1# show ipv6 route ospf
    IPv6 Routing Table - default - 9 entries
    O 2001:DB8:ACAD:1002::/64 [110/20]
    via FE80::D1:2, Ethernet0/1
    OI 2001:DB8:ACAD:2001::/64 [110/30]
    via FE80::2:1, Ethernet0/0
    OI 2001:DB8:ACAD:2002::/64 [110/40]
    via FE80::2:1, Ethernet0/0
    O 2001:DB8:ACAD:A002::/64 [110/20]
    via FE80::2:1, Ethernet0/0

    Kiểm tra OSPF LSDB
    D1 đang chạy OSPFv3 kiểu truyền thống. Ta sử dụng lệnh “ show ipv6 ospf database ” để hiển thị bảng tóm tắt của OSPFv3 LSDB.

    D1# show ipv6 ospf database

    OSPFv3 Router with ID (1.1.1.2) (Process ID 123)

    Router Link States (Area 1)

    ADV Router Age Seq# Fragment ID Link count Bits
    1.1.1.1 1096 0x80000009 0 1 B
    1.1.1.2 1110 0x80000005 0 1 None

    Net Link States (Area 1)

    ADV Router Age Seq# Link ID Rtr count
    1.1.1.2 1152 0x80000001 7 2

    Inter Area Prefix Link States (Area 1)

    ADV Router Age Seq# Prefix
    1.1.1.1 1096 0x80000001 2001:DB8:ACAD:A001::/64
    1.1.1.1 1096 0x80000001 2001:DB8:ACAD:A002::/64
    1.1.1.1 833 0x80000001 2001:DB8:ACAD:2001::/64
    1.1.1.1 1497 0x80000001 2001:DB8:ACAD:2002::/64

    Link (Type-8) Link States (Area 1)

    ADV Router Age Seq# Link ID Interface
    1.1.1.1 1150 0x80000001 4 Et0/1
    1.1.1.2 1096 0x80000002 7 Et0/1
    1.1.1.2 1151 0x80000002 8 Et0/0

    Intra Area Prefix Link States (Area 1)

    ADV Router Age Seq# Link ID Ref-lstype Ref-LSID
    1.1.1.2 1152 0x80000002 0 0x2001 0
    1.1.1.2 1150 0x80000001 7168 0x2002 7

    R1 đang chạy OSPFv3 với AF. Ta sử dụng câu lệnh “show ospfv3 database” để hiển thị bảng tóm tắt của OSPFv3 LSDB cho cả IPv4 và IPv6 AFs.

    R1# show ospfv3 database

    OSPFv3 123 address-family ipv4 (router-id 1.1.1.1)

    Router Link States (Area 0)

    ADV Router Age Seq# Fragment ID Link count Bits
    1.1.1.1 532 0x80000003 0 1 B
    2.2.2.1 508 0x80000004 0 2 None
    3.3.3.1 507 0x80000002 0 1 B

    Net Link States (Area 0)

    ADV Router Age Seq# Link ID Rtr count
    1.1.1.1 539 0x80000001 3 2
    2.2.2.1 512 0x80000001 4 2

    Inter Area Prefix Link States (Area 0)

    ADV Router Age Seq# Prefix
    1.1.1.1 1510 0x80000001 10.10.0.0/30
    3.3.3.1 553 0x80000001 10.10.4.0/30
    3.3.3.1 513 0x80000001 10.10.5.0/24

    Link (Type-8) Link States (Area 0)

    ADV Router Age Seq# Link ID Interface
    1.1.1.1 579 0x80000001 5 Et0/0
    2.2.2.1 579 0x80000001 5 Et0/0

    Intra Area Prefix Link States (Area 0)

    ADV Router Age Seq# Link ID Ref-lstype Ref-LSID
    1.1.1.1 539 0x80000001 3072 0x2002 3
    2.2.2.1 512 0x80000001 4096 0x2002 4

    Router Link States (Area 1)

    ADV Router Age Seq# Fragment ID Link count Bits
    1.1.1.1 602 0x80000002 0 1 B

    Inter Area Prefix Link States (Area 1)

    ADV Router Age Seq# Prefix
    1.1.1.1 578 0x80000001 172.16.0.0/30
    1.1.1.1 538 0x80000001 172.16.1.0/30
    1.1.1.1 506 0x80000001 10.10.4.0/30
    1.1.1.1 506 0x80000001 10.10.5.0/24

    Link (Type-8) Link States (Area 1)

    ADV Router Age Seq# Link ID Interface
    1.1.1.1 559 0x80000001 4 Et0/1

    Intra Area Prefix Link States (Area 1)

    ADV Router Age Seq# Link ID Ref-lstype Ref-LSID
    1.1.1.1 481 0x8000001 0 0x2001 0


    OSPFv3 123 address-family ipv6 (router-id 1.1.1.1)

    Router Link States (Area 0)

    ADV Router Age Seq# Fragment ID Link count Bits
    1.1.1.1 530 0x80000006 0 1 B
    2.2.2.1 508 0x80000004 0 2 None
    3.3.3.1 508 0x80000002 0 1 B

    Net Link States (Area 0)

    ADV Router Age Seq# Link ID Rtr count
    1.1.1.1 539 0x80000004 3 2
    2.2.2.1 511 0x80000001 4 2

    Inter Area Prefix Link States (Area 0)

    ADV Router Age Seq# Prefix
    1.1.1.1 579 0x80000001 2001:DB8:ACAD:1001::/64
    1.1.1.1 559 0x80000001 2001:DB8:ACAD:1002::/64
    3.3.3.1 551 0x80000001 2001:DB8:ACAD:2001::/64
    3.3.3.1 512 0x80000001 2001:DB8:ACAD:2002::/64

    Link (Type-8) Link States (Area 0)

    ADV Router Age Seq# Link ID Interface
    1.1.1.1 578 0x80000002 3 Et0/0
    2.2.2.1 578 0x80000005 3 Et0/0

    Intra Area Prefix Link States (Area 0)

    ADV Router Age Seq# Link ID Ref-lstype Ref-LSID
    1.1.1.2 539 0x80000001 3072 0x2002 3
    2.2.2.1 511 0x80000001 4096 0x2002 4

    Router Link States (Area 1)

    ADV Router Age Seq# Fragment ID Link count Bits
    1.1.1.1 553 0x80000001 0 1 B
    1.1.1.2 570 0x80000003 0 1 None

    Net Link States (Area 1)

    ADV Router Age Seq# Link ID Rtr count
    1.1.1.2 539 0x80000002 7 2

    Inter Area Prefix Link States (Area 1)

    ADV Router Age Seq# Prefix
    1.1.1.1 578 0x80000001 2001:DB8:ACAD:A001::/64
    1.1.1.1 538 0x80000001 2001:DB8:ACAD:A002::/64
    1.1.1.1 506 0x80000001 2001:DB8:ACAD:2001::/64
    1.1.1.1 506 0x80000001 2001:DB8:ACAD:2002::/64

    Link (Type-8) Link States (Area 1)

    ADV Router Age Seq# Link ID Interface
    1.1.1.1 559 0x80000002 4 Et0/1
    1.1.1.2 1209 0x80000002 7 Et0/1

    Intra Area Prefix Link States (Area 1)

    ADV Router Age Seq# Link ID Ref-lstype Ref-LSID
    1.1.1.1 481 0x8000003 0 0x2001 0
    1.1.1.2 481 0x8000002 7168 0x2002 7
    4. Hiệu chỉnh OSPFVv3

    4.1. Cấu hình passive interface.
    Để cấu hình passive interface OSPFv3 kiểu truyền thống, ta dùng lệnh “passive-interface” trong chế độ OSPFv3 router mode.

    D1(config)# ipv6 router ospf 123
    D1(config-rtr)# passive-interface e0/0

    Để cấu hình passive interface OSPFv3 với AF, bạn có thể sử dụng “ passive-interface ” trong chế độ OSPFv3 router mode để cấu hình cho cả IPv4 và IPv6 AFs.

    D2(config)# router ospfv3 123
    D2(config-router)# passive-interface e0/0

    Thay vào đó, bạn có thể sử dụng câu lệnh “ passive-interface ” trong chế độ AF configuration mode để cấu hình passive interface cho AF cụ thể.

    D2(config-router)# no passive-interface e0/0
    D2(config-router)# address-family ipv4 unicast
    D2(config-router-af)# passive-interface e0/0
    D2(config-router-af)# exit-address-family
    D2(config-router)# address-family ipv6 unicast
    D2(config-router-af)# passive-interface e0/0
    D2(config-router-af)# exit-address-family

    4.2. Cấu hình summarization.
    Câu lệnh “area area range ipv6-summary-address sử dụng để summarize các prefixes

    R1(config)# router ospfv3 123
    R1(config-router)# address-family ipv6 unicast
    R1(config-router-af)# area 1 range 2001:db8:acad:1000::/52

    R3(config)# router ospfv3 123
    R3(config-router)# address-family ipv6 unicast
    R3(config-router-af)# area 2 range 2001:db8:acad:2000::/52

    Trên R2 bây giờ sẽ nhận được summarized prefixes.

    R2# show ipv6 route ospf
    <output omitted>
    OI 2001:DB8:ACAD:1000::/52 [110/30]
    via FE80::1:2, Ethernet0/0
    OI 2001:DB8:ACAD:2000::/52 [110/30]
    via FE80::3:2, Ethernet0/1

    4.3. Sữa đổi các network type.
    OSPFv3 hỗ trợ network types giống như OSPFv2. Lưu ý rằng các Ethernet interfaces giữa R2 và R1, R2 và R2 có bầu chọn DR và BDR. Bởi vì Ethernet là một mạng đa truy cập. Tuy nhiên đây là kết nối point-to-point nên không cần bầu chọn DR và BDR.

    R2# show ospfv3 interface brief
    Interface PID Area AF Cost State Nbrs F/C
    Et0/1 123 0 ipv4 10 BDR 1/1
    Et0/0 123 0 ipv4 10 DR 1/1
    Et0/1 123 0 ipv6 10 BDR 1/1
    Et0/0 123 0 ipv6 10 DR 1/1

    Sử dụng câu lệnh “ ospfv3 network point-to-point” trong interface để thay đổi kết nối sang point-to-point. Lệnh này cần cấu hình cho cả 2 đầu.

    R2(config)# interface e0/1
    R2(config-if)# ospfv3 network point-to-point
    R2(config-if)# exit
    R2(config)# interface e0/0
    R2(config-if)# ospfv3 network point-to-point



    R1(config)# interface e0/0
    R1(config-if)# ospfv3 network point-to-point



    R3(config)# interface e0/0
    R3(config-if)# ospfv3 network point-to-point

    Chú ý các links bây giờ đã thay đổi thành P2P.

    R2# show ospfv3 interface brief
    Interface PID Area AF Cost State Nbrs F/C
    Et0/1 123 0 ipv4 10 P2P 1/1
    Et0/0 123 0 ipv4 10 P2P 1/1
    Et0/1 123 0 ipv6 10 P2P 1/1
    Et0/0 123 0 ipv6 10 P2P 1/1

    4.4. Quảng bá default route
    Cũng tương tự như OSPFv2, sử dụng câu lệnh default-information trong OSPFv3 để quảng bá default route trên ASBR router. Cấu hình static default route cho IPv4 và IPv6 trên R2.

    R2(config)# ipv6 route ::/0 lo0
    R2(config)# ip route 0.0.0.0 0.0.0.0 lo0

    R2(config)# router ospfv3 123
    R2(config-router)# address-family ipv6 unicast
    R2(config-router-af)# default-information originate
    R2(config-router-af)# exit
    R2(config-router)# address-family ipv4 unicast
    R2(config-router-af)# default-information originate
    R2(config-router-af)# exit

    Kiểm tra D1 đã nhận IPv6 default route thông qua OSPFv3.

    D1# show ipv6 route ospf
    <output omitted>
    OE2 ::/0 [110/1], tag 123
    via FE80::1:1, Ethernet0/1
    OI 2001:DB8:ACAD:2000::/52 [110/50]
    via FE80::1:1, Ethernet0/1
    OI 2001:DB8:ACAD:A001::/64 [110/20]
    via FE80::1:1, Ethernet0/1
    OI 2001:DB8:ACAD:A002::/64 [110/30]
    via FE80::1:1, Ethernete0/1

    Kiểm tra D2 đã nhận IPv4 default route thông qua OSPFv3.

    D2# show ip route ospfv3
    <output omitted>
    Gateway of last resort is 10.10.4.1 to network 0.0.0.0
    O*E2 0.0.0.0/0 [110/1] via 10.10.4.1, 00:01:13, Ethernet0/1
    172.16.0.0/30 is subnetted, 2 subnets
    O IA 10.10.0.0/30 [110/40] via 10.10.4.1, 00:00:03, Ethernet0/1
    O IA 172.16.0.0 [110/30] via 10.10.4.1, 00:02:55, Ethernet0/1
    O IA 172.16.1.0 [110/20] via 10.10.4.1, 00:20:22, Ethernet0/1


Working...
X