2021년 1월 10일 일요일

nmap.py

  import socket

import argparse

import sys

import time


def main():

    # Output command line args to screen

    if args.verbose: printmsg("Arguments used:"); print args ;


    starttime=time.time()

    # Start Scanning

    results={}

    for target in targets:

        results[target]= portscan(target,ports,args.tcpscan,args.udpscan,args.verbose)

    printmsg(("Total scantime %.2f seconds") % (time.time()-starttime))


    for target in results:

        print "%s TCP:%s  UDP:%s" % (target,results[target][0],results[target][1])

    return results


def portscan(target,ports,tcp,udp,verbose):

    #target=IPaddr,ports=list of ports,tcp=true/false,udp=true/false,verbose=true/false

    tcpports=[]

    udpports=[]

    targetstarttime=time.time()

    if tcp:

        for portnum in ports:

            try:

                s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

                s.settimeout(0.01)

                s.connect((target, portnum))

            except Exception:

                failvar = 0

                if verbose: print "%d/tcp \tclosed" % (portnum)

            else:

                if verbose: print "%d/tcp \topen"% (portnum)

                tcpports.append(portnum)

            s.close()

    if udp:

        for portnum in ports:

            try:

                s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)

                s.settimeout(0.1)

                s.sendto("--TEST LINE--", (target, portnum))

                recv, svr = s.recvfrom(255)

            except Exception, e:

                try: errno, errtxt = e

                except ValueError:

                    if verbose: print "%d/udp \topen"% (portnum)

                    udpports.append(portnum)

                else:

                    if verbose: print "%d/udp \tclosed" % (portnum)

            s.close()

    printmsg(("Scanned %s in %.2f seconds - Open: %iTCP, %iUDP" % \

                (target,time.time()-targetstarttime,len(tcpports),len(udpports))))

    return tcpports, udpports


def errormsg(msg): print "[!] Error: %s" % (msg) ; sys.exit(1)

def printmsg(msg): print "[+] nmap.py: %s" % (msg)


def iprange(addressrange): # converts a ip range into a list

    list=[]

    first3octets = '.'.join(addressrange.split('-')[0].split('.')[:3]) + '.'

    for i in range(int(addressrange.split('-')[0].split('.')[3]),int(addressrange.split('-')[1])+1):

        list.append(first3octets+str(i))

    return list


def ip2bin(ip):

    b = ""

    inQuads = ip.split(".")

    outQuads = 4

    for q in inQuads:

        if q != "": b += dec2bin(int(q),8); outQuads -= 1

    while outQuads > 0: b += "00000000"; outQuads -= 1

    return b


def dec2bin(n,d=None):

    s = ""

    while n>0:

        if n&1: s = "1"+s

        else: s = "0"+s

        n >>= 1

    if d is not None:

        while len(s)<d: s = "0"+s

    if s == "": s = "0"

    return s


def bin2ip(b):

    ip = ""

    for i in range(0,len(b),8):

        ip += str(int(b[i:i+8],2))+"."

    return ip[:-1]


def returnCIDR(c):

    parts = c.split("/")

    baseIP = ip2bin(parts[0])

    subnet = int(parts[1])

    ips=[]

    if subnet == 32: return bin2ip(baseIP)

    else:

        ipPrefix = baseIP[:-(32-subnet)]

        for i in range(2**(32-subnet)): ips.append(bin2ip(ipPrefix+dec2bin(i, (32-subnet))))

        return ips


if __name__ == '__main__':

    parser = argparse.ArgumentParser(description='nmap.py - Replicates limited nmap functionality in python')

    parser.add_argument('-v', '--verbose', action='store_true', help='Enable this for full output')

    parser.add_argument('-sS', '--tcpscan', action='store_true', help='Enable this for TCP scans')

    parser.add_argument('-sU', '--udpscan', action='store_true', help='Enable this for UDP scans')

    parser.add_argument('-p', '--ports', default='1-1024', help='The ports you want to scan (21,22,80,135-139,443,445)')

    parser.add_argument('-t', '--targets', help='The target(s) you want to scan (192.168.0.1)')

    if len(sys.argv)==1: parser.print_help(); sys.exit(0)

    args = parser.parse_args()


    # Set target (and convert for FQDN)

    targets=[]

    if args.targets:

        if '/' in args.targets: #found cidr target

            targets = returnCIDR(args.targets)

        elif '-' in args.targets:

            targets = iprange(args.targets)

        else:

            try: targets.append(socket.gethostbyname(args.targets)) # get IP from FQDN

            except: errormsg("Failed to translate hostname to IP address")

    else: parser.print_help(); errormsg("You need to set a hostname")


    # Set ports

    if args.ports == '-': args.ports = '1-65535'

    ranges = (x.split("-") for x in args.ports.split(","))

    ports = [i for r in ranges for i in range(int(r[0]), int(r[-1]) + 1)]


    main()

2021.01.10

딴짓중 


출근해서... 

무언가 해야 되는데.. 안하고 딴짓중... 



고질적인 게으름 병 ㅠ 


2020년 10월 12일 월요일

 #!/usr/bin/env python

# -*- coding: utf-8 -*-

# get nmap XML to CSV converter from below link

# https://github.com/materaj/nmap-parser-xml-to-csv/blob/master/nmap-parser-xml-to-csv.py

# thanks for Didier Stevens 

__description__ = 'nmap xml script output parser'

__author__ = 'Didier Stevens, modify by Sumedt Jitpukdebodin, and additionaly modified by ezno'

__version__ = '1.0 KFISAC'

__date__ = '2015/10/15'


import optparse

import xml.dom.minidom

import glob

import collections


QUOTE = '"'


def ToString(value):

    if type(value) == type(''):

        return value

    else:

        return str(value)


def Quote(value, separator, quote):

    value = ToString(value)

    if separator in value:

        return quote + value + quote

    else:

        return value


def MakeCSVLine(row, separator, quote):

    return separator.join([Quote(value, separator, quote) for value in row])


class cOutput():

    def __init__(self, filename=None):

        self.filename = filename

        if self.filename and self.filename != '':

            self.f = open(self.filename, 'w')

        else:

            self.f = None


    def Line(self, line):

        if self.f:

            self.f.write(line + '\n')

        else:

            print(line)


    def Close(self):

        if self.f:

            self.f.close()

            self.f = None


class cOutputCSV():

    def __init__(self, options):

        if options.output:

            self.oOutput = cOutput(options.output)

        else:

            self.oOutput = cOutput()

        self.options = options


    def Row(self, row):

        self.oOutput.Line(MakeCSVLine(row, self.options.separator, QUOTE))


    def Close(self):

        self.oOutput.Close()


# function for `Nessus Plugin ID` match, find case and add 'Plugin ID' value in the CSV row

