Saturday, June 2, 2012

[LAB OSPF] Virtual links and Summarization


Mô hình bài LAB:

Yêu cầu:
  • Cấu hình OSPF multi-area trên các routers 
  • Tạo một virtual link cho area 100 (cấu hình tại R2 và R3)
  • Summarize các routes từ area 100 (cấu hình tại R3)
  • Generate một default route từ R1 (cấu hình tại R1)

1.Cấu hình của các routers
---------
R1
---------

R1#show run
Building configuration...

Current configuration : 1074 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R1
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
ip cef
!
!
interface Loopback1
 ip address 10.1.1.1 255.255.255.0
!
interface Loopback30
 ip address 172.30.30.1 255.255.255.0
!
interface FastEthernet0/0
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface Serial0/0
 ip address 10.1.12.1 255.255.255.0
 clock rate 64000
!
interface FastEthernet0/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface Serial0/1
 no ip address
 shutdown
 clock rate 2000000
!
interface Serial0/2
 no ip address
 shutdown
 clock rate 2000000
!
!
router ospf 10
 log-adjacency-changes
 network 10.1.1.0 0.0.0.255 area 0
 network 10.1.12.0 0.0.0.255 area 0
 default-information originate always  <-- tạo ra 1 default route quảng bá đến các OSPF routers
!
ip forward-protocol nd
!
!
ip http server
no ip http secure-server
!
control-plane
!
!
line con 0
line aux 0
line vty 0 4
 login
!
!
end

----------
R2
----------

R2#show run
Building configuration...

Current configuration : 1072 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R2
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
ip cef
!
interface Loopback2
 ip address 10.1.2.1 255.255.255.0
!
interface FastEthernet0/0
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface Serial0/0
 ip address 10.1.12.2 255.255.255.0
 clock rate 64000
!
interface FastEthernet0/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface Serial0/1
 ip address 10.1.23.1 255.255.255.0
 clock rate 64000
!
interface Serial0/2
 no ip address
 shutdown
 clock rate 2000000
!
!
router ospf 10
 router-id 10.1.2.1 <== router ID được sử dụng để cấu hình virtual link
 log-adjacency-changes
 area 10 virtual-link 10.1.3.1 <== cấu hình virtual link cho area 10
 network 10.1.2.0 0.0.0.255 area 0
 network 10.1.12.0 0.0.0.255 area 0
 network 10.1.23.0 0.0.0.255 area 10
!
ip forward-protocol nd
!
!
ip http server
no ip http secure-server
!
control-plane
!
line con 0
line aux 0
line vty 0 4
 login
!
!
end

-----------
R3
-----------

R3#show run
Building configuration...

Current configuration : 1496 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R3
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
ip cef
!
interface Loopback3
 ip address 10.1.3.1 255.255.255.0
!
interface Loopback100
 ip address 192.168.100.1 255.255.255.0
!
interface Loopback101
 ip address 192.168.101.1 255.255.255.0
!
interface Loopback102
 ip address 192.168.102.1 255.255.255.0
!
interface Loopback103
 ip address 192.168.103.1 255.255.255.0
!
interface FastEthernet0/0
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface Serial0/0
 no ip address
 shutdown
 clock rate 2000000
!
interface FastEthernet0/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface Serial0/1
 ip address 10.1.23.2 255.255.255.0
 clock rate 64000
!
interface Serial0/2
 no ip address
 shutdown
 clock rate 2000000
!
!
router ospf 10
 router-id 10.1.3.1 <== router ID được sử dụng để cấu hình virtual link
 log-adjacency-changes
 area 10 virtual-link 10.1.2.1  <== cấu hình virtual link cho area 10
 area 100 range 192.168.100.0 255.255.252.0 <== summarize các routes bên trong area 100
 network 10.1.3.0 0.0.0.255 area 10
 network 10.1.23.0 0.0.0.255 area 10
 network 192.168.100.0 0.0.0.255 area 100
 network 192.168.101.0 0.0.0.255 area 100
 network 192.168.102.0 0.0.0.255 area 100
 network 192.168.103.0 0.0.0.255 area 100
!
ip forward-protocol nd
!
!
ip http server
no ip http secure-server
!
control-plane
!
line con 0
line aux 0
line vty 0 4
 login
!
!
end


2.Xem lại các cấu hình


Show virtual links trên R2 (R3)

