CCNP(SWITCH)

3일차 터미널 설정과 CDP

컴공 2013. 3. 8. 20:34
반응형

# 다이나밉스 설정

렘에 올리기 ccnp.cmd
tmp폴더 내용을 삭제!! (렘역할을 함으로 이전 설정이랑 겹칠 수 있다)
server2003 -> pc의 렘으로 사용할 장비 로딩시키기.


# 터미널 idle time 조정

R1#show terminal

Timeouts:      Idle EXEC    Idle Session   Modem Answer  Session   Dispatch

                10(->never)    10(->never로 바뀜)                 none     not set

수업 시간에는 끊어지면 불편하기에 terminal을 0분 0초로 설정하지만
현업에서는 1분 30초정도로 한다.


# history size 설정

R1#show history  (기본적으로 20개 저장함)
R1#terminal history size 100 (화살표로 다시 불러옴=  clt + p)

clt + a 앞으로

clt + f 한칸 뒤로
clt + b 한칸 앞으로

3. Editing is enabled (명령창에서 수정 기능)

R1#terminal no editing  //명령어가 길어지면 앞에부터 하나씩 지워진다. 고수전에는 키자


CDP (xxDP : discovery protocol : 발견약속)

SSDP(프린트 장비 찾기)
CDP (시스코 인근장비 찾기)
LLDP(주니퍼 인근장비 찾기)


=======> run :/ 운영하다, 케이블 설치

cdp run ==> no cdp run

lldp run

ssdp run(cisco는 복사기 쓸일없다)

========> layer 2 protocol

# no cdp run  ## 장비 내의 인터페이스 전부 cdp 정보를 받아오지 않는다.


int fa 0/1

no cdp enable

exi ==>해당 포트에서만 disabled됨 -->일반적, 물리적 정보를 알 수 없다.


장비 관리를 위해 hostname을 반드시 해줌

1. 관리

2. 보안 ==> 인증서

###################### 기본설정.

en
terminal history size 100
conf t
line con 0
exec-t 0 0
exi
host 
#####################

## yersinia로 sw1 fastEhternet 1/3 인터페이스에 copy 공격하기

vmnet 2------------------f1/3_sw1

# vmware

ubuntu를 킨다.

우분투 파워온!! ( network interface card는 vm2로 설정함)

dashhome-> ter ->
song@ubuntu:~$ sudo -i
[sudo] password for song: 
root@ubuntu:~# ifconfig
yersinia -G

네트워크는 flooding = copy 


# sw1

Sw1#show cdp neighbors 

Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge

                  S - Switch, H - Host, I - IGMP, r - Repeater


Device ID        Local Intrfce     Holdtme    Capability  Platform  Port ID

333KKKX          Fas 1/3            186      R T B S H r  yersinia  Eth 0

2IIWWWE          Fas 1/3            186         S H I     yersinia  Eth 0


\\\\\\\\\\\\\\\\\\\\\\

Sw1#show processes cpu ## 공격같은 것 뒤에는 다시 체크함.(cpu 점유율 체크)

Sw1(config)#interface fastEthernet 1/3  ## 우분투가 연결됨
Sw1(config-if)#no cdp
Sw1(config-if)#cdp enable 
Sw1(config-if)#end

Sw1#show mac-address-table dynamic 

Non-static Address Table:

Destination Address  Address Type  VLAN  Destination Port

-------------------  ------------  ----  --------------------

\\\\\\\\\\\\\\\\\\\\\\\\\\\\

SW3#terminal history size 100
SW3#conf t
SW3(config)#cdp time 5
SW3(config)#cdp hold 10
SW3(config)#no cdp log mismatch duplex 
SW3(config)#line console 0
SW3(config-line)#exec-timeout 0 0
SW3(config-line)#logging synchronous

alais exec a clear ip route * // 위험!! 통신이 끊어짐

SW3(config)#alias exec c config ter

SW3(config)#alias exec r show run
SW3(config)#alias exec i show ip route
SW3(config)#alias exec b show ip int brief
SW3(config)#line vty 0 4 //line vty 0 15 ==> ssh, ssl, vpn을 열어야된다.
SW3(config-line)#pas cisco
SW3(config-line)#login
SW3(config-line)#exi
SW3(config)#enable password cisco //등급에 따라서 secret이나 password를 사용한다
SW3(config)#service password-encryption // show run에서 암호부분을 암호화시켜준다.

SW3(config)#do show runn
enable password 7 14141B180F0B

------------------------------------------

SW3#conf t

SW3(config)#cdp timer 5 ##5초마다 받음

SW3(config)#cdp hold 10 ##10초동안 유지.. 렉이심함

cdp가 로그를만듬.


SW3(config)#cdp log mismatch duplex

simplex : 단방향통신


duplex : 양방향통신

half (반이중) :동시에 주고 받기가 안된다. (주기만하거나 받기만하거나)

collision = CSMA/CD : catagory5 이하에서 동작.

catagory 6(1gb), cat 6a, cat7에서는 없다

full (전이중) : 동시에 된다.

\\\\\\\\\\\\\\\\

SW3#show interfaces fastEthernet 0/0

interface reset 이 자꾸 되거나

runts 가 되면 mismatch 되어진다.

통신은되나 불량이 생긴다.


