반응형

 

 

 

 

 

 

Err-disable의 기능이란?

Switch에서 포트에 대해 장애 및 에러유무를 주기적으로 모니터링하며 에러가 발생하면 자동으로 포트가 Errdisabled 상태로 변경되며 Shutdown 상태가 됩니다. 이후 관리자가 조치를 취할 수 있도록 Event Log를 발생시켜줍니다.

Errdisabled 포트를 복구하려면 해당 포트에서 no shutdown 명령어를 입력해주어야 합니다.

 

 

 

 

Errdisable Detect 설정

장비마다 다르지만 아래와 같이 설정 가능한 옵션들이 많이 있습니다.
여기서 자주 사용하는 옵션만 설명 드리겠습니다.

Switch(config)#errdisable detect cause ?
  all                  Enable error detection on all cases
  arp-inspection       Enable error detection for arp inspection
  dhcp-rate-limit      Enable error detection on dhcp-rate-limit
  dtp-flap             Enable error detection on dtp-flapping
  gbic-invalid         Enable error detection on gbic-invalid
  inline-power         Enable error detection for inline-power
  l2ptguard            Enable error detection on l2protocol-tunnel
  link-flap            Enable error detection on linkstate-flapping
  loopback             Enable error detection on loopback
  pagp-flap            Enable error detection on pagp-flapping
  pppoe-ia-rate-limit  Enable error detection on PPPoE IA rate-limit
  psp                  Enable error detection on PSP
  security-violation   Enable error detection on 802.1x-guard
  sfp-config-mismatch  Enable error detection on SFP config mismatch

 

Switch(config)#errdisable detect cause all
모든 옵션을 포함합니다.

Switch(config)#errdisable detect cause dtp-flap
스위치를 Trunk로 연결했을 경우 trunk는 access 와 다르게 모든 VLAN 트래픽을 실어나르기 때문에 어떤 VLAN에 속하는지 표시해주는 헤더가 필요한데 두 스위치가 사용하는 encapsulation 설정이 다를 경우 발생합니다.

Switch(config)#errdisable detect cause link-flap
짧은 시간동안 스위치 포트가 Up/Down을 반복할 떄 발생합니다.

Switch(config)#errdisable detect cause pagp-flap
스위치간 Etherchannel 구성을 통해 여러개의 포트를 하나로 묶었을 때 묶음 조건이 다를 경우(ex=duplex)

Switch(config)#errdisable detect cause udld
STP프로토콜이 동작하기 위해 양방향 BPDU 프레임 교환이 필요한 스위치 연결에서 단방향 연결만 가능하여 STP프로토콜이 제대로 동작할 수 없을 경우에 발생합니다.

Switch(config)#errdisable detect cause rootguard
STP프로토콜의 root 역활을 하는 스위치에 root 스위치로부터 BPDU 프레임이 도착한 경우에 발생합니다.

 

 

 

 

자동으로 Errdisable 포트를 복구하는 명령어에 대해서 알아볼게요.

 

errdisable recovery 설정

Switch(config)#errdisable recovery cause ?
  all                      Enable timer to recover from all error causes
  arp-inspection           Enable timer to recover from arp inspection error disable state
  bpduguard                Enable timer to recover from BPDU Guard error
  channel-misconfig (STP)  Enable timer to recover from channel misconfig error
  dhcp-rate-limit          Enable timer to recover from dhcp-rate-limit error
  dtp-flap                 Enable timer to recover from dtp-flap error
  gbic-invalid             Enable timer to recover from invalid GBIC error
  inline-power             Enable timer to recover from inline-power error
  l2ptguard                Enable timer to recover from l2protocol-tunnel error
  link-flap                Enable timer to recover from link-flap error
  link-monitor-failure     Enable timer to recover from link monitoring failure
  loopback                 Enable timer to recover from loopback error
  mac-limit                Enable timer to recover from mac limit disable state
  oam-remote-failure       Enable timer to recover from OAM detected remote failure
  pagp-flap                Enable timer to recover from pagp-flap error
  port-mode-failure        Enable timer to recover from port mode change failure
  pppoe-ia-rate-limit      Enable timer to recover from PPPoE IA rate-limit error
  psecure-violation        Enable timer to recover from psecure violation error
  psp                      Enable timer to recover from psp
  security-violation       Enable timer to recover from 802.1x violation error
  sfp-config-mismatch      Enable timer to recover from SFP config mismatch error
  storm-control            Enable timer to recover from storm-control error
  udld                     Enable timer to recover from udld error
  unicast-flood            Enable timer to recover from unicast flood error
  vmps                     Enable timer to recover from vmps shutdown error

 

Switch(config)#errdisable recovery cause all (all대신에 하나씩 사용 가능합니다.)
Switch(config)#errdisable recovery interval 30 (기본 복구시간은 300초이고 30~86400초까지 설정가능합니다.)

 

 

 

테스트로 포트를 Errdisable 상태로 만들고 자동 복구가 되는지 확인해봤습니다.

*Jul  9 15:39:44.822: %PM-4-ERR_DISABLE: psecure-violation error detected on Et0/0, putting Et0/0 in err-disable state
*Jul  9 15:39:44.822: %PORT_SECURITY-2-PSECURE_VIOLATION: Security violation occurred, caused by MAC address 0050.7966.6802 on port Ethernet0/0.
*Jul  9 15:39:45.822: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/0, changed state to down
*Jul  9 15:39:46.823: %LINK-3-UPDOWN: Interface Ethernet0/0, changed state to down

 

Switch#show errdisable recovery 
ErrDisable Reason            Timer Status
-----------------            --------------
arp-inspection               Enabled
bpduguard                    Enabled
channel-misconfig (STP)      Enabled
dhcp-rate-limit              Enabled
dtp-flap                     Enabled
gbic-invalid                 Enabled
inline-power                 Enabled
l2ptguard                    Enabled
link-flap                    Enabled
mac-limit                    Enabled
link-monitor-failure         Enabled
loopback                     Enabled
oam-remote-failure           Enabled
pagp-flap                    Enabled
port-mode-failure            Enabled
pppoe-ia-rate-limit          Enabled
psecure-violation            Enabled
security-violation           Enabled
sfp-config-mismatch          Enabled
storm-control                Enabled
udld                         Enabled
unicast-flood                Enabled
vmps                         Enabled
psp                          Enabled
dual-active-recovery         Disabled

Timer interval: 30 seconds

Interfaces that will be enabled at the next timeout:

Interface       Errdisable reason       Time left(sec)
---------       -----------------       --------------
Et0/0          psecure-violation           19

 

*Jul  9 15:40:14.813: %PM-4-ERR_RECOVER: Attempting to recover from psecure-violation err-disable state on Et0/0
*Jul  9 15:40:16.813: %LINK-3-UPDOWN: Interface Ethernet0/0, changed state to up
*Jul  9 15:40:17.813: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/0, changed state to up

 

 

 

 

 

 

감사합니다.

반응형
반응형

 

 

 

 

 

 

 

Storm-Control

스위치 포트로 트래픽이 과다하게 수신될 경우 Storm-control 기능을 사용하여 수신하는 트래픽 처리양을 제어 및 관리할 수 있다.  스위치 포트로 유니캐스트, 멀티캐스트, 브로드캐스트 트래픽이 1초 동안 일정 수준 이상으로 수신되면 해당 트래픽을 일시적으로 차단하거나 조절해준다.

 

 

 

 

 

 

