다중경로
  이중화
   -> 루프백 인터페이스
    - iBGP : 출발지 주소
    - eBGP : 출발지 주소 -> ebgp-multihop 명령어


 * next-hop 속성
   1) eBGP Peer 간

 BGP 경로를 자기자신을 next-hop으로 전달
 * 주의사항 
 - bgp peer에게 도달할 routing table 경로가 있어야 한다.
 - next-hop에 도달 가능한 routing table 경로가 있어야 한다.




 * RIP, EIGRP, OSPF

 -> Metric 부르는 용어
   RIP : hop-count
 - EIGRP : 대역폭·지연(metric)
 - OSPF : 대역폭(cost)
EIGRP, OSPF -> 링크속도가 높을 수록 메트릭 속도가 낮다.

EIGRP, OSPF V2 -> classless routing protocol 
 - 수동 경로 요약 지원
 - 인증 지원, 멀티캐스트 통신


Multicast MAC
01-00-5E-xx-xx-xx
----------
으로 시작하면 멀티캐스트 맥 주소이다.

'시스코 > 시스코-필기' 카테고리의 다른 글

BGP 명령어  (0) 2022.01.13
IPsec, 동적 라우팅 (BGP - iBGP, eBGP)  (0) 2022.01.13
ACL 실습, NAT  (0) 2022.01.12
ACL, 표준 ACL(Standard ACL), 확장 ACL(Extended ACL)  (0) 2022.01.12
동적 라우팅(Dynamic Routing) - OSPF  (0) 2022.01.10

실습목표 

EIGRP와 BGP를 활용해 이더채널처럼 운용할 계획이다.

모든 라우터에 BGP를 설정하고, R2와 R3에만 EIGRP를 사용할 것이다.

 

R1 라우터 설정

R1(config)#int e0/1
R1(config-if)#ip add 1.1.21.1 255.255.255.0
R1(config-if)#no sh

R1(config-if)#int e0/0
R1(config-if)#ip add 1.1.12.1 255.255.255.0
R1(config-if)#no sh

 

R1(config)#int lo 0
R1(config-if)#ip add 10.10.0.1 255.255.255.0
R1(config-if)#no sh

R1(config-if)#int lo 1
R1(config-if)#ip add 100.100.100.1 255.255.255.0
R1(config-if)#no sh

 

R2 라우터 설정

R2(config-if)#int e0/0
R2(config-if)#ip add 1.1.32.2 255.255.255.0
R2(config-if)#no sh

R2(config-if)#int e0/1
R2(config-if)#ip add 1.1.23.2 255.255.255.0
R2(config-if)#no sh

 

R2(config-if)#int e0/2
R2(config-if)#ip add 1.1.12.2 255.255.255.0
R2(config-if)#no sh

 

R2(config-if)#int e0/3
R2(config-if)#ip add 1.1.21.2 255.255.255.0
R2(config-if)#no sh

 

R2(config)#int lo 0
R2(config-if)#ip add 10.10.10.1 255.255.255.0
R2(config-if)#no sh

 

R3 라우터 설정

R3(config)#int e0/0
R3(config-if)#ip add 1.1.32.3 255.255.255.0
R3(config-if)#no sh

 

R3(config-if)#int e0/1
R3(config-if)#ip add 1.1.23.3 255.255.255.0
R3(config-if)#no sh

R3(config-if)#int e0/2
R3(config-if)#ip add 1.1.34.3 255.255.255.0
R3(config-if)#no sh

 

R3(config)#int lo 0
R3(config-if)#ip add 10.10.20.1 255.255.255.0
R3(config-if)#no sh

 

R4 라우터 설정
R4(config)#int e0/0
R4(config-if)#ip add 1.1.34.4 255.255.255.0
R4(config-if)#no sh

 

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

기본설정에서 경로와 LO 정보들을 만들었다.

BGP 설정을 해주겠다.

 

R1 라우터 설정

R1(config)#router bgp 100
R1(config-router)#neighbor 1.1.21.2 remote-as 300
R1(config-router)#neighbor 1.1.12.2 remote-as 300
R1(config-router)#network 10.10.0.0 mask 255.255.255.0
R1(config-router)#network 100.100.100.0 mask 255.255.255.0

 

R2 라우터 설정

