라우터(Router) - OSPF vitual link

Network/Router 2015. 12. 13. 18:08

OSPF에서는 모든 통신이 area0을 거쳐서 통신이 이루어져야 통신이 가능하다. 

만약에 다음 그림과 같이 area가 0 영역에 닿지 못하고 떨어져 있으면 어떻게 해야할까?



위의 그림을 보면 area 3과 area 0이 동떨어져있다. 이렇게 되면 OSPF간 통신이 이루어지지 않는다.

이럴때 사용하는 것이 virtual link이다.

area 0과 area 3사이에는 area2가 다리역할을 할 수 있게 설정해주면 통신이 가능하다.

기본설정들은 모든 라우터에 다 해준 후, R2에서 ospf router 1 라우터 모드로 들어간 후,

R2에서는 area 2 virtual-link 5.5.5.5라는 명령어를 입력해주고, R5에서는 area 2 virtual-link 2.2.2.2라는 명령어를 입력해주면 끝난다.

이 명령어에 대한 설명은 area [다리역할 하는 area 번호] virtual-link [상대편 라우터의 ID] 이다.

<실습>



R1~R8까지 중요한 부분의 구성 부분만 편집해서 구성해 봤다.

R1)

interface Loopback0
 ip address 1.1.1.1 255.255.255.0

interface Serial1/0
 no ip address
 encapsulation frame-relay
 serial restart-delay 0
 no frame-relay inverse-arp

interface Serial1/0.123 multipoint
 ip address 1.1.123.1 255.255.255.0
 frame-relay map ip 1.1.123.3 103 broadcast
 frame-relay map ip 1.1.123.2 102 broadcast

router ospf 1
 network 1.1.1.1 0.0.0.0 area 0
 network 1.1.123.1 0.0.0.0 area 0
 neighbor 1.1.123.2 priority 1
 neighbor 1.1.123.3 priority 1

 

R2)

interface Loopback0
 ip address 2.2.2.2 255.255.255.0

interface Serial1/0
 no ip address
 encapsulation frame-relay
 serial restart-delay 0
 no frame-relay inverse-arp

interface Serial1/0.123 multipoint
 ip address 1.1.123.2 255.255.255.0
 frame-relay map ip 1.1.123.3 203 broadcast
 frame-relay map ip 1.1.123.1 201 broadcast

interface Serial1/1.245 multipoint
 ip address 1.1.245.2 255.255.255.0
 frame-relay map ip 1.1.245.4 204 broadcast
 frame-relay map ip 1.1.245.5 205 broadcast

router ospf 1
 area 2 virtual-link 5.5.5.5
 network 1.1.123.2 0.0.0.0 area 0
 network 1.1.245.2 0.0.0.0 area 2
 network 2.2.2.2 0.0.0.0 area 0
 neighbor 1.1.123.3
 neighbor 1.1.245.4 priority 1
 neighbor 1.1.245.5 priority 1

 

R3)

interface Loopback0
 ip address 3.3.3.3 255.255.255.0

interface Serial1/0
 no ip address
 encapsulation frame-relay
 serial restart-delay 0
 no frame-relay inverse-arp

interface Serial1/0.123 multipoint
 ip address 1.1.123.3 255.255.255.0
 frame-relay map ip 1.1.123.1 301 broadcast
 frame-relay map ip 1.1.123.2 302 broadcast

interface Serial1/1
 no ip address
 encapsulation frame-relay
 serial restart-delay 0
 no frame-relay inverse-arp

interface Serial1/1.37 point-to-point
 ip address 1.1.37.3 255.255.255.0
 frame-relay interface-dlci 307  

router ospf 1
 network 1.1.37.3 0.0.0.0 area 1
 network 1.1.123.3 0.0.0.0 area 0
 network 3.3.3.3 0.0.0.0 area 0

 

R4)

interface Loopback0
 ip address 4.4.4.4 255.255.255.0

interface Serial1/1
 no ip address
 encapsulation frame-relay
 serial restart-delay 0
 no frame-relay inverse-arp

interface Serial1/1.245 point-to-point
 ip address 1.1.245.4 255.255.255.0
 ip ospf network non-broadcast
 frame-relay interface-dlci 402  

router ospf 1
 network 1.1.245.4 0.0.0.0 area 2
 network 4.4.4.4 0.0.0.0 area 2

 

R5)

interface Loopback0
 ip address 5.5.5.5 255.255.255.0

interface Serial1/0
 ip address 1.1.56.5 255.255.255.0
 serial restart-delay 0

interface Serial1/1
 no ip address
 encapsulation frame-relay
 serial restart-delay 0
 no frame-relay inverse-arp

interface Serial1/1.245 point-to-point
 ip address 1.1.245.5 255.255.255.0
 ip ospf network non-broadcast
 frame-relay interface-dlci 502  

router ospf 1
 area 2 virtual-link 2.2.2.2
 network 1.1.56.5 0.0.0.0 area 3
 network 1.1.245.5 0.0.0.0 area 2
 network 5.5.5.5 0.0.0.0 area 2

 

R6)

interface Loopback0
 ip address 6.6.6.6 255.255.255.0

interface Serial1/0
 ip address 1.1.56.6 255.255.255.0
 serial restart-delay 0

router ospf 1
 network 1.1.56.6 0.0.0.0 area 3
 network 1.1.69.6 0.0.0.0 area 0
 network 6.6.6.6 0.0.0.0 area 3

 

R7)

interface Loopback0
 ip address 7.7.7.7 255.255.255.0

interface FastEthernet0/0
 ip address 1.1.78.7 255.255.255.0
 duplex auto
 speed auto

interface Serial1/1
 no ip address
 encapsulation frame-relay
 serial restart-delay 0
 no frame-relay inverse-arp

interface Serial1/1.37 point-to-point
 ip address 1.1.37.7 255.255.255.0
 frame-relay interface-dlci 703  

router ospf 1
 network 1.1.37.7 0.0.0.0 area 1
 network 1.1.78.7 0.0.0.0 area 1
 network 7.7.7.7 0.0.0.0 area 1

 

R8)

interface Loopback0
 ip address 8.8.8.8 255.255.255.0

interface FastEthernet0/0
 ip address 1.1.78.8 255.255.255.0
 duplex auto
 speed auto

router ospf 1
 network 1.1.78.8 0.0.0.0 area 1
 network 1.1.89.8 0.0.0.0 area 0
 network 8.8.8.8 0.0.0.0 area 1

 

노란색으로 밑줄 친 부분이 virtual link설정 부분이다.

R2와 R5가 area 2를 사이에 놓고 R5가 area 0영역에 닿지 않아 area 3와 area 0이 통신이 되지 않고 있다.

그래서 이 사이를 virtual-link로 뚫어준 것이다.


posted by 경원구