My Countingdown

Sunday, December 11, 2011

Lab 1. OSPF Virtual Link

If you already forget aboot OSPF, please have a look regarding my summary about OSPF at http://pursuingmydestiny.blogspot.com/2011/12/day-3-ccie-bootcamp.html



R1
interface Loopback0
ip address 1.1.1.1 255.255.255.255
!
interface Serial0/0
ip address 12.12.12.1 255.255.255.0
!
router ospf 1
router-id 1.1.1.1
log-adjacency-changes
network 1.1.1.1 0.0.0.0 area 0
network 12.12.12.1 0.0.0.0 area 1

R2
interface Loopback0
ip address 2.2.2.2 255.255.255.255
!
interface Serial0/0
ip address 12.12.12.2 255.255.255.0
!
!
interface FastEthernet0/0
ip address 23.23.23.2 255.255.255.0
!
router ospf 2
router-id 2.2.2.2
network 2.2.2.2 0.0.0.0 area 1
network 12.12.12.2 0.0.0.0 area 1
network 23.23.23.2 0.0.0.0 area 2

R3
interface Loopback0
ip address 3.3.3.3 255.255.255.255
!
interface FastEthernet0/0
ip address 23.23.23.3 255.255.255.0
!
router ospf 3
router-id 3.3.3.3
network 3.3.3.3 0.0.0.0 area 3
network 23.23.23.3 0.0.0.0 area 2

As you know, that all area must connect to area backbone (area 0). In this case we have area 3 that only connect to area 2. There are 2 ways what I know to solve the issue :
1. using virtual link that I will show now and
2. using tunneling

R1(config-if)#do sh ip rout
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

  1.0.0.0/32 is subnetted, 1 subnets
C    1.1.1.1 is directly connected, Loopback0
  2.0.0.0/32 is subnetted, 1 subnets
O    2.2.2.2 [110/65] via 12.12.12.2, 00:02:55, Serial0/0
  12.0.0.0/24 is subnetted, 1 subnets
C    12.12.12.0 is directly connected, Serial0/0

R2(config-if)#do sh ip rou
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

  1.0.0.0/32 is subnetted, 1 subnets
O IA 1.1.1.1 [110/65] via 12.12.12.1, 00:03:14, Serial0/0
  2.0.0.0/32 is subnetted, 1 subnets
C      2.2.2.2 is directly connected, Loopback0
  23.0.0.0/24 is subnetted, 1 subnets
C     23.23.23.0 is directly connected, FastEthernet0/0
  12.0.0.0/24 is subnetted, 1 subnets
C    12.12.12.0 is directly connected, Serial0/0

R3(config-router)#do sh ip rout
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

  3.0.0.0/32 is subnetted, 1 subnets
C    3.3.3.3 is directly connected, Loopback0
  23.0.0.0/24 is subnetted, 1 subnets
C    23.23.23.0 is directly connected, FastEthernet0/0

R3(config-router)#do sh ip ospf int brie
Interface PID Area IP Address/Mask Cost State Nbrs F/C
Fa0/0 3 2 23.23.23.3/24 10 DR 1/1
Lo0 3 3 3.3.3.3/32 1 LOOP 0/0

So R1 do not get any route for all IP that not connect to area 0

R1(config-if)#do sh ip ospf data

OSPF Router with ID (1.1.1.1) (Process ID 1)

Router Link States (Area 0)

Link ID ADV Router Age Seq# Checksum Link count
1.1.1.1 1.1.1.1 301 0x80000004 0x00CD54 1

Summary Net Link States (Area 0)

Link ID ADV Router Age Seq# Checksum
2.2.2.2 1.1.1.1 296 0x80000001 0x009B54
12.12.12.0 1.1.1.1 296 0x80000001 0x003C98

Router Link States (Area 1)

Link ID ADV Router Age Seq# Checksum Link count
1.1.1.1 1.1.1.1 301 0x80000004 0x00CD79 2
2.2.2.2 2.2.2.2 302 0x80000003 0x002FFB 3

Summary Net Link States (Area 1)

Link ID ADV Router Age Seq# Checksum
1.1.1.1 1.1.1.1 301 0x80000001 0x0047EC

R2(config)#do sh ip ospf data

OSPF Router with ID (2.2.2.2) (Process ID 2)

Router Link States (Area 1)

Link ID ADV Router Age Seq# Checksum Link count
1.1.1.1 1.1.1.1 332 0x80000004 0x00CD79 2
2.2.2.2 2.2.2.2 331 0x80000003 0x002FFB 3

Summary Net Link States (Area 1)

Link ID ADV Router Age Seq# Checksum
1.1.1.1 1.1.1.1 333 0x80000001 0x0047EC

Router Link States (Area 2)

Link ID ADV Router Age Seq# Checksum Link count
2.2.2.2 2.2.2.2 186 0x80000003 0x0095F2 1
3.3.3.3 3.3.3.3 188 0x80000002 0x005927 1

Net Link States (Area 2)