R2(config-router)#router bgp 300
R2(config-router)#neighbor 1.1.21.1 remote-as 100
R2(config-router)#neighbor 1.1.12.1 remote-as 100

R2(config-router)#neighbor 1.1.23.3 remote-as 300
R2(config-router)#neighbor 1.1.32.3 remote-as 300

R2(config-router)#network 10.10.10.0 mask 255.255.255.0

 

R3 라우터 설정

R3(config)#router bgp 300
R3(config-router)#neighbor 1.1.23.2 remote-as 300
R3(config-router)#neighbor 1.1.32.2 remote-as 300
R3(config-router)#neighbor 1.1.34.4 remote-as 200
R3(config-router)#network 10.10.20.0 mask 255.255.255.0

 

R4 라우터 설정

R4(config)#router bgp 200
R4(config-router)#neighbor 1.1.34.3 remote-as 300

 

bgp 설정을 마치고 R4 라우터에서 광고받은 네트워크를 확인해 본다.

R1라우터에서의 LO 네트워크를 하나도 광고받지 못했다.

한단계씩 올라가며 어디까지 광고받았는지 확인 해보았다.

바로 앞 R3에서 R1의 LO 네트워크에 대한 광고를 받았지만,

최적의 경로가 아니고 더 이상 다음 eBGP로 광고가 되지 않는다.

Next-hop을 확인해보니 1.1.12.1로 R1 라우터의 정보가 출력되어 있다.

다음 명령어를 통해 Next-hop을 임의로 지정해주었다.

 

R2(config-router)#neighbor 1.1.12.1 next-hop-self
R2(config-router)#neighbor 1.1.21.1 next-hop-self

 

 

해당 명령어를 입력하자, 정상적으로 네트워크를 광고받아 출력되는 것을 확인할 수 있었다.

 

EIGRP 라우팅을 활용해 부하분산을 시도한다.

 

EIGRP로 라우팅을 하자 라우팅 테이블에 아래와 같은 항목이 추가 되었다.

하나의 라우터에 두가지 경로가 표시되는데, 작업을 두개 이상의 포트로 나누어 한다고 해서 부하분산 이라고 한다.

 

D        10.10.20.0/24 [90/409600] via 1.1.32.3, 00:00:31, Ethernet0/0
                              [90/409600] via 1.1.23.3, 00:00:31, Ethernet0/1

   -> 부하 분산(equal cost Load balancing, 메트릭 동일할 때 가능)

 

만약에 1.1.32.2 경로를 강제로 끊어보았더니,

네트워크가 정지하지 않고 1.1.23.2와 연결되어 통신이 된다는 것을 확인할 수 있었다.

 

실습 목표

 1. BGP 설정
  eBGP Peer -> R1<->R2, R2<->R3

 2. Static NAT 설정 -> R1에 설정함
 inside global address : 4.4.4.0/24

 3. 기본경로 설정 -> R4에 설정

 4. R1에 192.168.1.0 /24 경로 설정

 5. R1에서 ROOTBACK 0 만들고 광고하기

 

 

라우터 기본 설정 -

R1 라우터 설정

R1(config)#int e0/0
R1(config-if)#ip add 1.1.14.1 255.255.255.0
R1(config-if)#no sh

R1(config-if)#int e0/1
R1(config-if)#ip add 1.1.12.1 255.255.255.0
R1(config-if)#no sh

 

R2 라우터 설정

R2(config)#int e0/0
R2(config-if)#ip add 1.1.12.2 255.255.255.0
R2(config-if)#no sh

R2(config-if)#int e0/1
R2(config-if)#ip add 1.1.23.2 255.255.255.0
R2(config-if)#no sh

 

R3 라우터 설정

R3(config)#int e0/0
R3(config-if)#ip add 1.1.23.3 255.255.255.0
R3(config-if)#no sh

R3(config-if)#int e0/1
R3(config-if)#ip add 3.3.3.1 255.255.255.0
R3(config-if)#no sh

 

R4 라우터 설정

R4(config)#int e0/0
R4(config-if)#ip add 192.168.1.1 255.255.255.0
R4(config-if)#no sh

R4(config-if)#int e0/1
R4(config-if)#ip add 1.1.14.4 255.255.255.0
R4(config-if)#no sh

 


R1(config)#int lo 0
R1(config-if)#ip add 4.4.4.1 255.255.255.0
R1(config-if)#no sh

 

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

