보안/이론

2) GRE Tunnel (Dynamic route)

_눙이_ 2021. 11. 23. 11:27
반응형

                                            ### GRE Tunnel (Dyanmic)

-R7 = 본사 PC
-R8 = 지사 PC

-R1 = GIT 본사
-R2 = GIT 지사

-R3 = ISP-1
-R4 = ISP-2
-R5 = ISP-3
-R6 = ISP-4


=========================================================================================================================

                       ## OSPF Routing Protocol을 사용한 공중망 구성

EX1) GIT-A , GIT-B , ISP-1 , ISP-2 , ISP-3 , ISP-4 구간에 OSPF Routing Protocol을 사용하여 공중망을 구성하시오
 .OSPF Process = 1 , Area = 0
 .Router-ID = GIT = X.X.X.X , ISP =  XX.XX.XX.XX (X = Router 번호)
 .OSPF 라우팅 업데이트가 필요한 Interface로만 OSPF Packet이 송신되어야 한다.
 .ISP-1 , ISP-2 , ISP-3의 Loopback 0 네트워크는 OSPF에 포함되어야 한다.
 .OSPF환경내의 모든 네트워크는 Interface에 할당된 SubnetMask로 확인되어야 한다.
 .GIT-A , GIT-B의 사설 네트워크는 OSPF에 포함되지 않아야한다.

    # ISP-1 (R3)
router ospf 1
 router-id 11.11.11.11
 passive-interface default
 no passive-interface serial 1/0.10
 no passive-interface serial 1/0.12
 network 100.100.11.0  0.0.0.255 area 0
 network 121.160.10.0  0.0.0.255 area 0
 network 121.160.12.0  0.0.0.255 area 0
!

    # ISP-2 (R4)
router ospf 1
 router-id 22.22.22.22
 passive-interface default
 no passive-interface serial 1/0.12
 no passive-interface serial 1/0.23
 network 100.100.12.0  0.0.0.255 area 0
 network 121.160.12.0  0.0.0.255 area 0
 network 121.160.23.0  0.0.0.255 area 0
!

    # ISP-3 (R5)
router ospf 1
 router-id 33.33.33.33
 passive-interface default
 no passive-interface serial 1/0.23
 no passive-interface serial 1/0.34
 network 100.100.13.0  0.0.0.255 area 0
 network 121.160.23.0  0.0.0.255 area 0
 network 121.160.34.0  0.0.0.255 area 0
!

    # ISP-4 (R6)
router ospf 1
 router-id 44.44.44.44
 passive-interface default
 no passive-interface serial 1/0.20
 no passive-interface serial 1/0.34
 network 100.100.14.0  0.0.0.255 area 0
 network 121.160.20.0  0.0.0.255 area 0
 network 121.160.34.0  0.0.0.255 area 0
!

        정보 확인

ISP-1# show ip ospf neighbor   [인접성 2개 확인]

ISP-2# show ip ospf neighbor   [인접성 2개 확인]

ISP-3# show ip ospf neighbor   [인접성 2개 확인]

ISP-4# show ip ospf neighbor   [인접성 2개 확인]



=========================================================================================================================

                       ## EIGRP Routing Protocol을 사용한 사설망 구성

-EIGRP Routing Protocol을 사용하여 GIT-A <--> ISP-1 , ISP-4 <--> GIT-B 에 사설망을 구성하시오
 .AS = 100 , 자동 요약 기능은 사용하지않는다.
 .EIGRP 라우팅 업데이트가 필요한 Interface로만 EIGRP Packet을 송신해야 한다.
 .GIT-A , GIT-B의 사설 네트워크와 Loopback 0 네트워크는 EIGRP에 포함되어야 한다.

    # GIT-A
router eigrp 100
 no auto-summary
 passive-interface default
 network 192.168.10.0
 network 100.100.1.0  0.0.0.255
!

    # GIT-B
router eigrp 100
 no auto-summary
 passive-interface default
 network 192.168.20.0
 network 100.100.2.0  0.0.0.255
!


=========================================================================================================================

                      ## 사설 망에서 외부 네트워크로 통신하기위한 Default-route 생성

   # GIT-A
ip route 0.0.0.0  0.0.0.0  121.160.10.11
!

   # GIT-B