---------
R2
---------
R2#show ip ospf virtual-links
Virtual Link OSPF_VL0 to router 10.1.3.1 is up
  Run as demand circuit
  DoNotAge LSA allowed.
  Transit area 10, via interface Serial0/1, Cost of using 64
  Transmit Delay is 1 sec, State POINT_TO_POINT,
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    Hello due in 00:00:01
    Adjacency State FULL (Hello suppressed)
    Index 2/3, retransmission queue length 0, number of retransmission 0
    First 0x0(0)/0x0(0) Next 0x0(0)/0x0(0)
    Last retransmission scan length is 0, maximum is 0
    Last retransmission scan time is 0 msec, maximum is 0 msec

----------
R3
----------
R3#show ip ospf virtual-links
Virtual Link OSPF_VL0 to router 10.1.2.1 is up
  Run as demand circuit
  DoNotAge LSA allowed.
  Transit area 10, via interface Serial0/1, Cost of using 64
  Transmit Delay is 1 sec, State POINT_TO_POINT,
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    Hello due in 00:00:05
    Adjacency State FULL (Hello suppressed)
    Index 1/2, retransmission queue length 0, number of retransmission 0
    First 0x0(0)/0x0(0) Next 0x0(0)/0x0(0)
    Last retransmission scan length is 0, maximum is 0
    Last retransmission scan time is 0 msec, maximum is 0 msec

Xem bảng routing table
----------
R1
----------
R1#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     172.30.0.0/24 is subnetted, 1 subnets
C       172.30.30.0 is directly connected, Loopback30
     10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
C       10.1.12.0/24 is directly connected, Serial0/0
O       10.1.2.1/32 [110/65] via 10.1.12.2, 00:19:00, Serial0/0
O IA    10.1.3.1/32 [110/129] via 10.1.12.2, 00:19:00, Serial0/0
C       10.1.1.0/24 is directly connected, Loopback1
O IA    10.1.23.0/24 [110/128] via 10.1.12.2, 00:19:00, Serial0/0
O IA 192.168.100.0/22 [110/129] via 10.1.12.2, 00:19:00, Serial0/0 <== summarized route

----------
R2
----------
R2#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is 10.1.12.1 to network 0.0.0.0

     10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
C       10.1.12.0/24 is directly connected, Serial0/0
O       10.1.3.1/32 [110/65] via 10.1.23.2, 00:20:08, Serial0/1
C       10.1.2.0/24 is directly connected, Loopback2
O       10.1.1.1/32 [110/65] via 10.1.12.1, 00:20:08, Serial0/0
C       10.1.23.0/24 is directly connected, Serial0/1
O*E2 0.0.0.0/0 [110/1] via 10.1.12.1, 00:20:08, Serial0/0 <== default route từ R1 gửi tới
O IA 192.168.100.0/22 [110/65] via 10.1.23.2, 00:20:08, Serial0/1 <== summarized route

----------
R3
----------
R3#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is 10.1.23.1 to network 0.0.0.0

     10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
O       10.1.12.0/24 [110/128] via 10.1.23.1, 00:21:00, Serial0/1
C       10.1.3.0/24 is directly connected, Loopback3
O       10.1.2.1/32 [110/65] via 10.1.23.1, 00:21:00, Serial0/1
O       10.1.1.1/32 [110/129] via 10.1.23.1, 00:21:00, Serial0/1
C       10.1.23.0/24 is directly connected, Serial0/1
C    192.168.102.0/24 is directly connected, Loopback102
C    192.168.103.0/24 is directly connected, Loopback103
C    192.168.100.0/24 is directly connected, Loopback100
C    192.168.101.0/24 is directly connected, Loopback101
O*E2 0.0.0.0/0 [110/1] via 10.1.23.1, 00:21:00, Serial0/1 <== default route
O    192.168.100.0/22 is a summary, 00:21:10, Null0 <== nếu có 1 gói tin được gửi đến địa chỉ 192.160.100.0/22 của R3 thì sẽ drop

2 comments:

  1. Các bài viết của anh hay và bổ ích quá. Anh cũng học trường UIT phải ko ạ? Gần đây em có vô 4rum uitstudent thấy một số bài viết về mạng Cisco của nick cuong nên nghĩ chắc là anh cũng học UIT :D. Em là sinh viên K4 UIT khoa Mạng, đang học về CCNP Route và sắp tới em cũng có ý định học CCNP Switch. Nếu được anh có thể cho em nick yahoo để tiện trao đổi được ko ạ, nick của em là tnkh1308 .Thanks anh :)

    ReplyDelete
  2. This comment has been removed by the author.

    ReplyDelete