# return value : Nessus Plugin ID

def getNessusPluginID(resultRow):

    NessusPluginID = 'None'

    portN = resultRow[1]

    protocolType = resultRow[2]

    state = resultRow[3]

    serviceNm = resultRow[4]

    scriptNm = ''

    found_flag = False

    

    # get NSE script result and match to 'NessusPlugin ID'

    if len(resultRow) > 5 :

        scriptNm = resultRow[5]

        if scriptNm == 'http-trace' :

        # http-trace, HTTP TRACE 탐색에 사용됨. 웹 포트만 대상으로 함 "BBA-014 웹 서버 HTTP Trace 기능 지원"

            NessusPluginID = '11213'

            found_flag = True

        if scriptNm == 'ftp-anon' :

        # ftp-anon, FTP server 에서 anonymous 허용 "BAC-005 Anonymous FTP 비활성화"

            NessusPluginID = '10079'

            found_flag = True

        if scriptNm == 'smtp-enum-users' :

        # smtp-enum-users, SMTP 서비스 확인 및 추가정보 수집 BAB-002 SMTP 서비스 expn/vrfy 명령어 실행

            NessusPluginID = '10263'

            found_flag = True

        if scriptNm == 'rpcinfo' :

        # rpcinfo,   RPC 관련 서비스 및 추가정보 수집    BAC-009 불필요한 RPC서비스 실행

            NessusPluginID = '10227'

            found_flag = True

        if scriptNm == 'smtp-open-relay' :

        # smtp-open-relay,   다른 메일 서버가 보낸 메일을 다시 발송하는 relay 기능을 제공   BAB-008  스팸 메일 릴레이 제한

            NessusPluginID = '10262'

            found_flag = True

        if scriptNm == 'dns-recursion' :

        # dns-recursion,   DNS recursion 여부 확인  BBC-003  DNS 서버 Recursive Query 허용

            NessusPluginID = '10539'

            found_flag = True

        if scriptNm == 'finger' :

        # finger,   finger 서비스 확인 및 추가정보 수집  BAE-002 Finger 서비스 비활성화

            NessusPluginID = '10068'

            found_flag = True

        if scriptNm == 'daytime' :

        # daytime   daytime 서비스 확인 및 추가정보 수집 BAE-010 DoS 공격에 취약한 서비스 비활성화

            NessusPluginID = '10457'

            found_flag = True

        if scriptNm == 'nfs-ls' :

        # daytime   daytime 서비스 확인 및 추가정보 수집 BAE-010 DoS 공격에 취약한 서비스 비활성화

            NessusPluginID = '11356'

            found_flag = True



    # 바로 취약여부를 알 수 없지만, 서비스 사용여부에 도움이 될만한 정보추가

    if found_flag == False :

        if portN == '69' and state == 'open':

# BAC-013 tftp, talk 서비스 비활성화 

            NessusPluginID = '11819'


        if portN == '161' and state == 'open' and serviceNm == 'snmp':

            # BAA-001 SNMP 서비스 Get community 스트링 설정 오류

            NessusPluginID = '41028'


        if portN == '21' and state == 'open' and serviceNm =='ftp':

            # BAE-011   FTP 서비스 구동 점검

            NessusPluginID = '10092'


        if portN == '25' and state == 'open' and serviceNm =='smtp':

            # BAB-001 SMTP 서비스 실행

            NessusPluginID = '10263'


        if portN == '513' and state == 'open' and serviceNm == 'login':

            # BAE-008   r 계열 서비스 비활성화

            NessusPluginID = '10205'


        if portN == '2049' and state == 'open' and serviceNm == 'nfs':

            # BAC-007   NFS 서비스 비활성화

            NessusPluginID = '11356'


        if portN == '2301' and state == 'open' :

            # BBA-010   HP(Compaq) 웹기반 관리(WBEM) 서비스 실행

            NessusPluginID = '23711'


        if (portN == '7' or portN =='9' or portN == '13' or portN == '19') and state == 'open':

            # BAE-010   DoS 공격에 취약한 서비스 비활성화

            NessusPluginID = '10457'


    return NessusPluginID


def NmapXmlParser(filenames, options):

    oOuput = cOutputCSV(options)

    oOuput.Row(['Plugin ID','Host','Port','Protocol','State','Name', 'Script', 'Synopsis'])

    for filename in filenames:

        domNmap = xml.dom.minidom.parse(open(filename, 'r'))


        nmap_header = domNmap.getElementsByTagName('nmaprun')

        nmap_footer = domNmap.getElementsByTagName('runstats')

        

        for hosttag in domNmap.getElementsByTagName('host'):

            for port in hosttag.getElementsByTagName('port'):

                scriptFound = False

                productStr = ''

                extraStr = ''


                addresses = [address.getAttribute('addr') for address in hosttag.getElementsByTagName('address') if address.getAttribute('addrtype') == 'ipv4']

                row = ['|'.join(addresses)]

                row.append(port.getAttribute('portid'))

                row.append(port.getAttribute('protocol'))

                for state in port.getElementsByTagName('state'):

                    row.append(state.getAttribute('state'))

                for service in port.getElementsByTagName('service'):

                    nameStr = ''

                    nameStr = service.getAttribute('name')

                    if service.getAttribute('product'):

                        productStr = service.getAttribute('product')

                    if service.getAttribute('extrainfo'):

                        extraStr = service.getAttribute('extrainfo')

                    row.append(nameStr)

                if port.getElementsByTagName('script'):

                    scriptFound = True

                    for script in port.getElementsByTagName('script'):

                        row.append(script.getAttribute('id'))

                        row.append(repr(script.getAttribute('output').encode('ascii').replace('\n  ','')))

                        row.insert(0, getNessusPluginID(row))

                        oOuput.Row(row)

                        row.pop(0)

                        row.pop()

                        row.pop()

                row.insert(0, getNessusPluginID(row))

                if row[0] == 'None':

                    row.append('None')

                    row.append('None')

                    row[7] = row[3] + ', Service Name : ' + row[5]

                elif row[0] != 'None' and len(row) == 6:

                    row.append('None')

                    row.append('None')

                    if productStr != '':

                        row[5] = row[5] + ', Product: ' + productStr 

                    if extraStr != '':

                        row[5] = row[5] + ', extraInfo: ' + extraStr

                    row[7] = row[5]

                oOuput.Row(row)

    oOuput.Close()



def File2Strings(filename):

    try:

        f = open(filename, 'r')

    except:

        return None

    try:

        return map(lambda line:line.rstrip('\n'), f.readlines())

    except:

        return None

    finally:

        f.close()


def ProcessAt(argument):

    if argument.startswith('@'):

        strings = File2Strings(argument[1:])

        if strings == None:

            raise Exception('Error reading %s' % argument)

        else:

            return strings

    else:

        return [argument]