테스트는 Cisco Packet Tracer로 시뮬레이션을 진행합니다.

아래와 같이 만들어서 테스트 진행했습니다.

 

Storm-control 설정

장비에 따라 조금 다를 수 있습니다.

 

Storm-control 기능을 사용할 포트를 정해주세요.
Switch(config)#interface range fastEthernet 0/2-4

 

 

Storm-control 기능을 이용하여 제어되는 프레임 유형을 선택할 수 있습니다.
Switch(config-if-range)#storm-control broadcast level
Switch(config-if-range)#storm-control multicast level
Switch(config-if-range)#storm-control unicast level

 

 

Storm-control 기능을 이용해서 포트를 제어할 방법을 설정할 수 있습니다.
Switch(config-if-range)#
storm-control action ?
shutdown 
Shutdown this interface if a storm occurs (설정값보다 초과되면 해당 포트를 Shutdown 한다.)
trap 
Send SNMP trap if a storm occurs (설정값보다 초과되면 SNMP로 메시지를 전송한다.)

 

 

Switch(config-if-range)#storm-control broadcast level ?
<0.00 - 100.00> Enter rising threshold
bps Enter suppression level in bits per second (bps 단위를 사용하여 초당 입력되는 트래픽 용량을 제어한다.)
pps Enter suppression level in packets per second (pps 단위를 사용하여 초당 입력되는 패킷 개수를 제어한다.)

 

 

Switch(config-if-range)#storm-control broadcast level 50 20
해당 포트에서 broadcast 프레임 처리양이 50이 되면 broadcast 프레임을 차단한다.
storm-control action shutdown 설정이 되어있으면 포트를 Shutdown 한다.
해당 포트에서 broadcast 프레임 처리양이 20이 될때까지 broadcast 프레임을 제어한다.

 

 

아래 명령어를 이용해 현재 설정값이랑 사용량을 볼 수 있습니다.
Switch#show storm-control broadcast
Interface Filter State Upper Lower Current
--------- ------------- ----------- ----------- ----------
Fa0/2 Link Up 20.00% 20.00% 0.00%
Fa0/3 Link Up 20.00% 20.00% 0.64%
Fa0/4 Link Up 20.00% 20.00% 0.64%

 

 

 

 

 

 

 

감사합니다.

 

 

 

반응형
반응형

 

 

 

DAI (Dynamic ARP Inspection)

DAI는 스위치 보안 기능으로 네트워크 내에 ARP 패킷의 정당성을 확인하여 통신하게 해주는 설정입니다.

MITM (Man in the Middle) 공격과 같이 MAC, IP의 ARP 패킷을 가로채 훔쳐보거나, 위조하여 공격하는

ARP Poisoning 등을 막기 위하여 사용하는 기능입니다.

 

DAI는 Untrust로 설정된 인터페이스에서 통신되는 패킷을 가로채 확인하여 옳지 않은 MAC-IP 패킷을 로그로 남기고 버린다. Trust된 인터페이스로 패킷이 들어오면 통과시킨다.

 

정확한 MAC-IP의 정당성을 확인하기 위해 DHCP Snooping에 의해 미리 생성된 데이터베이스를 활용한다. 

ACL을 설정하면 DHCP Snooping 보다 우선시 한다. ACL에 거부된 패킷은 DHCP Snooping 데이터베이스를 보지도 않고 거부한다.

 

 

 

테스트는 EVE-NG로 시뮬레이션을 진행합니다.

저번 DHCP Snooping 테스트와 같이 설정을 했습니다. 

 

 

 

 

 

유저 인터페이스들은 아래와 같이 설정하였습니다

SW1(config)#ip arp inspection vlan 10
SW1(config)#interface range ethernet 0/1 - 3 
SW1(config-if-range)#ip arp inspection limit rate 50

 

DHCP Server와 연결된 인터페이스는 아래와 같이 설정하였습니다.

SW1(config)#interface ethernet 0/0
SW1(config-if)#ip arp inspection trust 

 

ip arp inspection vlan [Vlan ID] - DAI를 적용할 Vlan을 입력해주세요.

ip arp inspection limit rate [num] - 신뢰하지 않는 인터페이스에 초당 ARP 패킷 수를 조절한다. (넘으면 차단)

ip arp inspection trust - 스위치가 연결되어있거나 신뢰가능한 인터페이스에 설정해 주세요.

 

 

 

 

 

 

 

테스트로 Untrust 인터페이스에서 ARP 패킷을 전송해 보겠습니다.

*Jun 30 11:51:48.183: %SW_DAI-4-DHCP_SNOOPING_DENY: 1 Invalid ARPs (Req) on Et0/2, vlan 10.([0050.7966.6804/192.168.10.200/ffff.ffff.ffff/192.168.10.200/13:51:47 EET Tue Jun 30 2020])

*Jun 30 11:51:49.186: %SW_DAI-4-DHCP_SNOOPING_DENY: 1 Invalid ARPs (Req) on Et0/2, vlan 10.([0050.7966.6804/192.168.10.200/ffff.ffff.ffff/192.168.10.200/13:51:48 EET Tue Jun 30 2020])

*Jun 30 11:51:50.187: %SW_DAI-4-DHCP_SNOOPING_DENY: 1 Invalid ARPs (Req) on Et0/2, vlan 10.([0050.7966.6804/192.168.10.200/ffff.ffff.ffff/192.168.10.200/13:51:49 EET Tue Jun 30 2020])

이와같이 패킷이 DENY 됩니다.

 

 

 

 

 

 

 

 

DAI 설정된 포트를 확인할 수 있습니다.

SW1#show ip arp inspection interfaces 

 Interface        Trust State     Rate (pps)    Burst Interval
 ---------------  -----------     ----------    --------------
 Et0/0            Trusted                 50                 1
 Et0/1            Untrusted                1                 1
 Et0/2            Untrusted               50                 1
 Et0/3            Untrusted               50                 1

 

 

 

 

DAI 설정된 정보를 볼 수 있습니다.

SW1#show ip arp inspection statistics 

 Vlan      Forwarded        Dropped     DHCP Drops      ACL Drops
 ----      ---------        -------     ----------      ---------
   10              5             21             21              0

 Vlan   DHCP Permits    ACL Permits  Probe Permits   Source MAC Failures
 ----   ------------    -----------  -------------   -------------------
   10              0              0              0                     0

 Vlan   Dest MAC Failures   IP Validation Failures   Invalid Protocol Data
 ----   -----------------   ----------------------   ---------------------
   10                   0                        0                       0

 

 

 

 

 

 

 

 

 

 

감사합니다.

반응형
반응형

 

 

 

 

 

DHCP Snooping 란?

Snooping 이란  '기웃거리다, 염탐하다, 훔쳐보다' 라는 의미로 DHCP Snooping 으로 합쳐지면 DHCP 패킷의 내용을 중간에 가로채서 훔쳐보거나 염탐하는 사용자가 있을 수 있습니다. 그걸 방지하기 위해 DHCP Snooping을 이용하여 DHCP 응답을 차단시켜주는 기능입니다.

 

 

 

 

 

테스트는 EVE-NG로 시뮬레이션을 진행합니다.

일단 아래와 같이 기본 Vlan 10으로 설정을 했습니다. 

 

 