ip route 0.0.0.0  0.0.0.0  121.160.20.4
!

      정보 확인

GIT-A# show ip route
     100.0.0.0/24 is subnetted, 1 subnets
C       100.100.1.0 is directly connected, Loopback0
C    192.168.10.0/24 is directly connected, FastEthernet0/0
     121.0.0.0/24 is subnetted, 1 subnets
C       121.160.10.0 is directly connected, Serial1/0.10
S*   0.0.0.0/0 [1/0] via 121.160.10.11


GIT-B# show ip route
     100.0.0.0/24 is subnetted, 1 subnets
C       100.100.2.0 is directly connected, Loopback0
C    192.168.20.0/24 is directly connected, FastEthernet0/1
     121.0.0.0/24 is subnetted, 1 subnets
C       121.160.20.0 is directly connected, Serial1/0.20
S*   0.0.0.0/0 [1/0] via 121.160.20.4









=========================================================================================================================

                      ## 사설망을 연결하기위한 Tunnel 생성

EX) GIT-A와 GIT-B 구간을 GRE Tunnel을 사용하여 연결하시오
 .GIT-A와 GIT-B 구간 Tunnel에 할당할 IP 주소는 172.16.10.0/24를 사용해야한다.
 .Tunnel로 통신시 사용할 공인 Source IP address , Destination IP address는  
  ISP-1 , ISP-4에 직접 연결된 물리적인 Interface의 IP 주소를 사용해야 한다.

    # GIT-A
interface tunnel 12
 ip address 172.16.10.1  255.255.255.0
 tunnel source 121.160.10.1
 tunnel destination 121.160.20.2
!

    # GIT-B
interface tunnel 12
 ip address 172.16.10.2  255.255.255.0
 tunnel source 121.160.20.2
 tunnel destination 121.160.10.1
!

     정보 확인

GIT-A# show ip route
      100.0.0.0/24 is subnetted, 1 subnets
C        100.100.1.0 is directly connected, Loopback0
      172.16.0.0/24 is subnetted, 1 subnets
C        172.16.10.0 is directly connected, Tunnel12
C    192.168.10.0/24 is directly connected, FastEthernet0/0
      121.0.0.0/24 is subnetted, 1 subnets
C        121.160.10.0 is directly connected, Serial1/0.10
S*   0.0.0.0/0 [1/0] via 121.160.10.11
GIT-A# ping 172.16.10.2


GIT-B# show ip route
      100.0.0.0/24 is subnetted, 1 subnets
C        100.100.2.0 is directly connected, Loopback0
      172.16.0.0/24 is subnetted, 1 subnets
C        172.16.10.0 is directly connected, Tunnel12
C    192.168.20.0/24 is directly connected, FastEthernet0/1
      121.0.0.0/24 is subnetted, 1 subnets
C        121.160.20.0 is directly connected, Serial1/0.20
S*   0.0.0.0/0 [1/0] via 121.160.20.4
GIT-B# ping 172.16.10.1


==================================================================================================================


                      ## Tunnel 경로를 사용한 사설망 연결

# GIT-A : 192.168.10.0/24
# GIT-B : 192.168.20.0/24
# Tunnel 12 : 172.16.10.0/24

    # GIT-A
router eigrp 100
 no passive-interface tunnel 12
 network 172.16.10.0  0.0.0.255
!

    # GIT-B
router eigrp 100
 no passive-interface tunnel 12
 network 172.16.10.0  0.0.0.255
!

      정보 확인

GIT-A# show ip eigrp neighbor
IP-EIGRP neighbors for process 100
H   Address                 Interface       Hold Uptime   SRTT   RTO  Q  Seq
                                            (sec)                     (ms)          Cnt Num
0   172.16.10.2             Tu12               14 00:00:05      73   5000   0  3

PC1# ping 192.168.20.2



GIT-B# show ip eigrp neighbor
IP-EIGRP neighbors for process 100
H   Address                 Interface       Hold Uptime   SRTT   RTO  Q  Seq
                                            (sec)                     (ms)          Cnt Num
0   172.16.10.1             Tu12               14 00:00:05      73   5000   0  3

PC2# ping 192.168.10.1








































































반응형