def ExpandFilenameArguments(filenames):

    return list(collections.OrderedDict.fromkeys(sum(map(glob.glob, sum(map(ProcessAt, filenames), [])), [])))


def Main():

    moredesc = '''

Arguments:

@file: process each file listed in the text file specified

wildcards are supported'''


    oParser = optparse.OptionParser(usage='usage: %prog [options] [@]file ...\n' + __description__ + moredesc, version='%prog ' + __version__)

    oParser.add_option('-o', '--output', type=str, default='', help='Output to file')

    oParser.add_option('-s', '--separator', default=',', help='Separator character (default ;)')

    (options, args) = oParser.parse_args()


    if len(args) == 0:

        oParser.print_help()

    else:

        NmapXmlParser(ExpandFilenameArguments(args), options)


if __name__ == '__main__':

    Main()

2020년 7월 17일 금요일

명언

머라도 쓰기 위한 몸부림.. 



방황과 변화를 사랑한다는 것은 살아 있다는 증거이다.

  • 바그너

나는 죽음이 또 다른 삶으로 인도한다고 믿고 싶지는 않다. 그것은 닫히면 그만인 문이다.

  • 카뮈

알차게 보낸 하루가 편안한 잠을 제공하는 것처럼 알찬 생애가 평온한 죽음을 가져다 준다.

  • 다빈치

나는 계속 배우면서 나는 갖추어 간다. 언젠가는 나에게도 기회가 올것이다.

  • 링컨

우리는 성공을 향해 전진할수록, 우리들은 사람들로부터 고립될 가능성이 많아지는 것이다.

  • 디오도어 루빈

진실은 죽어가는 사람의 입술 위에 앉아 있는 것이다.

  • 매튜 아놀드

건강은 유일무이의 보배이며, 이것을 얻기 위해서는 생명 자체까지 내던진다.

  • 몽테뉴

역경에서 행복한 날을 회상하는 것처럼 슬픈 일은 없다.

  • 괴테

사람들은 자신의 논리가 빈약하다고 느낄 때 목소리를 높인다 -

새무얼 존슨

인생은 한권의 책과 같다. 어리석은 사람은 대충 책장을 넘기지만 현명한 사람은 공들여서 읽는다. 그들은 단 한번 밖에 읽지 못하는 것을 알기 때문이다.


2020년 6월 16일 화요일

유닉스 로그 및 원격 접속 제한

로그파일

 4대장

utmp

wtmp 

btmp 

last log 

정의 

현재 로그인한 사용자 

상태 정보를 담고 있는 로그파일

 성공한 로그인/로그아웃 정보 및 

시스템의 boot/shutdown 의 

히스토리를 담고있는 로그 파일

 실패한 로그인 정보를 담고 있는 로그 파일

 마지막으로  성공한 로그인 정보를 담고있는 로그 파일

파일위치 리눅스

     솔라리스

/var/run/utmp

/var/adm/utmpx 

/var/log/wtmp

/var/adm/wtmpx 

 /var/log/btmp

/var/adm/loginlog

/var/log/lastlog

/var/adm/lastlog 

로그파일 확인 명령어

 w, who, finger

last 

lastb 

솔라리스는 text파일

리눅스 : lastlog

솔라리스는 finger 



유닉스 시스템에서 보안상의 이유로 root 사용자의 원격 접속을 제한하고자 할 때 운영체제별로 설정해줘야 하는 파일은?
Solaris : /etc/default/(  A  )
AIX : /etc/security/(  B  )
Linux : /etc/(  C  )

A : login
B : user
C : securetty

방화벽 유형

1) Screening Router
내부 네트워크 < ---- > Screening Router < ---- > 외부 네트워크

2) Bastion Host 
내부 네트워크 < ---- > Bastion Host < ---- > 외부 네트워크

3) Dual Homed 
내부 네트워크 < ---- > 내부 NIC || Bastion Host || 외부 NIC < ---- > 외부 네트워크 

4) Screened Host GW
내부 네트워크 < ---- >  내부 NIC || Bastion Host || 외부 NIC --- Screening Router < ---- > 외부 네트워크

5) Screend Subnet GW
내부 네트워크 < ---- > Screening Router --- 내부 NIC || Bastion Host || 외부 NIC --- Screening Router < ---- > 외부 네트워크

정보보안기사 정리

 개인정보보호법 외 다른 법령에서 정한바에 따라 개인정보를 파기하지 않고 보관할 경우 보관 방법에 대해 서술하시오.



해당 개인정보 파일은 다른 개인정보와 분리하여서 저장·관리하여야 한다.


법 조문 참고

제21조(개인정보의 파기) ① 개인정보처리자는 보유기간의 경과, 개인정보의 처리 목적 달성 등 그 개인정보가 불필요하게 되었을 때에는 지체 없이 그 개인정보를 파기하여야 한다. 다만, 다른 법령에 따라 보존하여야 하는 경우에는 그러하지 아니하다.

② 개인정보처리자가 제1항에 따라 개인정보를 파기할 때에는 복구 또는 재생되지 아니하도록 조치하여야 한다.

③ 개인정보처리자가 제1항 단서에 따라 개인정보를 파기하지 아니하고 보존하여야 하는 경우에는 해당 개인정보 또는 개인정보파일을 다른 개인정보와 분리하여서 저장ㆍ관리하여야 한다.

④ 개인정보의 파기방법 및 절차 등에 필요한 사항은 대통령령으로 정한다.

2020년 6월 7일 일요일

google 검색





intitle

Intitle : "Welcome"

제목 중 "Welcome" 문자가 포함된 페이지 검색

inurl

inurl : "admin"

URL admin이 포함된 페이지 검색

site

site : "coconut.co.kr"

coconut.co.kr 사이트에서 검색

filetype

filetype : "bak"

확장자가 bak으로 된 파일 검색

intext

intext : "coconut"

coconut 문자열이 포함된 페이지 검색



intitle

Intitle : "Welcome"

제목 중 "Welcome" 문자가 포함된 페이지 검색

inurl

inurl : "admin"

URL admin이 포함된 페이지 검색

site

site : "coconut.co.kr"

coconut.co.kr 사이트에서 검색

filetype

filetype : "bak"

확장자가 bak으로 된 파일 검색

intext

intext : "coconut"

coconut 문자열이 포함된 페이지 검색



==

 도서 - 구글 해킹 중 