기본설정을 마치고 BGP 설정을 해주겠다.

 

R4(config)#router bgp 100
R4(config-router)#neighbor 1.1.14.1 remote-as 100

R4(config-router)#network 192.168.1.0 mask 255.255.255.0

 

R1(config)#router bgp 100
R1(config-router)#neighbor 1.1.14.4 remote-as 100
R1(config-router)#neighbor 1.1.12.2 remote-as 200
R1(config-router)#neighbor 1.1.12.2 ebgp-multihop 3

R1(config-router)#network 4.4.4.0 mask 255.255.255.0

 

R2(config)#router bgp 200
R2(config-router)#neighbor 1.1.12.1 remote-as 100
R2(config-router)#neighbor 1.1.12.1 ebgp-multihop 4
R2(config-router)#neighbor 1.1.23.3 remote-as 300
R2(config-router)#neighbor 1.1.23.3 ebgp-multihop 2

 

R3(config)#router bgp 300
R3(config-router)#neighbor 1.1.23.2 remote-as 200
R3(config-router)#neighbor 1.1.23.2 ebgp-multihop 5

R3(config-router)#network 3.3.3.0 mask 255.255.255.0

 

각 라우터에 연결되어 있는 호스트를 광고 해 주어야 한다. 

그렇지 않으면 통신이 되지 않는다.

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

NAT 설정

R1#debug ip nat
IP NAT debugging is on

R1(config)#ip nat inside source static 192.168.1.100 4.4.4.100


R1(config)#int e0/0
R1(config-if)#ip nat inside

R1(config-if)#int e0/1
R1(config-if)#ip nat outside

 

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

마지막으로 R4에서 기본경로 설정을 해준다.

R4(config)#ip route 0.0.0.0 0.0.0.0 1.1.14.1

 

 

 

 

실습목표

R1, R2, R4, R5에만 BGP 설정을 하고, R3에는 BGP 설정을 하지 않는다.

R3에는 BGP 설정을 하지 않았기에 R1에서 Lo 0를 광고하여도 R2까지만 광고가 된다.

이를 R5로 광고가 되도록 설정해보아라.

 

R1 라우터 설정

R1(config)#int e0/0
R1(config-if)#ip add 1.1.12.1 255.255.255.0
R1(config-if)#no sh

R1(config-if)#int lo 0

R1(config-if)#ip add 172.16.1.1 255.255.255.0

 

R1(config-if)#int lo 0
R1(config-if)#ip add 172.16.1.1 255.255.255.0
R1(config-if)#no sh

 

R2 라우터 설정

R2(config)#int e0/0
R2(config-if)#ip add 1.1.12.2 255.255.255.0
R2(config-if)#no sh

R2(config-if)#int e0/1
R2(config-if)#ip add 1.1.23.2 255.255.255.0
R2(config-if)#no sh

 

R3 라우터 설정

R3(config)#int e0/0
R3(config-if)#ip add 1.1.23.3 255.255.255.0
R3(config-if)#no sh


R3(config-if)#int e0/1
R3(config-if)#ip add 1.1.34.3 255.255.255.0
R3(config-if)#no sh

 

R4 라우터 설정

R4(config)#int e0/0
R4(config-if)#ip add 1.1.34.4 255.255.255.0
R4(config-if)#no sh


R4(config-if)#int e0/1
R4(config-if)#ip add 1.1.45.4 255.255.255.0
R4(config-if)#no sh

 

R5 라우터 설정

R5(config)#int e0/0
R5(config-if)#ip add 1.1.45.5 255.255.255.0
R5(config-if)#no sh

 

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

기본 설정을 마치고, BGP 설정을 해주겠다.

 

R1 라우터 설정

R1(config-if)#router bgp 100
R1(config-router)#neighbor 1.1.12.2 remote-as 200

R1(config-router)#network 172.16.1.0 mask 255.255.255.0

 

R2 라우터 설정

R2(config-if)#router bgp 200
R2(config-router)#neighbor 1.1.12.1 remote-as 100
R2(config-router)#neighbor 1.1.23.3 remote-as 200

 

R4 라우터 설정

R4(config-if)#router bgp 200
R4(config-router)#neighbor 1.1.34.3 remote-as 200
R4(config-router)#neighbor 1.1.45.5 remote-as 300

 

R5 라우터 설정

R5(config-if)#router bgp 300