SW3#show interfaces fastEthernet 0/0

FastEthernet0/0 is administratively down, line protocol is down 

  Hardware is AmdFE, address is cc02.0c68.0000 (bia cc02.0c68.0000)

  MTU 1500 bytes, BW 100000 Kbit/sec, DLY 100 usec, 

     reliability 255/255, txload 1/255, rxload 1/255

  Encapsulation ARPA, loopback not set

  Keepalive set (10 sec)

  Full-duplex, 100Mb/s, 100BaseTX/FX

  ARP type: ARPA, ARP Timeout 04:00:00

  Last input never, output never, output hang never

  Last clearing of "show interface" counters never

  Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0

  Queueing strategy: fifo

  Output queue: 0/40 (size/max)

  5 minute input rate 0 bits/sec, 0 packets/sec

  5 minute output rate 0 bits/sec, 0 packets/sec

     0 packets input, 0 bytes

     Received 0 broadcasts, 0 runts, 0 giants, 0 throttles

     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored

     0 watchdog

     0 input packets with dribble condition detected

     0 packets output, 0 bytes, 0 underruns

     0 output errors, 0 collisions, 0 interface resets

     1 unknown protocol drops

     1 unknown protocol drops

     0 babbles, 0 late collision, 0 deferred

     0 lost carrier, 0 no carrier

     0 output buffer failures, 0 output buffers swapped out

\\\\\\\\\\\\\\\\\\\\\\\\\\

no cdp log mismatch duplex (문제해결을 해야한다.) runts패킷이 꺠졋거나. 정상 패킷이 64byte 1518보다크면 자이언트(giant)

pramble | sof |de mac | start mac |이더타입 | FCS(오류체크) mtu(46~1500byte) |

회선교환방식(전화), 패킷교환방식(우리가쓰는것)

9000byte까지 쪼개는 것 jumbo MTU (storage network 서버가이용)

점보패킷을 수용할 스위치를 써야지 수용할 수 있다.

SAN switch (억단위)


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

runt| mtu(46~1500byte) | giant

crc = 오류제어

기본 1만 바이트당 1byte오류가 나오면 안된다.

\\\\\\\\\\\\\\

SW3#terminal history size 100

SW3#conf t

Enter configuration commands, one per line.  End with CNTL/Z.

SW3(config)#cdp time 5

SW3(config)#cdp hold 10

SW3(config)#no cdp log mismatch duplex 

SW3(config)#line console 0

SW3(config-line)#exec-timeout 0

SW3(config-line)#logging synchronous


alias exec c config ter

alias exec r show run

alias exec i show ip route

alias exec b show ip int brief

alais exec a clear ip route * // 위험!! 통신이 끊어짐

line vty 0 15 ==> ssh, ssl, vpn을 열어야된다.



SW3(config)#alias exec c config ter

SW3(config)#alias exec r show run

SW3(config)#alias exec i show ip route

SW3(config)#alias exec b show ip int brief

SW3(config)#line vty 0 4

SW3(config-line)#pas cisco

SW3(config-line)#login

SW3(config-line)#exi

SW3(config)#ena

SW3(config)#enable pass

SW3(config)#enable password cisco //등급에 따라서 secret이나 password를 사용한다

SW3(config)#service password-encryption


SW3(config)#do show runn

Building configuration...


Current configuration : 1359 bytes

!

version 12.4

service timestamps debug datetime msec

service timestamps log datetime msec

service password-encryption

!

hostname SW3

!

boot-start-marker

boot-end-marker

!

enable password 7 14141B180F0B

!

no aaa new-model

memory-size iomem 5



//회사는 안된다.

\\\\\\\\\\\\\\\\\\\\\

show command로 모니터링 (가장 많이 쓴것)

\\\\\\\\\\\\\\\

왜 자꾸 미스매치가 뜨는가


---------------------회사 들어가서 기본적으로 하게 되는 것들.

HW

회로

------

서버

리눅스

서비스

-------

네트워크

보안

-----------------------

회사==> IT: OP (로그를 분석하고 응급처치)


router-server >show ip bgp summary


ROI (네트워크 장비는 99.999% 구동율 유지. 못지키면 다음 계약때 불이익이 있다)


\\\\\\\\\\\\\\\\\\

로그취득

0~7

0~4 : 심각

==>

원래에는 서버에다가 올리는 거다!!!

XP(syslog)-------------- f0/0 _R1  (f1/3_sw1_f1/1)

10.1.10.1  -------------- 10.1.10.2

255.255.255.0 255.255.255.0

layer4 전송계층까지 살펴봄

layer1 전기(clock, duplex, 등등 확인)

layer2

\\\\\\\\\\\\\\\\\\\\\\\\\ 로그 백업받기....

xp

10.1.10.1로 ncpa.cpl에 들어가서 vm2 ip를 바꾼다.

-------------------

R1(config)#int fa 0/0

R1(config-if)#no shutdown

R1(config-if)#ip add 10.1.10.2 255.255.255.0


firewall.cpl


R1(config)#logging on ?

  <cr> ##항상 cr을 확인하자!

R1(config)#logging on

R1(config)#logging host 10.1.10.1

R1(config)#logging trap 7 ## 보내고싶은 로그 등급


반응형