영화 속에서나 소설 속에서 등장하는 해커들, 그들은 다양한 방법으로 전산망에 침입을 시도한다. 그들이 사용하는 툴은 어떤 것이 있을까? 간단한 쉘스크립트에서 GUI 환경의 툴까지 바이러스, , 스파이웨어, 트로이 목마 등 다양한 분류, 많은 종류로 존재 하는데, 이러한 해킹 툴들은 수동적 공격 기법에 비해 그 전파 속도 및 위험성이 높으며, 이에 대한 피해의 정도가 계속 높아지고 있다.


특히 최근 몇 년 전부터는 웹 어플리케이션에 관련한 해킹 툴이 많이 발표 되고 있는데, 그것은 모든 클라이언트 사용자에게 허용할 수 밖에 없는 웹 서비스의 개방적인 성격과 기존 보안장비인 방화벽, 침입탐지시스템 등의 한계성이 나타나는 이유에서이다. 또한, 웹 서비스를 통해 이루어지는 공격에 대해서는 아직 정형화 되지 않은 대응책들로 인하여 그 위험성이 계속 높아지고 있다. 일반적인 예로 하이잭커를 들 수가 있는데, 이는 정상적인 방법으로 사이트에 접근하는 과정을 가로채어 어떤 특정한 사이트로 연결하거나 특정 검색 엔진을 사용하게 하는 악성코드이다. 또 스팸 메일 발송에 악용이 될 수 있는 다양한 정보 들을 여러 시스템에서 수집하는 툴 등이 존재한다.


그렇다면 최근에는 어떠한 해킹툴이 있을까? 얼마 전, 각종 해킹과 관련된 뉴스에서는 웜으로 인한 홈페이지 변조가 많은 기사로 대두되었다. 이 웜은 Santy웜으로서 Google 등의 검색엔진을 이용하여 취약한 버전의 홈페이지를 검색하고, 변조시켰다.


검색엔진을 이용한 취약성이 존재하는 사이트를 발견하는 툴들이 개발되면서부터, 웹 어플리케이션에 대한 보안의 필요성이 크게 되었다.

 


그렇다면, 어떠한 검색엔진을 이용하여 각종 해킹 기법 및 해킹 툴들이 만들어지는지에 대해서 생각해 보기로 하자. 검색 서비스는 우리들이 접할 수 있는 각종 포털 탈사이트(다음, 야후, 네이버, 엠파스등)에서도 제공해 준다. 하지만 대부분의 이러한 사이트들의 검색엔진은 포탈 사이트 내의 일부분으로 존재한다. 또 다른 검색엔진으로는 Google을 들 수가 있는데, Google은 전세계적으로 사용되고 있는 검색엔진이며, 검색 할 수 있는 범위와 검색의 결과가 매우 정확하다.


여기서 언급하고 있는 Google에 대해서 더 자세히 알아보자.
Google
30억 페이지를 수집하고 있고 하루 2억번 이상의 검색결과를 제공하고 있는 세계 최대의 검색엔진 서비스이다. 또한, 메타태그나 키워드에만 의지하지 않고, 페이지 랭크(Page Rank)라고 하는 기법을 사용하여 웹페이지의 공정한 순위를 매김하고 있다. 특히 가장 중요한 부분으로서는 2003년 이후 검색엔진이 지능화 되면서 시스템의 주요 정보 및 민감한 데이터의 접근 경로까지 검색 결과를 제공하는데 있다.


이러한 여러 기능 때문에 해커들은 Google을 이용하여 각종 중요 정보들을 검색하여, 해킹 대상을 검색 하거나, 기타 여러 정보들을 수집을 한다.


이외에 해커들이 해킹 도구를 Google로 사용하는 이유는 한 가지가 더 있다. 그 이유는 검색 시에 사용되어지는 옵션에 대한 기능적인 면을 들 수가 있는데, 이는 기본 검색 옵션 (link, inurl, intext ), 단어 검색 옵션(+, -, "", | )을 복합하여 사용함으로 중요 정보들을 쉽게 검색할 수 있다는 것이다.

 


용어 정리

OOP (Object Oriented Programming) : 객체 지향형 프로그래밍으로, 모든 데이터를 오브젝트(object;물체)로 취급하여 프로그래밍 하는 방법

 

HTTP Protocol (hypertext transfer protocol) : 인터넷에서, 웹 서버와 사용자의 인터넷 브라우저 사이에 문서를 전송하기 위해 사용되는 통신 규약

 

JSP (JavaServer Pages) : 웹프로그램밍 언어로 HTML내에 자바 코드를 삽입하여 웹 서버에서 동적으로 웹 페이지를 생성하여 웹 브라우저에 돌려주는 언어

 

ASP(active server pages) : 마이크로소프트사의 NT머신 IIS 3.0 이상에서만 작동하는 특별한 페이지로, 클라이언트가 요청하면 서버에서 응답해 주는 방식의 서버측 프로그램으로 동적인 웹페이지 생성한다.

OWASP(Open Web Application Security Project) : 국제웹보안표준기구로 웹보안 10대 취약점을 기술한 자료

SQL Injection : 웹보안 주요 취약점 중 하나로, 입력 값을 변조해서 정상적인 SQL을 통해 공격자가 원하는 데이터베이스 접근을 시도하는 기술

 

XSS (Cross Site Sripting) : 웹보안 취약점 중 하나로,

게시판에 악성코드 삽입 후 해당 페이지에 접속한 사용자 브라우져에 대해 스크립트 실행.

2020년 6월 1일 월요일

쿠버네티스와 도커의 차이


쿠버네티스와 도커의 차이




쿠버네티스란? 여러 컨테이너를 관리/예약하는 도구

도커란? 여러 컨테이너를 관리/예약하는 플랫폼

그런데 둘이 뭐가 다를까?

간단히 얘기해서 도커는 '기술적인 개념이자 도구'이고 쿠버네티스는 '도커를 관리하는 툴'이라고 생각하면 된다.

이미지를 컨테이너에 띄우고 실행하는 기술이 도커고

이런 도커를 기반으로 컨테이너를 관리하는 서비스가 쿠버네티스라고 생각하면 된다.

도커는 '한 개의 컨테이너'를 관리하는 데 최적, 쿠버네티스는 '여러 개의 컨테이너'를 서비스 단위로 관리하는 데 최적화되어있다.

 

 

도커

도커는 '컨테이너 기반의 오픈소스 가상화 플랫폼'이다.

기술적인 개념이다. 도커로 컨테이너를 띄운다.

컨테이너

컨테이너: 애플리케이션 & 애플리케이션을 구동하는 환경을 격리한 공간.

컨테이너에 프로그램을 띄워서 돌린다고 생각하면 된다.

서버에 컨테이너를 올려 쓰는데, 그동안 VM을 올려 쓰던 서버와 뭐가 다른가?

그동안의 가상머신(VM)을 올려 쓰던 서버와 다른 점:

VM vs Container

