6.9 정리 - RIP 라우팅, Port Security

HakJin Kim·2023년 6월 9일
0

[Port Security]

(허브로 연결한 토폴로지)

  • 포트로 통하는 데이터의 차단을 목적으로 사용
  • 들어오는 데이터(fa0/22, fa0/23)가 관리 대상, 나가는 데이터(fa0/24)는 해당X
  • MAC 주소가 기준이며 통신 순서에 따라 순서 등록이 된다.

(포트 시큐리티를 위한 기본 설정)

Switch(config)#int fa0/23
Switch(config-if)#switchport mode trunk
Switch(config-if)#switchport port-security 

(포트 시큐리티- 기본명령어)

Switch(config-if)#switchport port-security ?
  aging        Port-security aging commands
  mac-address  Secure mac address
  maximum      Max secure addresses
  violation    Security violation mode

(포트 시큐리티-maximum 명령어)

Switch(config-if)#switchport port-security maximum 2

(포트 시큐리티-violation 명령어)

Switch(config-if)#switchport port-security violation ?
  protect   Security violation protect mode -> 차단없이 이용
  restrict  Security violation restrict mode -> 차단 로그/이벤트를 남김
  shutdown  Security violation shutdown mode

(ex)

Switch(config-if)#switchport port-security violation shutdown

(restrict 모드에서 로그 확인법)

Switch(config-if)#do sh port-security

(Shutdown으로 인한 차단 해제)

Switch(config-if)#shutdown 
Switch(config-if)#no shutdown

- 곧바로 no shutdown을 하는 것이 아닌 shutdown - no shutdown 으로 진행

(MAC-Address 확인법)

Switch(config)#do sh mac-


(스위치로 연결한 토폴로지)

  • 허브와 다르게 스위치는 자기 MAC주소가 있기 때문에 maximum 명령어를 쓸 때에는 +1을 해주어야한다.
    ex) 두 대를 올릴때 Switch(config-if)#switchport port-security maximum 3

(MAC-Address 등록)


switchport port-security mac-address 0090.2187.CE3C

  • 우선적으로 사용할 MAC주소를 미리 등록시켜둘 수 있다.

주의점)

  • 포트 시큐리티를 적용할때는 switchport port-security 명령어를 꼭 적용하고 maximum이나 violation 명령어를 적용하자.
    (적용을 하지 않으면 다른 명령어들이 안먹힌다)

  • fa0/23번 포트는 스위치-스위치 연결이므로 shutdown-no shutdown 후 초기 상태에서도 mac 주소를 먹고있다.

[동적 라우팅]

  • Dynamic Routing
  • 정적 라우팅의 복잡한 IP주소 추가 과정 없이 몇 줄의 명령어로 간편하게 라우팅을 할 수 있다.

(Routing Protocol RIP)

(기본 형식)

Router(config)#router rip
Router(config-router)#version 2
Router(config-router)#network (라우터 자신과 연결된 네트워크 IP주소)
Router(config-router)#no auto-summary 

(실습)

  • 왼쪽부터 Router1, Router2, Router3이다.
  • 각 라우터에 RIP 방식으로 동적 라우팅 설정을 해준다면 자동으로 라우팅된다.
  • 동적 라우팅간 network 명령어에 적는 IP주소는 라우터 자기가 가지고 있는 네트워크의 IP주소이다.

(R1)

Router(config)#router rip
Router(config-router)#version 2
Router(config-router)#network 192.168.10.0
Router(config-router)#network 1.1.12.0
Router(config-router)#no auto-summary 

(R2)

Router(config)#router rip
Router(config-router)#version 2
Router(config-router)#network 1.1.12.0
Router(config-router)#network 1.1.23.0
Router(config-router)#network 192.168.20.0
Router(config-router)#no auto-summary 

(R3)

Router(config)#router rip
Router(config-router)#version 2
Router(config-router)#network 192.168.30.0
Router(config-router)#network 1.1.23.0
Router(config-router)#no auto-summary 
  • 간단하게 각 라우터에 해당 명령어를 적용시킨다면 수월한 라우팅을 할 수 있다.
profile
처음 시작하는 사람

0개의 댓글

관련 채용 정보