R5(config-router)#neighbor 1.1.45.4 remote-as 200

 

BGP 설정을 마치고, R1부터 R5까지 LO 0 가 잘 광고가 되었는지 확인해보기 위해

Show ip bgp 명령어를 입력했다.

 

R2까지는 광고가 되었지만, R3라우터에 BGP를 설정하지 않아서

R4부터는 광고가 되지 않아 아무런 내용이 출력되지 않았다.

이러한 경우 정적 라우팅을 통해 R2~R4까지의 경로를 라우터에게 알려주는 방법이 있다.

 

R2(config)#ip route 1.1.34.0 255.255.255.0 1.1.23.3

 

R4(config)#ip route 1.1.23.0 255.255.255.0 1.1.34.3

R4(config)#ip route 1.1.12.0 255.255.255.0 1.1.34.3

 

정적 라우팅까지 마치자 R5에서 LO 0 가 광고되는 것을 확인할 수 있었다.

 

실습목표

스위치를 통해 연결된 라우터간에 BGP를 설정하여 네이버 설정을 하라.

R2 라우터에서 LO 0를 선언하고 광고하라

 

R1 라우터 설정

R1(config)#int e0/1
R1(config-if)#ip add 1.1.1.1 255.255.255.0
R1(config-if)#no sh

 

R2 라우터 설정

R2(config)#int e0/0
R2(config-if)#ip add 1.1.1.2 255.255.255.0
R2(config-if)#no sh

R2(config-if)#int lo 0
R2(config-if)#ip add 172.16.30.1 255.255.255.0
R2(config-if)#no sh

 

R3 라우터 설정

R3(config)#int e0/0
R3(config-if)#ip add 1.1.1.3 255.255.255.0
R3(config-if)#no sh

 

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

기본 설정을 마치고 BGP 설정을 해준다.

 

R1 라우터 설정

R1(config)#router bgp 100
R1(config-router)#neighbor 1.1.1.3 remote-as 200

R1(config-router)#neighbor 1.1.1.2 remote-as 100

 

R2 라우터 설정

R2(config-if)#router bgp 100
R2(config-router)#neighbor 1.1.1.1 remote-as 100
R2(config-router)#neighbor 1.1.1.3 remote-as 200
R2(config-router)#network 172.16.30.0 mask 255.255.255.0

 

R3 라우터 설정

R3(config)#router bgp 200
R3(config-router)#neighbor 1.1.1.1 remote-as 100
R3(config-router)#neighbor 1.1.1.2 remote-as 100

 

     Network          Next Hop            Metric LocPrf Weight Path
 *   172.16.30.0/24   1.1.1.2                                0 100 i
 *>                   1.1.1.2                  0             0 100 i

 

R3에서 Lo 0 의 네트워크를 광고받는 것을 확인할 수 있다.

 

기본 설정

R1

 

R1(config)#int e0/0
R1(config-if)#ip add 1.1.12.1 255.255.255.0
R1(config-if)#no sh

 

R2

 

R2(config)#int e0/0
R2(config-if)#ip add 1.1.12.2 255.255.255.0
R2(config-if)#no sh

R2(config-if)#int e0/1
R2(config-if)#ip add 1.1.23.2 255.255.255.0
R2(config-if)#no sh

 

R3

 

R3(config-if)#int e0/0
R3(config-if)#ip add 1.1.23.3 255.255.255.0
R3(config-if)#no sh

R3(config-if)#int e0/1
R3(config-if)#ip add 1.1.34.3 255.255.255.0
R3(config-if)#no sh

 

R4

 

R4(config)#int e0/0
R4(config-if)#ip add 1.1.34.4 255.255.255.0
R4(config-if)#no sh


R4(config-if)#int e0/1
R4(config-if)#ip add 1.1.45.4 255.255.255.0
R4(config-if)#no sh

 

 

R5

R5(config)#int e0/0
R5(config-if)#ip add 1.1.45.5 255.255.255.0
R5(config-if)#no sh

 

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

기본 설정을 마치고 동적 라우팅, BGP를 설정해 준다.

BGP의 기본 설정 명령어는

    Router(config)# router bgp AS_Number
    Router(config-router)# neighbor 네이버주소 remote-as 네이버AS번호

이다.

주어진 AS번호를 활용해 설정한다.

 