일반 유저 인터페이스들은 아래와 같이 설정하였습니다.

SW1(config)#ip dhcp snooping
SW1(config)#ip dhcp snooping vlan 10
SW1(config)#no ip dhcp snooping information option 

SW1(config)#interface range ethernet 0/1 - 3
SW1(config-if-range)#ip dhcp snooping limit rate 15

 

 

DHCP Server가 연결된 인터페이스는 아래와 같이 설정하였습니다.

SW1(config)#interface ethernet 0/0
SW1(config-if)#ip dhcp snooping trust 

 

ip dhcp snooping - DHCP Snooping 기능을 활성화 시켜줍니다.

ip dhcp snooping vlan [Vlan ID] - DHCP Snooping 기능을 적용할 Vlan을 입력해 주세요.

ip dhcp snooping limit rate [num] - 신뢰하지 않는 인터페이스에 초당 DHCP 패킷 수를 조절한다. (넘으면 차단)

ip dhcp snooping trust - DHCP Server가 연결되어있거나 신뢰가능한 인터페이스에 설정해 주세요.

no ip dhcp snooping information option - DHCP option82를 꺼주는 설정인데, 대부분의 enterprise server는 이를 지원하지 않습니다. 궁금하신분은 DHCP option82를 검색하여 확인해보세요 !!

 

 

 

 

DHCP Snooping 기능을 설정한 포트를 확인할 수 있습니다.

SW1#sh ip dhcp snooping 
Switch DHCP snooping is enabled
DHCP snooping is configured on following VLANs:
10
DHCP snooping is operational on following VLANs:
10
DHCP snooping is configured on the following L3 Interfaces:

Insertion of option 82 is enabled
   circuit-id default format: vlan-mod-port
   remote-id: aabb.cc00.1000 (MAC)
Option 82 on untrusted port is not allowed
Verification of hwaddr field is enabled
Verification of giaddr field is enabled
DHCP snooping trust/rate is configured on the following Interfaces:

Interface                  Trusted    Allow option    Rate limit (pps)
-----------------------    -------    ------------    ----------------   
Ethernet0/0                no         no              15        
  Custom circuit-ids:
Ethernet0/1                no         no              15        
  Custom circuit-ids:
Ethernet0/2                no         no              15        
  Custom circuit-ids:
Ethernet0/3                no         no              15        
  Custom circuit-ids:

 

 

 

 

DHCP Snooping 패킷을 확인해볼 수 있습니다.

SW1#sh ip dhcp snooping statistics 
  Packets Forwarded = 3
  Packets Dropped = 9
  Packets Dropped From untrusted ports = 0

 

 

 

 

 

테스트로 0/1번 포트의 limit rate를 1로 바꿔서 확인해 보세요.

SW1(config)#interface ethernet 0/1
SW1(config-if-range)#ip dhcp snooping limit rate 1

 

해당 포트가 차단된 로그를 볼 수 있습니다.

*Jun 30 10:57:30.646: %SYS-5-CONFIG_I: Configured from console by console
*Jun 30 10:57:49.485: %DHCP_SNOOPING-4-DHCP_SNOOPING_ERRDISABLE_WARNING: DHCP Snooping received 1 DHCP packets on interface Et0/1 
*Jun 30 10:57:49.485: %DHCP_SNOOPING-4-DHCP_SNOOPING_RATE_LIMIT_EXCEEDED: The interface Et0/1 is receiving more than the threshold set 
*Jun 30 10:57:49.485: %PM-4-ERR_DISABLE: dhcp-rate-limit error detected on Et0/1, putting Et0/1 in err-disable state 
*Jun 30 10:57:50.489: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/1, changed state to down
*Jun 30 10:57:51.489: %LINK-3-UPDOWN: Interface Ethernet0/1, changed state to down

 

SW1#sh interfaces status 

Port      Name               Status       Vlan       Duplex  Speed Type
Et0/0                        connected    10           auto   auto unknown
Et0/1                        err-disabled 10           auto   auto unknown
Et0/2                        connected    10           auto   auto unknown
Et0/3                        connected    10           auto   auto unknown

 

 

 

 

 

감사합니다.

 

CISCO - DHCP Snooping에 대한 자세한 내용이 적혀있어요 !!

https://www.cisco.com/c/en/us/td/docs/switches/datacenter/sw/4_1/nx-os/security/configuration/guide/sec_nx-os-cfg/sec_dhcpsnoop.html

반응형
반응형

 

 

 

 

 

DHCP란 ?

사용하는 전자기기가 많아지거나 PC 자체의 변동사항으로 IP 설정이 필요할 경우 매번 관리가 어려워 자동으로 IP를 할당해주는 프로토콜 입니다.

 

 

 

 

DHCP 프로토콜의 원리

DHCP 프로토콜을 통한 IP주소 할당은 임대라는 개념을 가지고 있는데 이는 DHCP 서버가 IP주소를 영구적으로 단말에 할당하는 것이 아니고 임대기간을 설정하여 설정 기간동안만 단말이 IP주소를 사용하도록 하는 것입니다. 임대기간이 끝나면 단말은 임대받은 IP주소를 반납하는 절차를 수행하게 됩니다.

 

 

  • 1 - DHCP Discover (Brodcast)

클라이언트는 DHCP 서버를 찾기 위하여 같은 네트워크상에 Discover 메시지를 브로드캐스트 합니다. 

 

  • 2 - DHCP Offer (Unicast)

클라이언트로부터 Discover 메시지를 받아 DHCP Server는 IP 정보들을 클라이언트에게 제공합니다.

  • 3 - DHCP Request (Brodcast)

클라이언트는 서버로부터 받은 IP 정보들을 할당받겠다고 모든 서버들에게 request 메시지를 보냅니다.

 

  • 4 - DHCP ACK (Unicast)

클라이언트에게 IP 정보를 할당해준 서버로부터 ACK 메시지를 이용해 IP 정보 할당을 승인하겠다는 메시지를 클라이언트에게 보냅니다.

 

 

 

이제 EVE-NG를 이용하여 라우터를 DHCP Server로 만들어 보겠습니다.

아래 그림과 같이 인터페이스 설정 및 Port 설정 Static route 설정이 된 다음에 시뮬레이션을 진행하였습니다.

 

현재 구성은 이렇게 해놨습니다.

 

일단 DHCP Service가 Enable이 기본값이지만 Disabled 상태라면 Enabled 상태로 만들어준다.

R1(config)#service dhcp 
SW1(config)#service dhcp 

 

 

 

 

그리고 DHCP Server로 설정할 라우터에 입력해주시면 됩니다.

 

R1(config)#ip dhcp pool Data10
R1(dhcp-config)#network 192.168.10.0 255.255.255.0
R1(dhcp-config)#default-router 192.168.10.1
R1(dhcp-config)#domain-name cisco.com
R1(dhcp-config)#dns-server 192.168.10.2
R1(config)#ip dhcp pool Data20
R1(dhcp-config)#network 192.168.20.0 255.255.255.0
R1(dhcp-config)#default-router 192.168.10.1
R1(dhcp-config)#domain-name cisco.com
R1(dhcp-config)#dns-server 192.168.10.2

 

pool name은 본인이 마음대로 설정가능합니다.

network는 DHCP로 자동할당하고 싶은 네트워크 대역을 적어주시면 됩니다.

