2012년 11월 27일 화요일

라우터

1.모니터링
1) # sh process cpu
   # cpu utilization for five seconds : 45%/40%
 (1) 45%
  -> 메인 cpu 사용율 = 라우팅
 (2) 40%
  -> cache 사용율 = cef 스위칭

2) 메인 cpu 사용율 > cache 사용율
 -> 공격 의심
 (1) # sh process cpu sorted | ex 0.00
  ->점유율 높은 process 조사
 (2) ARP process 점유율 높으면
  -> arp spoofing 의심
  (a) # sh arp
      ->중복 mac 주소를 갖고 있는 ip 주소 확인
  (b) # sh mac add add mac주소
   ->포트 위치 파악 후 해당 포트 shut
 (3) IP process 점유율 높으면
  -> 바이러스 감염 의심
  (a) # sh ip cache flow | i  k 로 packet양 높은 ip 확인
  (b) # sh arp
    ->중복 mac 주소를 갖고 있는 ip 주소 확인
  (c) # sh mac add add mac주소
   ->포트 위치 파악 후 해당 포트 shut

3) ip spoofing 공격
 -> mac 주소 1개에 ip 주소 여러개 사용
 -> 대개 DOS 공격인 경우 많음
 -> RPF 기능 on 하면 차단 가능함
 (1) sh ip cache flow | i 96.70(ip spoofing 의심 ip)
  -> 유입되는 interface 확인
 (2) sh ip cef f0/0
  -> 유입되는 netxt hop ip 주소 확인
 (3) 외부 isp 이면 해당 isp에 ip 차단 요청
 (4) 메인 cpu 사용율 = cache 사용율
  -> 패킷 유입량 많음

2.명령어
 1) clear ip accounting
  -> ip accounting-output 초기화

 2) clear ip flow stats
  -> cache flow 초기화

 3) clear ip route
  -> routing table 초기화

 4) clear cdp table
  -> cdp table 초기화

 5) clear ip nat translation *
  -> nat table 초기화

 6) sh ip nat translation
  -> nat된 ip 주소 확인

 7) sh ip nat statistics
  -> nat 변환 통계 보기

 8) sh int status errdisable

 9) sh int f0/0 counter errors

3.access-list 수정
 1) access-list 10 deny 1.1.1.1
  (1) 1.1.1.2 추가
   (a) # sh ip access-list
        # standard ip access-list 10
        #  10 deny 1.1.1.1
   (b) (config)# ip access-list standard 10
   (c) (config)# 15 permit 1.1.1.2
  (2) 1.1.1.2 삭제
   (a) # ip access-list standard 10
   (b) (config)# ip access-list standard 10
   (c) (config)# no 15

 2) 이름을 갖는 standard access-list 추가
 (1) (config)# ip access-list standard abc
 (2) (config)# 10 permit 1.1.1.3

4.access-list 명령어
 1) sh access-list
  -> 전체 access-list 목록 보기

 2) sh ip access-list 100
  -> 특정 번호 access-list 목록 보기

 3) sh ip accounting access-violations
  -> access-list 위반 패킷 확인

5.HSRP 장애 처리
 1) sh standby f0/0
  -> 가상 mac 주소 확인
 2) 각 단말에서 gateway의 mac 주소가 가상 mac 주소와 같은지 비교
 3) 같지 않으면 arp spooping 의심

6.crash 발생
 1) crashinfo 파일이 flash에 저장 됨
 2) 재부팅 되면 지워지므로 반드시 저장해야 함

7.IOS 복구
 1) tftpdnld 가 있을때
  (1) rommon> set
   -> 환경변수 확인
  (2) rommon> IP_ADDRESS=1.1.1.1
  (3) rommon> IP_SUBNET_MASK=255.255.255.0
  (4) rommon> DEFAULT_GATEWAY=1.1.1.2
  (5) rommon> TFTP_SERVER=1.1.1.2
  (6) rommon> TFTP_FILE=ios이미지.bin
  (7) rommon> tftpdnld
  (8) 파일 업로드 시작됨
  (9) rommon> unset
   -> 환경변수 삭제
  (10) rommon> ios 복사 완료
  (11) rommon> reset

 2) tftpnld 가 없을때
  (1) rommon> confreg
  (2) rommon> do you wish to change the configuration? y
  (3) rommon> ~~~~~~~~~~~~~~~~~~~~~~~~ ? n
  (4) rommon> change console baud rate ? y
  (5) rommon> ~~~~~7=115200,[7]=7
  (6) rommon> ~~~~~~~~~~~~~~~~~~~~~~~~? n
  (7) console speed 115200으로 수정후 콘솔 접속
  (8) rommon> xmodem ios이름~.bin
  (9) 자동 재부팅
  (10) router# config-register 0x2102







댓글 없음:

댓글 쓰기