R1

    R1(config)#router bgp 100
    R1(config-router)#neighbor 1.1.12.2 remote-as 200
    R1(config-router)#ex


    R1(config)#int lo 0
    R1(config-if)#ip add 192.168.1.1 255.255.255.0
    R1(config-if)#no sh

 > 루프백 인터페이스를 만들어줌, 물리적으로 존재하지 않는 논리적인 인터페이스 포트이다.

 

R2

    R2(config)#router bgp 200
    R2(config-router)#neighbor 1.1.12.1 remote-as 100
    R2(config-router)#neighbor 1.1.23.3 remote-as 300

 

 R3
    R3(config)# router bgp 300
    R3(config-router)# neighbor 1.1.23.2 remote-as 200
    R3(config-router)# neighbor 1.1.34.4 remote-as 300

 R4
    R4(config)# router bgp 300
    R4(config-router)# neighbor 1.1.34.3 remote-as 300
    R4(config-router)# neighbor 1.1.45.5 remote-as 400

 R5
    R5(config)# router bgp 400
    R5(config-router)# neighbor 1.1.45.4 remote-as 300

 

 

R3의 네이버 관계를 확인해본다.

R3#show ip bgp summary

 

Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
1.1.23.2        4          200       7       9        1    0    0 00:05:14        0
1.1.34.4        4          300       7       8        1    0    0 00:04:31        0

 

1.1.23.2와 AS200으로 네이버 관계를,

1.1.34.4와 AS300으로 네이버 관계를 맺고 있다는 것을 확인할 수 있다.

 

R1에서 Loopback 0 를 광고해 다른 네이버에게 Loopback에 대한 정보를 알 수 있도록 설정해보자.

 

R1(config-router)#network 192.168.1.0 mask 255.255.255.0

R3#show ip bgp
BGP table version is 2, local router ID is 1.1.23.3
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
              x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
 *>  192.168.1.0      1.1.23.2                               0 200 100 i

 

*>는 BGP가 인지한 최적의 경로임을 나타낸다.

해당 명령어를 통해 광고받은 네트워크의 정보와 Next hop의 정보 외에도 많은 것을 확인할 수 있다.

 

R4에서 광고받은 네트워크를 확인해보았다.

 

     Network          Next Hop            Metric LocPrf Weight Path
 * i 192.168.1.0      1.1.23.2                 0    100      0 200 100 i

 

BGP는 최적의 경로가 아니라고 설명한다.

R5에서 Show ip bgp를 해도 아무런 광고가 되지 않는다.

 

이런 경우에는 정적 라우팅 ip route를 활용해 넥스트홉을 임의로 지정해 줄 수 있다.

 

R4(config)# ip route 1.1.23.0 255.255.255.0 1.1.34.3

 

     Network          Next Hop            Metric LocPrf Weight Path
 *>i 192.168.1.0      1.1.23.2                 0    100      0 200 100 i

 

정적 라우팅을 통해 넥스트홉을 지정하자 최적의 경로로 변경되었다.

 

     Network          Next Hop            Metric LocPrf Weight Path
 *>  192.168.1.0      1.1.45.4                               0 300 200 100 i

 