서버- Hypervisor위에 VM들을 올리기 vs 서버- Host OS - Docker Engine - Container들 올리기

자원을 필요한 만큼 격리하여 컨테이너에 할당 (= 운영체제와 자원 공유) => 효율적! 배포가 빠름! but 컨테이너 하나가 쳐묵쳐묵하면 장애 발생.

기존 vm은 가상머신의 모든 자원을 사용하던것

 

 

쿠버네티스

쿠버네티스는 '컨테이너 오케스트레이션 툴'이다.

다른 컨테이너 오케스트레이션 툴로는 '도커 스웜', 'ECS', 'Nomad'등이 있다.

* 오케스트레이션이란? 컨테이너를 스케줄링/ 클러스터링/ 서비스 디스커버리/ 로깅 및 모니터링 하는 것

쿠버네티스 특징 :

점진적 업데이트 제공 -> 서비스 중단 없이 업데이트 가능

특정 컨테이너가 죽었다면 즉각 그 컨테이너를 복제 생성해서 서비스를 유지한다. (= self healing)

마이크로서비스

거대한 어플리케이션을 기능별로 나누어 변경/조합이 가능하게 한 것

컨테이너를 사용하면 하나의 큰 어플을 서비스 단위로 잘라 빠르게 배포 가능.

그리고 각각 분리해서 쓰니 변경사항이 분리된 다른 기능들에 영향 미치지 않음.

클래스 분리하는거랑 비슷한 개념인가보다.

micro service architecture

 

 

참고

삼성SDS:: 초보자를 위한 쿠버네티스

배달의민족:: 쿠버네티스를 이용해 테스팅 환경 구현해보기

IBM:: 컨테이너와 쿠버네티스 쉽게 이해하기 - 좋음

subicura:: 쿠버네티스 시작하기 - 좋음

쿠버네티스:: 쿠버네티스란 무엇인가

subicura;: 초보자를 위한 도커 안내서

도커 무작정 따라하기

매모

도커 아파치 구축

도커 컨테이너 디렉토리 구조 확인

httpd 사용법



출처: https://conservative-vector.tistory.com/entry/쿠버네티스와-도커의-차이 [에움길]

2020년 5월 27일 수요일

Nexus 7000 Initial Startup System Verification

http://kim10322.blog.me/150156885676



Initial Startup System Verification 

 

이번 장에서는 Nexus 7010 스위치 기본 정보 확인에 대해서 알아보도록 하겠습니다.

 

 

1. 'show version' 명령어를 이용한 Software Version 정보 확인

 

N7K-2-VDC-1# show version
Cisco Nexus Operating System (NX-OS) Software <- NX-OS 소프트웨어 정보 확인
TAC support: http://www.cisco.com/tac
Documents: http://www.cisco.com/en/US/products/ps9372/tsd_products_support_serie
s_home.html
Copyright (c) 2002-2011, Cisco Systems, Inc. All rights reserved.
The copyrights to certain works contained in this software are
owned by other third parties and used and distributed under
license. Certain components of this software are licensed under
the GNU General Public License (GPL) version 2.0 or the GNU
Lesser General Public License (LGPL) Version 2.1. A copy of each
such license is available at
http://www.opensource.org/licenses/gpl-2.0.php and
http://www.opensource.org/licenses/lgpl-2.1.php

Software
  BIOS:      version 3.22.0
  kickstart: version 6.0(1) <- NX-OS 버전 확인
  system:    version 6.0(1) <- NX-OS 버전 확인
  BIOS compile time:       02/20/10
  kickstart image file is: bootflash:///n7000-s1-kickstart.6.0.1.bin <- NX-OS 파일 저장 위치 확인
  kickstart compile time:  12/25/2020 12:00:00 [10/19/2011 12:00:34]
  system image file is:    bootflash:///n7000-s1-dk9.6.0.1.bin <- NX-OS 파일 저장 위치 확인
  system compile time:     9/25/2011 2:00:00 [10/19/2011 13:42:59]


Hardware
  cisco Nexus7000 C7010 (10 Slot) Chassis ("Supervisor module-1X")
  Intel(R) Xeon(R) CPU         with 4104304 kB of memory. <- 시스템 CPU 및 DRAM 용량 확인
  Processor Board ID JAF1606APAE

  Device name: N7K-2-VDC-1
  bootflash:    2048256 kB <- Bootflash 용량 확인
  slot0:              0 kB (expansion flash) <- Expansion Flash 용량 확인

Kernel uptime is 0 day(s), 1 hour(s), 16 minute(s), 27 second(s) <- 시스템 구동 시간 확인

Last reset at 148581 usecs after  Mon Dec 17 04:59:22 2012

  Reason: Reset Requested by CLI command reload
  System version: 6.0(1)
  Service:

plugin
  Core Plugin, Ethernet Plugin


CMP (Module 5) ok
 CMP Software
  CMP BIOS version:        02.01.05
  CMP Image version:       6.0(1) [build 6.0(0.66)]
  CMP BIOS compile time:   8/ 4/2008 19:39:40
  CMP Image compile time:  9/25/2011 2:00:00

 

 



2. 'show hardware fabric-utilization' 명령어를 이용한 패브릭 대역폭 정보 확인 

 

N7K-2-VDC-1# show hardware fabric-utilization
------------------------------------------------
Slot        Total Fabric        Utilization
              Bandwidth         Ingress % Egress %
------------------------------------------------
1             138 Gbps           0.00          0.00  <- 46G x 패프릭 3개
5              69 Gbps           0.00          0.00  <- SE - 23G x 패프릭 3개 

 

 





3. 'show boot' 명령어를 이용한 Boot 내용 정보 확인

 

N7K-2-VDC-1# show boot
Current Boot Variables:

sup-1
kickstart variable = bootflash:/n7000-s1-kickstart.6.0.1.bin
system variable = bootflash:/n7000-s1-dk9.6.0.1.bin

Boot Variables on next reload:

sup-1
kickstart variable = bootflash:/n7000-s1-kickstart.6.0.1.bin
system variable = bootflash:/n7000-s1-dk9.6.0.1.bin 

 

 

4. 'show bootflash:' 명령어를 이용한 Bootflash에 저장된 파일 정보 확인

 

N7K-2-VDC-1# dir bootflash:
        328      May 03 00:59:41 2012  MDS20120501190914247.lic <- 라이센스
        330      May 03 01:00:01 2012  MDS20120501191529773.lic <- 라이센스
       4310      Jul 04 17:28:52 2012  VDC_1_CONFIG0704
       4096      Dec 17 23:35:53 2012  lost+found/
  201314850    Feb 22 20:36:38 2012  n7000-s1-dk9.6.0.1.bin <- NX-OS
   29588480    Feb 22 20:35:11 2012  n7000-s1-kickstart.6.0.1.bin <- NX-OS
      12180     Nov 28 15:45:33 2011  setup
       4096     Aug 10 15:17:35 2011  sup-local/
       9250     Aug 10 15:22:25 2011  test
       2607     May 11 09:09:32 2012  test_config
       4377     May 11 09:41:26 2012  vdc1-config
       4096     Dec 06 07:26:09 2012  vdc_2/
       4096     Dec 17 05:30:14 2012  vdc_3/
       4096     Dec 17 06:07:42 2012  vdc_4/