default-router는 네트워크 대역의 게이트웨이를 설정해 주는 것입니다.

따로 DHCP server의 domain-name이 있으면 IP와 적어주시면 됩니다.

 

 

 

그리고 제외하고 싶은 범위를 선택하여 입력해줍니다.

R1(config)#ip dhcp excluded-address 192.168.10.1 192.168.10.10
R1(config)#ip dhcp excluded-address 192.168.20.1 192.168.20.10

 

그리고 VPC에서 확인해봅시다.

VPCS> dhcp 
DDORA IP 192.168.10.11/24 GW 192.168.10.1

VPCS> sh

NAME   IP/MASK              GATEWAY                             GATEWAY
VPCS1  192.168.10.11/24     192.168.10.1
       fe80::250:79ff:fe66:6805/64

같은 네트워크에 있는 VPC는 DHCP를 통하여 문제없이 할당 받았습니다.

 

하지만 다른 대역에 있는 VPC는 할당받지 못하였습니다.

VPCS> dhcp
DDD
Can't find dhcp server

 

이럴때는 R2에서 DHCP 브로드 캐스트 패킷을 받아야하는 포트에 설정해 주세요.

이 작업은 DHCP Relay 설정입니다. 

R2(config)#int ethernet 0/1.20
R2(config-subif)#ip helper-address 192.168.10.1

ip helper-address에 DHCP server 의 게이트웨이를 적어주게 되면 받아올 수 있습니다.

 

 

 

그리고 나서 VPC에서 다시 확인해보면 아래와 같이 나오게 됩니다.

VPCS> dhcp
DORA IP 192.168.20.11/24 GW 192.168.20.1

VPCS> sh

NAME   IP/MASK              GATEWAY                             GATEWAY
VPCS1  192.168.20.11/24     192.168.20.1
       fe80::250:79ff:fe66:6806/64

 

 

 

 

 

 

해당 명령어로 할당한 IP 정보를 볼 수 있습니다.

R1#show ip dhcp binding 

 

 

 

해당 명령어로 DHCP pool 이름과 정보를 볼 수있습니다.

R1#show ip dhcp pool

 

 

 

 

 

 

 

 

감사합니다. 

반응형
반응형

 

 

 

 

 

 

 

 

VTP (VLAN Trunking Protocol)
  • CISCO 전용 프로토콜로 연결된 스위치끼리 VLAN 정보를 자동으로 주고 받아 동기화 하는 프로토콜입니다.

 

VTP 특징
  • VLAN 설정 정보는 받아오지만 스위치 Port 정보들은 받아오지 않는다.
  • 스위치의 기본 설정으로는 Server로 되어 있고 Domain은 설정되어 있지 않다.
  • 확장 VLAN (1006~4094)은 Transparent 모드에서만 사용이 가능하다.
  • VTP 설정하다 문제가 발생할 수 있기에 (패스워드 설정 -> 도메인 설정 -> 모드 설정) 순으로 해야 안전하다.
  • 스위치 순서에도 중요하기에 (VTP 모드 설정 -> Trunk port 설정 -> VLAN 설정 -> Port에 VLAN 설정) 순으로 해줘야 안전하다.
  • 보안상의 문제로 VTP Transparent mode를 권장합니다.

 

VTP 설정 조건
  • 스위치에서는 VTP가 기본적으로 동작되며 끌 수 없는 프로토콜입니다.
  • VTP를 사용하려면 스위치들의 VLAN domain name을 같도록 설정해야지만 VLAN 정보를 동기화 할 수 있습니다.
  • VTP 동기화 메시지를 주고 받으려면 스위치간에 연결된 포트를 Trunk Port로 설정을 해줘야 합니다.
  • VLAN 정보가 무분별하게 동기화 될 수 있기에 VTP password를 설정해주세요. 스위치간에 VTP password가 맞지않으면 동기화 되지 않습니다.

 

 

VTP message 

Summary Advertisement

VTP server가 자신과 연결된 스위치에게 5분 주기로 전달하는 메시지입니다. 

관리하는 VTP domain에 Revision number를 전송한다. 다른 스위치들은 Rivision number를 받아서 자신의 VLAN 정보가 최신인지 아닌지를 구분하고 VLAN 구성에 변화가 생겼을 때에는 즉시 전송합니다.

 

Subset Adverisement

VLAN 구성이 변경 되었을 때나 VTP client로부터 Advertisement Request를 수신했을 때 전송하고 VLAN 정보를 가지고 있는 메시지입니다.

 

Advertisement Request

VTP client가 server에게 메시지를 요청하거나 자신이 가지고 있는 Revision number보다 높은 number를 가지고 있거나 VTP domain 변경 등 여러가지 VLAN에 변화가 생겼을 경우 VTP server에게 전송하는 메시지입니다.

 

 

 

 

 

 

 VTP mode

VTP server mode

VLAN 정보를 직접 생성, 전송할 수 있고 (VLAN 1 ~ 1005)까지만 관리가 가능하다.

 

VTP client mode
같은 domain에 password가 설정된 VTP server로부터 VLAN 정보를 받아 저장한다.

직접 VLAN 정보를 설정할 수 없다.

 

VTP transparent mode

자신만의 VLAN 정보를 설정할 수 있고, 다른 스위치에게 자신의 VLAN 정보를 전송하지 않으며, VTP server로부터 받은 정보로 동기화하지 않지만 받은 정보는 다른 스위치에게 전송한다.

VLAN(1~4094) 생성 및 관리 가능하고 Revision number 값은 항상 0 입니다.

 

 

 

 

 

 

 

 

 

 

먼저 EVE-NG로 Switch를 만들었습니다.

 

기본을 확인해보면 아래와 같습니다.

 

SW1#sh vtp status 
VTP Version capable             : 1 to 3
VTP version running             : 1
VTP Domain Name                 : 
VTP Pruning Mode                : Disabled
VTP Traps Generation            : Disabled
Device ID                       : aabb.cc00.1000
Configuration last modified by 0.0.0.0 at 0-0-00 00:00:00
Local updater ID is 0.0.0.0 (no valid interface found)

Feature VLAN:
--------------
VTP Operating Mode                : Server
Maximum VLANs supported locally   : 1005
Number of existing VLANs          : 5
Configuration Revision            : 0
MD5 digest                        : 0x57 0xCD 0x40 0x65 0x63 0x59 0x47 0xBD 
                                    0x56 0x9D 0x4A 0x3E 0xA5 0x69 0x35 0xBC 

 

 

 

SW1(config)#vtp domain Goodluck
Domain name already set to Goodluck.
SW1(config)#vtp password 123123
Setting device VTP password to 123123
SW1(config)#vtp mode server
Device mode already VTP Server for VLANS.
SW1(config)#vtp version 2

 

SW2(config)#vtp domain Goodluck
Changing VTP domain name from NULL to Goodluck
*Jun 25 12:50:43.708: %SW_VLAN-6-VTP_DOMAIN_NAME_CHG: VTP domain name changed to Goodluck.
SW2(config)#vtp password 123123
Setting device VTP password to 123123
SW2(config)#vtp mode transparent
Setting device to VTP Transparent mode for VLANS.
SW2(config)#vtp version 2

 

VTP version은 server에서만 설정이 가능합니다.