아무런 내용이 출력되지 않았던 R5에서도 Loopback 0의 네트워크 정보를 광고받는것을 확인할 수 있다.


 1. BGP 설정
   -> BGP란? AS간 라우팅 정보 교환

   - 설정 명령

    Router(config)# router bgp AS_Number
    Router(config-router)# neighbor 네이버주소 remote-as 네이버AS번호


 * split-horizon : 네이버를 통해서 학습한 경로는 다시 해당 네이버로 전달하지 않음
                       >라우팅 루핑을 방지하기 위함 
                  수신 인터페이스를 통해서 광고 받은 정보는 해당 인터페이스로 업데이트를 보내지 않는다
     * BGP에서 스플릿 호라이즌 규칙은 IBGP Peer 간에 적용된다.


 * 수동 경로 요약                
                                     /22
      192.168.0.0/24       0000 00 | 00 . 0000 0000
      192.168.1.0/24       0000 00 | 01 . 0000 0000
      192.168.2.0/24       0000 00 | 10 . 0000 0000                              => 192.168.0.0/22 로 요약된다.
      192.168.3.0/24       0000 00 | 11 . 0000 0000




 1. IPsec ( Site to Site IPsec VPN 설정 )

   1) 설정
  
      - IKE 1 단계 ( IKE Phase 1 )
         : 피어 간 6개의 패킷이 교환 됨 (피어당 3개)

    Router(config)# crypto isakmp policy 10
    Router(config-isakmp)# encryption 암호화 알고리즘
    Router(config-isakmp)# authentication 인증방식
    Router(config-isakmp)# group 그룹번호
    Router(config)# crypto isakmp key 인증키 address VPN피어주소

      - IKE 2 단계 ( IKE Phase 2, IPsec SA )
          : 사용자 트래픽 보호 설정 (암호화)

    >> IPsec 보호 대상 트래픽 지정 - ACL 사용
    Router(config)# ip access-list extended 이름
    Router(config-ext-nacl)# permit ip source wildcardmask destination wildcardmask


    >> transform-set 정의 - 암호화, 인증 알고리즘 정의
    Router(config)# crypto ipsec transform-set 이름 암호화 알고리즘 인증알고리즘

    >> crypto map 작성
    Router(config)# crypto map 맵이름 일련번호 ipsec-isakmp
    Router(config-isakmp-map)# match address ACL이름
    Router(config-isakmp-map)# set peer VPN피어주소
    Router(config-isakmp-map)# set transform-set 트랜스폼셋이름

    >> crypto map 적용 ( 외부 네트워크와 연결된 인터페이스 )
    Router(config)# interface 인터페이스명
    Router(config-if)# crypto map 맵이름


 * BGP (EGP)
   -> AS와 AS간의 라우팅 정보를 교환
   -> AS : 하나의 네트워크 집단,회사

   -> peer 관계
     - iBGP : 같은 AS상에 있는 BGP peer 관계를 뜻함
     - eBGP: 다른 AS상에 있는 BGP peer 관계를 뜻함

   - BGP 설정
   Router(config)# router bgp AS_번호
   Router(config-router)# neighbor IP주소 remote-as AS_번호(네이버의 AS번호)







'시스코 > 시스코-필기' 카테고리의 다른 글

이중화, Metric  (0) 2022.01.14
BGP 명령어  (0) 2022.01.13
ACL 실습, NAT  (0) 2022.01.12
ACL, 표준 ACL(Standard ACL), 확장 ACL(Extended ACL)  (0) 2022.01.12
동적 라우팅(Dynamic Routing) - OSPF  (0) 2022.01.10

실습목표

L3 스위치에서 VLAN을 생성하고, 각 호스트에 분배하라.

Static NAT를 이용해 주어진 IP주소로 변환하라.

지역간 통신이 원활하게 하라.

 

대구 라우터 설정

Daegu(config)#do debug ip nat

IP NAT debugging is on

 

Daegu(config)#ip nat inside source static 192.168.10.100 100.100.10.100

 

Daegu(config)#ip nat inside source static 192.168.20.100 100.100.20.100

 

Daegu(config)#ip nat inside source static 192.168.10.254 100.100.10.254

 

Daegu(config)#int fa0/0

Daegu(config-if)#ip nat outside

 

Daegu(config-if)#int fa0/1

Daegu(config-if)#ip nat inside

 

NAT 설정을 해준 후, 기본 설정을 해주었다.

 

부산 라우터 설정

Busan(config)#int fa0/1

Busan(config-if)#ip add 200.200.200.1 255.255.255.0

Busan(config-if)#no sh

 

Busan(config-if)#int fa0/0

Busan(config-if)#ip add 1.1.1.10 255.255.255.252

Busan(config-if)#no sh

 

Busan(config)#ip route 100.100.10.0 255.255.255.0 1.1.1.9

Busan(config)#ip route 100.100.20.0 255.255.255.0 1.1.1.9

 

대구 라우터 설정

Daegu(config)#int fa0/0

Daegu(config-if)#ip add 1.1.1.9 255.255.255.252

Daegu(config-if)#no sh

 

Daegu(config-if)#int fa0/1

Daegu(config-if)#ip add 1.1.1.6 255.255.255.252

Daegu(config-if)#no sh

 

Daegu(config)#ip route 192.168.10.0 255.255.255.0 1.1.1.5

Daegu(config)#ip route 192.168.20.0 255.255.255.0 1.1.1.5

Daegu(config)#ip route 200.200.200.0 255.255.255.0 1.1.1.10

 