Usage for bootflash://sup-local
  359104512 bytes used
 1494011904 bytes free
 1853116416 bytes total 

 

 

5. 'show license usage' 명령어를 이용한 라이센서 사용 유무 정보 확인

 

N7K-2-VDC-1# show license usage
Feature                                          Ins  Lic   Status Expiry Date Comments
                                                         Count
--------------------------------------------------------------------------------
MPLS_PKG                                     No    -   Unused               -
STORAGE-ENT                               No    -    Unused               -
ENTERPRISE_PKG                          No    -    Unused               -
FCOE-N7K-F132XP                          No    0   Unused               -
ENHANCED_LAYER2_PKG                No    -   Unused                -
SCALABLE_SERVICES_PKG             No    -   Unused                -
TRANSPORT_SERVICES_PKG           No    -   Unused                -
LAN_ADVANCED_SERVICES_PKG     Yes   -   In use Never         -   <- 현재 활성화된 라이센스
LAN_ENTERPRISE_SERVICES_PKG   Yes   -   Unused Never       -
-------------------------------------------------------------------------------- 

 

 

6. 'show license' 명령어를 이용한 라이센서 파일 정보 확인 

 

N7K-2-VDC-1# show license
MDS20120501190914247.lic: <- 라이센스
SERVER this_host ANY
VENDOR cisco
INCREMENT LAN_ADVANCED_SERVICES_PKG cisco 1.0 permanent uncounted \
        VENDOR_STRING=<LIC_SOURCE>MDS_SWIFT</LIC_SOURCE><SKU>L-N7K-ADV1K9=</SKU> \
        HOSTID=VDH=JAF1547ATMB \ <- 호스트 ID
        NOTICE="<LicFileID>20120501190914247</LicFileID><LicLineID>1</LicLineID> \
        <PAK>3111J75B9B4</PAK>" SIGN=043E0E5E79CA

MDS20120501191529773.lic: <- 라이센스
SERVER this_host ANY
VENDOR cisco
INCREMENT LAN_ENTERPRISE_SERVICES_PKG cisco 1.0 permanent uncounted \
        VENDOR_STRING=<LIC_SOURCE>MDS_SWIFT</LIC_SOURCE><SKU>L-N7K-LAN1K9=</SKU> \
        HOSTID=VDH=JAF1547ATMB \ <- 호스트 ID
        NOTICE="<LicFileID>20120501191529773</LicFileID><LicLineID>1</LicLineID> \
        <PAK>3111J6C0ACD</PAK>" SIGN=DEFE450889CC 

 

 

7. 'show inventory:' 명령어를 이용한 Nexus 7010 스위치 모듈 및 Power Supply 정보 확인  

 

N7K-2-VDC-1# show inventory
NAME: "Chassis",  DESCR: "Nexus7000 C7010 (10 Slot) Chassis "   
PID: N7K-C7010           ,  VID: V02 ,  SN: JAF1547ATMB         

NAME: "Slot 1",  DESCR: "10/100/1000 Mbps Ethernet XL Module"  
PID: N7K-M148GT-11L      ,  VID: V02 ,  SN: JAF1601ABCF         

NAME: "Slot 5",  DESCR: "Supervisor module-1X"                 
PID: N7K-SUP1            ,  VID: V14 ,  SN: JAF1606APAE         

NAME: "Slot 11",  DESCR: "Fabric card module"                   
PID: N7K-C7010-FAB-1     ,  VID: V04 ,  SN: JAF1601AKND         

NAME: "Slot 12",  DESCR: "Fabric card module"                   
PID: N7K-C7010-FAB-1     ,  VID: V04 ,  SN: JAF1601AKNQ         

NAME: "Slot 13",  DESCR: "Fabric card module"                   
PID: N7K-C7010-FAB-1     ,  VID: V04 ,  SN: JAF1601AKSF         

NAME: "Slot 33",  DESCR: "Nexus7000 C7010 (10 Slot) Chassis Power Supply"
PID: N7K-AC-6.0KW        ,  VID: V02 ,  SN: AZS155100B0         

NAME: "Slot 34",  DESCR: "Nexus7000 C7010 (10 Slot) Chassis Power Supply"
PID: N7K-AC-6.0KW        ,  VID: V02 ,  SN: AZS155100AE         

NAME: "Slot 36",  DESCR: "Nexus7000 C7010 (10 Slot) Chassis Fan Module"
PID: N7K-C7010-FAN-S     ,  VID: V01 ,  SN: FLN160102QD         

NAME: "Slot 37",  DESCR: "Nexus7000 C7010 (10 Slot) Chassis Fan Module"
PID: N7K-C7010-FAN-S     ,  VID: V01 ,  SN: FLN160102K2         

NAME: "Slot 38",  DESCR: "Nexus7000 C7010 (10 Slot) Chassis Fan Module"
PID: N7K-C7010-FAN-F     ,  VID: V02 ,  SN: FOX1543XAE4         

NAME: "Slot 39",  DESCR: "Nexus7000 C7010 (10 Slot) Chassis Fan Module"
PID: N7K-C7010-FAN-F     ,  VID: V02 ,  SN: FOX1543XAE0         

 

 

8. 'show redundancy status' 명령어를 이용한 Supervisor Redundancy 정보 확인

 

N7K-2-VDC-1# show redundancy status
Redundancy mode
---------------
      administrative:   HA
         operational:   None

This supervisor (sup-5)   <- Supervisor Engine 정보 확인
-----------------------
    Redundancy state:   Active
    Supervisor state:   Active
      Internal state:   Active with no standby

Other supervisor (sup-6) <- Supervisor Engine 정보 확인(현재 없음)
------------------------
    Redundancy state:   N/A

    Supervisor state:   N/A
      Internal state:   N/A

System start time:          Mon Dec 17 23:39:26 2012

System uptime:              0 days, 0 hours, 26 minutes, 37 seconds
Kernel uptime:              0 days, 0 hours, 30 minutes, 58 seconds
Active supervisor uptime:   0 days, 0 hours, 26 minutes, 37 seconds 

 

 

9. 'show module' 명령어를 이용한 Module Status 정보 확인

 


N7K-2-VDC-1# show module