SW3(config)#vtp domain Goodluck
Changing VTP domain name from NULL to Goodluck
*Jun 25 12:53:17.094: %SW_VLAN-6-VTP_DOMAIN_NAME_CHG: VTP domain name changed to Goodluck.
SW3(config)#vtp password 123123
Password already set to 123123
SW3(config)#vtp mode client
SW3(config)#vtp version 2 
Cannot modify version in VTP client mode unless the system is in VTP version 3

 

 

 

설정을 해주고나서 SW1에서 VLAN을 만들었습니다.

VLAN 100, 500, 1000, 1500을 만들었는데 위에 설명과 같이 VLAN 1500의 정보는 전송이 안됩니다.

 

 

VTP - server mode

 

 

VTP - transparent mode

 

 

VTP - client mode

 

 

 

 

 

 

VTP pruning (가지치기)

VLAN을 조금 더 효율성있게 관리하기 위해 만든 기술입니다.

스위치를 여러 도메인으로 나누면 브로드캐스트 도메인 크기가 줄어들어 브로드캐스트 트래픽이 감소하게 되는데 Trunk Port는 모든 VLAN의 정보를 전송하기에 필요없는 VLAN 정보로 인하여 트래픽을 발생시킨다.

VLAN 트래픽이 이동할 때 갈 필요가 없는 Trunk Port 방향을 잘라버려 Trunk Port라도 VLAN정보에 대한 트래픽을 수신하지 않게하는 기술입니다.

 

 

SW1#sh vtp status 
VTP Version capable             : 1 to 3
VTP version running             : 2
VTP Domain Name                 : Goodluck
VTP Pruning Mode                : Disabled
VTP Traps Generation            : Disabled
Device ID                       : aabb.cc00.1000
Configuration last modified by 0.0.0.0 at 6-25-20 12:55:44
Local updater ID is 0.0.0.0 (no valid interface found)

Feature VLAN:
--------------
VTP Operating Mode                : Server
Maximum VLANs supported locally   : 1005
Number of existing VLANs          : 8
Configuration Revision            : 4
MD5 digest                        : 0xF3 0xB1 0x90 0x70 0x66 0xA4 0xB6 0x41 
                                    0x9C 0x9F 0x43 0x32 0xFF 0xC1 0x04 0x97 

 

 

VTP - server에서 아래와 같이 입력해주면 연결된 client 들에게 자동으로 설정이 됩니다.

SW1(config)#vtp pruning 
Pruning switched on

 

 

SW3#sh vtp  status 
VTP Version capable             : 1 to 3
VTP version running             : 2
VTP Domain Name                 : Goodluck
VTP Pruning Mode                : Enabled
VTP Traps Generation            : Disabled
Device ID                       : aabb.cc00.3000
Configuration last modified by 0.0.0.0 at 6-25-20 13:11:03

Feature VLAN:
--------------
VTP Operating Mode                : Client
Maximum VLANs supported locally   : 1005
Number of existing VLANs          : 8
Configuration Revision            : 5
MD5 digest                        : 0xCF 0x2E 0x6B 0x98 0x93 0xEF 0x1A 0x08 
                                    0x2C 0x04 0xC3 0x63 0x29 0xDB 0x56 0x83 

 

반응형
반응형

 

 

 

 

 

Port-Security 란?

특정 포트에 Port-Security 기능을 사용하여 포트에 학습할 수 있는 MAC주소의 수를 제한하거나 포트에 MAC 주소를 설정하여 허가된 MAC 주소만 접속 가능하도록 설정하는 것입니다. 

 

 

 

 

사용 목적
  • 스위치는 하나의 포트에 여러 개의 MAC주소를 학습할 수 있도록 되어있고 제한이 없다.
  • 이러한 점을 이용하여 여러 개의 MAC주소를 학습하게 하여 스위치의 MAC Address table을 가득차게 만들고 더이상 MAC주소를 학습하지 못하게 된 스위치는 그 이후에 들어오는 모든 Frame을 Flooding 시켜 허브처럼 동작하게 만든다. 이러한 공격하는 기법을 MAC Flooding Attack이라고 한다.
  • 내부 네트워크까지 침입한 공격자는 Sniffing 환경을 구성하여 중간에서 패킷을 훔쳐볼 수 있다. 이런 공격으로 대표적인 것은 MAC주소를 변경하여 네트워크 시스템에 들어갈 수 있는 ARP Spoofing이 있다.

 

 

이제 실습을 해보겠습니다.

 

 

GNS3를 이용하여 구성하였습니다.

SW1 가지고 있는 MAC 주소

SW1#show mac address-table 
          Mac Address Table
-------------------------------------------
Vlan    Mac Address       Type        Ports
----    -----------       --------    -----
 100    0050.7966.6802    DYNAMIC     Et1/0
 100    0050.7966.6804    DYNAMIC     Et1/1
 100    0050.7966.6805    DYNAMIC     Et1/2
Total Mac Addresses for this criterion: 3

 

 

 

SW2 가지고 있는 MAC 주소

SW2#show mac address-table 
          Mac Address Table
-------------------------------------------

Vlan    Mac Address       Type        Ports
----    -----------       --------    -----
 100    0050.7966.6806    DYNAMIC     Et1/2
 100    0050.7966.6807    DYNAMIC     Et1/1
 100    0050.7966.6808    DYNAMIC     Et1/0
Total Mac Addresses for this criterion: 3

 

 

 

 

Port-Security 활성화
SW1(config)#interface ethernet 1/0
SW1(config-if)#switchport port-security

 

 

 

 

Port-Security 학습 가능한 최대 MAC주소 개수 설정
SW1(config)#interface ethernet 0/0 
SW1(config-if)#switchport port-security
SW1(config-if)#switchport port-security maximum 5 (기본은 1개 장비마다 다르지만 최대 4097개까지 가능)

 

 

SW2에 MAC주소는 총 3개 입니다. 하지만 Maximum을 2개로 테스트 했을 경우 Log 입니다.

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

*Mar 26 14:14:01.841: %PM-4-ERR_DISABLE: psecure-violation error detected on Et0/0, putting Et0/0 in err-disable state 
*Mar 26 14:14:01.842: %PORT_SECURITY-2-PSECURE_VIOLATION: Security violation occurred, caused by MAC address 0050.7966.6806 on port Ethernet0/0. 
*Mar 26 14:14:01.842: %IP-4-DUPADDR: Duplicate address 192.168.100.1 on Vlan100, sourced by aabb.cc80.0200 
*Mar 26 14:14:02.847: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/0, changed state to down. 
*Mar 26 14:14:03.843: %LINK-3-UPDOWN: Interface Ethernet0/0, changed state to down

 

Port-Security의 학습 3가지 방식

 

Static Port-Security MAC Address

특정 포트에 사용할 사용자의 MAC주소를 직접 입력하여 설정하고 NVRAM에 저장할 수 있다.

SW1(config)#int ethernet 1/0
SW1(config-if)#switchport port-security
SW1(config-if)#switchport port-security mac-address 0050.7966.6804

 

해당 포트에 다른 MAC주소를 설정해놨을때 차단되었다는 Log 입니다.