Link ID ADV Router Age Seq# Checksum
23.23.23.3 3.3.3.3 188 0x80000001 0x00B21F

R3(config-router)#do sh ip ospf data

OSPF Router with ID (3.3.3.3) (Process ID 3)

Router Link States (Area 2)

Link ID ADV Router Age Seq# Checksum Link count
2.2.2.2 2.2.2.2 212 0x80000003 0x0095F2 1
3.3.3.3 3.3.3.3 212 0x80000002 0x005927 1

Net Link States (Area 2)

Link ID ADV Router Age Seq# Checksum
23.23.23.3 3.3.3.3 212 0x80000001 0x00B21F

Router Link States (Area 3)

Link ID ADV Router Age Seq# Checksum Link count
3.3.3.3 3.3.3.3 307 0x80000001 0x007C91 1

Let's make a link from R2 to R1

R2(config-if)#router ospf 2
R2(config-router)#area 1 virtual-link 1.1.1.1

You will get message in R1 because no any virtual-link in R1.


*Mar 1 00:34:20.567: %OSPF-4-ERRRCV: Received invalid packet: mismatch area ID, from backbone area must be virtual-link but not found from 12.12.12.2, Serial0/0

R1(config-router)#router ospf 1
R1(config-router)#area 1 virtual-link 2.2.2.2

Now area 1 already connect to area backbone. You can check in R1

R3(config-router)#do sh ip rou
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

  1.0.0.0/32 is subnetted, 1 subnets
O IA 1.1.1.1 [110/75] via 23.23.23.2, 00:01:04, FastEthernet0/0
  2.0.0.0/32 is subnetted, 1 subnets
O IA 2.2.2.2 [110/11] via 23.23.23.2, 00:01:27, FastEthernet0/0
  3.0.0.0/32 is subnetted, 1 subnets
C      3.3.3.3 is directly connected, Loopback0
  23.0.0.0/24 is subnetted, 1 subnets
C      23.23.23.0 is directly connected, FastEthernet0/0
  12.0.0.0/24 is subnetted, 1 subnets
O IA 12.12.12.0 [110/74] via 23.23.23.2, 00:01:27, FastEthernet0/0


Let's connect area 2 and 3 to area backbone

R3(config-router)#area 2 virtual-link 2.2.2.2
R2(config-router)#area 2 virtual-link 3.3.3.3

Now area 2 & 3 already connect to area backbone. Please check again!

R1(config-router)#do sh ip rout
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

  1.0.0.0/32 is subnetted, 1 subnets
C      1.1.1.1 is directly connected, Loopback0
  2.0.0.0/32 is subnetted, 1 subnets
O      2.2.2.2 [110/65] via 12.12.12.2, 00:10:22, Serial0/0
  3.0.0.0/32 is subnetted, 1 subnets
O IA 3.3.3.3 [110/75] via 12.12.12.2, 00:00:38, Serial0/0
  23.0.0.0/24 is subnetted, 1 subnets
O IA 23.23.23.0 [110/74] via 12.12.12.2, 00:03:20, Serial0/0
  12.0.0.0/24 is subnetted, 1 subnets
C      12.12.12.0 is directly connected, Serial0/0

R2(config-router)#do sh ip rout
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

  1.0.0.0/32 is subnetted, 1 subnets
O      1.1.1.1 [110/65] via 12.12.12.1, 00:03:42, Serial0/0
  2.0.0.0/32 is subnetted, 1 subnets
C      2.2.2.2 is directly connected, Loopback0
  3.0.0.0/32 is subnetted, 1 subnets
O IA 3.3.3.3 [110/11] via 23.23.23.3, 00:01:10, FastEthernet0/0
  23.0.0.0/24 is subnetted, 1 subnets
C       23.23.23.0 is directly connected, FastEthernet0/0
  12.0.0.0/24 is subnetted, 1 subnets
C       12.12.12.0 is directly connected, Serial0/0

R3(config-router)#do sh ip rou
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

  1.0.0.0/32 is subnetted, 1 subnets
O      1.1.1.1 [110/75] via 23.23.23.2, 00:01:29, FastEthernet0/0
  2.0.0.0/32 is subnetted, 1 subnets
O IA 2.2.2.2 [110/11] via 23.23.23.2, 00:01:29, FastEthernet0/0
  3.0.0.0/32 is subnetted, 1 subnets
C      3.3.3.3 is directly connected, Loopback0
  23.0.0.0/24 is subnetted, 1 subnets
C      23.23.23.0 is directly connected, FastEthernet0/0
  12.0.0.0/24 is subnetted, 1 subnets
O IA 12.12.12.0 [110/74] via 23.23.23.2, 00:01:29, FastEthernet0/0

In OSPF all database should be the same within one area. Please note that make it virtual-link using router-id. If no router-id, it will choose from loopback or if no loopback will choose from interface. For checking router-id in OSPF can use command "show ip ospf" or "show ip ospf database".

No comments:

Post a Comment