모듈 번호  포트 개수    모듈타입                                                      모델명                                 모듈상태
Mod          Ports        Module-Type                                                Model                                 Status
------     --------    --------------------------------------- ----- --------------------------- ------------
1            48              10/100/1000 Mbps Ethernet XL Module               N7K-M148GT-11L                 ok
5             0               Supervisor module-1X                                      N7K-SUP1                           active *
6             0               Supervisor module-1X                                      N7K-SUP1                           ha-standby
7             48             1000 Mbps Optical Ethernet XL Module               N7K-M148GS-11L                 ok

Mod  Sw                  Hw
---  --------------  ------
1      6.0(1)               1.2    
5      6.0(1)               2.1    


Mod  MAC-Address(es)                               Serial-Num
---  --------------------------------------  ----------
1    f0-f7-55-0c-fc-08 to f0-f7-55-0c-fc-3c        JAF1601ABCF
5    6c-9c-ed-46-89-08 to 6c-9c-ed-46-89-10   JAF1606APAE 

 

Mod  Online Diag Status
---  ------------------
1     Pass
5     Pass 

 

Xbar Ports  Module-Type                                  Model                   Status
---  -----  ----------------------------------- ------------------ ----------
1      0       Fabric Module 1                               N7K-C7010-FAB-1    ok
2      0       Fabric Module 1                               N7K-C7010-FAB-1    ok
3      0       Fabric Module 1                               N7K-C7010-FAB-1    ok 

 

Xbar Sw                  Hw
---  --------------  ------
1     NA                   1.1    
2     NA                   1.1    
3     NA                   1.1    


Xbar MAC-Address(es)                                Serial-Num
---  --------------------------------------  ----------
1     NA                                                       JAF1601AKND
2     NA                                                       JAF1601AKNQ
3     NA                                                       JAF1601AKSF

 

* this terminal session

 

 

만약, 특정 모듈을 재부팅하려면 다음과 같은 명령어를 사용합니다.

 

N7K-2-VDC-1#reload module 1

 

또는

 

N7K-2-VDC-1(config)#poweroff module 1 

 

 

10. 'show environment' 명령어를 이용한 Power Status 정보 확인

 

N7K-2-VDC-1# show environment
Power Supply:
Voltage: 50 Volts
Power                                    Actual        Total
Supply    Model                       Output       Capacity       Status
                                             (Watts )     (Watts )
-------  -------------------  -----------  -----------  --------------
1           N7K-AC-6.0KW             314 W        3000 W        Ok       
2           N7K-AC-6.0KW             244 W        3000 W        Ok       
3           ------------                0 W           0 W            Absent   


                                             Actual       Power     
Module    Model                      Draw        Allocated       Status
                                            (Watts )     (Watts )    
-------  -------------------  -----------  -----------  --------------
1          N7K-M148GT-11L         292 W         400 W          Powered-Up
5          N7K-SUP1                   N/A           210 W           Powered-Up
6          supervisor                   N/A           210 W          Absent
Xb1      N7K-C7010-FAB-1         N/A           80 W           Powered-Up
Xb2      N7K-C7010-FAB-1         N/A           80 W           Powered-Up
Xb3      N7K-C7010-FAB-1         N/A           80 W           Powered-Up
Xb4      xbar                            N/A           80 W           Absent
Xb5      xbar                            N/A           80 W           Absent
fan1     N7K-C7010-FAN-S         67 W         720 W           Powered-Up
fan2     N7K-C7010-FAN-S         67 W         720 W           Powered-Up
fan3     N7K-C7010-FAN-F          7 W         120 W           Powered-Up
fan4     N7K-C7010-FAN-F          7 W         120 W           Powered-Up

N/A - Per module power not available


Power Usage Summary:
--------------------
Power Supply redundancy mode (configured)                  PS-Redundant
Power Supply redundancy mode (operational)                 Non-Redundant

Total Power Capacity (based on configured mode)           6000 W
Total Power of all Inputs (cumulative)                              6000 W
Total Power Output (actual draw)                                   558 W
Total Power Allocated (budget)                                      2900 W
Total Power Available for additional modules                   3100 W

Clock:
----------------------------------------------------------
Clock           Model                 Hw         Status
----------------------------------------------------------
A               Clock Module         --         NotSupported/None
B               Clock Module         --         NotSupported/None


Fan:
------------------------------------------------------
Fan                  Model                       Hw         Status
------------------------------------------------------
Fan1(sys_fan1)  N7K-C7010-FAN-S      1.1          Ok 
Fan2(sys_fan2)  N7K-C7010-FAN-S      1.1          Ok 
Fan3(fab_fan1)  N7K-C7010-FAN-F       1.1          Ok 
Fan4(fab_fan2)  N7K-C7010-FAN-F       1.1          Ok 
Fan_in_PS1       --                             --           Ok            
Fan_in_PS2       --                             --           Ok            
Fan_in_PS3       --                             --           Absent        
Fan Air Filter :  Absent


Temperature:
--------------------------------------------------------------------
Module   Sensor        MajorThresh   MinorThres   CurTemp     Status
                                   (Celsius)     (Celsius)    (Celsius)        
--------------------------------------------------------------------
1        CPU     (s4)         115             95                38         Ok            
1        Crossbar(s5)       105             95                33         Ok            
1        CTSdev4 (s9)      115             105                52         Ok            
1        CTSdev5 (s10)     115             105               48         Ok            
1        CTSdev7 (s12)     115             105               47         Ok            
1        CTSdev9 (s14)     115             105               44         Ok            
1        CTSdev10(s15)     115             105              45         Ok            
1        CTSdev11(s16)     115             105              42         Ok            
1        CTSdev12(s17)     115             105              40         Ok            
1        QEng1Sn1(s18)     115             105              44         Ok            
1        QEng1Sn2(s19)     115             105              42         Ok            
1        QEng1Sn3(s20)     115             105              41         Ok            
1        QEng1Sn4(s21)     115             105              41         Ok            
1        L2Lookup(s22)      120             110              38         Ok            
1        L3Lookup(s23)      120             110              48         Ok            
5        Intake  (s3)           60              42               16         Ok            
5        EOBC_MAC(s4)    105             95               35         Ok            
5        CPU     (s5)          105             95               28         Ok            
5        Crossbar(s6)        105             95               41         Ok            
5        Arbiter (s7)           110             100             42         Ok            
5        CTSdev1 (s8)        115             105             31         Ok            
5        InbFPGA (s9)        105             95              32         Ok            
5        QEng1Sn1(s10)     115             105             38         Ok            
5        QEng1Sn2(s11)     115             105             37         Ok            
5        QEng1Sn3(s12)     115             105             34         Ok            
5        QEng1Sn4(s13)     115             105             35         Ok            
xbar-1   Intake  (s2)         60              42              17         Ok            
xbar-1   Crossbar(s3)      105             95              38         Ok            
xbar-2   Intake  (s2)         60              42              17         Ok            
xbar-2   Crossbar(s3)      105             95              36         Ok            
xbar-3   Intake  (s2)         60              42              16         Ok            
xbar-3   Crossbar(s3)      105             95              38         Ok      

 

 