*Mar 26 14:38:44.398: %PM-4-ERR_DISABLE: psecure-violation error detected on Et1/0, putting Et1/0 in err-disable state
*Mar 26 14:38:44.398: %PORT_SECURITY-2-PSECURE_VIOLATION: Security violation occurred, caused by MAC address 0050.7966.6802 on port Ethernet1/0.
*Mar 26 14:38:45.403: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet1/0, changed state to down
*Mar 26 14:38:46.399: %LINK-3-UPDOWN: Interface Ethernet1/0, changed state to down

 

 

Dynamic Port-Security MAC Address

특정 포트에 사용할 사용자의 MAC주소를 동적으로 학습하지만 학습한 MAC주소는 NVRAM에 저장할 수 없다

스위치가 Reboot이 되면 Port-Security에 학습했던 MAC주소는 삭제된다.

(명령어 X)

 

 

 

Sticky Port-Security MAC Address

특정 포트에 사용할 사용자의 MAC주소를 동적으로 학습하고, 학습한 MAC주소는 NVRAM에 저장할 수 있다.

스위치가 Reboot이 되어도 Port-Security에 학습했던 MAC주소는 NVRAM에 저장된다.

SW1(config)#interface ethernet 0/0
SW1(config-if)#switchport port-security
SW1(config-if)#switchport port-security mac-address sticky

 

 

 

 

 

Port-Security Violation Mode 3가지

 

Violation shutdown

Port-Security가 동작하는 포트에서 위반했을 경우 해당 포트는 Shutdown이 되며 err-disabled 상태로 넘어간다.

Port-Security Default Violation 이다.

SW1(config)#interface ethernet 0/0
SW1(config-if)#switchport port-security
SW1(config-if)#switchport port-security mac-address 0050.7966.6804
SW1(config-if)#switchport port-security violation shutdown

 

 

 

Violation restrict

Port-Security가 동작하는 포트에서 위반한 MAC주소를 가진 장비의 모든 Frame을 Drop시킨다.

Drop과 동시에 위반한 MAC주소에 대해서 Log가 발생한다.

SW1(config)#interface ethernet 0/0
SW1(config-if)#switchport port-security
SW1(config-if)#switchport port-security maximum 2
SW1(config-if)#switchport port-security violation restrict

 

최대 2개까지 가능하게 했을때 0050.7966.6806의 MAC주소가 제한 되었다는 Log 입니다.

*Mar 26 15:15:47.206: %PORT_SECURITY-2-PSECURE_VIOLATION: Security violation occurred, caused by MAC address 0050.7966.6806 on port Ethernet0/0.

 

 

 

Violation protect

Port-Security가 동작하는 포트에서 위반한 MAC주소를 가진 장비의 모든 Frame을 Drop시킨다.

restrict와 동일하게 동작하지만, protect는 Log를 발생시키지 않는다.

SW1(config)#interface ethernet 0/0
SW1(config-if)#switchport port-security
SW1(config-if)#switchport port-security maximum 2
SW1(config-if)#switchport port-security violation
SW1(config-if)#switchport port-security violation protect

 

 

 

 

 

 

Port-Security Aging Time 2가지

특정 포트에 Port-Security가 동작하면 해당 포트의 연결된 장비의 MAC주소에 대한 유지 시간을 설정할 수 있다.

포트의 MAC주소 개수를 제한하면서 기존의 MAC주소를 수동으로 삭제하지 않고 aging time을 설정하여 관리할 수 있다. 기본 aging time 은 0분이고 최대 1440분이다.

 

Absolute

특정 포트 Port-Security에 등록된 MAC주소가 설정한 aging time이 만료되어야 Port-Security에 등록된 MAC주소가 삭제된다. 

SW1(config)#interface ethernet 0/0
SW1(config-if)#switchport port-security 
SW1(config-if)#switchport port-security aging time 10
SW1(config-if)#switchport port-security aging type absolute 

  

 

 

Inactivity

특정 포트 Port-Security에 등록된 MAC주소로 설정한 aging time동안 Data Traffic이 없는 경우에 해당 Port-Security에 등록된 MAC주소가 삭제된다.

SW1(config)#interface ethernet 0/0 
SW1(config-if)#switchport port-security  
SW1(config-if)#switchport port-security aging time 10
SW1(config-if)#switchport port-security aging type inactivity

 

 

 

 

 

 

해당 포트에 Port-Security 설정 확인입니다.

SW1#show port-security interface ethernet 0/0
Port Security              : Enabled
Port Status                : Secure-up
Violation Mode             : Restrict
Aging Time                 : 0 mins
Aging Type                 : Absolute
SecureStatic Address Aging : Disabled
Maximum MAC Addresses      : 2
Total MAC Addresses        : 2
Configured MAC Addresses   : 0
Sticky MAC Addresses       : 0
Last Source Address:Vlan   : 0050.7966.6806:100 - 가장 마지막에 연결된 MAC주소
Security Violation Count   : 20 - 위반된 MAC주소 횟수

 

 

 

 

저는 스탠다드로 이렇게 사용합니다.

SW1(config)#interface ethernet 0/0 
SW1(config-if)#switchport port-security  
SW1(config-if)#switchport port-security aging time 1
SW1(config-if)#switchport port-security aging type inactivity
SW1(config-if)#switchport port-security maximum 5
SW1(config-if)#switchport port-security violation restrict

 

 

 

 

 

감사합니다 !!

부족한 부분이나 빠진 부분이 있으면 댓글로 남겨주세요.

 

 

자세한 내용은 CISCO 홈페이지에서 확인 가능합니다.

https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst4500/12-2/25ew/configuration/guide/conf/port_sec.html#wp1054687

 

반응형
반응형

 

 

 

 

 

 

 

 

 

 

RIP(Routing Information Protocol) 이란 ?

 

  • RIP(Routing Information Protocol)은 이동 할 수 있는 경로 수(hop count)를 metric하여 사용한다.
  • 목적지까지 가능 경로가 2개 이상 있을 경우, 목적지까지 도달하는데 필요한 라우터 개수가 가장 적은 쪽의 경로를 최적의 경로로 선출하여 라우팅 테이블에 등록하여 사용한다.
  • hop count란 경로를 통과할 수 있는 장치의 수입니다.
    같은 네트워크는 0의 metric을 가지고 다른 네트워크는 1로 계산하여 최대 15의 metric을 가진다.
  • 제한적인 경로 때문에 소규모 네트워크 환경이나 네트워크 변화가 적은 환경에서 사용하기 적합하다.

 

*metric이란?

목적지로 가는 경로가 여러개일 경우 알고리즘을 통하여 경로값을 계산해 메트릭이 낮게 나오는 경로를 최적 경로로 선출하는데 사용합니다. 

 

 

 

 

 

 

RIPv1 특징

  • 서브넷 정보가 없는 라우팅을 전송하는 Classful routing protocol
  • 인접라우터 간에 브로드캐스트 패킷(UDP / port : 520)을 사용하며 라우팅 정보를 교환한다.
  • 목적지에 대한 최적 경로가 2개 이상이면 라우터는 균등하게 패킷을 분산 처리한다.

 

 

RIPv2 특징

  • 서브넷 정보가 있는 라우팅을 전송하는 Classless routing protocol
  • 인접라우터 간에 멀티캐스트 패킷을 사용하여 라우팅 정보를 교환한다.
  • 다른 Dynamic Routing들과 같이 라우팅 정보를 인증할 수 있어 보안성이 강화된다.
  • 라우팅 정보를 교환할 때 tag를 설정할 수 있어 경로 관리가 편리하다.
  • 패킷에 Next-hop을 표시하여 불필요한 경로를 방지한다.

 

 

 

 

 