FW 라우터 설정

FW(config)#int fa0/1

FW(config-if)#ip add 1.1.1.5 255.255.255.252

FW(config-if)#no sh

 

FW(config-if)#int fa0/0

FW(config-if)#ip add 1.1.1.2 255.255.255.252

FW(config-if)#no sh

 

FW(config)#ip route 192.168.10.0 255.255.255.0 1.1.1.1

FW(config)#ip route 192.168.20.0 255.255.255.0 1.1.1.1

FW(config)#ip route 200.200.200.0 255.255.255.0 1.1.1.6

 

GW L3 스위치 설정

GW(config)#int fa0/24

GW(config-if)#no switchport

GW(config-if)#ip add 1.1.1.1 255.255.255.252

GW(config-if)#no sh

GW(config-if)#exit

 

GW(config)#ip routing

 

GW(config)#vlan 10

GW(config-vlan)#vlan 20

 

GW(config-vlan)#int vlan 10

GW(config-if)#ip add 192.168.10.1 255.255.255.0

GW(config-if)#no sh

 

GW(config-if)#int vlan 20

GW(config-if)#ip add 192.168.20.1 255.255.255.0

GW(config-if)#no sh

 

GW(config-if)#int ra fa0/21-22

GW(config-if-range)#switchport access vlan 10

 

GW(config-if-range)#int fa0/23

GW(config-if)#switchport access vlan 20

 

GW(config)#ip route 200.200.200.0 255.255.255.0 1.1.1.2

 

부산 라우터만 정적 라우팅 IP주소가 NAT로 변환된 주소인 이유는, 대구 라우터에서 NAT를 설정했기 때문이다.

 

설정을 마치자 통신이 원활하게 되는 것을 확인할 수 있다.

 

 

 

 

 

실습 목표

Static NAT 설정을 통해 192.168.1.0 네트워크를 100.100.100.0 네트워크로 변환

정적 라우팅을 활용하여 라우팅

변환된 주소로 웹서버 접속

 

대구 라우터 설정

 

Daegu(config)#int fa0/1

Daegu(config-if)#ip add 192.168.1.1 255.255.255.0

Daegu(config-if)#no sh

 

Daegu(config-if)#int fa0/0

Daegu(config-if)#ip add 1.1.1.1 255.255.255.252

Daegu(config-if)#no sh

 

ISP 라우터 설정

 

ISP(config)#int fa0/1

ISP(config-if)#ip add 1.1.1.2 255.255.255.252

ISP(config-if)#no sh

 

ISP(config-if)#int fa0/0

ISP(config-if)#ip add 1.1.1.5 255.255.255.252

ISP(config-if)#no sh

 

부산 라우터 설정

 

Busan(config)#int fa0/1

Busan(config-if)#ip add 1.1.1.6 255.255.255.252

Busan(config-if)#no sh

 

Busan(config-if)#int fa0/0

Busan(config-if)#ip add 200.200.200.1 255.255.255.0

Busan(config-if)#no sh

 

기본 설정을 마친 후, 대구 라우터에 NAT 설정을 해주었다.

 

Daegu(config)#ip nat inside source static 192.168.1.100 100.100.100.100

Daegu(config)#ip nat inside source static 192.168.1.254 100.100.100.101

 

Daegu(config)#int fa0/0

Daegu(config-if)#ip nat outside

 

Daegu(config-if)#int fa0/1

Daegu(config-if)#ip nat inside

 

Daegu(config-if)#do debug ip nat

IP NAT debugging is on

 

라우팅

 

대구 라우팅

 

Daegu(config)#ip route 200.200.200.0 255.255.255.0 1.1.1.2

 

부산 라우팅

 

Busan(config)#ip route 100.100.100.0 255.255.255.0 1.1.1.5

 

ISP 라우팅

 

ISP(config)#ip route 100.100.100.0 255.255.255.0 1.1.1.1

ISP(config)#ip route 200.200.200.0 255.255.255.0 1.1.1.6

 

라우팅 설정을 마치자 호스트간 핑 테스트가 된다.

 

부산 호스트의 DNS 서버를 변환된 서버의 주소를 입력하고 웹 서버에 접속하자 문제없이 접속이 된다.

 

 

 

 

NAT를 활용해 주소를 변환하고, 변환된 주소로 웹 접속을 해보았다.

 

 

+ Recent posts