11. 'show run' 명령어를 이용한 'Running-Config' 설정 내용 확인

 

N7K-2-VDC-1# sh run

!Command: show running-config
!Time: Tue Dec 18 00:08:57 2012

version 6.0(1)
hostname N7K-2-VDC-1 <- 호스트 네임
vdc N7K-2-VDC-1 id 1 <- VDC-1
  limit-resource module-type m1 f1 m1xl
  allocate interface Ethernet1/7-31,Ethernet1/35-41,Ethernet1/45-48
  limit-resource vlan minimum 16 maximum 4094
  limit-resource monitor-session minimum 0 maximum 2
  limit-resource monitor-session-erspan-dst minimum 0 maximum 23
  limit-resource vrf minimum 2 maximum 4096
  limit-resource port-channel minimum 0 maximum 768
  limit-resource u4route-mem minimum 96 maximum 96
  limit-resource u6route-mem minimum 24 maximum 24
  limit-resource m4route-mem minimum 58 maximum 58
  limit-resource m6route-mem minimum 8 maximum 8
vdc VDC-2 id 2 <- VDC-2 
  limit-resource module-type m1 f1 m1xl
  allocate interface Ethernet1/1,Ethernet1/3,Ethernet1/32,Ethernet1/42
  boot-order 1
  limit-resource vlan minimum 16 maximum 4094
  limit-resource monitor-session minimum 0 maximum 2
  limit-resource monitor-session-erspan-dst minimum 0 maximum 23
  limit-resource vrf minimum 2 maximum 4096
  limit-resource port-channel minimum 0 maximum 768
  limit-resource u4route-mem minimum 8 maximum 8
  limit-resource u6route-mem minimum 4 maximum 4
  limit-resource m4route-mem minimum 8 maximum 8
  limit-resource m6route-mem minimum 5 maximum 5
vdc VDC-3 id 3 <- VDC-3
  limit-resource module-type m1 f1 m1xl
  allocate interface Ethernet1/2,Ethernet1/5,Ethernet1/33,Ethernet1/43
  boot-order 1
  limit-resource vlan minimum 16 maximum 2048
  limit-resource monitor-session minimum 0 maximum 2
  limit-resource monitor-session-erspan-dst minimum 0 maximum 23
  limit-resource vrf minimum 2 maximum 2048
  limit-resource port-channel minimum 0 maximum 512
  limit-resource u4route-mem minimum 8 maximum 8
  limit-resource u6route-mem minimum 4 maximum 4
  limit-resource m4route-mem minimum 3 maximum 3
  limit-resource m6route-mem minimum 5 maximum 5
vdc VDC-4 id 4 <- VDC-4 
  limit-resource module-type m1 f1 m1xl
  allocate interface Ethernet1/4,Ethernet1/6,Ethernet1/34,Ethernet1/44
  boot-order 1
  limit-resource vlan minimum 16 maximum 4094
  limit-resource monitor-session minimum 0 maximum 2
  limit-resource monitor-session-erspan-dst minimum 0 maximum 23
  limit-resource vrf minimum 2 maximum 4096
  limit-resource port-channel minimum 0 maximum 768
  limit-resource u4route-mem minimum 8 maximum 8
  limit-resource u6route-mem minimum 4 maximum 4
  limit-resource m4route-mem minimum 8 maximum 8
  limit-resource m6route-mem minimum 5 maximum 5

feature telnet
feature interface-vlan

username admin password 5 $1$sLAt/RhC$l6n7DSlWC57tnKYk/ObBd/  role network-admin <-  Username/Password
ip domain-lookup
copp profile strict
snmp-server user admin network-admin auth md5 0xbb3d7f080dc57a471ea9b0c04c1bc4fe priv 0xbb3d7f080dc57
a471ea9b0c04c1bc4fe localizedkey
rmon event 1 log trap public description FATAL(1) owner PMON@FATAL
rmon event 2 log trap public description CRITICAL(2) owner PMON@CRITICAL
rmon event 3 log trap public description ERROR(3) owner PMON@ERROR
rmon event 4 log trap public description WARNING(4) owner PMON@WARNING
rmon event 5 log trap public description INFORMATION(5) owner PMON@INFO

vrf context management
vlan 1

interface Vlan1

interface cmp-mgmt module 5 <-  Supervisor Engine I CMP 관리 포트
      ip address 10.2.1.5 255.255.255.0
      ip default-gateway 10.2.1.1
interface cmp-mgmt module 6 <- Supervisor Engine I CMP 관리 포트 
      ip address 10.2.1.6 255.255.255.0
      ip default-gateway 10.2.1.1


interface Ethernet1/7

interface Ethernet1/8

interface Ethernet1/9

interface Ethernet1/10

interface Ethernet1/11

interface Ethernet1/12

interface Ethernet1/13

interface Ethernet1/14

interface Ethernet1/15

interface Ethernet1/16

interface Ethernet1/17

interface Ethernet1/18

interface Ethernet1/19

interface Ethernet1/20

interface Ethernet1/21

interface Ethernet1/22

interface Ethernet1/23

interface Ethernet1/24

interface Ethernet1/25

interface Ethernet1/26

interface Ethernet1/27

interface Ethernet1/28

interface Ethernet1/29

interface Ethernet1/30

interface Ethernet1/31

interface Ethernet1/35

interface Ethernet1/36

interface Ethernet1/37

interface Ethernet1/38

interface Ethernet1/39

interface Ethernet1/40

interface Ethernet1/41

interface Ethernet1/45

interface Ethernet1/46

interface Ethernet1/47

interface Ethernet1/48

interface mgmt0 <- 관리용 인터페이스
  ip address 10.2.1.14/24
line console
line vty
boot kickstart bootflash:/n7000-s1-kickstart.6.0.1.bin sup-1
boot system bootflash:/n7000-s1-dk9.6.0.1.bin sup-1
boot kickstart bootflash:/n7000-s1-kickstart.6.0.1.bin sup-2
no system default switchport shutdown
 



 

기본적인 시스템 정보 확인은 Cisco IOS 장비와 다른점은 없는거 같습니다. 단, 대형 장비이기때문에 Cisco Catalyst 6500 스위치처럼 슈퍼바이저 엔진 모듈, 패브릭 모듈, 이더넷 모듈, 파워 서플라이에 대한 정보 확인만 잘하시면 될듯합니다.