RIP Timer

주기적인 RIP 라우팅 업데이트를 할 때 시간 간격을 제어하거나,

네트워크 토폴로지가 변경될 때 RIP 경로를 갱신할 때 사용된다. 

 

  • Update Timer (0 ~ 30초)
    주기적으로 라우팅 업데이트할 때 사용되는 시간 (수신하면 0초로 리셋)
  • Invaild Timer (30 ~ 180초)
    라우터가 다른 라우터로부터 180초 이상 업데이트를 받지 못하는 경우 
    업데이트 하지 않는 라우터의 경로를 사용 할 수 없는 경로로 표시한다.
  • Hold Down Timer (180 ~ 360초)
    라우팅 업데이트를 수신하지 않는다.
  • Flushed Timer (0 ~ 240초)
    라우터가 다른 라우터로부터 240초 이상 업데이트를 받지 못하는 경우
    업데이트 하지 않는 라우터의 모든 라우팅 테이블 항목을 제거한다.

RIP Timer 설정하는 법

R0(config-router)#timers basic update invalid holddown flush

R0(config-router)#timers basic 50 100 150 300

 

 

 

 

 

 

 

Cisco Packet Tracer 프로그램을 사용하여 구성했습니다.

 

 

이제 RIPv1 설정 명령어를 알아봅시다.

 

모든 네트워크는 24비트로 넣어줬습니다.

 

 

R0 라우터

R0(config)#router rip

R0(config-router)#network 10.10.10.0

R0(config-router)#network 20.20.20.0

 

R1 라우터

R1(config)#router rip

R1(config-router)#network 20.20.20.0

R1(config-router)#network 50.50.50.0

R1(config-router)#network 60.60.60.0

 

R2 라우터

R2(config)#router rip

R2(config-router)#network 60.60.60.0

R2(config-router)#network 100.100.100.0

R2(config-router)#network 150.150.150.0

 

R3 라우터

R3(config)#router rip

R3(config-router)#network 150.150.150.0

R3(config-router)#network 200.200.200.0

 

 - 라우팅 설정 완료 후 - 

 

R0#sh ip route rip

20.0.0.0/8 is variably subnetted, 2 subnets, 2 masks

R 50.0.0.0/8 [120/1] via 20.20.20.2, 00:00:02, GigabitEthernet0/0

R 60.0.0.0/8 [120/1] via 20.20.20.2, 00:00:02, GigabitEthernet0/0

R 100.0.0.0/8 [120/2] via 20.20.20.2, 00:00:02, GigabitEthernet0/0

R 150.150.0.0/16 [120/2] via 20.20.20.2, 00:00:02, GigabitEthernet0/0

R 200.200.200.0/24 [120/3] via 20.20.20.2, 00:00:02, GigabitEthernet0/0

 

* R - RIP 라우팅 사용 

* 200.200.200.0/24 - 목적지 네트워크

* [120/3] via 20.20.20.2 - hop count 와 패킷이 나가는 인접한 인터페이스 IP

* 00:00:02 - 인접한 라우터와 라우팅 업데이트 후 시간

* GigabitEthernet0/0 - 패킷이 나가는 인접한 인터페이스

 

 

 

*RIPv1의 문제점

Classful routing protocol을 사용하여 서브넷 경계가 자동요약이 일어나기 때문에 서브넷 구간에 라우팅 문제가 발생할 수 있습니다.

 

*해결방법

Offset-list를 이용하여 경로로 들어오는 metric과 나가는 metric 을 증가시킨다.

R0(config-router)#offset-list [access-list-number | access-list-name] {in | out} offset [interface-type interface-number]

R0(config-router)#offset-list 98 in 1 fastEthernet 0/2

 

 

 

 

 

 

 

 

 

이제 RIPv2 설정 명령어를 알아봅시다.

 

 

모든 네트워크는 24비트로 넣어줬습니다.

 

기본 구성은 RIPv1 이랑 같습니다.

 

R0 라우터

R0(config)#router rip

R0(config-router)#version 2

R0(config-router)#no auto-summary

R0(config-router)#network 10.10.10.0

R0(config-router)#network 20.20.20.0

R0(config-router)#passive-interface gigabitEthernet 0/0  (Gi0/0으로 업데이트 하지 않는다.)

 

R1 라우터

R1(config)#router rip

R1(config-router)#version 2

R1(config-router)#no auto-summary

R1(config-router)#network 20.20.20.0

R1(config-router)#network 50.50.50.0

R1(config-router)#network 60.60.60.0

 

R2 라우터

R2(config)#router rip

R2(config-router)#version 2

R2(config-router)#no auto-summary

R2(config-router)#network 60.60.60.0

R2(config-router)#network 100.100.100.0

R2(config-router)#network 150.150.150.0

 

R3 라우터

R3(config)#router rip

R3(config-router)#version 2

R3(config-router)#no auto-summary

R3(config-router)#network 150.150.150.0

R3(config-router)#network 200.200.200.0

 

 

*RIPv1 문제를 해결하기 위한 RIPv2

Classless routing protocol을 사용하여 no auto-summary 명령어를 이용하여 자동요약을 해지시킨다.

Passsive-interface 명령어를 사용하여 불필요한 인터페이스로 RIP 업데이트 전송하는 패킷을 차단시킨다.

 

 

R0#sh ip route rip

30.0.0.0/8 is variably subnetted, 2 subnets, 2 masks

R 30.0.0.0/8 [120/3] via 20.20.20.2, 00:00:09, GigabitEthernet0/0

R 30.30.30.0/30 [120/3] via 20.20.20.2, 00:00:09, GigabitEthernet0/0

50.0.0.0/24 is subnetted, 1 subnets

R 50.50.50.0 [120/1] via 20.20.20.2, 00:00:09, GigabitEthernet0/0

60.0.0.0/30 is subnetted, 1 subnets

R 60.60.60.0 [120/1] via 20.20.20.2, 00:00:09, GigabitEthernet0/0

100.0.0.0/8 is variably subnetted, 2 subnets, 2 masks

R 100.0.0.0/8 [120/2] via 20.20.20.2, 00:00:09, GigabitEthernet0/0

R 100.100.100.0/24 [120/2] via 20.20.20.2, 00:00:09, GigabitEthernet0/0

150.150.0.0/16 is variably subnetted, 2 subnets, 2 masks

R 150.150.0.0/16 [120/2] via 20.20.20.2, 00:00:09, GigabitEthernet0/0

R 150.150.150.0/30 [120/2] via 20.20.20.2, 00:00:09, GigabitEthernet0/0

R 200.200.200.0/24 [120/3] via 20.20.20.2, 00:00:09, GigabitEthernet0/0

 

 

 

 

* MD5 해시

MD5 해시 함수를 이용하여 라우팅 정보를 인증할 수 있는 기능이 있습니다.

수신한 라우팅 정보가 인증이 맞지 않는다면 라우터는 수신한 라우팅 정보를 무시하고 폐기시켜 버립니다.

 

R0(config)# key chain (name-of-chain)

R0(config-keychain)# key (number)

R0(config-keychain-key)# key-string (string)

R0(config)#interface (type number)

R0(config-if)# ip rip authentication key-chain (name-of-chain)

R0(config-if)# ip rip authentication mode {text | md5}

 

 

R0(config)# key chain rip-md5 - 인접한 라우터간 Chain name은 달라도 됨

R0(config-keychain)# key 123123 - 인접한 라우터간 number 동일해야 함

R0(config-keychain-key)# key-string abcdef - 인접한 라우터간 string 동일해야 함

R0(config)# interface gigabitEthernet 0/0

R0(config-if)# ip rip authentication key-chain rip-md5

R0(config-if)# ip rip authentication mode md5

 

 

 

 

 

 

 

 

 

Loop 방지를 위한 기능들 

 

*트리거드 업데이트 방식

WAN처럼 대역폭이 제한된 네트워크 주기적으로 라우팅 업데이트 하는 대신, 변화가 있을 때 라우팅 업데이트를 한다.

(WAN Point-to-Point, 시리얼 인터페이스에서만 지원)

R1(config)#int serial 0/0
R1(config-if)#ip rip triggered

 

 

*루트 포이즈닝

특정 네트워크가 장애나 삭제된 것을 인식한 라우터가 인접 라우터에게 metic 16 정보를 광고하여 더 이상 도달할 수 없는 네트워크 정보를 업데이트 해준다.

R1(config)#interface ethernet 1/2

R1(config-if)#ip rip poison-reverse

 

 

*스프릿 호라이즌

라우팅 정보를 수신한 라우터는 전달해준 인터페이스 포트를 기록해두고 해당 인터페이스로는 동일한 라우팅 정보를 중복 전달하지 않는다.

R0(config)#interface gigabitEthernet 0/0

R0(config-if)#ip split-horizon

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

감사합니다 !!

 

자세한 내용은 CISCO 홈페이지에서 확인 가능합니다.

https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/iproute_rip/configuration/15-mt/irr-15-mt-book/irr-cfg-info-prot.html#GUID-B773C338-DC20-4DC0-9B21-F6E9FE0921BC

반응형
반응형

 

 

 

Static Routing 이란,

정적으로 구성한 라우팅 테이블에서 라우팅 정보를 사용하거나 동적 라우팅 알고리즘을  같이 사용하여
계산된 라우팅 정보를 사용하여 패킷을 전달한다.

 

 

 

 

Static Routing의 장점

 

  • static Route은 dynamic route보다 대역폭을 덜 사용한다.
  • 라우팅 업데이트를 계산하고 분석하는데 CPU를 사용하지 않아 빠르게 라우팅이 가능하다.
  • 라우팅 테이블을 적게 사용하여 장비에 부담을 줄일 수 있다.
  • 네트워크 트래픽이 예측 가능하고 설계가 간단하다.
  • static routing에는 라이센스가 필요하지 않다.

 

Static Routing의 단점

 

  • 라우터 사이에 경로를 자동으로 업데이트 하지 않는다.
  • 경로에 문제가 생겨도 다른 길을 자동으로 찾아내지 못하여 관리자가 경로를 재구성해야 한다.

 

 

 

 

 

 

 

Cisco Packet Tracer 프로그램을 사용하여 구성했습니다.

 

인천 사무실과 서울 사무실이 서로 통신이 되게 static routing을 사용해 봅시다.

 

 

 

 

Static Route를 사용하기전에 인천 사무실 PC0 (192.168.100.5)에서 서울 사무실 PC3 (10.10.10.5)로 Ping을 날려봤을때 응답이 없는 모습을 보실 수 있습니다.

 

Ping을 날려봤을때 응답이 없는 모습입니다.

 

 

 

이제 Static route 설정 명령어를 알아봅시다.

 

일단 설정모드로 접속하셔야합니다.

Example : R1(config)#

 

 

설정모드에서 명령어를 입력해 주시면 됩니다.

 

R1(config)#ip route { ip-prefix | ip-addr/ip-mask } {[ next-hop | nh-prefix ] | [ interface next-hop | nh-prefix ]} [ name nexthop-name] [ tag tag-value] [ pref ]

 

R1(config)#ipv6 route ip6-prefix { nh-prefix | link-local-nh-prefix } | ( nexthop [ interface ] | link-local-nexthop [ interface ]} [ name nexthop-name] [ tag tag-value ] [ pref ]

 

쉽게 풀자면

ip route 네트워크 서브넷마스크 { R2 Gi0/0 ip | R1 Gi0/0 } 

ip route (목적지 네트워크 주소) {마주보는 인터페이스 IP - next hop}

 

R1(config)#ip route 10.10.10.0 255.255.255.0 20.20.20.2

R1(config)#ip route 10.10.10.0 255.255.255.0 gigabitEthernet 0/0

두가지로 사용하실 수 있습니다.

 

 

양쪽 라우터에 설정하셔야지 통신이 됩니다.

 

 

인천 사무실에 static route를 넣었습니다.

 

 

서울 사무실에 static route를 넣었습니다.

 

 

 

 

이제 아까와 똑같이 인천 사무실 PC0 (192.168.100.5)에서 서울 사무실 PC3 (10.10.10.5)로 Ping을 날려봤을때 응답하는 모습을 보실 수 있습니다.

 

Ping을 날려봤을때 응답하는 모습입니다.

 

 

라우팅을 설정했으니 이제 라우팅 테이블 확인하는 명령어를 배워봅시다.

 

관리자 모드로 접속하셔야합니다.

Example : R1#

 

관리자 모드에서 명령어 입력해주시면 됩니다.

R1#show{ ip | ipv6 } static-route

R1#show ip route

장비 IOS 마다 차이가 있습니다.

 

 

입력하게되면 아래와 같이 라우팅 테이블이 나옵니다.

 

 

감사합니다 !! 

 

자세한 내용은 CISCO 홈페이지에서 확인 가능합니다.

https://www.cisco.com/c/en/us/td/docs/switches/datacenter/sw/5_x/nx-os/unicast/configuration/guide/l3_cli_nxos/l3_route.html

반응형
반응형

 

 

 

스위치의 설정 모드

스위치의 모드는 이용자 모드, 관리자 모드, 다양한 설정 모드로 구분할 수 있습니다.

 

 

스위치의 이용자 모드(User Mode)

스위치를 처음 키거나 콘솔, 텔넷으로 접속하면 이용자 모드로 접속합니다.

이용자 모드에서는 스위치의 관리를 위한 가장 기본적인 명령어만 사용할 수 있습니다.

이용자 모드에서는 hostname 옆에 > 로 표시된다.

 

 

 

스위치의 관리자 모드(Privilege Mode)

스위치의 관리자 모드는 이용자 모드에서 enable 명령어를 입력하면 접속할 수 있습니다.

관리자 모드에서는 스위치에 관한 모든 명령어를 사용할 수 있습니다.

관리자 모드에서는 hostname 옆에 # 로 표시된다.

 

 

 

스위치의 설정 모드(Configuration Mode)

스위치의 설정모드는 관리자 모드에서 configure terminal 이거나 줄여서 conf t 명령어를 입력하면 접속할 수 있습니다.

설정모드에서는 관리자용 이름, 패스워드 및 스위치의 모든 설정 작업을 많이 다룬다. 

다른 설정모드와 구분하여 전체 설정 모드라고 부른다.

전체 설정모드에서는 hostname 옆에 (config)# 로 표시된다.

 

 

 

 

감사합니다 !!

반응형

+ Recent posts