Google

«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
BLOG Total Visitors
Today Hit, Yesterday Hit
BLOG main image


visitor stats
'study'에 해당되는 글 51건
[Schizo!, 2009. 6. 27. 13:25, study]

 

 

 

 

 

 

 

삼국지위서동이전(三國志魏書東夷傳)

                                                      97학년도 제2학년 제2조
최영숙. 오현주. 오경임. 김은숙. 황준석. 윤정수

<삼국지(三國志)>는 중국(中國)의 삼국시대(三國時代) 역사(歷史)를 기록(記錄)한 책(冊)으로, 중국(中國) 정사(正史)의 하나입니다.  <삼국지(三國志)>는 위서(魏書)가 서른 권, 촉서(蜀書)가 열다섯 권, 오서(誤書)가 스무 권으로 되어 있습니다.  위서동이전(魏書東夷傳)은 서진의 진수(陳壽)가 편찬한 <삼국지(三國志)>의 위서(魏書)에 속해 있는 것으로 고대동방(古代東方)의 여러 나라와 겨레에 관한 기록(記錄)입니다. 
위서(魏書)는 총 서른 권 가운데 기(紀)가 네 권, 열전(列傳)이 스물여섯 권인데 동이전(東夷傳)은 제일 마지막 권 30의 오환(烏丸)․선비(鮮卑) 다음에 실려 있습니다.  동이전(東夷傳)을 구성함에 있어서 가장 많이 의존한 것은 사찬(私纂) 어환(魚煥)의 <위략(魏略)>이었습니다.  따라서 동이전(東夷傳)의 구성도 위략(魏略)과 거의 같습니다. 
삼국지위서동이전(三國志魏書東夷傳)은 서(序)․부여(夫餘)․고구려(高句麗)․동옥저(東沃沮)․읍루(挹婁)․예(濊)․한(韓)․왜인(倭人)의 순서로 되어 있습니다.  서(序)에서는 중국인의 입장에서 주변 겨레들에 대한 관심을 갖는 이유를 간단히 적고 있습니다.  부여(夫餘)에는 부여의 위치, 영역, 풍습, 산물들에 관한 자세한 기록과 함께 순장(徇葬) 풍습에 대해 기록이 있습니다.  고구려(高句麗)에는 관제, 제천행사, 혼인풍속들을 적고 중국과 고구려의 관계를 후한 때부터 상세히 적고 있습니다.  초기 고구려 사회에 대한 <삼국사기(三國史記)>의 기록(記錄)을 보완할 수 있는 중요한 자료가 됩니다.  동옥저(東沃沮)에는 고조선(古朝鮮)에 복속(服屬)했던 사실, 한군현과의 관계, 고구려에 복속한 사실들과 풍속을 적고 있습니다.  그 다음으로 읍루(挹婁) 겨레의 습속을 적고, 책화(責禍) 풍습과 과하마(果下馬)로 유명한 예(濊) 겨레의 삶의 모습을 적고 있습니다.  한(韓)은 마한(馬韓), 진한(辰韓), 변한(弁韓)의 모습을 적고 있습니다.  삼한소국(三韓小國)의 명칭을 열거하고 신지(臣智), 읍차(邑次)와 같은 소국 수장(首長)들의 명칭과 한군현과의 관계에서 생겨 난 칭호들을 싣고 있습니다.  왜인(倭人)에는 대방군(帶方郡)에서 야마다이국<사마대국(邪馬臺國)>에 이르는 길을 적고, 당시 왜인(倭人)들의 정치와 사회의 모습을 적었습니다.
이처럼 <삼국지위서동이전(三國志魏書東夷傳)>은 우리 고대 겨레들이 살았던 모습과 풍속외에도 여러 가지 사실들을 제법 상세히 전한다는 것에서 우리 고대사(古代史)의 연구에 중요한 문헌입니다.  부여의 영고(迎鼓), 고구려의 동맹(同盟), 예의 무천(舞天), 삼한의 오월제(五月祭)․시월제(十月祭)와 같은 농경의례(農耕儀禮) 모습과 정치조직의 발전정도를 알 수 있게 하였습니다.  그러나 동이전(東夷傳)은 어디까지나 다른 겨레인 중국인의 눈에 비친 모습과 특징에 관한 기록이라 한계가 있습니다.  그리고 동이전(東夷傳)에 묘사된 사회상은 대략 삼세기 무렵이지만, 때로 훨씬 이전의 것도 포함되어 있어 모두를 같은 시기의 것들로 보기 어렵습니다.  그러나 <삼국지위서동이전(三國志魏書東夷傳)>은 동방 겨레들에 관한 최고(最古)의 기록으로서 동방 고대사의 연구에 유일한 사료(史料)일 것입니다.

 

 


부여전
부여(夫餘). 재장성지북(在長城之北). 거현도천리(去玄菟千里). 남여고구려(南與高句麗). 동여읍루(東與挹婁). 서여선비접(西與鮮卑接). 북유약수(北有弱水). 방가이천리(方可二千里). 호팔만(戶八萬). 기민토저(其民土著). 유궁실창고뢰옥(有宮室創庫牢獄).다산릉광택(多山陵廣澤). 어동이지역최평창(於東夷之域最平敞). 토지의오곡(土地宜五穀). 불생오과(不生五果). 기인추대(其人麤大). 성강용근후(性强勇謹厚). 불구초(不寇鈔). 국유군왕(國有君王). 개이육축명관(皆以六畜名官).유마가(有馬加)․우가(牛加)․저가(豬加)․구가(狗加)․견사(犬使)․견사자․사자(犬使者․使者). 읍락유호민(邑落有豪民). 민하호(民下戶). 개위노복(皆爲奴僕). 제가별주사출도(諸加別主四出道). 대자주수천가(大者主數千家). 소자수백가(小者數百家). 식음개용조두(食飮皆用俎豆). 회동배작세작(會同拜爵洗爵). 읍양승강(揖讓升降). 이은정월제천(以殷正月祭天). 국중대회(國中大會). 연일음식가무(連日飮食歌舞). 명왈영고(名曰迎鼓). 어시시단형옥(於是時斷刑獄). 해인도(解人徒). 재국의상백(在國衣尙白). 백포대몌포고(白布大袂袍袴). 리혁탑(履革鞜). 출국즉상증수금계(出國則尙繒繡錦罽). 대인가호리유백흑초지구(大人加狐狸狖白黑貂之裘). 이금은식모(以金銀飾冒). 역인전사개궤(譯人傳辭皆跪). 수거지절어(手據地竊語). 용형엄급(用刑嚴急). 살인자사(殺人者死). 몰기가인노비(沒其家人奴婢). 절도일책십이(竊盜一責十二). 남녀음(男女淫). 부인투(婦人妒). 개살지(皆殺之). 우증투(尤憎妒). 이살(已殺). 시지국남산상(尸之國南山上). 지부란(至腐爛). 여가욕득(女家欲得). 수우마내여지(輸牛馬乃與之). 형사처수(兄死妻嫂). 여흉노동속(與匈奴同俗). 기국선양생(其國善養牲). 출명마역옥초유미주(出名馬亦玉貂狖美珠). 주대자여산조(珠大者如酸棗). 이궁시도모위병(以弓矢刀矛爲兵). 가가자유개장(家家自有鎧仗). 국지기로자설(國之耆老自說). 고지망인(古之亡人). 작성책개원(作城柵皆員). 유사뢰옥(有似牢獄). 행도주야(行道晝夜). 무로유개가(無老幼皆歌). 통일성불절(通日聲不絶). 유군사역제천(有軍事亦祭天). 살우관제(殺牛觀祭). 이점길흉(以占吉凶). 제해자위흉(蹄解者爲凶). 합자위길(合者爲吉). 유적제가자전(有敵諸加自戰). 하호구담양(下戶俱擔糧). 식음지(食飮之). 기사하월개용빙(其死夏月皆用冰). 살인순장(殺人徇葬). 다자백수(多者百數). 후장유관무곽(厚葬有棺無槨).  위략왈(魏略曰). 기속정상오월(其俗亭喪五月). 이구위영(以久爲榮). 기제망자(其祭亡者). 유생유숙(有生有熟). 상주불욕속(喪主不欲速). 이타인강지(而他人强之). 상쟁인(常諍引). 이차위절(以此爲節). 기거상남여개순백(其居喪男女皆純白). 부인자포면의(婦人者布面衣). 거환패(去環佩). 대체여중국상방불야(大體與中國相彷彿也).  부여본속현도(夫餘本屬玄菟). 한말공손도웅장해동(漢末公孫度雄張海東). 위복외이(威服外夷). 부여왕위구태(夫餘王尉仇台). 경속요동(更屬遼東). 시구려(時句麗). 선비강(善卑彊). 도이부여재이로지간(度以夫餘在二虜之間). 처이종녀(妻以宗女). 위구태사(尉仇台死). 간위거립(簡位居立). 무적자(無適子). 유얼자마여(有孼子麻余) 위거사(位居死) 제가공립마여(諸加共立麻余) 우가형자명위거(牛加兄子名位居) 위견사(爲犬使) 경재선시(輕財善施) 국인부지(國人附之) 세세유사예경도공헌(歲歲遺使詣京都貢獻) 정시중(正始中) 유주자사모구검토구려(幽州刺史母丘儉討句麗) 유현토태수왕기예부여(遺玄菟太守王頎詣夫餘) 위거유견가교영공군량(位居遺犬加郊迎供軍糧) 계부우가유이심(季父牛加有二心) 위거살계부부자(位居殺季父父子) 적몰재물(籍沒財物) 유사부렴송관(遺使簿斂送官) 구부여속(舊夫餘俗) 수한부조(水旱不調) 오곡불숙(五穀不熟) 첩귀구어왕(輒歸咎於王) 혹언당역(或言當易) 혹언당살(或言當殺) 마여사(麻余死) 기자의려연육세(其子依慮年六歲) 입이위왕(立以爲王) 한시부여왕장용옥갑(漢時夫餘王葬用玉匣) 상예이부현도군(常豫以付玄菟郡) 왕사즉영취이장(王死則迎取以葬) 공손연주(公孫淵誅) 현도고유유옥갑일구(玄菟庫猶有玉匣一具) 금부여고유옥벽(今夫餘庫有玉璧)․찬수대지물(瓚數代之物) 전세이위보(傳世以爲寶) 기로언선대지소사야(耆老言先代之所賜也)   위략왈(魏略曰) 기국은부(其國殷富) 자선세이래(自先世以來) 미상파양(未嘗破壤)  기인문언(其印文言)『예왕지인(濊王之印)』 국유고성명예성(國有故城名濊城) 개본예맥지지(蓋本濊貊之地) 이부여왕기중(而夫餘王其中) 자위(自謂)『망인(亡人)』 억유(抑有)(사(似))[이(以)]야(也)
위략왈(魏略曰) 구지우언(舊志又言) 석북방유고난지국자(昔北方有高亂之國者) 기왕자시비유신(其王者侍婢有身) 왕욕살지(王欲殺之) 비운(婢云) : 『유기여계자(有氣如雞子) 래하아(來下我) 고유신(故有身)』 후생자(後生子) 왕읍지어혼중(王揖之於溷中) 저이록허지(猪以㖨噓之) 사지마한(徙至馬閑) 마이기허지(馬以氣噓之) 불사(不死) 왕의이위천자야(王疑以爲天子也) 내령기모수축지(乃令其母收畜之) 명왈동명(名曰東明) 상령목마(常令牧馬) 동명선사(東明善射) 왕공탈기국야(王恐奪其國也) 욕살지(欲殺之) 동명주(東明走) 남지시엄수(南至施掩水) 이궁격수(以弓擊水) 어별부위교(魚鼈浮爲橋) 동명득도(東明得度) 어별내해산(魚鼈乃解散) 추병불득도(追兵不得渡) 동명인도왕부여지지(東明因都王夫餘之地)

부여전
부여는 장성(만리장성)의 북쪽에 있다.  그 부여는 현토군에서 천리쯤 떨어져 있다.  남쪽에 고구려, 동쪽에 읍루, 서쪽에 선비와 인접한다.  북쪽은 약수가 흐른다.  땅은 사방으로 이천리이고 호수는 팔만이다.  그 나라 사람들은 농사짓고 정착해 산다.  궁실․창고․뢰옥을 두고 있다.  ... 산과 언덕과 넓은 못이 많다. 동이 지역에서 가장 평탄하고 넓은 곳이다.  토질은 오곡이 자라기에 알맞다.  그러나 오과는 자라지 못한다.  ... 그 나라 사람들은 몸집이 크고, 성품이 굳세고 용감하고 부지런하고 후덕하다.  그래서 도둑질과 노략질이 없다.  ... 나라에는 군왕이 있다.  모두 여섯가지 가축의 이름을 관직명으로 한다.  마가․우가․저가․구가․견사․견사자는 심부름꾼(신하)이다.  읍락에는 호민이 있다.  백성은 하호라 하고, 모두 노복이다.  여러 가들은 따로 사출도를 주관한다.  큰 곳은 수천의 가를 관장하고 작더라도 수백 가를 관장한다.  ... 음식을 먹을 때 모두 나무 그릇을 쓴다.  .. 회합에서는 술에 절하고 잔을 씻으며, 읍을 하고 사양하며 (술잔을) 오르내렸다. ... 은나라의 정월에는 하늘에 제를 지내는데 나라의 가장 큰 모임으로 날마다 먹고 마시고 노래하고 춤춘다.  이를 영고라 하였다.  이때는 간옥을 그치고 죄수를 풀어 주었다.  ... 나라 안에서는 흰 색 옷을 숭상한다.  흰 베로 큰 소매의 도포와 바지를 만들어 입었고, 가죽신을 신었다.  나라 밖에서는 비단에 수를 놓은 옷이나 털옷을 입기도 했다.  대인은 여우․살쾡이․원숭이․희고 검은 담비의 가죽을 덧입기도 했다.  금은으로 모자에 장식을 했다.  역인은 말을 전할 때 모두 무릅을 꿇고 손으로 땅을 짚고 조용히 말했다.  ... 형벌은 엄급(혹독)하다.  사람을 죽인자는 사형에 처한다.  또한 그 집안 사람들을 모두 노비로 삼는다.  도둑질한 자는 그것의 열 두배를 갚아야 한다.  남녀간 음란한 짓을 한 자들은 사현에 처하고 투기한 부인도 사형에 처한다.  부인이 투기하는 것을 더 미워해서 죽인 후에는 그 시체를 남산 위에 던져두고 썩어 문드러지도록 버려둔다.  친정에서 시체를 거두려 할 때는 소와 말을 바쳐야만 한다.  형이 죽으며 형수를 아내로 삼는다.  이것은 흉노들과 다를바 없는 풍습이다.  ..  그 나라 사람들은 짐승을 잘 길렀다.  명마와 주옥, 담비와 원숭이 가죽, 미주가 난다.  큰 구슬은 대추알 크기만 하다.  활과 화살, 갈과 창을 병기로 한다.  집집마다 스스로 갑옷과 무기를 갖추고 있다.  그 나라의 늙은이들은 옛날 자신들이 망명해 왔다고 말한다.  성책은 모두 둥글게 되어 감옥처럼 보인다.  길을 가면서 늙은이․젊은이들이 밤낮을 가리지 않고 노래를 불러 하루종일 노래 소리가 그치지 않는다.  ... 전쟁이 일어나면 또한 제를 올린다.  소를 잡아 그 발굽을 살펴서 길흉을 점치는데, 발굽이 갈라지면 흉하고 붙으면 길하다고 믿는다.  적이 침입하면 가들은 모두 모여 스스로 전쟁에 참전하고 하호들은 군사들의 식량을 만들어 바친다.  ... 여름철에 사람이 죽으면 모두 얼음을 넣어 장사지내고, 사람을 죽여 순장한다.  많을 때는 백여명이나 된다. 장사를 후하게 지낼 때 관을 쓰고 곽을 쓰지 않는다.
위략왈, 그나라 습속에는 초상을 다섯달을 지낸다.  오래 될 수록 영화롭게 여긴다.  그 죽은이에게 제를 올릴 때는 날 것, 익힌 것 가리지 않고 쓴다.  상주는 상치르는 일을 빨리 하지 않으려 하나, 주변의 다른 사람들이 빨리 상을 치르라고 강요한다.  이로써 언제나 실랑이를 벌이는 것으로 예절을 삼는다. (실랑이를 벌이는 것이 예의이다.)  상중의 남녀 모두 순백의 옷을 입는다.  상주의 부인이 되는 이는 베로 만든 면의(먼 길 갈때 쓰는 얼굴 가리개)를 쓴다.  반지나 패물을 지니지 않는다.  (이것은) 대체로 중국과 더불어 서로 비슷하거나 같다.
부여는 본래 현도군에 속했다.  한말에 공손도(중국인 장군)가 해동에서 세력을 키워서 위엄으로 외이들을 복속 시켰다.  부여왕 위구태는 소속을 바꾸어 요동군에 복속했다.  이때 고구려와 선비가 강성하여, 공손도는 부여가 이들 두 나라 사이에 끼여 있음을 보고 일족의 딸을 그 부여왕에게 시집보내었다.  위구태왕이 죽고 간위거가 왕이 되었다.  간위거는 적자가 없고 서얼인 마여가 있었다.  위거가 죽고 제가들이 함께 마여를 왕으로 옹립했다.  우가의 벼슬에 있는 이의 형의 아들 이름도 위거인데, 견사가 되어서 재물을 아끼지 않고 많이 베풀어서 나라 사람들이 그를 따랐다.  해마다 위 도읍에 사신을 보내어 공물을 바쳤다.  정시(위 제왕의 연호 : 240-248년) 해 중순에 유쥬자사인 모구검이고구려를 토벌하면서 현도태수 왕기를 부여에 보냈다.  위거는 견사를 보내어서 교외에서 왕기를 맞게하고,  군량을 보내었다.  계부 우가가 딴 맘을 먹자, 계부 부자를 죽이고 그들의 재산을 깡그리 몰수하여, 조사관을 보내어 장부에 기록하여 관에 보내었다. 
옛부여의 풍속에는 장마와 가뭄이 연이어서 오곡이 익지 않을 때는 왕에게 그 허물을 물어서 혹은 왕을 바꾸거나 혹은 왕을 죽였다.  마여가 죽자 그의 아들인 여섯살박이 의려를 왕으로 삼았다.
한나라때 부여왕의  장례에는 옥갑을 썼다.  항상 현도군에 미리 가져다 두었다가 왕이 죽으면 그것을 가져다 장레를 치렀다.  공손연이 주살된 뒤에도 현도군에 창고에는 옥갑이 한구 남아 있었다.  지금 부여의 창고에는 옥으로된 벽, 규, 찬과 같은 여러가지 대를 이어 전해오는 물건이 있어 이를 보물로 여긴다.  노인들은 이를 선대의 왕께서 내리신 것(하사한 것)이라 한다. 
위략왈 그 나라는 매우 부강하여 선대로부터 일찌기 적에게 파괴된 적이 없다. 
그 도장에 「예왕지인」이란 글이 있다.  나라의 옛성의 이름이 있었는데 예성이 었다.  아마도 본래 예맥의 땅인 것을 부여가 그 가운데서 왕으로 추대되었기에 자신들을 스스로 「망인(망명한 사람)」이라고 말하는 까닭이 여기에 있는 듯 하다. 
위략왈 옛 기록에 다음과 같은 말이 있다.  옛 북방에 고리이란 나라가 있었다.  그 왕의 시녀가 임신을 하여서 왕이 그녀를 죽이려했다.  그녀는 말하기를 : “달걀과 같은 크기의 기운이 내게 내려와서 임신하였다”고 했다. 
뒤에 그녀는 아들을 낳았다.  왕은 그 아이를 돼지우리에 버렸지만, 돼지가 입김을 불어 넣어 아이가 죽지 않았다.  마굿간에 버렸으나, 말이 입김을 불어 넣어 아이가 죽지 않았다.  왕은 천제의 아들로 여겨, 그 어미에게 거두어 기르게 하고 이름을 동명이라했다.  항상 말을 기르게 하였다.  동명은 활을 잘 쏘았다.  왕은 자신의 나라를 빼앗길까봐 동명을 죽이려 했다.  동명은 남으로 달아나 시업수에 이르렀다.  활로 물을 치니 물고기와 자라가 떠올라 다리를 만들었다.  동명이 물을 건넌뒤 물고기와 자라는 흩어져 버려서 추적하던 군사는 물을 건너지 못했다.  그리해서 동명은 부여 지역에 도읍하여 왕이 되었다
<고구려전>
고구려는 요동의 동쪽 천리(의 거리)에 있다. 남쪽에는 조선, 예맥과 동쪽에는 옥저와 북쪽에는 부여와 접하고 있다. 환도의 아래에 도읍을 정하였고, 사방의 넓이가 가히 이천리 정도 되고, 호수는 삼만이다.
큰 산과 깊은 골짜기는 많으나 들판과 못은 없다. 산과 골짜기를 따라서 거처하고 산골짜기 물을 먹는다. 좋은 밭이 없어서 비록 힘껏 농사를 지어도 입과 배를 실하게 하는데는 부족했다. 그들의 습속은 음식을 아끼고 집을 치장하기를 좋아한다. 거처하는 곳의 좌우에 큰 집을 짓고 귀신에게 제사를 지낸다. 또 신성스러운 별과 토지의 신과 곡식의 신에게 제사를 지낸다. 그 사람들의 성격은 흉악하고 급하며 도둑질과 노략질하기를 좋아한다.
그 나라는 왕이 있고 관직은 상가, 대노, 패자, 고추가, 주부, 우태, 승, 사자, 조의, 선인이 있으며 (신분의) 높고 낮음이 각각 등급이 있다.
동이의 옛 말에 의하면 (고구려는) 부여의 별종인데 언어와 모든 행사들은 부여와 같은 것이 많으나 그들의 기질과 의복은 다른 점이 있다.
본래 (고구려는) 다섯 부족이 있는데 연노부, 절노부, 순노부, 관노부,, 계루부가 있다. 본래 연노부에서 왕이 되었으나 점점 (세력이) 약해져서 지금은 계루부가 그것을 대신한다.
한나라 때에는 복과 피리와 부는 재주를 가진 사람을 하사하였는데 항상 현도부에 나아가 조복과 의책을 받았고 (현도군에 있는) 고구려 수령이 그 명부를 주관하였다. 후에 점점 교만하고 방자하여 다시 현도군에 나아가지 않아서 동쪽의 경계에 작은 성을 쌓아서 그 안에 조의와 의책을 두어 해마다 와서 그것을 가지게 하였다. 지금 오랑캐(고구려)는 이 성을 책구루라 말하는 것과 같다. 구루는 고구려 사람이 성을 부르는 말이다.
그들이 관직을 두 때는 대로가 있으면 패자를 두지 않았고, 패자가 있으며 대로를 두지 않았다. 왕의 종족으로서 대가는 모두 고추가로 일컫느다. 연노부는 본래 국주였으므로 지금 비록 와이 되지 않더라도 적통이 맞는 대인은 고추가로 일컬어질 수 있었다. 또한 종묘를 세우고 신성스러운 별과 토지의 신과 곡식의 칭호를 더하였다. 모든 대가 또한 스스로 사자, 조의, 선인을 두었고 그 이름은 모두 왕에게 올렸다. (사자, 조의, 선인은 중국의) 경이나 대부의 가신과 같다. 같이 모일 때 앉거나 서거나 왕가의 사자나, 조의, 선인과 열을 같이 할 수 없었다.
그 나라의 대가는 농사를 짓지 않았기에 그냥 앉아서 먹는 사람이 만여구이다. 하호가 멀리서 쌀과 양식, 고기, 소금을 운반하여서 그들에게 공급한다.
그 백성들은 노래하고 춤추는 것을 좋아한다. 나라의 마을들은 밤이 되면 남녀들이 무리지어 모여서 서로 노래하며 논다. 큰 창고가 없고 집집마다 작은 창고가 있는데 그것을 이름하여 부경이라 한다. 그 사람들은 깨끗하고 갈무리하고 스스로 술빚는 것을 좋아한다. 꿇어앉아 절할 때는 한쪽 다리를 펴니 부여와 같지 않다. 길을 걸을 때는 모두 달음박질하듯 걷는다.
시월에 하늘에 제사를 지내는 나라의 큰 행사는 말하기를 동맹이라 하낟. 그들의 공적인 모임의 의복은 모두 비단으로 수놓았고 금은으로 장식하였다. 대가 주부는 먼저 책을 쓰는데 중국의 책과 비슷하나 뒤가 없다. 그 소가는 절풍을 쓰는데 모양이 고깔과 같다.
그 나라 동쪽에는 큰 굴이 있는데 이름하여 수혈이라 한다. 시월에 나라의 큰 행사는 수신을 맞이하고 돌아와 나라의 동쪽 위에 그것에 제사를 지내는데 나무로 만든 수신을 신의 자리에 둔다.
감옥이 없는데 죄가 있으면 제가들이 평가하고 의논하여 곧 그를 죽이고 처자를 빼앗아 노비로 삼는다.
그들의 풍속은 혼인을 할 때 말로써 이미 정하고 여자집은 큰 집 뒤에 작은 집을 짓느데 이르하여 서옥이라 한다. 사위가 날이 저물면 여자집밖에 이르러 스스로 이름을 말하고 꿇어앉아 절하며 여자와 자는 것을 이룰 수 있기를 빈다. 만일 이런 것을 두세번 하면 여자의 부모가 들어주며 작은 집안에 잘 수 있도록 해주는데 돈과 비단을 곁에 가지런히 둔다. 아들을 낳아 장성해지면 부인을 데리고 집으로 돌아간다.
그들의 풍속은 음란하다. 남녀가 이미 결혼은 하였으며 곧 조금씩 죽을 때 보낼 옷을 만들고 후하게 장사를 지낸다. 금, 은, 재물과 동은 죽을 때 보는는 데 다쓴다. 돌을 쌓아 봉분을 만들고 소나무와 잣나무를 나란히 심는다.
그 나라 말은 모두가 작아서 산을 오르는데 편리하다. 그 나라 사람들은 힘이 세고 전투에 익숙하여서 옥저와 동예가 모두 속해졌다.
또 소수맥이 있는데, 고구려는 큰 강을 의지하여 나라를 세워 거처한다. 서안평현 북쪽에 작은 강이 있는데 남쪽으로 흘러 바다로 유입된다. 고구려인의 별종이 작은 강에 의지하여 나라를 세웠는데 그것을 이름하여 말하기를 소수맥이라 한다. (거기는) 좋은 활이 나기 때문에 소위 맥궁이라고도 한다.
왕마의 초년에 고구려 군사를 뽑아내어 오랑캐를 치게 하였으나 (고구려가) 이에 행하지 않으므로 그곳에 강압적으로 보냈더니, 모두 변방을 나가 달아난 뒤 (중국의 군현을) 노략질하였다. 요서의 대윤전담이 그들을 추격하다가 (도리어 그들에게) 살해되었다. (이에 중국의) 주․군․현이 그 허물을 고구려 제후 도에게 돌렸다. 엄우가 말을 아뢰었다.
“맥인이 법을 어긴 것은 그 죄가 도에게서 미롯된 것이 아니므로 그를 안심시키고 위로해야함이 마땅합니다. 지금 외람하여 큰 죄를 씌우게 되면 그들이 마침내 반란을 일으킬까 두렵습니다.”
그러나 왕망은 말을 듣지 아니하고 우에게 (고구려를) 치도록 조서를 내렸다. 우는 (고)구려 제후 도를 만나자고 꾀어내어 그가 도착하자 목을 베어 그 머리를 보내어 장안에 이르게 했다. 왕망은 크게 기뻐하면서 천하에 펴 알리어 고구려한 이름을 고쳐 하구려라 이르게 하였다.
당시 (고구려는) 후국이 되었는데 안 공무제 8년에 고구려왕이 사신을 보내어 조공하며서부터 비로서 왕이라 일컬음을 보인다.
상제와 안계 사이에 (고)구려왕 궁이 자주 요동을 침입하였으므로 다시 현도에 속하게 되었다. 요동태수 채풍과 현도태수 요광은 궁이 두 군(고을)을 해칠 것이라 생각하여 군대를 일으켜 토벌하였다. 궁이 거짓으로 대화하기를 청하자 두 군은 진격하지 않았다. (그 틈을 이용하여) 궁은 몰래 군을 파견하여 현도를 공격하여 후성을 불사르고 요수에 침입하여 관리와 백성들을 죽였다. 그 뒤 궁(고구려 태조왕)이 다시 요동을 침범하자 채풍이 가벼이 군사들을 거느리고 추격하였다가 패하여 죽었다.
궁이 죽고 아들 백고가 왕으로 세워졌다. 순제와 환제의 사이에 다시 요동을 범하여 신안과 거향을 도둑질하고도 서안평을 공격하여 도중에서 대방령을 죽이고 낙랑태수의 처자를 노략질로 얻었다. 영제의 건영 2년에 현도태수 경림이 그들을 토벌하여 수백명의 머리를 베고, 수백명을 사로잡았다. (이에) 백고가 항복하여 요동에 복속하였다.
가평 가운데 백고는 현도군에 속하기를 빌었다. 공순도의 세력이 해동에 웅거하자 대가, 우거와 주부 선인 등을 파견해 공순도를 도와 도적을 격파였다.
백고가 죽고 두 아들이 있었는데 큰 아들은 발기, 작은 아들은 이이모였다. 발기는 아버지를 닯지 않아서 국이들과 함께 이이모를 옹립하여 왕이 되게 했다. 백고 때부터 자주 요동을 노략질하였고 또 망한 오랑캐 5백여호를 받아들였다. 건안 연간에 공순강이 군대를 보내어 그것(고구려)을 공격하여 그 나라를 격파하였고 성읍과 촌락을 불태웠다. 발기는 형이면서도 왕의 위치를 얻지 못한 것을 원망하여 연노부의 가와 함께 각기 하호 3만여명을 이끌고 나아가 강에게 투항하였다가 돌아와서 비류수에 살았다. 항복했던 호족(오랑캐)이 이이모를 다시 배반하므로 이이모는 다시 새로운 나라를 세웠다. 오늘날 있는 곳이 이곳이다. 발기는 드디어 요동으로 건너가고, 있던 아들은 고구려에 계속 머물렀는데 지금의 고추가 교위거가 그 사람이다. 그 후 다시 현도를 공격함으로 현도와 요동이 함께 반격하여 크게 격파하였다.
이이모는 아들이 없어 관노부의 여자와 사통하여 아들을 낳으니 이름이 위궁이다. 이이모가 죽자 즉위하여 왕이 되니 지금의 고구려 왕이 바로 그 사람이다. (위궁이) 증조가 이름이 궁이었는데 태어나면서부터 눈을 뜨고 사물을 보았으므로 그 나라 사람들이 (궁을) 미워하였다. (궁이) 장성새지자 과연 흉악하여 자주 (남의 나라를) 침략하다가 나라가 잔파되는 지경에 이르렀다. 지그므이 왕(위왕)도 태어나자마자 그 역시 눈을 뜨고 사람을 보았다. 구려에서는 서로 닮은 것을 위라고 부르는데 그의 증조부와 닮았기 때문에 위궁이란 이름을 지었다. 위궁은 용감하고 힘이 세었으며 말을 잘 타고 사냥에서 활을 잘 쏘았다.
경초 2년 태수 사마선황이 군대를 거느리고 공손연은 토벌하니 위궁이 주부와 대가를 파견 군사 수천명을 거느리고 (사마선왕의) 군대를 도왔다.
정시 3년에 (위)궁이 서안평을 노략질하였다. (정시)5년에는 유주자사 관구검에게 격파되었는데 그 때의 사실은 검의 열전에 실려 있다.
 


'study' 카테고리의 다른 글

진서 부여전 (원문)  (0) 2009.06.27
Final Exam - CCNA 1 Networking Basics (Version 3.1)  (1) 2008.06.14


본인의 아이피 주소 확인과 위치 추적
[Schizo!, 2009. 6. 27. 13:19, study]














 

진서(晉書) 사이전(四夷傳) 가운데 부여(夫餘) 이야기

 

夫餘國                  부여(夫餘) 나라

 

夫餘國在玄菟北千餘里    부여(夫餘)는 현도(玄菟) 북쪽 천여 리

                        되는 곳에 있다.

南接鮮卑                남쪽은 선비(鮮卑)와 이웃하고

北有弱水                북쪽에는 약수(弱水)가 있다.

地方二千里              땅이 사방 이천 리다.

戶八萬                  집이 팔 만이고

有城邑宮室              (), 마을, 궁궐(宮室)이 있다.

地宜五穀                땅에는 다섯 곡식이 잘 자란다.

其人                사람들이 굳세고 용감하다.

會同揖讓之儀有似中國    만나고 절하고 양보하는 모습이 중원(中原)

                        비슷하다.

其出使                  사신이 다른 나라에 갈 때는

乃衣錦罽                비단과 털옷을 입고

以金銀飾腰              금과 은으로 허리띠를 꾸민다.

 

其法                    나라 법에

殺人者死                사람을 죽인 자는 죽이고

沒入其家                그 집안 사람들은 모두 잡아들인다.

盜者一責十二            물건을 훔치면 하나에 대해 열 두 배로 갚게 한다.

男女淫婦人妒皆殺之      음탕한 남녀와 강샘하는 계집은 모두 죽인다.

 

若有軍事                싸움이 일어나면

殺牛祭天                소를 죽여 하늘에 제사 지내고

以其蹄占吉凶            소 발굽으로 좋고 나쁨을 점친다.

蹄解者              발굽이 갈라져 있으면 좋은 일이 일어난다고 믿고

合者                붙어 있으면 나쁜 일이 일어난다고 믿는다.  

 

死者以生人殉葬          사람이 죽으면 산 사람을 같이 묻는 순장(殉葬)

                        한다.

有槨無棺                방무덤을 쓰지 관은 쓰지 않는다.

其居喪                  장례()를 치를 때는

男女皆衣純白            남녀 모두 흰옷을 입는다.

婦人著布面衣            여자들은 천을 뒤집어 써 얼굴을 가리고

去玉佩                  옥과 패물을 버린다.

出善馬及貂美珠        훌륭한 말, 담비(), 원숭이(), 고운 구슬이

                        난다.

珠大如酸棗              구슬 크기가 대추 만하다.

 

其國殷富                나라가 잘 산다.

自先世以來              옛 조상 때부터

未嘗被破                침략을 받거나 파괴된 적이 없다.

其王印文稱              임금 도장에는

穢王之印                <예왕지인(穢王之印)>이라는 글이 새겨져 있다.

國中有古穢城            나라 안에 <옛 예성(穢城)>이라 부르는 성이 있다.

本穢貊之城也            처음에 예맥(穢貊) 사람이 살던 성이었다.

 

武帝時                  무제(武帝, 사마염(司馬炎))

頻來朝貢                자주 와서 조공(朝貢)하였다.

 

至太康六年              태강(太康) 육 년(285)

爲慕容所襲破          모용외(慕容)한테 공격을 받아 나라가  

                        무너졌다.

其王依慮自殺            임금 의려(依慮)는 스스로 목숨을 끊었고

子弟走保沃沮            아들은 옥저(沃沮)로 달아나 목숨을 보존하였다.

帝爲下詔曰              무제(사마염)가 조서를 내려 가로되

夫餘王世守忠孝          "부여왕은 세세토록 충효를 지켰지만

爲惡虜所滅              나쁜 오랑캐에게 멸망 당했다.

甚愍念之                그 일이 무척 안타깝다.

若其遺類足以復國者      만약 살아남은 사람들 가운데 다시 나라를 일으킬

                        만한 자가 있다면

當爲之方計              내 그 자를 위하여 계책을 세우고 

使得存立                다시 나라를 세우게 하리라" 하였다.

 

有司奏護東夷校尉鮮于嬰  사주호(司奏護) 동이교위(東夷校尉)

                        선우영(鮮于嬰)

不救夫餘                제때 부여(夫餘)를 구해주지 않아

失於機略                계책 쓰기에 좋은 때를 놓쳤다.

詔免嬰                  선우영을 파면하고

以何龕代之              대신 하감(何龕)을 동이교위(東夷校尉)에 앉혔다.

 

明年                    이듬해

夫餘後王依羅遣詣龕      다음 부여왕 의라(依羅)가 하감에게 사신을

                        보냈다. 

求率見人還復舊國        백성을 이끌고 돌아가 옛 나라를 다시 세우려 하니

仍請援                  도와달라고 하였다.

龕上列                  하감이 모든 군사를 앞에 늘여 세웠다.

遣督郵賈沈以兵送之      독우(督郵) 가침(賈沈)에게 군사를 거느리고

                        의라(依羅)를 호송케 했다.

又要之於路            모용외가 또 길에 숨어서 의라(依羅)를 기다렸다.

沈與戰                  가침(賈沈)이 모용외와 싸워

大敗之                  모용외 군사를 크게 물리쳤다.

眾退                  모용외 군사가 물러났다.

羅得復國                의라(依羅)가 다시 나라를 세울 수 있었다.

 

爾後每爲掠其種人      이후에도 매번 모용외가 부여 사람들을 잡아

賣於中國                중원(中原)에 팔았다.

帝愍之                  무제(사마염)가 이를 불쌍히 여겼다.

又發詔以官物贖還        조서를 내려 관물(官物)로 몸값을 주고 부여

                        사람들을 제 나라로 돌려보냈다.

下司冀二州              (사마염이) 사주(司州)와 기주(冀州) 두 주()

                        조서를 내려

禁市夫餘之口            부여(夫餘) 사람들을 사고 팔지 못하게 했다.

<진서(晉書) 97 열전(列傳) 67 사이(四夷)>

 

[한자 풀이]

: [] 읍하다(인사 방법 가운데 하나), 사양하다, 모으다

: [] 묽기 그물, 융단, 양탄자

: [] 허리, 신장, 콩팥

: [] 강샘하다, 투기하다, 시새우다

: [] 담비

: [] 짐승 이름, 원숭이의 일종

酸棗 : [산조] 멧대추

: [] 자주, 빈번히, 급하다, 물가

: [] , 성벽, 산 이름, 사람 이름 

     [] , 성벽  [] 사람 이름

: [] 근심하다, 가여워하다, 불쌍히 여기다

: [] 아뢰다, 여쭈다, 상소

: [] 어린아이, 갓난아이

機略 : [기략] 기회에 접한 알맞은 계책

: [] 감실(신주를 모시는 곳), 절탑, 그릇

: [] 이르다

: [] 보다, 보이다  [] 보이다, 만나다

: [] ()하다, 그듭, 누차, 말미암다

上列 : [상렬] 1. 앞에서 열거한, 상기한  2. 고관  3. 윗자리, 상석

: [] 우편, 역참

: [] , 명성, 평판  [] 장사, 상인, 상품

: [] 중요하다, 모으다, 합치다, 기다리다, 잠복하다, 허리

: [] , 어조사, (), (), 가깝다

: [] 속죄하다, 속전(죄를 면하기 위해 바치는 돈)을 내다

: [] 바라다, 땅 이름

 

 

# 이 글을 퍼가시는 분은 출처를 밝혀 주십시오.

 

[참고 자료]

진서(晉書) 97 열전(列傳) 67 사이(四夷)

 

[참고 사이트]

엠파스

야후 재팬

위키피디아

구글

바이두(www.baidu.com)

'study' 카테고리의 다른 글

삼국지위서동이전  (9) 2009.06.27
Final Exam - CCNA 1 Networking Basics (Version 3.1)  (1) 2008.06.14


본인의 아이피 주소 확인과 위치 추적
[Schizo!, 2009. 4. 21. 02:43, study/programming]

WORD 는 unsigned int를 typedef한 것!

DWORD는 unsigned long을 typedef 한것입니다.

매번 unsigned long이라 쓰기 힘들어, DWORD라 타입을 재정의 한겁니다.


관련 헤더파일에

typedef unsigned long   DWORD;

라 선언되어 있습니다.


출처 : 네이버 지식

 

'study > programming' 카테고리의 다른 글

c언어 예약어  (0) 2009.04.21
터보c 에러  (0) 2008.06.09
getpass  (1) 2008.04.29
리눅스 명령어  (0) 2008.03.18
비주얼스튜디오 2008  (0) 2008.03.09


본인의 아이피 주소 확인과 위치 추적
[Schizo!, 2009. 4. 21. 02:38, study/programming]

1. 자료형 관련 예약어


char : character의 약자로서, 아스키코드로 저장되는 형태를 의미

         문자 형식을 저장 할 때 쓰인다.

 

int :  2^31 - 1 ~ -2^31의 범위를 가진 변수 타입

        integer의 약자로서. 정수 형태로 저장한다.

       

float : sign비트와 mentissa, exponent 비트로 나누어서 저장한다.          8Byte   ex)10.11 --> 1.011 * 10^1

 

short : 32767 ~ -32768의 범위를 가진 변수 타입

          int 형태보다 적은 비트로 숫자를 표현할 때 사용한다.     

          (시스템에 따라 크기가 다름)


long : 2^63 - 1 ~ -2^63의 범위를 가진 변수 타입

         int 형태보다 많은 비트로 숫자를 표현할 때 사용한다.


double : 플롯과 비슷한 형태로 저장되지만 10Byte이다.

           VC++에서 쓰면 더블로 고치라고 warnning이 나타난다.


unsigned : 원래 숫자의 맨 앞 비트 (most significant bit)는 부호

               비트이지만 언사인드를 앞에 붙이면 부호비트가 그냥

                숫자를 나타낸다.

                그래서 표현 가능한 최대값이 2배가됀다.


byte : 127 ~ -128의 범위를 가진 변수 타입


bool : true, false 값 만을 가진 논리 변수 타입


union : 공용체의 선언


enum : 열거.... 잘 쓰이지 않음.


void : 리턴해주는 값이 없거나, 혹은 상위함수로부터의 전달받는

         인자값이 없을 때 사용한다.



2. 기억 관련 예약어


auto : 자동 변수라고 해서 그 함수 내에서만 쓰이고 사라지는

         변수이다. 일반적으로 정의해주지 않는다.


static : 정적 지역변수를 정의할 때 사용한다.


extern : 외부변수를 정의할 때 사용한다.


register : CPU의 레지스터를 이용할 때 사용한다.




3. 제어관련 예약어


if ~ else : 조건문에서 사용한다.     

                if(A){ B } : A가 참일 때 B가 실행됨.

             else{ B } : 만약 위에 있는 if 문들이

              모두 거짓일 때 실행됨

for :  흔히 반복문(loop)이라고한다.  for(A;B;C){ D }- A는 변수

         선언부/혹은 값을 넣는 부분, B는 bool 형을 반환해야 하며

         B가 참이면 반복, C는 한번 반복 하면서 실행할 문장이다.


while : for와 용도가 비슷함. 순환문에서 사용한다.

          while(A){ B } : A가 참일 동안 B가 실행되는 문장.


do ~ while : 순환문에서 사용한다.

                  do{ A }while(B); : 먼저 A를 실행 시키고,

                  B가 반복하는 문.


switch ~ case : 분기 문을 사용할 수 있도록 한다.

                     switch(A){ ... } : A문을 가지고 switch문에

                     들어가는 것을 나타냄.

                     case B : C; : A가 B와 같을 경우  C가 실행됨.


break : swich 명령어와 더불어 분기문에서 사용한다.


continue : switch 명령어와 더불어 분기문에서 사용한다.


default : switch와 더불어 조건문에서 사용한다.


try ~ catch : try{ A }catch(B) { C } - A를 실행하다가 에러를   만나면 B와 에러 타입이 같은지 본 후에

                  같으면 C를 실행.


return : 상위함수에 값을 리턴 할 때 사용한다.


goto : 강제로 jump하게 하는 명령어이다.

          일반적으로 사용하지 않는다.


4. 기타 자료형


main : main 함수는 C언어의 entry point이다.

         프로그램이 처음 시작돼는 위치를 알려주는 곳이다.


sizeof : 변수의 (혹은 자료형의) 차지하는 크기를 보여준다.


include : #include 는 단순히 파일을 연결하는 개념이다.

            기존에 작성된 라이브러리를 사용하는 것.


struct : 구조체의 선언


typedef : 데이터형의 이름을  다르게 바꿀 수 있는 명령어이다.

            typedef char byte 라고 하면 char a; 대신에

            byte a; 라고 선언할 수 있다.


const : 상수로 만든다. const int days = 30; 이라고 선언해주면 ays 라는 문자열을 30이라고 인식해준다.


volatile : 프로그램이 변경하지 않아도 메모리의 값이

            변경할 수 있게 해준다. 

 

'study > programming' 카테고리의 다른 글

WORD의 의미  (0) 2009.04.21
터보c 에러  (0) 2008.06.09
getpass  (1) 2008.04.29
리눅스 명령어  (0) 2008.03.18
비주얼스튜디오 2008  (0) 2008.03.09


본인의 아이피 주소 확인과 위치 추적
[Schizo!, 2008. 11. 22. 22:38, study/ccna]
ccna 2 final

Why would an administrator change the value highlighted in the exhibit? (Choose two.)

-to make the router bypass the startup-configuration file

-to configure the router to boot the RXBOOT image 

During initial router bootup the following line appears:
"NVRAM invalid, possibly due to write erase."
What are two possible reasons for this result? (Choose two.)

-The router has not been configured.

-The startup-config file cannot be located. 

A new technician must add boot system commands to one of the department routers. Which available commands will the router return as output when the command shown below is entered? (Choose two.)
Router(config)# boot system ?

-TFTP

-FLASH 

What information can be learned during the initial router bootup? (Choose two.)

-the number and types of interfaces installed

-the router model and the amount of memory that is available 

Which of the following are primary functions of a router? (Choose two.)

-packet switching

-Path selection 


What can be determined from the output shown in the exhibit? (Choose two.)

-Montgomery has Layer 2 connectivity with Cumberland.

-Brant, Fisherman, and Potomac are directly connected to Montgomery. 

Which router components and operations are correctly described? (Choose two.)

NVRAM - stores the configuration file

POST - runs diagnostics on hardware modules 

What are the results of setting the boot field bits in the configuration register to "0000"? (Choose two.)

-The router will enter ROM monitor mode upon reload.

Which commands will correctly configure an extended ACL? (Choose two.)

-Router(config)# access-list 192 permit icmp host 198.18.4.3 172.22.0.255 0.0.0.0 echo

-Router(config)# access-list 153 deny udp 10.43.0.0 0.0.255.255 any eq 161 

Which commands will show the status and IP address of all interfaces on a router? (Choose two.)

-show protocols

-show interfaces 

An administrator needs to determine if RIP v1 or IGRP should be used in a small network. Which two statements are true and should be considered by the administrator before making the decision? (Choose two.)

-IGRP will use the available bandwidth and calculated traffic delays on the link to help determine the best path.

-IGRP can be implemented on large networks up to 255 hops in diameter. 

Which of the following statements are true regarding routed protocols? (Choose two.)

-They provide enough information in the Layer 3 address to allow a packet to be forwarded from one network to another.

-They carry user data between networks. 

Which two steps describe how to create a functional physical connection between a router console and a terminal? (Choose two.)

-Use an RJ-45 to DB-9 adapter on the terminal serial port to connect to the cable going to the router console.

-Use a rollover cable to connect from a terminal serial port to the router console port. 

What are two possible reasons a router would not load a valid IOS from flash? (Choose two.)

-The first boot system command executed in the startup configuration file is boot system rom.

-The configuration register is set to 0x2100. 

access-list 199 deny tcp 198.18.0.0 0.0.255.255 any eq 25
access-list 199 permit ip any any
 
Assuming this ACL is correctly applied to a router interface, which statements describe traffic on the network? (Choose two.)

-SMTP traffic from hosts on network 198.18.0.0 will be denied.

-SMTP and HTTP traffic to hosts on the 198.18.0.0 network is permitted. 


What can be concluded from the set of commands shown in the exhibit? (Choose two.)

-This is a named extended ACL that allows any host on 192.168.85.0 to Telnet to address 172.25.0.26.

-All FTP and HTTP traffic destined for 172.25.0.26 will be denied. 


Neither router in the graphic has a host table or DNS available. The interfaces and passwords have been correctly configured. Which of the following commands will initiate a Telnet session? (Choose two.)

-ATL# 192.168.4.2

-CHI# telnet 192.168.4.1 

From the running-config, the following configuration entries are displayed:
Router(config)# line vty 0 2 
Router(config-line)# password g8k33pr 
Router(config-line)# login 
What can be interpreted from the exhibited configuration? (Choose two.)

-Three Telnet lines are available for remote access.

-Remote access to this local router will require a Telnet password of g8k33pr. 

What are two characteristics of the support for Telnet within Cisco IOS software? (Choose two.)

-Up to five separate Telnet lines are supported by default in standard edition IOS files.

-A router can host simultaneous Telnet sessions. 

What are two recommended uses of login banners? (Choose two.)

-to display security warning messages

-to announce a scheduled system shutdown

Which features describe a FastEthernet interface on a router? (Choose two.)

-may be administratively disabled by using the shutdown command

-must be configured with a valid IP address and subnet mask in order to forward packets 

What will occur if the command service password-encryption is entered on a router? (Choose two).

-It will apply a weak encryption to all unencrypted passwords.

-It will configure the user EXEC mode, telnet, and enable passwords as encrypted. 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Choose 3 

Which procedures will work while configuring the router using the setup configuration utility? (Choose three.)

-Press Enter or the Return key to accept the default values.

-Enter the address on an interface or add a new routing protocol suite.

-Press Ctrl-C to return to the privileged mode prompt or to terminate setup mode. 


Which devices can be used to convert the data from a WAN router at the customer site into a form acceptable for use by the WAN service provider? (Choose three.)

-modem

-DCE device

-CSU/DSU 


Refer to the exhibit. Communication is needed between the Marketing LAN and the Sales LAN. All hosts on those LANs also need connectivity to the Internet. Which three commands will allow this communication? (Choose three).

-Marketing(config)# ip route 0.0.0.0 0.0.0.0 fa0/0

-Sales(config)# ip route 192.0.2.0 255.255.255.0 fa0/0

-Sales(config)# ip route 0.0.0.0 0.0.0.0 s0/0 


What can be determined from the output shown in the exhibit? (Choose three.)

-The version for this IOS file is 12.1 release 5.

-Where the file is stored on the router and whether the file is relocatable is indicated by the expression mz.

-This image could be used on a 2621 or a 2620 with enough RAM. 

What are three features of CDP? (Choose three.)

-provides information on directly connected devices that have CDP enabled

-tests Layer 2 connectivity

-enabled by default on each interface 

The following access list has been correctly applied to a router interface:
access-list 52 deny 172.30.65.52
access-list 52 permit any
 
Which of the following statements are true about this ACL? (Choose three.)

-A wildcard mask of 0.0.0.0 is assumed for 172.30.65.52.

-All traffic from 172.30.65.51 will be permitted.

-This is a standard IP access list. 

Why are interface descriptions used in router configurations? (Choose three).

-to enable support personnel to easily identify networks and customers that may    be affected by a possible interface issue

-to provide comments on the interface without affecting the router functionality

-to identify the purpose and location of the interface 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Single answer

In what order will the initial startup routine of a router locate and load the IOS if the config-register setting is 0x2102 and there are no boot system commands present in the startup-config file?

-Flash, TFTP server, ROM 


The Marshall and Fiji routers have been correctly configured to use RIP v1 as a dynamic routing protocol, and all interfaces on the Marshall and Fiji routers are reporting "interface is up, line protocol is up" status. RIP v1 is then configured on the Chatham router using the following commands:  
Chatham(config)# router rip 
Chatham(config-router)# network 198.18.100.0 
Chatham(config-router)# network 172.23.0.0 
If no additional routing is configured on Chatham, Marshall, or Fiji, what will be the result?

-Networks 198.18.100.0/24 and 172.23.0.0/16 will be unreachable from Marshall and Fiji. 
 


Router A is directly connected to the networks shown in the graphic and has a default route that points to Router B. All interfaces are active and properly addressed. However, when the workstation on network 172.16.4.0/24 sends a packet to destination address 172.16.201.5, it is discarded by Router A. What can be a reason for this result?

-The ip classless command is not enabled on Router A. 


A network administrator has enabled RIP on routers A and B in the network diagram. Which commands will prevent RIP v1 updates from being sent to Router C?

-B(config)# router rip 
B(config-router)# passive-interface S0/1
 

Which router component stores the information that is displayed by the show arp command?

-RAM 

If a PC does not have network connectivity to a router, which router port can be used to establish communication?

-Console 

What can a network administrator do to recover from a lost router password?

-boot the router to ROM monitor mode and configure the router to ignore NVRAM when it initializes 
 


 
 
The following access list has been created to prevent traffic from host 172.23.40.36 from accessing the 192.168.34.0 network.
access-list 44 deny host 172.23.40.36
access-list 44 permit any
 
Refer to the graphic. Which group of commands will properly place the access list so that the host is denied access only to network 192.168.34.0?

-Tokyo(config)# interface fa0/0 
Tokyo(config-if)# ip access-group 44 out
 

A network administrator must configure a FastEthernet interface with an IP address. The configuration must also identify the remote site to which the interface is connected. Which set of commands will meet these requirements?

-StPetersburg(config)# interface fa0/0 
StPetersburg(config-if)# ip address 172.26.155.5 255.255.255.252 
StPetersburg(config-if)# description San Jose T1
 

A network administrator issues the erase startup-config command on a configured router with the configuration register set to 0x2102 and observes the following output:
Erasing the nvram filesystem will remove all files! Continue? [Confirm]
[OK]
Erase of nvram: complete
If the router unexpectedly loses power after this sequence, what will occur when power is restored?

-The router will prompt the user to enter setup mode or to continue without entering setup mode. 

The main router of XYZ company has enough flash and RAM to store multiple IOS images. An administrator wants to upload a second IOS image from a TFTP server to the flash of the router. Which method will accomplish this task?

-Copy the IOS image file from a TFTP server using the command copy tftp flash. When prompted, provide the IP address or name of the TFTP server and the IOS image filename. 


Refer to the exhibit. While planning an IOS upgrade, the administrator issues the command show version. What is the current IOS boot location?

-ROM 


Refer to the graphic. Which command will create a standard ACL that will apply to outbound traffic on interface Fa0/0 of router A and will deny IP traffic from any host on network 172.16.34.0/24 that is destined for network 192.168.5.0/24 while allowing all other IP traffic?

-access-list 33 deny 172.16.34.0 0.0.0.255
access-list 33 permit any
 


Refer to the exhibit. Router C interface E0 has gone down. What is the maximum time that will elapse before Router A learns that network 110.90.1.0 is down?

-5 seconds


 
Refer to the exhibit. Which set of commands will configure static routes that will allow the WinterPark and the Altamonte routers to deliver packets from each LAN and direct all other traffic to the Internet?

-WinterPark(config)# ip route 0.0.0.0 0.0.0.0 192.168.146.1 
Altamonte(config)# ip route 10.0.234.0 255.255.255.0 192.168.146.2 
Altamonte(config)# ip route 0.0.0.0 0.0.0.0 s0/1


Which ACL can be applied in the outbound direction of Serial 0/0 on router B in the graphic to allow all IP traffic from LAN A to the Internet, allow Web traffic from LAN B to the Internet, and deny all other traffic to the Internet?

-access-list 125 permit ip 192.168.2.0 0.0.0.255 any 
access-list 125 permit tcp 10.90.3.0 0.0.0.255 any eq www


 
What will occur when the following ACL is applied inbound to both FastEthernet interfaces of the Anaheim Router shown in the exhibit?
access-list 166 permit icmp 10.128.114.0 0.0.0.255 10.97.88.0 0.0.0.255 echo 
access-list 166 permit icmp 10.97.88.0 0.0.0.255 10.128.114.0 0.0.0.255 echo 
access-list 166 permit tcp 10.128.114.0 0.0.0.255 any eq www

-The Finance Admin host and the HR Admin host will be able to ping to each other. The HR Admin host will be allowed to access Web servers on the Internet, while the Finance Admin host will be denied Internet Web access.


 
Refer to the graphic. A network administrator has a console connection to Router A. Pings to Router B are successful, but pings to Routers C and D fail. What is the first step in troubleshooting the problem?

-Use the show interfaces command from a Telnet session on router B to check the connection to router C. 


Refer to the graphic. Assuming default metrics are used and the network is fully converged, which path will the IGRP routing protocol use to send a packet from Router A to Router F?

-A, B, D, E, F 

What can be determined from this output?  
I 192.0.2.0/24 [100/57625] via 198.18.243.21, 00:00:12, Serial0/1

-57625 is a composite metric used by IGRP in calculating the best path. 

'study > ccna' 카테고리의 다른 글

CCNA 2 - Module 11 Exam  (0) 2008.11.08
CCNA 2 - Module 10 Exam  (0) 2008.10.28
CCNA 2 - Module 9 Exam  (0) 2008.10.28
CCNA 2 - Module 8 Exam  (0) 2008.10.25
CCNA 2 - Module 7 Exam  (0) 2008.10.25


본인의 아이피 주소 확인과 위치 추적
[Schizo!, 2008. 11. 8. 12:57, study/ccna]

1 Which statements are true regarding the significance of the access control list wildcard mask 0.0.0.7? (Choose two.)
• The first 29 bits of a given IP address will be ignored.
• The last 3 bits of a given IP address will be ignored.
• The first 32 bits of a given IP address will be checked.
• The first 29 bits of a given IP address will be checked.
• The last 3 bits of a given IP address will be checked.

2 Which of the following parameters can ACLs use to filter traffic? (Choose three.)
• packet size
• protocol suite
• source address
• destination address

• source router interface
• destination router interface

3 Choose the commands that will correctly configure a standard ACL. (Choose two.)
• Router(config)# access-list 97 permit host 192.5.5.1
• Router(config)# access-list 32 permit 210.93.105.3 0.0.0.0

• Router(config)# access-list 148 permit 201.100.11.2 0.0.0.0
• Router(config)# access-list 107 permit host 192.5.5.1 213.45.27.0 0.0.0.255 eq 23
• Router(config)# access-list 10 permit tcp 192.5.5.1 0.0.0.255 201.100.11.0 0.0.0.255 eq 80

4 Select the statements that describe ACL processing of packets. (Choose three.)
• An implicit deny any rejects any packet that does not match any ACL statement.
• A packet can either be rejected or forwarded as directed by the statement that is matched.

• A packet that has been denied by one statement can be permitted by a subsequent statement.
• A packet that does not match the conditions of any ACL statements will be forwarded by default.
• Each statement is checked only until a match is detected or until the end of the ACL statement list.
• Each packet is compared to the conditions of every statement in the ACL before a forwarding decision is made.

5 Which of the following are reasons to use ACLs? (Choose three.)
• to provide a basic level of security for network access
• to speed up network performance by filtering priority packets
• to preserve bandwidth by providing a mechanism for traffic flow control
• to decide which packets are forwarded or blocked at the router console port
• to screen certain hosts to either allow or deny access to part of a network
• to allow all packets passing through the router access to all parts of the network

6

Assuming the ACL in the graphic is correctly applied to an interface, what effect will the ACL have on network traffic?
• All traffic to network 172.16.0.0 will be denied.
• All TCP traffic will be permitted to and from network 172.16.0.0.
• All telnet traffic from the 172.16.0.0 network to any destination will be denied.
• All port 23 traffic to the 172.16.0.0 network will be denied.
• All traffic from the 172.16.0.0 network will be denied to any other network.

7 Choose the command that will correctly configure a standard ACL.
• Router# access-list 10 permit any
• Router# access-list 101 permit any
• Router(config)# access-list 10 permit any
• Router(config)# access-list 101 permit any
• Router(config)# access-list 10 permit any any


8

Select the commands that will apply the ACL in the diagram to filter traffic going to the 192.168.2.0 network.


• Router1# configure terminal
Router1(config)# access-list 10 in E0

• outer1(config)# interface ethernet 0
Router1(config-if)# access-list 10 in

• Router2(config)# interface s1
Router2(config-if)# ip access-group 10 out

• Router2(config)# interface ethernet 0
Router2(config-if)# ip access-group 10 out


• Router1(config)# interface ethernet 0
Router1(config-if)# ip access-group 10 out

• Router2# configure terminal
Router2(config)# access-group 10 out

9

Assuming the ACL in the graphic is correctly applied to an interface, what effect will this ACL have on network traffic?
• Host 192.168.15.4 will be denied ftp access to any destination, but will be permitted all other access.
• All ftp traffic to host 192.168.15.4 will be denied.
• All traffic from that interface will be denied.
• No traffic will be denied because a "permit" statement does not exist in this ACL.

10

Refer to the exhibit. The network administrator has connectivity to the routers and networks in the diagram. An ACL has been created to allow the network administrator FTP access to the webserver. This ACL must also deny FTP access to the server from the rest of the hosts on the LAN. Which interface in the exhibit is the recommended location to apply the ACL?
• FastEthernet 0/0 on the Carlisle router
• Serial 0/0 on the Carlisle router
• Serial 0/1 on the Mt. Holly router
• FastEthernet 0/0 on the Mt. Holly router

11 Select the correct statements about extended ACLs. (Choose two)
• Extended ACLs use a number range from 1-99.
• Extended ACLs end with an implicit permit statement.
• Extended ACLs evaluate the source and destination addresses.
• Port numbers can be used to add greater definition to an ACL.

• Multiple ACLs can be placed on the same interface as long as they are in the same direction.

12 The following commands were entered on a router:


Router(config)# access-list 2 deny 172.16.5.24
Router(config)# access-list 2 permit any


What can be concluded about this set of commands?
• The access list statements are misconfigured.
• All nodes on 172.16.0.0 will be denied access when these statements are applied.
• The default wildcard mask, 0.0.0.0 is assumed.
• The default wildcard mask 255.255.255.255 is assumed.

13 Where should a standard access control list be placed?
• close to the source
• close to the destination
• on an Ethernet port
• on a serial port

14 A router that has two Ethernet interfaces and one serial interface is configured to route both IP and IPX. What is the maximum number of IP ACLs that can be configured to filter packets on this router?
• 1
• 2
• 3
• 6
• 12


15 Which statement is true regarding wildcard masks?
• The wildcard mask and subnet mask perform the same function.
• The wildcard mask is always the inverse of the subnet mask.
• A "0" in the wildcard mask identifies IP address bits that must be checked.
• A "1" in the wildcard mask identifies a network or subnet bit.

16 ACL statements operate in sequential, logical order. If a condition match is true, the rest of the ACL statements are not checked. If all of the ACL statements are unmatched, what happens to the packet?
• The packets will be placed in a buffer and forwarded when the ACL is removed.
• The packets will be sent to the source with an error notification message.
• The implicit permit any statement placed at the end of the list will allow the packets to flow through uninhibited.
• The implicit deny any statement placed at the end of the list will cause the packets to be dropped.


17 Which of the following matches an ACL identification number with the correct protocol?(Choose three.)
• 0 - standard IP
• 99 - standard IP
• 100 - extended IP

• 210 - extended IP
• 678 - extended IPX
• 888 - standard IPX

18 The router IOS tests each condition statement in an ACL in sequence. Once a match is made, which of the following occurs? (Choose two.)
• The entire ACL must be deleted and recreated.
• The accept or reject action is performed.
• The packet is forwarded to the next hop.
• The remaining ACL statements are not checked.
• The router goes through the list again to verify that a match has been made.

19

Create a standard ACL that will deny traffic from 192.5.5.25 to the 210.93.105.0 network but will allow traffic from all other hosts. (Choose two.)

• Router(config)# access-list 22 deny 192.5.5.25 0.0.0.0

• Router(config)# access-list 22 deny host 192.5.5.25 0.0.0.0
Router(config)# access-list 22 permit any any

• Router(config)# access-list 22 deny 192.5.5.25 0.0.0.0
Router(config)# access-list 22 permit any


• Router(config)# access-list 22 deny host 192.5.5.25
Router(config)# access-list 22 permit any


• Router(config)# access-list 22 deny 192.5.5.0 0.0.0.255
Router(config)# access-list 22 permit any

'study > ccna' 카테고리의 다른 글

ccna 2 final  (0) 2008.11.22
CCNA 2 - Module 10 Exam  (0) 2008.10.28
CCNA 2 - Module 9 Exam  (0) 2008.10.28
CCNA 2 - Module 8 Exam  (0) 2008.10.25
CCNA 2 - Module 7 Exam  (0) 2008.10.25


본인의 아이피 주소 확인과 위치 추적
[Schizo!, 2008. 10. 28. 09:15, study/ccna]

1 Which of the following describe how TCP adds reliability to communication? (Choose three.)
• Hosts using TCP set up virtual circuits at the beginning of the transmission using the three-way handshake.
• Hosts using TCP set the error-checking frequency at the beginning of the transmission and maintain this frequency for the duration of the data transfer.
• When a sending host does not receive an acknowledgment within a timed interval it retransmits data.
• The receiving host acknowledges that it has received the expected number of segments and requests additional data.

• The receiving host acknowledges any incorrectly received data and requests retransmission of damaged or missing bytes.
• The sending host transmits each segment twice to ensure that data is not lost.


2 A computer programmer is developing software that requires a reliable stream of data. Which protocol can be used in the software design to eliminate the need for building error detection and recovery into the application program?
• TCP
• IP
• ICMP
• UDP
• HTTP


3 Why is TCP considered a connection-oriented protocol?
• It establishes a virtual connection between hosts using a two-way handshake.
• It uses IP to guarantee delivery of packets between hosts.
• It requires hosts to go through a synchronization process prior to data transmission.
• It creates a connection that depends on application layer protocols for error detection.

4 At which point in the transmission process are segments numbered?
• when received
• when reassembling
• before transmission
• while negotiating window size

5 What is dynamically assigned by the source host when forwarding data?
• destination IP address
• destination port number
• default gateway address
• source IP address
• source port number


6 How are originating source port numbers assigned during the data encapsulation process?
• assigned manually by the user when starting the application
• assigned dynamically by the source host
• assigned by the routing protocol during the lookup process
• assigned by the destination host during session negotiation


7 Which of the following would an administrator do to defend against a denial of service SYN flooding attack? (Choose two.)
• Hide the source of incoming IP addresses.
• Decrease the connection timeout period.
• Synchronize all host communication.
• Increase the connection queue size.
• Flood the network with false SYN requests.


8 When a host receives a data segment, what allows the host to determine which application should receive the segment?
• IP source address
• IP destination address
• PAR
• sliding window
• port number
• SYN packet

9 What is used by UDP to determine if the data or header has been transferred without corruption?
• lower layer protocols
• checksum
• PAR
• sliding window
• acknowledgment and retransmission
• IP

10 What is the purpose of using port numbers in the transport layer?
• to identify the segment as being either TCP or UDP
• to provide reliability during data transport
• to identify the interface port number used by the router when forwarding data
• to track multiple conversations that occur between hosts


11 In the TCP header, which of the following determines the amount of data that can be sent before receiving an acknowledgment?
• segment number
• priority number
• window size
• value in the length field
• value in the port field
• acknowledgment number

12 What does TCP use to ensure reliable delivery of data segments?
• upper layer protocols
• lower layer protocols
• sequence numbers
• port numbers


13 Which of the following protocols uses UDP for transport layer services?
• SMTP
• HTTP
• DNS
• FTP


14 What type of segment and data is shown in the graphic?
• a UDP segment carrying e-mail traffic
• a TCP segment carrying FTP traffic
• an IP segment carrying FTP traffic
• a UDP segment carrying web traffic
• a TCP segment carrying web traffic
• an IP segment carrying e-mail traffic


15 What is the purpose of Positive Acknowledgment and Retransmission (PAR)?
• PAR allows the presentation layer to request that data be resent in a format the destination host can process.
• PAR provides a mechanism for the receiving device to request that all segments be retransmitted if one segment is corrupt.
• PAR helps ensure that a number of data segments sent by one host are received by another host before additional data segments are sent.
• PAR is used to renegotiate the window size during the synchronization process.


16 Which of the following are functions of the TCP protocol? (Choose three.)
• translation of data
• synchronization
• path determination
• flow control
• data representation
• reliability


17 What is used by both TCP and UDP when creating a segment?
• IP address
• MAC address
• IPX address
• socket or port number
• acknowledgment number
• sequence number


18 Which authority has control over the assignment of port numbers for applications?
• IEEE
• IANA
• InterNIC
• Software Developers Association


19 Which of the following describe types of port numbers that can be represented in the headers of TCP and UDP segments? (Choose three.)
• connectionless
• well-known
• operational
• dynamic
• registered

• static


20 What is the purpose of the three-way handshake that occurs between hosts using TCP as the transport layer protocol?
• to increase the number of packets that can be sent before an acknowledgment is required
• to allow a host to forward data to a router
• to establish a round trip connection between sender and receiver before data is transferred
• to provide a mechanism for data encryption and compression


21 During the encapsulation process, in which order are the IP address, MAC address, and port number assigned when the router is establishing communication with the TFTP server?
• IP address, MAC address, port number
• MAC address, IP address, port number
• port number, IP address, MAC address
• port number, MAC address, IP address

22 Which of the following describes a type of denial of service attack designed to exploit the normal function of the TCP three-way handshake?
• A host sends a packet with a spoofed source IP address.
• A host sends a packet with an incorrect destination IP address.
• A source sends a packet containing a garbled header.
• A host sends an oversized packet that fills the memory buffers of the destination host.
• A host sends a packet that contains a virus.
• A host sends a packet that contains a worm.


23 Which transport layer unit of information places the port number in the header?
• data
• segment
• packet
• frame
• bit

'study > ccna' 카테고리의 다른 글

ccna 2 final  (0) 2008.11.22
CCNA 2 - Module 11 Exam  (0) 2008.11.08
CCNA 2 - Module 9 Exam  (0) 2008.10.28
CCNA 2 - Module 8 Exam  (0) 2008.10.25
CCNA 2 - Module 7 Exam  (0) 2008.10.25


본인의 아이피 주소 확인과 위치 추적
[Schizo!, 2008. 10. 28. 09:11, study/ccna]

1

After issuing the command traceroute 192.168.4.2 from Router A, the following information is returned

Tracing the route to Router_D (192.168.4.2)
1 Router_B (192.168.2.2) 16 msec 16 msec 16 msec
2 * * *
3 * * *

What can be concluded about the network shown in the graphic based on the output given?
• Network 192.168.5.0 is missing from the routing table on Router
• There is a problem with the connection between Router B and Router C.
• Router C is not running CDP.
• Some of the routers are non-Cisco devices.
• Router B was not able to return ICMP TEMs to Router A

2 Which of the following would be the default administrative distance of a static IP route that references the IP address of the next hop?
• 0
• 1
• 5
• 20

3 After issuing the show interfaces command, a technician notices the line "Serial1 is down, line protocol is down" in the output. Which of the following are possible reasons for this message output? (Choose three.)
• There is a mismatch in the encapsulation type on both ends of the link.
• A Layer 1 issue exists.
• An interface problem exists.

• The clockrate was not set during configuration.
• There is no usable media for the protocol.
• Keepalive messages are not being sent.

4 Which three correctly pair a routing metric with its description? (Choose three.)
• hop count - the number of routers traversed to reach a destination
• bandwidth - the amount of time it takes a packet to travel a link
• load - the amount of activity on a link
• delay - the link speed
• reliability - the error rate on a link

5

When issuing the show interfaces serial1 command, a network administrator receives the output shown in the graphic. What are the possible causes of an increase in the number of input errors? (Choose three.)
• There could be Layer 3 addressing problems.
• There could be a problem with faulty telephone equipment.
• The router hardware could be defective.

• There is an incorrectly configured encapsulation on the interface.
• There could be a problem with the cabling.

6 Which ICMP message type notifies source hosts that a receiving host or network is not available?
• time exceeded
• redirect
• destination unreachable
• source quench
• parameter problem
• echo reply

7 The show interfaces command provides line and protocol status information. Which of the following conditions would never occur in the output of this command?
• serial1 is up, line protocol is up
• serial1 is up, line protocol is down
• serial1 is down, line protocol is down
• serial1 is down, line protocol is up
• serial1 is administratively down, line protocol is down

8

The network administrator shown in the exhibit can ping the E0 interface of the HAR router, but the telnet intranet.xyz.com command issued from the administrator's workstation fails to open a session with the intranet.xyz.com server. What are two possible causes of this problem? (Choose two.)
• upper-layer application problems
• domain name system problems

• IP addressing problems on the HAR router
• clock rate problems on the HAR router serial interface
• ICMP connectivity problems

9 The network administrator is using a PC to access a router via the router console port. Both the PC and the router are powered on and a cable has been connected between them. However, a session cannot be established. Which steps might fix this problem? (Choose two.)
• Verify the cable is properly connected at each end.
• Reseat the network card in the PC.
• Verify the cable is the correct type.
• Verify that a password has been set on the console line.
• Check the transceiver for link lights.
• Reseat the console card on the router

10 Which command will display routing table information about all known networks and subnetworks?
• Router# show ip interfaces
• Router# show ip connections
• Router# show ip route
• Router# show ip networks

11 A network technician has discovered that a router in the network can no longer be reached. The technician attempts to verify Layer 1 functionality, but is unable to physically inspect the cables. Which command can be used to determine the type of cable connected to the router?
• Router# show interfaces
• Router# show controllers serial
• Router# show ip route
• Router# show ip protocol
• Router# show version
• Router# show running-config

12 During the lookup process when forwarding a packet, a router checks its routing table for the best path to the destination. If a route has an administrative distance of 0, what does this indicate to the router?
• The packet should be discarded.
• The destination is unreachable.
• The destination is a directly connected network.
• The source of the update for that route is unreliable.

13 Which command will verify the functionality of all seven layers of the OSI model on a network host?
• ping
• debug
• telnet
• traceroute

14

After issuing the show interfaces serial1 command, an administrator notices an increasing number of carrier transitions. What are the possible causes for this increase? (Choose two.)
•There is an incorrect encapsulation configured on the interface.
•There could be an interruption in the line by the service provider.
•There is a faulty switch or CSU/DSU.

•There is noise on the serial line.

15

Consider the RIP network shown in the diagram. Which entries would be listed in the routing table of Router A?
• R 192.168.5.2[120/1] via 192.168.15.0, 00:00:09, Serial0
• R 192.168.15.0[120/1] via 192.168.5.2, 00:00:13, Serial1
• R 192.168.15.0[120/1] via 192.168.5.1, 00:00:13, Serial0
• R 192.168.5.1 [120/1] via 192.168.5.2 00:00:29, Serial1
R 192.168.15.0 [120/1] via 192.168.5.2, 00:00:29, Serial1
• R 192.168.5.1 [120/1] via 192.168.5.2 00:00:18, Serial0
R 192.168.15.2 [120/1] via 192.168.5.2, 00:00:18, Serial

16 Which items would be displayed when the show ip protocols command is executed? (Choose three.)
• sources of routing updates
• networks being advertised

• routing protocol up or down
• configured routed protocols
• Layer 2 status of the interface
• update timer values

17 Which two are true regarding the debug commands? (Choose two.)
• Debug commands may be issued from the user EXEC prompt.
• The command undebug all will turn off all debug operations.
• By default, the router sends the debug output and messages to the telnet session.
• The high processor overhead incurred using debug may disrupt normal router operation.
• The debug all command provides a summary view of router activity and can be used frequently for troubleshooting.
• The show debugging command will display current events such as traffic on an interface and error messages generated by nodes on the network.

18 A network administrator suspects that a network is not being included in the routing updates. Which command will provide information on when the next update is due and which networks are advertised in the update?
• Router# show interfaces
• Router# show controllers serial
• Router# show ip protocols
• Router# show ip route
• Router# show running-config

19 Which of the following is a problem at the physical layer of the OSI model?
• incorrect file formatting
• incorrect encapsulation on a serial interface
• incorrect routing protocol
• incorrect cable type

20

When the show cdp neighbors command is issued from Router C, which devices will be displayed in the output?
• D, SWH-2
• A, B, D
• SWH-1, SWH-2
• B, D
• SWH-1, A, B
• A, B, D, SWH-1, SWH-2

21 Which of the following are advantages of using a static route? (Choose three.)
• secure operation
• highly adaptable
• low maintenance configuration
• low processor overhead
• precise control of path selection


22 Which of the following commands can be used to statically configure default routes? (Choose two.)
• ip static-route
• ip route
• ip network-route
• ip default-network
• ip default-static

23 Why does a router build a routing table? (Choose two.)
• to list available routes for forwarding data
• to map local Layer 2 addresses to the remote Layer 3 destination address
• to dynamically send periodic updates regarding the router's status
• to prevent routing loops when redundant links are added to the network
• to select the best path to a destination

24 Which of the following lines from the show interfaces output would indicate a Layer 2 problem?
• Serial1 is up, line protocol is up.
• Serial1 is up, line protocol is down.
• Serial1 is down, line protocol is down.
• Serial1 is administratively down, line protocol is down.

'study > ccna' 카테고리의 다른 글

CCNA 2 - Module 11 Exam  (0) 2008.11.08
CCNA 2 - Module 10 Exam  (0) 2008.10.28
CCNA 2 - Module 8 Exam  (0) 2008.10.25
CCNA 2 - Module 7 Exam  (0) 2008.10.25
CCNA 2 - Module 7 Exam  (0) 2008.10.11


본인의 아이피 주소 확인과 위치 추적
[Schizo!, 2008. 10. 25. 14:50, study/ccna]

1 How does a source host use ICMP to confirm that a destination host is reachable?
• The source host sends an ICMP echo request to the destination router which responds with an ICMP echo reply confirming the reachability of the destination host.
• The source host sends a data packet and receives an ICMP host unreachable packet from the destination host if the data packet cannot be delivered.
• The source host sends an ICMP packet with a TTL value of 1 and receives an ICMP reply with a TTL value of 0 from the destination host.
• The source host sends an ICMP echo request and receives an ICMP echo reply from the destination host.


2 Which type of message is generated by a host when the ping command is entered?
• ICMP echo request
• ICMP echo reply
• UDP echo request
• UDP error message

3 Which of the following start the test of destination reachability?
• echo request issued by source
• echo reply issued by source
• echo request issued by destination
• echo reply issued by destination


4 Which two statements are true regarding ICMP? (Choose two.)
• ICMP provides reliability for the TCP/IP protocol stack.
• ICMP is a component of the TCP/IP protocol stack.
• ICMP notifies the sender that data transmission errors have occurred.

• ICMP is connection-oriented.
• ICMP messages are propagated to all intermediate devices.


5 How does ICMP improve data transfer reliability in IP networks?
• Each router in the path reads ICMP packets and uses the information to update routing tables.
• ICMP can correct many network problems as they occur.
• ICMP error messages are returned to the sending device when a packet is dropped by a router.
• ICMP packets report the intermediary devices that a packet passed through before failure occurred.


6 Which layer protocols provide reliability for IP when needed?
• ICMP and ping
• RIP and TTL
• upper layer protocols
• lower layer protocols
• Internet layer protocols
• network access layer protocols


7 Which devices along a data transmission path are notified by ICMP when delivery failures occur?
• source devices only
• destination devices only
• intermediary devices
• source and destination devices
• source, intermediary, and destination devices


8 When a datagram is processed by a router on the path from source to destination, what happens to the value in the TTL field?"
• It is increased by one.
• It is decreased by one.
• It stays the same.
• It is reset to 0.
• Nothing.


9 Which condition could cause a fragmentation needed ICMP destination unreachable message to be sent?
• A low bandwidth WAN link has become congested with IP traffic.
• A packet is forwarded from a Token Ring network to an Ethernet network.
• A network is not reachable because of faulty routing information.
• The address specified by the sending host is nonexistent.


10

Workstation 1 sent a data packet to Workstation 4. It never arrived because Fa0/0 interface went down on Router C. How will the devices handle this failure?
• Workstation 4 will send an error message to Router C and Workstation 1 that it did not receive the packet.
• Router C will use ICMP to send a message back to Workstation 1 indicating that the packet could not be delivered.
• Router C discards the packet without providing notification to any device.
• Router C uses ICMP to correct the failure and transmits the data to Workstation 4.
• Workstation 1 will use ICMP to correct the problem and then notify Router C to continue the transmission.


11 Which three conditions must be met in order for host to host communication over an internetwork to occur on IP networks? (Choose three.)
• The routing protocols configured on the source and destination networks must be the same.
• A default gateway must be properly configured on the hosts and local networks.
• Intermediary devices, such as routers, must be present on the network and have knowledge of how to reach the destination network.

• The source and destination host subnet masks must match.
• The IP addresses of the hosts must be in the same network or subnet as their respective gateway devices.


'study > ccna' 카테고리의 다른 글

CCNA 2 - Module 10 Exam  (0) 2008.10.28
CCNA 2 - Module 9 Exam  (0) 2008.10.28
CCNA 2 - Module 7 Exam  (0) 2008.10.25
CCNA 2 - Module 7 Exam  (0) 2008.10.11
CCNA 2 - Module 6 Exam  (1) 2008.10.11


본인의 아이피 주소 확인과 위치 추적
[Schizo!, 2008. 10. 25. 14:49, study/ccna]


1 Which command or set of commands will stop the RIP routing process?
• RouterB(config)# router rip
RouterB(config-router)# shutdown
• RouterB(config)# router rip
RouterB(config-router)# network no 192.168.2.0
• RouterB(config)# no router rip
• RouterB(config)# router no rip

2 When does a distance vector routing protocol set a hold-down timer on a route?
• when the metric value of the route decreases
• when the route is marked as inaccessible
• when the metric value for the route improves
• when a regular update is received from a neighboring router


3 Which of the following functions are performed by a router as routing information travels through the network? (Choose two.)
• advertise supported applications
• identify new destinations
• calculate packet speed
• verify network scalability
• identify invalid networks


4 What do distance vector algorithms require each router in the network to send?
• a partial routing table to each router in the LAN
• a partial routing table to each router in the WAN
• the entire routing table to each neighboring router
• the entire routing table to each router in the autonomous system

5

What actions will occur after RouterA loses connectivity to network 114.125.16.0? (Choose two.)
• RouterB will include network 123.92.76.0 and 136.125.85.0 in its update to RouterA.
• During the next update interval, RouterB will send a RIP update out both ports that includes the inaccessible network.
• During the next update interval, RouterC will send an update to RouterB stating that network 114.125.16.0 is accessible in 2 hops.
• Router C will learn of the loss of connectivity to network 114.125.16.0 from RouterB.
• RouterB will include network 123.92.76.0 and 136.125.85.0 in its update to RouterC.


6

Refer to the exhibit. Assuming default settings are configured, which routing protocol has been configured on the router?
• OSPF
• RIP
• EIGRP
• BGP
• Static


7 Which command will display RIP activity as it occurs on a router?
• debug ip rip
• show ip route
• show ip interface
• show ip protocols
• debug ip rip config
• show ip rip database

8 Which of the following methods does split horizon use to reduce incorrect routing information?
• Routing updates are split in half to reduce the update time.
• Information learned from one source is not distributed back to that source.
• New route information must be learned from multiple sources to be accepted.
• The time between updates is split in half to speed convergence.
• New route information is suppressed until the system has converged.


9

According to the router output from the show ip route command shown above, which of the following statements are true? (Choose two.)
• The metric to network 192.168.8.0 is 24.
• The hop count to a device on network 192.168.8.0 is 2.
• The total path cost to network 192.168.4.0 is the default value of 16.
• The logical address of the next router for network 192.168.1.0 is 192.168.3.1.
• The devices on network 192.168.5.0 cannot be reached as indicated by the 'C' label.


10 How would an administrator configure a static route for use if a primary route failed?
• configure the route with a metric greater than the default value
• configure the route and the router will activate it as needed
• configure the route to activate by using the redistribute static command
• configure the route with an administrative distance greater than the default value


11 Which statements describe RIP? (Choose three.)
• The maximum metric value is 255 hops.
• The maximum metric value is 15 hops.
• Routing updates occur every 30 seconds.
• Routing updates occur every 90 seconds.
• It is a distance vector routing protocol.
• It is a link state routing protocol.


12 A router has routes to several subnets of a classful network in its routing table. A default route is defined on the router but the ip classless command is disabled. If the router receives packets for a subnet that is not in its routing table but is in the same classful network as the other subnets, what will happen to the packets?
• The packets will be forwarded using the default route.
• The packets will be forwarded using a route to one of the other subnets of the classful network.
• A nonreachable message will be returned to the source.
• The packets will be discarded.
• The router will generate a new route to the subnetted network.


13

The administrator of the network depicted in the graphic would like to decrease the network's convergence time. How can this be accomplished?
• disable split horizon on the routers
• increase the update interval on the routers
• change the RIP holddown timer to 96 seconds
• change the RIP holddown timer to 226 seconds

14

If the passive interface command is enabled on the fa0/0 interface of Router E, which statements are true? (Choose two.)
• Router E will send all routing updates via interface fa0/0.
• Router E will ignore all routing updates learned via interface fa0/0.
• Router E will use routing updates learned via interface fa0/0.
• Router E will not send routing updates via interface fa0/0.


15 Which statements describe load balancing when RIP is configured as the routing protocol? (Choose two.)
• A router is allowed to take advantage of multiple best paths to a given destination.
• RIP uses the round robin approach in load balancing.
• RIP load balancing selects a single path to forward all data to the destination even though equal parallel paths exist.
• RIP load balancing is based on bandwidth first and then the hop count.
• Only one path to a destination can be statically assigned or dynamically calculated.


16

The graphic shows a network that is configured to use RIP routing protocol. Router2 detects that the link to Router1 has gone down. It then advertises the network for this link with a hop count metric of 16. Which routing loop prevention mechanism is in effect?
• split horizon
• error condition
• hold-down timer
• route poisoning
• count to infinity

17

Which of the following would be the correct command sequence to enable RIP on Router B for all connected networks?
• RouterB# router rip
RouterB(router)# network 210.36.7.0
RouterB(router)# network 220.17.29.0
RouterB(router)# network 211.168.74.0

• RouterB(config)# router rip
RouterB(config-router)# network 198.16.4.0
RouterB(config-router)# network 211.168.74.0
RouterB(config-router)# network 199.84.32.0

• RouterB(config)# configure router rip
RouterB(config-router)# network 210.36.7.0
RouterB(config-router)# network 199.84.32.0
RouterB(config-router)# network 211.168.74.0


• RouterB(config)# router rip
RouterB(config-router)# network 198.16.4.0
RouterB(config-router)# network 210.36.7.0
RouterB(config-router)# network 211.168.74.0


• RouterB(config)# router rip
RouterB(config-router)# network 198.16.4.0
RouterB(config-router)# network 210.36.7.0
RouterB(config-router)# network 220.17.29.0


18 When a routing table update is received by a router in a distance vector network, which of the following occurs?
• The hop count metrics for the enclosed routes are incremented.
• The update is forwarded to the gateway router for verification.
• Path entries are checked for routing loops.
• The hop count metrics for the enclosed routes are decremented.
• Static routes are updated with the new information.

19 The following line was displayed in the output of the show ip route command:
192.168.3.0/24 [120/2] via 192.168.2.2, 00:00:30, Serial0/0
What is the administrative distance of the enabled routing protocol?
• 2
• 30
• 100
• 120


20 When does RIP send routing table updates? (Choose two.)
• periodically, every 30 seconds
• periodically, every 60 seconds
• periodically, every 90 seconds
• if optionally configured, when topology changes occur (triggered-update)


21 Which of the following can exist in a distance vector network that has not converged? (Choose three.)
• routing loops
• inconsistent traffic forwarding

• no traffic forwarding until system converges
• inconsistent routing table entries
• routing table updates sent to wrong destinations


22 What happens to a static route entry in a routing table when the outgoing interface is not available?
• The route is removed from the table.
• The router polls neighbors for a replacement route.
• The route remains in the table because it was defined as static.
• The router redirects the static route to compensate for the loss of the next hop device.


'study > ccna' 카테고리의 다른 글

CCNA 2 - Module 10 Exam  (0) 2008.10.28
CCNA 2 - Module 9 Exam  (0) 2008.10.28
CCNA 2 - Module 8 Exam  (0) 2008.10.25
CCNA 2 - Module 7 Exam  (0) 2008.10.11
CCNA 2 - Module 6 Exam  (1) 2008.10.11


본인의 아이피 주소 확인과 위치 추적
[Schizo!, 2008. 10. 11. 13:15, study/ccna]

1 Which command or set of commands will stop the RIP routing process?
• RouterB(config)# router rip
RouterB(config-router)# shutdown
• RouterB(config)# router rip
RouterB(config-router)# network no 192.168.2.0
• RouterB(config)# no router rip
• RouterB(config)# router no rip

2 When does a distance vector routing protocol set a hold-down timer on a route?
• when the metric value of the route decreases
• when the route is marked as inaccessible
• when the metric value for the route improves
• when a regular update is received from a neighboring router


3 Which of the following functions are performed by a router as routing information travels through the network? (Choose two.)
• advertise supported applications
• identify new destinations
• calculate packet speed
• verify network scalability
• identify invalid networks


4 What do distance vector algorithms require each router in the network to send?
• a partial routing table to each router in the LAN
• a partial routing table to each router in the WAN
• the entire routing table to each neighboring router
• the entire routing table to each router in the autonomous system

5

What actions will occur after RouterA loses connectivity to network 114.125.16.0? (Choose two.)
• RouterB will include network 123.92.76.0 and 136.125.85.0 in its update to RouterA.
• During the next update interval, RouterB will send a RIP update out both ports that includes the inaccessible network.
• During the next update interval, RouterC will send an update to RouterB stating that network 114.125.16.0 is accessible in 2 hops.
• Router C will learn of the loss of connectivity to network 114.125.16.0 from RouterB.
• RouterB will include network 123.92.76.0 and 136.125.85.0 in its update to RouterC.


6

Refer to the exhibit. Assuming default settings are configured, which routing protocol has been configured on the router?
• OSPF
• RIP
• EIGRP
• BGP
• Static


7 Which command will display RIP activity as it occurs on a router?
• debug ip rip
• show ip route
• show ip interface
• show ip protocols
• debug ip rip config
• show ip rip database

8 Which of the following methods does split horizon use to reduce incorrect routing information?
• Routing updates are split in half to reduce the update time.
• Information learned from one source is not distributed back to that source.
• New route information must be learned from multiple sources to be accepted.
• The time between updates is split in half to speed convergence.
• New route information is suppressed until the system has converged.


9

According to the router output from the show ip route command shown above, which of the following statements are true? (Choose two.)
• The metric to network 192.168.8.0 is 24.
• The hop count to a device on network 192.168.8.0 is 2.
• The total path cost to network 192.168.4.0 is the default value of 16.
• The logical address of the next router for network 192.168.1.0 is 192.168.3.1.
• The devices on network 192.168.5.0 cannot be reached as indicated by the 'C' label.


10 How would an administrator configure a static route for use if a primary route failed?
• configure the route with a metric greater than the default value
• configure the route and the router will activate it as needed
• configure the route to activate by using the redistribute static command
• configure the route with an administrative distance greater than the default value


11 Which statements describe RIP? (Choose three.)
• The maximum metric value is 255 hops.
• The maximum metric value is 15 hops.
• Routing updates occur every 30 seconds.
• Routing updates occur every 90 seconds.
• It is a distance vector routing protocol.
• It is a link state routing protocol.


12 A router has routes to several subnets of a classful network in its routing table. A default route is defined on the router but the ip classless command is disabled. If the router receives packets for a subnet that is not in its routing table but is in the same classful network as the other subnets, what will happen to the packets?
• The packets will be forwarded using the default route.
• The packets will be forwarded using a route to one of the other subnets of the classful network.
• A nonreachable message will be returned to the source.
• The packets will be discarded.
• The router will generate a new route to the subnetted network.


13

The administrator of the network depicted in the graphic would like to decrease the network's convergence time. How can this be accomplished?
• disable split horizon on the routers
• increase the update interval on the routers
• change the RIP holddown timer to 96 seconds
• change the RIP holddown timer to 226 seconds

14

If the passive interface command is enabled on the fa0/0 interface of Router E, which statements are true? (Choose two.)
• Router E will send all routing updates via interface fa0/0.
• Router E will ignore all routing updates learned via interface fa0/0.
• Router E will use routing updates learned via interface fa0/0.
• Router E will not send routing updates via interface fa0/0.


15 Which statements describe load balancing when RIP is configured as the routing protocol? (Choose two.)
• A router is allowed to take advantage of multiple best paths to a given destination.
• RIP uses the round robin approach in load balancing.
• RIP load balancing selects a single path to forward all data to the destination even though equal parallel paths exist.
• RIP load balancing is based on bandwidth first and then the hop count.
• Only one path to a destination can be statically assigned or dynamically calculated.


16

The graphic shows a network that is configured to use RIP routing protocol. Router2 detects that the link to Router1 has gone down. It then advertises the network for this link with a hop count metric of 16. Which routing loop prevention mechanism is in effect?
• split horizon
• error condition
• hold-down timer
• route poisoning
• count to infinity

17

Which of the following would be the correct command sequence to enable RIP on Router B for all connected networks?
• RouterB# router rip
RouterB(router)# network 210.36.7.0
RouterB(router)# network 220.17.29.0
RouterB(router)# network 211.168.74.0

• RouterB(config)# router rip
RouterB(config-router)# network 198.16.4.0
RouterB(config-router)# network 211.168.74.0
RouterB(config-router)# network 199.84.32.0

• RouterB(config)# configure router rip
RouterB(config-router)# network 210.36.7.0
RouterB(config-router)# network 199.84.32.0
RouterB(config-router)# network 211.168.74.0


• RouterB(config)# router rip
RouterB(config-router)# network 198.16.4.0
RouterB(config-router)# network 210.36.7.0
RouterB(config-router)# network 211.168.74.0


• RouterB(config)# router rip
RouterB(config-router)# network 198.16.4.0
RouterB(config-router)# network 210.36.7.0
RouterB(config-router)# network 220.17.29.0


18 When a routing table update is received by a router in a distance vector network, which of the following occurs?
• The hop count metrics for the enclosed routes are incremented.
• The update is forwarded to the gateway router for verification.
• Path entries are checked for routing loops.
• The hop count metrics for the enclosed routes are decremented.
• Static routes are updated with the new information.

19 The following line was displayed in the output of the show ip route command:
192.168.3.0/24 [120/2] via 192.168.2.2, 00:00:30, Serial0/0
What is the administrative distance of the enabled routing protocol?
• 2
• 30
• 100
• 120


20 When does RIP send routing table updates? (Choose two.)
• periodically, every 30 seconds
• periodically, every 60 seconds
• periodically, every 90 seconds
• if optionally configured, when topology changes occur (triggered-update)


21 Which of the following can exist in a distance vector network that has not converged? (Choose three.)
• routing loops
• inconsistent traffic forwarding

• no traffic forwarding until system converges
• inconsistent routing table entries
• routing table updates sent to wrong destinations


22 What happens to a static route entry in a routing table when the outgoing interface is not available?
• The route is removed from the table.
• The router polls neighbors for a replacement route.
• The route remains in the table because it was defined as static.
• The router redirects the static route to compensate for the loss of the next hop device.

'study > ccna' 카테고리의 다른 글

CCNA 2 - Module 10 Exam  (0) 2008.10.28
CCNA 2 - Module 9 Exam  (0) 2008.10.28
CCNA 2 - Module 8 Exam  (0) 2008.10.25
CCNA 2 - Module 7 Exam  (0) 2008.10.25
CCNA 2 - Module 6 Exam  (1) 2008.10.11


본인의 아이피 주소 확인과 위치 추적
[Schizo!, 2008. 10. 11. 13:13, study/ccna]

1 What can be concluded about the routing process on a router if the commands router rip and network 192.5.5.0 have been issued? (Choose three.)
• A distance vector routing protocol was used.
• A link-state routing protocol was used.
• Routing updates will broadcast every 30 seconds.
• Routing updates will broadcast every 90 seconds.
• Hop count is the metric used for route selection.
• Bandwidth, load, delay, and reliability are the metrics used for route selection.


2 Which two protocols use an addressing scheme to direct user traffic? (Choose two.)
• IP
• EIGRP
• IPX
• OSPF
• RIP

3 What are some of the advantages of using a link-state routing protocol instead of a distance vector routing protocol? (Choose two.)
• The topology database eliminates the need for a routing table.
• Frequent periodic updates are sent to minimize the number of incorrect routes in the topological database.
• Routers have direct knowledge of all links in the network and how they are connected.
• After the inital LSA flooding, they generally require less bandwidth to communicate changes in a topology.

• Link-state protocols require less router processor power than distance vector protocols.

4 If dynamic routing is not configured on a router, how do routing table updates occur?
• Link state advertisements are sent from other routers.
• Updates are made to the routing table by the administrator.
• Best path information is communicated by network hosts.
• The routing table is updated by neighboring routers.

5 Why is fast convergence desirable in networks that use dynamic routing protocols?
• Routers will not allow packets to be forwarded until the network has converged.
• Hosts are unable to access their gateway until the network has converged.
• Routers may make incorrect forwarding decisions until the network has converged.
• Routers will not allow configuration changes to be made until the network has converged.


6 What is the purpose of a routing protocol?
• It is used to build and maintain ARP tables.
• It provides a method for segmenting and reassembling data packets.
• It allows an administrator to devise an addressing scheme for the network.
• It allows a router to share information about known networks with other routers.
• It provides a procedure for encoding and decoding data into bits for packet forwarding.

7 Which are the primary functions used by a router when forwarding data?(Choose two.)
• data encryption
• error notification
• packet switching
• address identification
• path determination
• packet validation


8 How does a router learn about routes to a network? (Choose three.)
• Information is gathered from its own configuration regarding directly connected networks.
• Switches forward destination address information to each router.
• Hosts communicate destination network information to each router.
• Other routers forward information about known networks.
• Routes are entered manually by a network administrator.

• Routes are learned from information gathered from ARP tables.


9 Which type of address does a router use to make routing decisions?
• source IP address
• source MAC address
• destination IP address
• destination MAC address

10 Describe the switching function that occurs in a router.
• allows the router to make forwarding decisions based on Layer 2 addressing
• uses network addressing to select the best route and interface to forward data
• accepts a packet on one interface and forwards it to a second interface
• enables the router to select the most appropriate interface for forwarding a packet


11 Select the statements that describe link-state routing processes? (Choose three.)
• Each router develops its own map of the entire network.
• Routers send triggered updates when changes in the network occur.
• Link-state routing protocols place a higher load on router resources during the routing protocol initialization.

• Link-state protocols are more prone to routing loops than distance vector routing protocols.
• Networks using link-state routing protocols are slower to reach convergence after changes have occurred than those using distance vector protocols.


12 Why is it necessary to specify a list of networks when configuring an interior routing protocol?
• to tell the router how to reach those networks
• to tell the router which attached networks participate in routing updates
• to tell the router which set of metrics to use for the attached networks
• to tell the router which routing protocol to use


13

Assuming that the network shown in the graphic is converged and dynamic routing is enabled, which of the following conditions will cause a modification to the Orlando routing table? (Choose two.)
• The device connecting the S0 interface of the Tampa router to the serial link loses power.
• A network administrator shuts down the Orlando router E0 interface.
• A DCHP server connected to the Tampa E1 network loses power.
• The IP address of a workstation on the Orlando E0 network is reassigned.
• A host on the Orlando E1 network transmits data to a server on the Tampa E1 network.
• A Telnet connection to the Orlando router fails.

14 All routers at a medium sized company have been upgraded. During the upgrade, the network administrator determined that a more advanced routing protocol using a combination of both distance vector and link state features should be implemented. Which protocol should be selected?
• RIP
• BGP
• OSPF
• EIGRP


15 Which category of routing algorithms discovers and maintains a topological map of the entire internetwork?
• static
• Bellman-Ford
• exterior gateway
• Internetwork Packet Exchange
• distance vector
• link-state

16 Which is an exterior routing protocol commonly used between ISPs?
• RIP
• BGP
• OSPF
• EIGRP


17 Which of the following statements are true regarding the command ip route 172.16.1.0 255.255.255.0 172.16.2.1? (Choose three.)
• This command is used to set up a static route.
• This command is used to set up a default route.
• This command is entered from global configuration mode.
• All packets intended for network 172.16.1.0 will be sent to gateway 172.16.2.1.

• All packets intended for network 172.16.2.1 will be sent to gateway 172.16.1.0.


18

Referring to the diagram, which commands will enable hosts on the Idaho E0 network to reach hosts on the E0 network of the Montana router? (Choose two.)
• Montana(config)# ip route 172.31.5.0 255.255.255.0 172.31.5.1
• Montana(config)# ip route 172.31.3.0 255.255.255.0 172.31.4.1
• Idaho(config)# ip route 172.31.5.0 255.255.255.0 172.31.4.1
• Idaho(config)# ip route 172.31.5.0 255.255.255.0 172.31.4.2
• Idaho(config)# ip route 172.31.5.1 255.255.255.0 172.31.4.1

19

Which of the following are valid static IP routes? (Choose three.)
• RouterB(config)# ip route 192.168.5.0 255.255.255.0 S1
• RouterC(config)# ip route 192.168.1.0 255.255.255.0 S1
• RouterA(config)# ip route 192.168.3.0 255.255.255.0 192.168.2.2
• RouterB(config)# ip route 192.168.1.0 255.255.255.0 192.168.2.2
• RouterC(config)# ip route 192.168.2.0 255.255.255.0 192.168.4.1
• RouterA(config)# ip route 192.168.4.0 255.255.255.0 192.168.2.1


20 Given the command, RouterC(config)# ip route 197.5.2.0 255.255.255.0 192.10.1.1, what does the address 192.10.1.1 represent?
• the source host
• the next hop router
• the outbound interface
• the destination network


21 Which of the following conditions must be met in order for a network to have converged?
• The routers in the network are operating with dynamic routing protocols.
• The routers in the network are operating with compatible versions of IOS.
• The routers in the network are operating with the same routing tables.
• The routers in the network are operating with consistent routing knowledge.

22 Which two statements describe autonomous systems? (Choose two.)
• Interior gateway protocols are used between autonomous systems.
• Exterior gateway protocols are used between autonomous systems.
• An autonomous system may be under the control of multiple organizations.
• An autonomous system is identified by a 16 bit number assigned by ARIN.
• The autonomous system is identified in the network portion of the IP address.

'study > ccna' 카테고리의 다른 글

CCNA 2 - Module 10 Exam  (0) 2008.10.28
CCNA 2 - Module 9 Exam  (0) 2008.10.28
CCNA 2 - Module 8 Exam  (0) 2008.10.25
CCNA 2 - Module 7 Exam  (0) 2008.10.25
CCNA 2 - Module 7 Exam  (0) 2008.10.11


본인의 아이피 주소 확인과 위치 추적
[Schizo!, 2008. 6. 14. 19:51, study]

  Which devices will create multiple collision domains in an Ethernet network? (Choose two.)

*switch 

*router 

How many collision domains are shown in the diagram?

*seven

Refer to the exhibit. The physical documentation shows a portion of the internetwork of the ABC Company. Which segments will be free of collisions?

*segments 3, 4, and 5

Refer to the exhibit. Which diagram represents the network topology that an administrator would prefer, and why would the administrator prefer it?

*Diagram A. It will better provide available bandwidth to the hosts.

After an unsuccessful ping to the local router, the technician decides to investigate the router. The technician observes that the lights and fan on the router are not operational. In which layer of the OSI model is the problem most likely occurring?

*physical

Refer to the exhibit. How many broadcast domains are shown?

*three

Which of the following statements are correct about CSMA/CD? (Choose three.)

*It is a media access method used in LANs.

*When a device needs to transmit, it checks to see if the media is available.

*Only one device can successfully transmit at a time

Refer to the exhibit. A network associate needs to establish an Ethernet connection between Host A and Host B. However, the distance between the two hosts is further than the cabling standards allow. Which two devices that operate at the physical layer of the OSI can be used to allow Host A and Host B to communicate? (Choose two.)

*hub

*repeater

What are important characteristics to consider when purchasing a network interface card? (Choose two.)

*media used on the network

*system bus used on the computer

Refer to the exhibit. What must be configured on Host B to allow it to communicate with the file server? (Choose three.)

*a unique host IP address

*the subnet mask for the LAN

*the default gateway address

What is the decimal representation of the binary number 11111000?

*248


 Which type of address is 192.168.170.112/28? 

 *subnetwork address

Refer to the exhibit. Host A pings Host B. What can be concluded about the source and destination addresses contained in the communication sent by Router R5 when it forwards the ping out the Ethernet interface to Host B? (Choose two.)

*source MAC address: 5555.AAAA.6666

*destination IP address: 192.168.10.134

 What is the correct number of usable subnetworks and hosts for the IP network address 192.168.35.0 subnetted with a /28 mask?

 *14 networks / 14 hosts

Refer to the exhibit. The network administrator wants to create a subnet for the point-to-point connection between the two routers. Which subnetwork mask would provide enough addresses for the point-to-point link with the least number of wasted addresses?

*255.255.255.252

Refer to the exhibit. A network technician is trying to determine the correct IP address configuration for Host A. What is a valid configuration for Host A?

*IP address: 192.168.100.20; Subnet Mask: 255.255.255.240; Default Gateway: 192.168.100.17

 A router interface has been assigned an IP address of 172.16.192.166 with a mask of 255.255.255.248. To which subnet does the IP address belong?

 *172.16.192.160

 Which characteristics are common to both UDP and TCP? (Choose two.)

 *uses port numbers

*classified as a transport layer protocol

Two peer hosts are exchanging data using TFTP. During the current session, a datagram fails to arrive at the destination. Which statement is true regarding the retransmission of the datagram?

*Datagram retransmission is controlled by the application.

 Which protocols are TCP/IP application layer protocols? (Choose two.)

 *TFTP

 *DNS

Which technologies are considered to be LAN technologies? (Choose two.)

*Token Ring

*Ethernet

Refer to the exhibit. What is the order of the TCP/IP Protocol Data Units as data is moved as indicated through the OSI model?

*bits, frames, packets, segments, data

Refer to the exhibit. A newly hired technician has a task of terminating CAT 5 UTP cables. The network administrator visually examined the cables the technician terminated. Some of the cables have connectors as shown in the exhibit. What should the network administrator explain to the technician about the cables?

*The cable in Graphic A will produce more crosstalk.

Refer to the exhibit. Which type of UTP cable should be used to connect Host A to Switch1?

*straight-through

When using Category 5 UTP cable, which RJ-45 pin pairs are used to exchange data between hosts on an Ethernet network?

*1 and 2; 3 and 6

In the exhibit, the connections between the devices are labeled A, B, C, D, and E. For each connection, what is the correct UTP cable to use?

*A=rollover, B=straight, C=straight, D=crossover, E=crossover

 A network administrator has added a new switch to the network. The new switch connects to an existing switch that is already installed. Which UTP cable correctly connects the new switch to the existing switch? 

*crossover

Which cable diagram displays the end to end pinout for a crossover cable used with Cisco devices?

*Cable C

Which subnet masks could be used when subnetting a Class B IP address? (Choose two.)

*255.255.255.240

*255.255.192.0

A large company has a network that is constantly changing. The routing tables in the routers need to be adjusted to reflect the changes in the routing paths. What type of routing would the network administrator implement?

*dynamic routing protocols

Which physical network topology is easy to monitor and troubleshoot, easy to add new devices to as the network expands, but subject to complete failure when a central hub or switch ceases to work?

*star

Refer to the exhibit. The connections in the exhibit are labeled A through E. Which of these indicate LAN links? (Choose two.)

*link A

*link E

A computer technician is asked to make a network cable. One end of the cable is pinned as a 568A and the other as a 568B. For what purposes can this cable be used? (Choose two.)

*to connect a switch to a switch

*to connect a hub to a switch

 How does a switch learn the addresses of hosts connected to its ports?

*The switch reads the source MAC address on incoming frames and records it in CAM.

A router determines the path to deliver a packet. What layer of the OSI model does this fact represent?

*network

Refer to the exhibit. Workstation 1 pings the Fa0/1 interface of Router 1. Which MAC address will workstation 1 obtain during the ARP request for this communication?

*00-08-A3-B6-CE-02

Refer to the exhibit. A network administrator has implemented subnetting using the network 192.168.25.0 and a /28 mask. Workstation 1 is not able to ping with Workstation 2. What is a possible cause for this lack of communication?

*Workstation 1 is not on the same network that the RTA router LAN interface is on.

Why do vendors utilize the OSI model when designing networking products?

*It ensures greater compatibility and interoperability with equipment from different vendors.

A technician is testing connectivity between the devices using the ping command. Pings between Host B and Host A were successful. The technician could not ping the R3 address 172.16.3.2 from Host A. The technician issued ipconfig from Host A and saw the information displayed in the exhibit. What is the most likely problem?

*The default gateway of Host A is incorrect.

 The ping command can be used to test connectivity between hosts. Which OSI model layers are verified by this test?

 *Layers 1, 2 and 3



Which network device creates the highest amount of latency?

*router




Refer to the exhibit. What kind of Ethernet cable is represented?

*straight-through cable




Refer to the exhibit. The hub and the switch are operating using factory default settings. Which hosts will receive the frame if host A transmits a broadcast frame?

*Workstations B, C, D, E, and the router will receive the data.



Why would a company install a switch instead of a hub when building or expanding a corporate network?

*A switch provides more bandwidth by sending frames only out the port to which the destination device is attached. A hub sends the frame out all ports except the source port.





Consider the networks shown in the exhibit. Host A is sending packets to host B. Which layer of the OSI model is being used when the router is making the calculated decision to determine which interface to send the packet out?

*network


An Ethernet host receives a frame, calculates the FCS, and compares the calculated FCS to the FCS received in the frame. The host finds that the two FCS values do not match. What action will be taken by the host?

*The host discards the frame.




Based on the graphic above, which of the following occurs as each host system comes on line in the topology?

*The switch adds MAC address to the bridge table as each host sends a frame.


A network administrator has installed a 24 port switch and connected 10 computers with 10/100 NICs. If the NICs are operating at 100 Mbps, how much bandwidth is available for each computer to receive data?

*100 Mbps


A user initiates three simultaneous FTP connections from the local host to the same FTP server. Which OSI layer is responsible for establishing and managing these different FTP connections?

*session








SECOND CASE

Which devices segment collision domains? (Choose two.)

* router 

* switch 




Refer to the exhibit. How many collision domains are present in the topology?

*7




Refer to the exhibit. An instructor in the network class has given the students the network diagram and asks the students to select the appropriate network devices. The goals are to provide a collision-free LAN environment and to provide Internet connectivity. What is the correct design?

*Replace Box 1 with a Layer 2 switch and Box 2 with a router.




Refer to the exhibit. A network administrator attempts to increase the available bandwidth for workstation A by setting the NIC to full-duplex mode. After the configuration is changed, there are increased collisions and errors occurring. Why is this occurring in the network?

*The NIC is no longer detecting collisions.




Refer to the exhibit. A network administrator is testing a connectivity issue in the network. The administrator discovers that host A cannot communicate with host B, host C, or RouterA. A ping command on host A to 127.0.0.1 succeeds. The NIC link indicator on host A is illuminated. Temporarily, the administrator removes the cable from host A and uses the LAN cable from host B to connect from host A to port 1 on the switch. While using the substitute cable, host A can communicate with host C and RouterA. At which layer of the OSI model was the problem occurring?

*physical




How many broadcast domains are shown in the diagram?

*three


A collision has occurred on an Ethernet network. Which three statements explain the CSMA/CD process? (Choose three.)

*  After the jam signal, all transmission stops for a random period. 

* When the backoff period expires, each host checks to see whether the networking media is idle and then attempts to transmit. 

*  When the collision is detected, the hosts continue to transmit using a jam pattern for a short time to ensure that all hosts detect the collision. 


Which of the following devices extend a collision domain? (Choose two.)

* hub 

* repeater 


What should a network administrator consider when migrating to Gigabit Ethernet architecture from Fast Ethernet? (Choose three.)


*Existing NICs might need to be upgraded. 

*Existing switches might need to be upgraded. 

*Existing UTP must be tested for CAT 5e compatibility.




Refer to the exhibit. What must be configured on Host B to allow it to communicate with the Host C? (Choose three.)

*a unique host IP address

*the default gateway address

*the subnet mask for the LAN


Which binary number is a representation of the decimal number 248?

*11111000


Which type of address is 223.168.17.167/29?

*broadcast address


When two or more routes exist to a network, upon what do routers base their decision?

*the routing protocol metrics


Which combination of network id and subnet mask correctly identifies all IP addresses from 172.16.128.0 through 172.16.159.255?

*172.16.128.0 255.255.224.0


What is the correct number of usable subnetworks and hosts for the IP network address 192.168.99.0 subnetted with a /29 mask?

*30 networks / 6 hosts




Refer to the exhibit. The internetwork in the exhibit has been assigned the IP address 172.20.0.0. What would be the appropriate subnet mask to maximize the number of networks available for future growth?

*255.255.252.0


A NIC of a computer has been assigned an IP address of 172.31.192.166 with a mask of 255.255.255.248. To which subnet does the IP address belong?

*172.31.192.160


What are three characteristics of the TCP protocol? (Choose three.)


* forces the retransmission of unacknowledged packets 

* creates a virtual session between end-user applications 

*is responsible for breaking messages into segments and reassembling them at their destination


A network user is using the FTP protocol to transfer data from the local host to an FTP server. The local host is also using the SNMP protocol to report the system status to the network management system. Which statement describes the communication from the host?

*FTP uses TCP to establish a session before any data is transferred.


Which protocols are TCP/IP application layer protocols? (Choose two.)

*FTP

*SMTP


Which technologies are considered to be WAN technologies? (Choose two.)

*DSL

*Frame Relay





Refer to the exhibit. What is the order of the TCP/IP Protocol Data Units as data is moved as indicated through the OSI model?

*data, segments, packets, frames, bits




Refer to the exhibit. A newly hired technician has a task of terminating CAT 5 UTP cables. The network administrator visually examined the cables the technician terminated. Some of the cables have connectors as shown in the exhibit. What should the network administrator explain to the technician about the cables?

*The cable in Graphic A will produce more crosstalk.




Refer to the exhibit. Which type of UTP cable should be used to connect Switch1 to Switch2?

*crossover


When using Category 5 UTP cable, which RJ-45 pin pairs are used to exchange data between hosts on an Ethernet network?


*1 and 2; 3 and 6




Refer to the exhibit. Which type of cabling should be used at each of the connection points shown?

*A-straight-through

B-crossover

C-straight-through

D-fiber

E-straight-through





Refer to the exhibit. What type of cable connects the two routers together without any intermediary device?

*crossover




Which cable diagram displays the end to end pinout for a console cable used with Cisco devices?

*Cable B


Which subnet masks would be valid for a subnetted Class B address? (Choose two.)

* 255.255.252.0 

* 255.255.255.192 


What type of routing is it when the network administrator manually configures a route?

*static


Which statement describes a star topology?

*Each host is connected to a hub or switch, either of which acts as a central point for all network connections.




Refer to the exhibit. The connections in the exhibit are labeled A through E. Which of these indicate WAN links? (Choose three.)

*

 link B 

 link C 

 link D 




A technician needs to connect a FastEthernet port from a router to a FastEthernet port on a switch. The graphic shows the RJ-45 cable ends for a patch cable. What result can be expected if this cable is used for the link?

*The cable will be able to pass traffic between the devices.




Refer to the received frame in the exhibit. In what two ways is the information from the received frame used by a switch? (Choose two.)

*192.168.10.11 is left intact as the frame is forwarded.

*To make the forwarding decision, the switch looks in its switch table for address aaaa.bbbb.cccc.


Which layer of the OSI model defines the process of adding the source and destination IP address to a data packet?

*network




Refer to the exhibit. Workstation 1 pings the Fa0/1 interface of Router 1. Which MAC address will workstation 1 obtain during the ARP request for this communication?

*00-08-A3-B6-CE-02




Refer to the exhibit. What device does Device X represent in the graphic to allow PC1 to ping PC4?

*router


When the receiving workstation detects an error in the data it has received, it does not acknowledge receipt of the data. The source workstation retransmits the unacknowledged data. Which layer of the OSI model supports this process of retransmission?

*transport


A company has the following addressing scheme requirements:

   -currently has 25 subnets

   -uses a Class B IP address

   -has a maximum of 300 computers on any network segment

   -needs to leave the fewest unused addresses in each subnet

What subnet mask is appropriate to use in this company?

*255.255.254.0


What can be verified by successfully pinging the reserved loopback address on a host?

*The TCP/IP stack of the local host is installed correctly.




Refer to the exhibit. A company needs to attach workstation E at a point 150 meters from an existing hub. What device should be placed at location D to allow the new host to connect to the network with the least amount of latency?

*repeater




Refer to the exhibit. Which type of Category 5 cable is used to make an Ethernet connection between Host A and Host B?

*crossover cable




A simplified CAM table for Switch1 is shown in the exhibit. If host A sends a frame with a destination MAC address of 66C, how does the switch process this frame?

*The switch sends the frame out ports 2, 3, and 4.


Which of the following increases the potential for a collision to occur?

*an increase in the number of devices attached to the hub




Refer to the exhibit. Host A has been added to the network. However, host A cannot communicate with the server B or the Internet. All cables have been tested and are functioning to standards. At which layer of the OSI model is this problem occurring?

*Layer 3


A workstation is browsing a web server. What will be the partial contents of the segment sent from the workstation to the web server?

* 1번




Refer to the exhibit. What is the purpose of the highlighted address?

*It allows the NIC to communicate with other devices on the same network.




Refer to the exhibit. Host A is being manually configured for connectivity to the LAN. Which two addressing scheme combinations are possible configurations that can be applied to the host for connectivity? (Choose two.)

*Address - 192.168.1.82

Gateway - 192.168.1.65

*Address - 192.168.1.70

Gateway - 192.168.1.65


A user initiates three simultaneous FTP connections from the local host to the same FTP server. Which OSI layer is responsible for establishing and managing these different FTP connections?

*session

'study' 카테고리의 다른 글

삼국지위서동이전  (9) 2009.06.27
진서 부여전 (원문)  (0) 2009.06.27


본인의 아이피 주소 확인과 위치 추적
[Schizo!, 2008. 6. 9. 13:31, study/programming]
님의 경우는 메뉴에서 Options - Directories 에서 경로를 적절히 설정하여 해결할수 있습니다.

또한 C++ 로 컴파일 하려면 파일명도 *.cpp 이여야지만 C++ 로 컴파일 합니다.

아래는 제가 예전에 비슷한 문제(Turbo C++ 3.0)에 대한 답변을 한것들 입니다.
지금 문제 외에도 다음과 같은 문제와 만날수 있죠.

Turbo C++ 에서 간단한 소스에서 에러가 나는 원인들은 아래와 같습니다.

[그래픽 셋팅]

[F10]키 누르면 메뉴를 선택합니다.
Options
Linker
Libraries...

Libraries 선택하시면 Dos형 체크박스가 나올거에요.
Libraries OK
[ ] Container Class
[ ] Turbo Vision Cancel
[X] Graphics library
[X] Standard Run Time Help


[엉뚱한 파일 컴파일]

메뉴중에 Project 라고 있을거예요.
여기서 프로젝트를 지워 줍니다.
보통 책에서 프로젝트에 대한 내용이 안나오므로
초보자는 소스는 짜고서 엉뚱한걸 컴파일 할수도 있거든요.

Alt + 0 을 누르면 툴내의 차일드창 목록이 뜨는데
쓸데 없는 소스창이 있을수도 있어요.
그런 소스는 Delete 키로 없애세요

[헤더파일] - 님은 이경우에 속합니다

헤더파일을 Tc 에서 설정하지 않은 폴더로 정해놓았을 수도 있습니다.
#include "경로\stdio.h"
위와 같이 경로를 설정할수 있습니다.
물론 F10키로 메뉴상에서 경로를 선택할수도 있구요.
Options - Directories 메뉴를 클릭하면 경로를 바꿀수 있습니다.

[콘솔창 보기]

그리고 이런 경우는 적지만, 님이 에러가 나지 않았는데 에러라고 생각할 수도 있습니다.
컴파일하면 에러와 경고가 있는데 경고는 에러가 아닙니다.
위의 내용을 컴파일 하면 결과가 나오지 않습니다.
결과를 보려면 Alt + F5 키를 누르면 됩니다.

[프로그램 종료전 출력결과 보여주기]

결과를 자동으로 볼수 있는 Hello World를 짜려면 아래를 써넣으세요.

#include <stdio.h>
#include <conio.h>
main()
{
printf("Hello, world!");
getch(); // ←
키보드 누를때까지 프로그램이 종료되지 않습니다.
}



Hello, world!


[툴사용시 화면이 깨질 경우]

도스로 들어간 다음 프롬프트에
chcp 437
를 하면 영문도스로 바뀌며, Tc 실행시 글자가 깨지지 않습니다.

[지식인으로 올리면 일부소스가 없어질 경우]

올리신 소스에서 가 나타나지 않는 이유는 html 의 태그로 인식하기 때문이예요.
역시 태그를 사용함으로써 해결하면 됩니다.

[Bonus ! 무슨 짓을 해도 해결이 안되는 경우]

알수 없는 설정을 잘못 건드렸는데 단서가 될만한게 아무것도 없을때,
마지막으로 무조건 해결하는 방법도 있습니다.
Turbo C++ 3.0 은 이런 모든 설정을 Bin 폴더의 TCCONFIG.TC 에 저장합니다.
아무 이상 없이 자기가 원하는 설정에 맞추어진 곳 에서 TCCONFIG.TC 만 카피해 자신의 폴더에 옮겨 놓아도 모든건 해결 됩니다.



http://kin.naver.com/detail/detail.php?d1id=1&dir_id=10104&eid=gTLBeVEFaetrrirB/HLbyJhB1wFVLKa2&qb=dW5hYmxlIHRvIG9wZW4gIMXNuri+vg==&pid=fZyxUdoQsD4ssZHKQkKsss--423649&sid=SEyxVzKeTEgAAEkqCu4

'study > programming' 카테고리의 다른 글

WORD의 의미  (0) 2009.04.21
c언어 예약어  (0) 2009.04.21
getpass  (1) 2008.04.29
리눅스 명령어  (0) 2008.03.18
비주얼스튜디오 2008  (0) 2008.03.09


본인의 아이피 주소 확인과 위치 추적
[Schizo!, 2008. 4. 30. 16:28, study/전자회로]
사용자 삽입 이미지

'study > 전자회로' 카테고리의 다른 글

가산기에 대해...  (0) 2008.03.31


본인의 아이피 주소 확인과 위치 추적
[Schizo!, 2008. 4. 29. 14:18, study/programming]
사용자 삽입 이미지

'study > programming' 카테고리의 다른 글

c언어 예약어  (0) 2009.04.21
터보c 에러  (0) 2008.06.09
리눅스 명령어  (0) 2008.03.18
비주얼스튜디오 2008  (0) 2008.03.09
비주얼c  (0) 2008.03.09


본인의 아이피 주소 확인과 위치 추적
[Schizo!, 2008. 3. 31. 17:49, study/전자회로]

보아하니 컴퓨터를 말씀하시는 것 같네요. ;

비트가 무엇인지 말씀하셨는데, 비트(Bit) 라고 하는 것은 Binary Digit 의 약자로써 한 자리수로 이루어진 2진수 (여기서 2진수는 컴퓨터 에서만 쓰일 수 있는 0과 1의 두가지 숫자를 말합니다.)  를 의미하며, 정보 표현의 최소 단위입니다.

숫자가 높으면 높을 수록 좋은 것이라는 사실은 충분히 아실꺼라고 생각하고요. ^ ^

가산기는 가산. 한자로 더할 가. 말 그대로 덧셈을 하는 것입니다.

가산기의 회로는 조합 논리회로 라고 해서 반가산기(H·A), 전가산기(F·A).

또 가산기와 관련된 회로 말고도

여러가지 조합 논리회로들이 있는데요.

가산기와 관련된 회로는 이 두가지 회로입니다.

반가산기(H·A)는 입력이 2개, 출력이 두개이며 1개의 XOR 게이트(여기서 XOR 게이트는 기본 논리회로 중 하나로 앞에서 언급했던 2진수 끼리의 덧셈을 한 결과를

반대로 나타내게 하는 회로를 말함) 와 AND 게이트(AND 게이트 역시 기본 논리회로 중 하나로 2진수의 곱셈 결과를 나타냄) 로 구성되어 있는 가산기이며 전가산기(F·A)는 입력이 3개, 출력이 2개이며 반가산기 2개와 1개의 OR 회로(기본 논리회로 중 하나로 2진수의 덧셈 결과를 나타냄) 로 구성되어 있는 가산기 입니다.

사용용도는 말그대로 덧셈을 하기 위해서라는 목적 밖에는..

말씀을 못드리겠고요.

가산기 회로도는 아래 자료를 첨부하였으니 이미지를 보시면서

설명을 같이 보신다면 이해가 빠르실 줄로 생각합니다. ;

사용자 삽입 이미지

     








▲ 반가산기  회로도                                            

사용자 삽입 이미지
 









▲ 전가산기 회로도

'study > 전자회로' 카테고리의 다른 글

전자회로  (0) 2008.04.30


본인의 아이피 주소 확인과 위치 추적
[Schizo!, 2008. 3. 18. 11:12, study/programming]

유닉스/리눅스 명령어 레퍼런스


파일 명령어

ls - 디렉토리 목록보기
ls -al - 숨은 파일까지 정렬된 형태로 보기
cd dir - dir 디렉토리로 이동
cd - home 디렉토리로 이동
pwd - 현재 위치한 디렉토리 보여주기
mkdir dir - dir라는 디렉토리 만들기
rm file - file을 지우기
rm -r dir - dir 디렉토리를 지우기
rm -f file - 강제로 file 삭제
rm -rf dir - dir 디렉토리와 디렉토리 아래에 있는 모든 파일 삭제
cp file1 file2 - file1을 file2라는 이름으로 복사
cp -r dir1 dir2 - dir1 디렉토리에 있는 것들을 dir2 디렉토리로 복사; dir2가 존재하지 않는다면 만듬
mv file1 file2 - file1을 file2로 이름을 바꾸거나 옮김,
file2가 디렉토리로 존재한다면 file1을 file2 디렉토리로 옮김
ln -s file link - file로 연결된 link라는 심볼릭 링크를만듬
touch file - file을 생성하거나 업데이트
cat > file - 입력을 file로 저장
more file - file의 내용을 출력
head file - file의 첫 10줄을 출력
tail file - file의 마지막 10줄을 출력
tail -f file - file에 추가되는 내용을 출력,마지막10줄부터 출력함


프로세스 관리
ps - 현재 활성화된 프로세스 보여주기
top - 실행중인 모든 프로세스 보여주기
kill pid-프로세스id pid를 종료
killall proc - proc로 시작하는 모든 프로세스 종료
bg - 정지되있거나 화면에서 안보이게 실행중인 프로세스 보여주기; 정지된 프로세스를 화면에 출력하지 않고 계속 진행하기
fg - 화면에 보이지 않게 작동하던 작업 중 최근의 것을 화면에출력하면서 작동시키기
fg n - 화면에 보이지 않게 작동하던 작업 중 n 번째 작업을 화면에 출력하면서 작동시키기


파일 퍼미션
chmod 숫자 file - file의 퍼미션값을 숫자로 바꿈. 숫자는 3자리이며 첫 번째는 소유자,두 번째는 그룹,
세 번째는 익명의권한을 더해서 나타냄.
파일 퍼미션
chmod 숫자 file - file의 퍼미션값을 숫자로 바꿈. 숫자는 3자리이며 첫 번째는 소유자,두 번째는 그룹, 세 번째는 익명의
권한을 더해서 나타냄.

SSH
ssh
user@host - user로 host에 접속
ssh -p 포트넘버
user@host - host의 지정한 포트넘버에
user로 접속
ssh-copy-id
user@host-사용자명,암호를 입력하지 않고
로그인 할 수 있도록 ssh key를 복사


검색
grep pattern files - file안의 pattern을 찾기
grep -r pattern dir - dir 디렉토리 안에서 재귀적으로pattern 찾기
command | grep pattern - command 명령의 출력에서pattern을 찾는다
locate file - 파일을 찾음


시스템 정보보기
date - 현재 날짜와 시각을 출력
cal - 이번달 달력을 출력
uptime - 현재 기동시간을 출력
w - 온라인인 사용자를 출력
whoami - 어느 사용자로 로그인 하였는지 출력
finger user -user에 관한 정보 출력
uname -a - 커널 정보 출력
cat /proc/cpuinfo - cpu 정보 출력
cat /proc/meminfo - 메모리 정보 출력
man command - command에 대한 매뉴얼 출력
df - 디스크 사용량 출력
du - 디렉토리 사용량 출력
free - 메모리와 스왑 정보 출력
whereis app - app를 실행가능한 위치 출력
which app - app가 기본으로 실행되는 곳을 보여줌


압축
tar cf file.tar files - files들을 포함한 file.tar를 만듬
tar xf file.tar - file.tar을 압축해제
tar czf file.tar.gz files - Gzip 압축을 사용한 압축
tar zxf file.tar.gz - Gzip을 이용해 압축해제
tar cjf file.tar.bz2 - Bzip2 압축을 사용한 압축
tar xjf file.tar.bz2 - Bzip2 압축을 사용한 압축해제
gzip file - file을 압축해서 file.gz로 이름변경
gzip -d file.gz - file.gz를 fiel로 압축해제


네트워크
ping host - host에 핑을 보내 결과 출력
whois domain - domain에 대한 whois 정보 출력
dig domain - domain에 대한 DNS 정보를 출력
dig -x host - 호스트까지의 경로를 되찾아가기


설치
소스로부터 설치
./configure
make
make install
dpkg -i pkg.deb - 패키지 설치(Debian)
rpm -Uvh pkg.rpm - 패키지 설치(RPM)


단축키
Ctrl+C - 현재 명령의 실행을 강제로 마침
Ctrl+Z-현재 명령을 멈춤,fg를 이용해서 계속해서 화면에서 보
이도록 실행하거나 bg 를 이용해서 안보인채 계속 실행
Ctrl+D-현 세션에서 로그 아웃,exit와 비슷
Ctrl+W - 현재 라인에서 한 단어 삭제
Ctrl+U - 현재 줄 전체 삭제
Ctrl+R - 최근 입력한 명령어 보여주기
!! - 마지막 명령어 반복실행
exit - 현재 세션에서 로그 아웃

cal [[month] year]
달력을 출력

date [MMDDHHmm[[yy] | ccyy]]
컴퓨터의 시간을 알 수 있음

df [-lt][-f][{}]
슈퍼블록에서 카운트하고 있는 마운트된 파일 시스템, 디렉토리에서 사용가능한
디스크블록과 freeinode수를 알려줌

du
사용자 자신의 디스크 사용 상황을 블록 단위로 출력해줌

grep [option] limited regular expression [file]
파일에서 특정한 패턴을 찾는데 사용되며, 그 패턴을 포함하고 있는 모든 행을 출력함

kill [-sihno] PID
지정한 프로세서에게 종료신호를 보내는 명령어

ps
컴퓨터 시스템에서 활동중인 프로세서의 상태를 알려주는 명령

touch [-amc][MMddhhmm[yy]]files
지정된 파일에 접근하여 최종적으로 수정된 시간을 갱신

tr [-option][string1[string2]]
표준 입력의 특정 문자들을 삭제하거나 치환하여 표준 출력으로 내보내는 명령어

tty
컴퓨터 시스템에 연결하여 사용하고 있는 터미널의 이름을 알려줌

umask [###]
파일이 만들어질 때 적용되는 파일접근 허용모드를 설정

cd
현재 디렉토리를 바꿈

ls [-option][file/directory]
디렉토리의 내용을 화면에 출력

mkdir [-m]mode[-p]<경로><디렉토리 이름>
새로운 디렉토리를 만듬

rmdir [-ps]<디렉토리이름>
지정된 디렉토리를 제거

pwd
현재의 작업디렉토리를 화면에 출력

cat
파일의 내용을 표준 출력 장치로 내보내는 명령어

cmp [-l][-s]file1 file2
두개의 파일을 비교하여 차이점을 화면에 출력

comm [-[123]]file1 file2
지정된 두개의 파일을 비교하여 공통부분을 삭제 혹은 선택할 때 사용

cp file1 [file2] target
지정된 파일을 다른 이름으로 복사

cut -clist[files]
파일의 각 행에서 선택된 필드를 절단

dd[option=value]
파일을 변환 혹은 복사

diff
지정된 두개의 파일간의 차이를 비교하여 두개의 파일이 일치되기 위해 필요한
정보를 제공

fgrep [option] string[file]
문자열에 따라 파일을 검색

find path list expression
어떤 파일이 어느 디렉토리에 있는지를 찾아줌

join [option]file1 file2
관계형 데이터베이스 조작 명령으로 지정된 파일의 관계를 결합하여 결과를
표준 출력장치로 출력

ln [-f][-n][-s]file1[file2] target
두개의 파일을 연결하여 사용

mknod name b/c major-No minor-No
특수 파일을 위한 디렉토리 항목과 이에 대응하는 i-node를 생성

mv <현재 이름> <변경될 이름>
디렉토리 또는 파일의 이름을 변경

paste file1 file2
여러 개의 파일에 있는 같은 행의 내용을 병합

pr -option files
파일을 표준출력으로 보여주고 현재의 시각, 파일명, 페이지 등을 같이 보여줌

rm [-f][i]file
파일 혹은 디렉토리를 삭제

sort [option]files
파일을 정렬 혹은 병합

tail
지정된 파일의 끝 부분을 출력

tar [-]{txruc}[vwfblm][0-7[lmh]][tapefile][blocksize]file1 file2
파일들을 자기 테이프에 저장 또는 불러오기 위한 명령어

ulimit
v 사용자 범위의 출력, 설정, 프로세서의 보통 파일 크기 범위를 출력

umask[xxx]
v 파일 생성 마스크의 설정과 출력을 위해 사용

uniq [-udc [+n][-n]][input[output]]
중복되는 행을 삭제하는 명령

wc file
텍스트 파일에 담겨져 있는 문자 수, 단어 수 및 라인 수를 화면에 출력하는 명령

bc
간단한 산술 계산을 할 수 있게 함

enable, disable
프린터의 사용을 허용 혹은 불가능하도록 설정

factor [integer]
지정된 정수를 소인수 분해하여 화면에 출력

mesg [-n][-y]
다른 사용자가 메세지를 보낼 때 수신여부를 결정

mount [-v | -p]
이미 만들어져 있는 파일 시스템을 연결하는 명령

passwd
자신의 암호를 등록하거나 변경할 때 사용

stty [-a][-g][option]
현재 단말기나 콘솔의 입/출력 선택 항목을 설정

tee [-l][-a][file]
파이프를 접속

tr [-option][string1[string2]]
표준 입력의 특정 문자들을 삭제하거나 치환하여 표준 출력으로 내보내는 명령

wall
모든 사용자에게 동일한 메세지를 전송

write user[terminal]
다른 사용자에게 1대1 메시지를 전송

chgrp group file
지정된 파일의 소유권자 그룹을 바꾸는 명령

chmod mode file
지정된 파일에 대한 사용 권한을 변경하고자 할 때 사용

chown owner file
지정된 파일에 대한 소유 권한을 변경하고자 할 때 사용

'study > programming' 카테고리의 다른 글

터보c 에러  (0) 2008.06.09
getpass  (1) 2008.04.29
비주얼스튜디오 2008  (0) 2008.03.09
비주얼c  (0) 2008.03.09
공부  (0) 2008.01.16


본인의 아이피 주소 확인과 위치 추적
[Schizo!, 2008. 3. 9. 11:47, study/programming]
마이크로소프트의 비주얼스튜디오 2008 공개버전
스텐다드 버전이 아니여도 프로그래밍 하는데는 지장 없음.

 

Microsoft Visual Studio Express Edition 2008

'study > programming' 카테고리의 다른 글

getpass  (1) 2008.04.29
리눅스 명령어  (0) 2008.03.18
비주얼c  (0) 2008.03.09
공부  (0) 2008.01.16
웹기반 다이어그램 제작 툴  (0) 2008.01.05


본인의 아이피 주소 확인과 위치 추적
[Schizo!, 2008. 3. 9. 11:35, study/programming]

'study > programming' 카테고리의 다른 글

리눅스 명령어  (0) 2008.03.18
비주얼스튜디오 2008  (0) 2008.03.09
공부  (0) 2008.01.16
웹기반 다이어그램 제작 툴  (0) 2008.01.05
문자열 연결 strcat 안씀.  (0) 2007.12.26


본인의 아이피 주소 확인과 위치 추적
[Schizo!, 2008. 2. 8. 01:05, study/toeic]

<출처 : http://www.english.co.kr/>
http://blog.naver.com/stacy1052?Redirect=Log&logNo=70000636671

오늘은 엘씨공부가 한창인 관계로 기본적인 엘씨 공부방법을 소개할까합니다.

다들 딕테이션을 많이 하라고 하는데요
앞에서 많이들 적어주시긴 했는데 제가 생각하는 딕테이션에 대해 먼저 말씀드릴게요
그리고 딕테이션은 많이들 알고 계시기 때문에 반복적인 정보인 것 같긴 하지만 혹시나 하는 마음에
아주 기본적이지만 여기서부터 시작하려고 합니다.  

아시는 분들은 아래 내용은 안읽어보셔도 되요^^


받아쓰기
영어로는 Dictation이라고 씁니다.

초등학교 때 하셨던 것처럼 영어 한 문장을 듣고 받아쓰시는 방법이라고 생각하시면 됩니다.
토익을 완전히 처음 접하시는 분들은 파트 I, 또는 파트 II 한 문장을 받아 적는데 심하면 오분이상이 걸릴수
도 있습니다. 테잎을 백번을 돌려 들어도 완전한 문장을 받아 적기 힘들때도 있죠..

시간도 많이 걸리고 짜증나기도 하고 도대체 언제까지 들어야 효과를 장담할 수 있을지 예측도 불가능한
딕테이션을 하는 이유는 "내가 못듣는 부분"을 찾기 위해서입니다.  

많은 학생들이 대충 듣고서 "다" 들었다고 착각(^^;; 기분나쁘게 듣지는 마시길~~)하는 경우가 있거든요
직접 해보면 정말 얼굴에 기름종이를 대었다 뗀 것처럼 적나라한 듣기 실력이 드러납니다.

그래서, 파트 1, 2처럼 1문장씩 짧게 나오는 부분에서 제대로 문장을 익혀야 파트 III, IV에 가서 덜 좌절하
고 덜 고생할 수 있습니다.


우선 1문장 듣고 받아쓰세요.  
안 될 경우 10번 정도만 돌려 들으세요. 더 들어도 현재 상태에서는 머리 뚜껑만 열리는 경우가 많습니다.
공부하다 성격버리면 곤란하죠.

스크립트 확인하세요.
틀린부분을 빨간 색 (또는 색깔이 확연히 구분되는 펜으로 수정합니다.)

분석하세요.
왜 이 부분을 못들었는지 확인하세요.

***여기서부터가 더욱 중요합니다.
대부분은 위의 단계만을 밟습니다.
그리고 딕테이션을 했다고 하는데 저기까지만 하면 아마 별로 소용없다고 하시는 분들이 많을 거에요.

다시 들으시면서 자신이 못들은 부분을 확실히 머리속에 남겨야 합니다.
모르는 단어였던 것인지, 연음현상이 일어나서 몰랐던 건지, 아니면 내가 아는 발음과 다르게 나는지 등 여
러가지 이유가 있겠죠.

***여기까지만 해도 정말 좋지만 아직 한 단계가 남았습니다.
다시 들으시면서 따라 읽으셔야 합니다.
파트 I, II같은 경우는 짧은 문장이 많으므로 하루 한 두문장 정도는 (특히, 생소하거나 놀라운 영어 발음의
세계를 깨달은 문장을) 하루종일 외우시면서 다니시면 좋겠죠^^

이렇게 하루 두, 세시간씩 매일 2개월 이상씩만 하시면 놀라운 변화를 느끼실수 있으실 겁니다.

말이 쉽지 매일 두, 세시간씩 한다는 건 정말 힘들겠죠?
저 때의 놀라운 변화는 여러분들이 그만큼 영어 발음과 억양, 문장의 구성에 노출이 많이 되어서 익숙해졌
다는 증거입니다.

그러니 그만큼 노출될 정도로 많이 들으시구요, 위에서 설명드린 딕테이션은 동일한 노출의 경우에 보다
큰 효과를 얻을 수 있는 방법입니다.

다음에는 어느 정도 딕테이션을 해 보시고, 듣기도 어느 정도 되시는 분들을 위한 듣기 연습 방법을 설명하
도록 하지요^^

구럼...



토익 학습방법_딕테이션2번째_토익 받아쓰기 공부법

오늘부터는 파트 III로 들어가기도 하기 때문에 딕테이션의 다음 단계로 넘어가도록 하겠습니다.

흔히들 Shadowing (섀도잉)이라고 부르는 겁니다.

말그대로 그림자처럼 듣고 따라읽는 것입니다.

지난 번에 말씀드린 딕테이션의 문제는 자신의 문제점이 적나나하게 드러나는 장점에도 불구하고
엄청나게 시간을 많이 투자하여야 한다는 문제점이 있습니다.

따라서, 어느 정도 적응이 되신 분들..
이제는 문장이 어느 정도 들린다 하시는 분들..
그리고 파트 III, IV를 받아적다 보니 한, 두 문제 했더니 날이 샜더라 하시는 분들..

이제는 좀 더 다른 방법으로 문제점도 파악하고 속도도 올려야 할 때입니다.

그런 분들은 섀도잉을 써보시면 도움이 되실 겁니다.


딕테이션은 받아 적는 것에 치중하다가 단어만 또는 소리만 듣게 되고 내용은 이해하지 못하는 현상이 발
생할 수 있습니다. 그러나 섀도잉을 하면 문장의 구성 뿐 아니라 이해 능력도 함께 그리고 영어 발음, 연
음, 리듬에 대한 이해도 생길 수 있습니다.

다만, 이 방법은 앞에서도 말씀드린 것처럼 딕테이션에 어느 정도 적응이 되신 후에 하는 것이 효과적입니
다. 무조건 처음부터 이 방법을 쓰시면 여전히 자신이 무엇을 듣고 무엇을 듣지 못하는지 잘 알지 못하기
때문에 효과가 떨어질 수 있습니다.

방법은 의외로 쉽습니다.
테이프에서 한 문장씩 듣습니다. 그리고 따라읽습니다.

한 번듣고 따라 읽으면 좋지만 힘든 경우에는 문장 속의 주어, 동사, 목적어를 먼저 듣고 파악한 다음
한 번 더 들으시면서 나머지 부사정보들을 파악하십시오. 물론 이 때, 머리속으로 의미가 이해되지 않으면
섀도잉은 힘듭니다.

즉, 문장 구조에 대한 이해와 어휘가 어느 정도 build-up된 이후에 가능하다는 말이 되겠죠?

그리고, 지난번에도 말씀드린 것처럼 스크립트를 보시고 자신이 듣지 못한 부분이 무엇인지 확인하는 것
이 매우 중요합니다.

이 방법을 지속적으로 연습하면, 영어 발음감각도 좋아지고, 정보이해 능력도 좋아질 겁니다.

이해가 되시나요?

토익 학습방법_딕테이션마지막_토익 받아쓰기 공부비법


오늘은 딕테이션의 마지막 단계라고 할 수 있는 echoing에 대해서 설명드리겠습니다.

에코잉은 에코가 메아리자나요, 그래서 말 그대로 메아리치듯이 거의 동시에 따라읽기를 하는 방법입니
다. 그니까 Henry aimed to be like a native speaker라는 문장이 있다면 테이프에서 Henry를 들은 다음 바
로 치고 들어가서 따라 읽는 방법입니다.
무슨 말인지 잘 감이 안잡히시죠?

요즘 방송 선전에 보면 어떤 중국 사람이 연단에서 연설하자나요..그럼 그 사람이 중국말을 하자마자 한국
여자가 통역을 하죠? "솰라 솰라" 그리고 곧 "요즘 한국사람 ~~~" 머 이런 식으로요.
이것과 비슷하게 하시면 됩니다.

에휴하고 걱정이 앞서실 것 같은데 제 생각으로도 설명드린 방법중에서 가장 어려운 것 같습니다. 그래서,
혹시 한 문장 딕테이션 하기도 벅차다 하시는 분들..여전히 제가 말씀드린 한 단계만 올리는데 우선 집중하
시고 실력을 키워나가시면 될 것 같구요.
섀도잉에 어느 정도 익숙해지신 분들은 이 방법을 한 번 써보십시오.

좋은 점은 무엇인지 궁금하시죠?

장점은 우선 네이티브들이 읽어주는 영어의 스피드에 익숙해지고 발음과 억양에 적응할 수 있는 동시에
끊임없이 밀려들어오는 정보들에 대한 두려움이 없어집니다.

파트 III, IV하면서 가장 큰 문제가 이거자나요? 한 문장만 들려주면 알겠는데...언제 끝나는지 알수 없는 그
긴 내용이 주저리 주저리...

다만, 에코잉을 하실 때 주의할 점은 소리만 따라하시면 역시나 이것도 효과는 없다는 겁니다.
입으로는 따라하시되 해석이 되면서 따라가셔야 됩니다.
점점 오래 하시다 보면 익숙해지는 자신을 볼 수 있구요..

AFN같은 방송에 나오는 쉬운 말들 역시 따라하실 수 있습니다.
이 정도 실력이 된다는 건 listening이 어느 정도 자리를 잡았다는 거거든요.

좋겠죠?
여러분들도 하실수 있답니다.

차근차근 그러면서 꾸준히...
리스닝은 하루에 몰아서 하는 것 보다 매일 조금씩 하시는 것이 더욱 효과적입니다.

'study > toeic' 카테고리의 다른 글

toeic  (0) 2007.09.28


본인의 아이피 주소 확인과 위치 추적
[Schizo!, 2008. 1. 16. 22:50, study/programming]

#include <stdio.h>

int maxi(int max,int n);
int mini(int min,int n);

int main(void){
    int n,i,max,min;
    printf("비교할 숫자 입력\n");
    scanf("%d",&n);
    max=min=n;
    for(i=2;i<=10;i++){
        scanf("%d",&n);
        max = maxi(max,n);
        min = mini(min,n);
    }
    printf("최대값:%d 최소값:%d",max,min);
    return 0;
}
maxi(int max,int n){

    if(max<n){
        return n;
    }else
        return max;
}
mini(int min,int n){
    if(min>n){
        return n;
    }
    else
        return min;
}


#include <Stdio.h>

int main(void){
 int i,n;
 
 scanf("%d",&i);
 
 for(n=2;n<i;n++){
  if(i%n == 0){
   printf("%d는 소수가 아닙니다",i);
   return 0;
  }
 }
   printf("%d는 소수입니다",i);
   return 0;
}


'study > programming' 카테고리의 다른 글

비주얼스튜디오 2008  (0) 2008.03.09
비주얼c  (0) 2008.03.09
웹기반 다이어그램 제작 툴  (0) 2008.01.05
문자열 연결 strcat 안씀.  (0) 2007.12.26
후위식.  (0) 2007.12.25


본인의 아이피 주소 확인과 위치 추적
[Schizo!, 2008. 1. 5. 13:42, study/programming]
사용자 삽입 이미지

gliffy.com 이라는 플래시기반 다이어그램 툴입니다.
ms visio와 같은 기능을 제공합니다.
간단하게 가입만 하면 무료로 사용할 수 있습니다.


'study > programming' 카테고리의 다른 글

비주얼c  (0) 2008.03.09
공부  (0) 2008.01.16
문자열 연결 strcat 안씀.  (0) 2007.12.26
후위식.  (0) 2007.12.25
memset 함수  (0) 2007.12.17


본인의 아이피 주소 확인과 위치 추적
[Schizo!, 2007. 12. 26. 06:48, study/programming]

#include <stdio.h>
#include <stdlib.h>

char *hap(char *a,char *b){
 int i,j;
 char *temp;
 temp=(char*)malloc(strlen(a)+strlen(b));
 for(i=0;i<strlen(a);i++)
 temp[i]=a[i];
 for(j=0;j<strlen(b);j++)
 temp[i+j]=b[j];
 temp[i+j]='\0';
 return temp;

}


int main(void){
 char *str1="dog";
 char *str2="house";
 char *str;
 str1=hap(str1,str2);

 printf("%s",str1);
 return 0;
}



#include <stdio.h>
#include <stdlib.h>
int main()
{
    char str1[10]="cat";
    char str2[10]="house";
    int i,j;
   
    for(i=0;str1[i] != '\0';i++);//str1의 끝을 알아냅니다.(i의 위치)
   
    for(j=0;str2[j] != '\0';j++)//str2의 끝까지 돌려 줍니다.
       str1[i+j]=str2[j];//i는 str1의 마지막 위치 j를 더해주면서 str2의 문자를 하나씩 추가 해줌
   
    str1[i+j]='\0';//문자열 끝부분에 널문자를 넣어줌  
      
    printf("%s",str1);//결과 확인

    system("pause");
    return 0;
}


 ㅇ_ㅇ 기본적인 메카니즘은

 1개의 공간에 나머지 문자를 붙이는 것이랍니다.


 char* chStr1 = "cat";

 char* chStt2 = "house";


 라고 있을때

 Length 함수를 사용하면 길이를 구할수 있답니다.

 더 근본적으로 사용하면 \n 이 나올때까지 loop를 돌아서

 갯수를 파악하지요.


 cat는 0,1,2 까지 들어간 3개의 문자열입니다.

 이 뒤에 5개의 문자를 가져다가 넣으면 끝나지요.


 하지만 chStr1 이란 공간은 3개만 할당되어 있습니다.

 더 넣을 필요가 있겠지요?


 char* copyString(char* chStr1, char* chStr2)

 {

     char* chTemp = (char*)malloc(sizeof(char)*(Length(chStr1)+Length(chStr2));

     // chTemp 라는 저장공간에 chStr1, chStr2 만큼의 공간을 할당합니다.

     // 예제대로라면 8개의 공간이 할당되겠지요.


    for(int i = 0; i < length(chStr1); i++)

        chTemp[i] = chStr1[i];

    // 요렇게 하면 chTemp에는 "Cat" 이 들어갑니다.


    for(int i = 0; i < Length(chStr2); i++)

        chTemp[Length(chStr1) + i] = chStr2[i];

    // 이러면 chTemp 는 "Cathouse" 라는 문자가 들어갑니다.

    // 즉 Cat을 하나씩 넣어준후에 그 뒷공간에 house를 가져다 넣는것이지요.


    return chTemp;

 }

 요렇게 하면 반환되는 것은 "cathouse"가 반환되겠죠?

 이런 메카니즘이랍니다.

 strcpy도 비슷해서

 2개의 공간을 받아서 메모리를 잡고 앞의 공간을 지운후에

 새로운 공간을 넣어서 복사해 나가는 것이랍니다.

 CString 같이 String을 전문적으로 처리해주는 Class도 비슷하게 돌아가지요.





string str1="kor";
string str2="jpn";
char *i[]={NULL};

*i=&str1;
*i+1=&str2;

printf(%s,"i");




C 언어의 경우.. 문자열 정보 맨마지막에는 0x00(\0)의 정보를 가지고 있습니다..

즉, 각 문자열을 구분하는 것은 아무것도 있지 않는 0 이라는 정보지요.. ('0' 과는 다릅니다..)


그리고 문자열이 합쳐지는 변수에는 그냥 포인터로 설정하시면 안 됩니다.

이유는 주소가 어디로 되어 있는지 알 수 없는 포인터에 자료를 쓰게되면 다운에 이를 수 있습니다..


char *str1 = "kor";

char *str2 = "jpn";


두개의 문자열이 있습니다.. 이때 이 두개의 문자열을 str 이라는 변수에 합쳐서 저장하고 싶다면..

우선 str 변수를 선언해야겠지요.. 포인터 변수로 정의하고 싶으시다면..

그 내용이 저장될 배열 변수도 필요합니다.


char *str, str_real[128];

str = &str_real[0]; // 포인터 변수 str 을 정의하고 그 내용을 저장할 str_real 배열을 선언 후 그 주소를 대입.


이제 준비는 끝났습니다.. 합치기만 하면 되죠..


char *tmp; // 이건 포인터를 이용해서 편리하게 문자열을 복사하기 위함입니다..


tmp = str1;

while ( *tmp ) // 0x00 이 아니면 while문 반복합니다.

  *str++ = *tmp++; // 여기서 주의할 점은 괄호를 사용하면 큰일납니다. ++ 이 먼저 실행되어서 이상해집니다.


이것으로 str1의 데이터가 str으로 복사되었습니다. str2 도 똑같이 반복해주면 됩니다.


tmp = str2;

while ( *tmp ) *str++ = *tmp++;


자, 여기서 끝난것이 아닙니다.. 처음에 설명드렸듯이 문자열의 끝에는 0x00 이 붙어야한다고 했지요..

현재 str 포인터가 가르키고 있는 위치는 str1과 str2를 합치고 난 뒷부분입니다..


*str = 0x00; // 그냥 *str = 0; 해도 됩니다만.. 확실하게 구분짓기 위해.. 0x00 이라 사용합니다.. 눈에 띄라고;;

str = &str_real[0]; // 이제 문자열 합치기가 끝났으므로.. str의 주소값을 원래대로 복구합니다.


puts ( str ); // 이제 출력하면.. str1 과 str2 가 합쳐진 korjpn 이라는 결과가 나오게됩니다.


[[[[ 다소 복잡하지만.. 포인터를 이해하는데는 더없이 좋은 예제입니다.. ]]]]


위의 설명을 이용하여 2개의 문자열을 하나로 합치는 함수를 작성해 보겠습니다.


void my_strcat ( char *src1, char *src2, char *des )

{

  while ( *src1 ) *de

}

'study > programming' 카테고리의 다른 글

공부  (0) 2008.01.16
웹기반 다이어그램 제작 툴  (0) 2008.01.05
후위식.  (0) 2007.12.25
memset 함수  (0) 2007.12.17
이분검색  (0) 2007.12.14


본인의 아이피 주소 확인과 위치 추적
[Schizo!, 2007. 12. 25. 11:56, study/programming]

A+B*C/D  -  E/F*G+H   =>

A+BC*D/  - E/F*G+H   =>

ABC*D/+  - E/F*G+H   =>

ABC*D/+ -  EF/G*+H  =>

ABC*D/+EF/G*- +H     =>

ABC*D/+EF/G*-H+      



(1+2)*3+4/(5+6*7)+8  =>

1+2)*3+4/(5+6*7)+8

'study > programming' 카테고리의 다른 글

웹기반 다이어그램 제작 툴  (0) 2008.01.05
문자열 연결 strcat 안씀.  (0) 2007.12.26
memset 함수  (0) 2007.12.17
이분검색  (0) 2007.12.14
call by value  (0) 2007.12.14


본인의 아이피 주소 확인과 위치 추적
[Schizo!, 2007. 12. 17. 11:18, study/programming]
void *memset( void *dest, int c, size_t count ); 원형을 가지고 있습니다.

리턴값은
dest 매개변수의 값입니다.

매개변수에 대해서 설명해 드리겠습니다.

dest : Pointer to destination
(즉, 아래의 c의 문자로 셋팅할 메모리 블록을 가리킵니다.
예를 들면 초기화를 시킬 어떤 문자배열이나 동적배열로 할당받은 메모리 영역의
시작 주소를 가리킵니다.)

c : Character to set
dest 메모리 블록을 초기화하는데 쓰일 문자를 적어줍니다.

count : Number of characters

dest 의 시작주소로부터 몇 바이트를 c 로 전달된 문자로 초기화 할 것인지를

바이트단위로 적어줍니다.

-----------예제입니다--------------
#include
#include

void main( void )
{
char buffer[] = "This is a test of the memset function";

printf( "Before: %s\n", buffer );
memset( buffer, '*', 4 );
printf( "After: %s\n", buffer );
}


출력

Before: This is a test of the memset function
After: **** is a test of the memset function

출처 : 본인 머리 & MSDN

'study > programming' 카테고리의 다른 글

문자열 연결 strcat 안씀.  (0) 2007.12.26
후위식.  (0) 2007.12.25
이분검색  (0) 2007.12.14
call by value  (0) 2007.12.14
문자열  (0) 2007.12.10


본인의 아이피 주소 확인과 위치 추적
[Schizo!, 2007. 12. 14. 02:23, study/programming]

#include <stdio.h>

int find(int low, int high);
int arr[5]={1,3,5,7,9};
int n;
int cnt=0;

int main(void){
 printf("숫자를 입력하세요:");
 scanf("%d",&n);
 find(0,4);
 return 0;
}

int find(int low, int high){

 int mid;
 while(1){
  if(low>high){
   printf("찾는 수가 없습니다");
   return 0;
  }
  mid=(low+high)/2;
  ++cnt;
  if(n==arr[mid]){
   printf("찾았습니다!%d는 %d번째 회전수는 %d입니다.",n,mid,cnt);
  return 0;
  }
  else if(n>arr[mid])
   low=mid+1;
  else if(n<arr[mid])
   high=mid-1;
 }
}


 

'study > programming' 카테고리의 다른 글

후위식.  (0) 2007.12.25
memset 함수  (0) 2007.12.17
call by value  (0) 2007.12.14
문자열  (0) 2007.12.10
소수구하기,이분검색  (0) 2007.12.09


본인의 아이피 주소 확인과 위치 추적
[Schizo!, 2007. 12. 14. 01:37, study/programming]

#include <stdio.h>

void o ( int r )
{
 r += 10;

 printf ("함수 안 =%d\n", *r );

/* return; */
}



void main()
{
 int r = 10;

 printf ("함수 호출 전 = %d\n", r );

 o ( r );
printf("함수 호출 후 = %d\n", r );


 /* return; */
}


하고


#include <stdio.h>

void o ( int *r )
{
 *r += 10;

 printf ("함수 안 =%d\n", *r );

/* return; */
}


void main()
{
 int r = 10;

 printf ("함수 호출 전 = %d\n", r );

 o ( &r );
 printf("함수 호출 후 = %d\n", r );

    /* return; */
}


의 차이는 무엇입니까???

또 return이란 어떤 녀석이며 어떻게 사용되지요???? 대충

void형에선 생략 되는것은 알구요..

main()함수에 뭐 데이터값을 넘겨주는것?? 머시기 는 대충그정도 까진 알겟는데

자세한건 잘..

또 return이란 뭡니까 도대체

return 이 녀석이 절 엄청 괴롭혀요 아..;; 증말 여태까지 보지 못햇던 녀석이

갑자기 함수에 출현해가지고 막 대충 책에는 설명해놓고

도대체 return은 무엇이면 또 return은 언제 사용되고 또 return이 있어야 하는지를

안알려준다는거죠

일단 void형 함수는 return을 생략해도 됩니다 삐리리... ㅜ.ㅜ


아차차ㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡ

위에 두 예제의 차이점은 무엇입니까??

한개는 call by value방식이라는거고

그 밑에꺼는 call by reference라는데.. call by reference를 이해하기 전에 주소라는 개념을 또 이해 한다네요??

주소는 또 무엇이죠??.. 책에는 뭐 메모리 딱 .. 칸같은거 나와서 설명하는데 부족한감이 없지안나 싶구요..

또 *r 에서 *가 상징하는 의미는 무엇이죠??

부탁합니다..;;ㅜㅜ





먼저 C언어에는 Call By Value 만이 존재합니다. 포인터를 사용하여 Call By Reference를 흉내내는 것입니다.

함수를 정의할때 매개변수를 같이 정의하지요... 위의 예에서는 함수 o에 매개변수가 하나 있는데 이것이 Call By Value에서는 int r, 즉 변수 r이 정수임을 표시하고 있죠. 다음 예에는 int *r, 즉 변수 r이 정수값의 기억장소 주소임을 나타내고 있습니다.


C/C++에서 포인터는 매우 중요하고 강력한 기능을 가지고있습니다. 질문하신 내용으로 볼때 포인터에 대한 학습이 아직 다 끝나지 않으신듯 합니다만...

포인터와 관계된 연산자 두가지에 대해 먼저 설명을 드리면...

변수 앞에 &라는 연산자를 사용하면 해당변수의 주소를 얻어오게 되어 변수의 주소(기억장소번지)값을 결과로 받게 됩니다.

또 변수 앞에 *라는 연산자를 사용하면 해당변수가 주소라는 가정하에 해당주소에 있는 값에 접근할 수 있도록 하지요.


위 설명을 기준으로 한다면 두번째 예제는 주소값을 매개변수로 넘겨주어 해당 기억장소에 접근하여 값을 변경하도록 함으로써 호출된 main 함수에서 할당받은 r 변수를 수정할 수 있게 되는 것입니다. 즉, 엄밀히 이야기하면 주소를 값으로하는 Call By Value 인 것이죠. (이게 더 햇갈리나요??? 어찌 됐던 C언어에는 Call By Reference는 없습니다.) 주소값을 사용함으로써 Call By Reference 효과를 얻게 되는 것입니다.

(아~~~ 설명하면서도 어렵다...)


마지막으로 return이라는 것에 대해 설명을 드리죠.

return은 정의된 함수의 반환자료형에 따른 함수 처리결과를 호출한 함수로 되돌려주는 기능을 합니다.

위의 예는 함수 o에 대한 반환형이 void, 즉 반환되는 값이 없는 것으로 정의되어 있습니다.

따라서, 함수 마지막의 return은 있어도 되고 없어도 되는 것이죠... 그러나 반환형이 정수나, 실수, 자료형의 주소 등과 같이 특정한 값을 가져야 하는 경우에는 반드시 return 문장이 필요하게 됩니다.

그리고 함수 수행도중에 return을 만나게 되면 더이상 함수를 처리하지 않고 결과를 반환하고 호출된 함수로 복귀하게 됩니다.


도움이 되시길 바랍니다.


'study > programming' 카테고리의 다른 글

memset 함수  (0) 2007.12.17
이분검색  (0) 2007.12.14
문자열  (0) 2007.12.10
소수구하기,이분검색  (0) 2007.12.09
정렬하기 (포인터함수)  (2) 2007.12.09


본인의 아이피 주소 확인과 위치 추적
[Schizo!, 2007. 12. 10. 01:13, study/programming]
// gainax.c

#include <stdio.h>

int main(void)
{
 int i = 0;
 char c1[] = {'C', ' ', 'l', 'a', 'n', 'g', 'u', 'a', 'g', 'e', '\0'};
 char cerr[] = {'C', ' ', 'l', 'a', 'n', 'g', 'u', 'a', 'g', 'e'};

 char c2[] = "C language";
 char c3[15] = "C language";
 char *c4 = "C language";

 printf("각 변수의 크기는 >> \n");
 printf("c1 = %d, cerr = %d, c2 = %d, c3 = %d, c4 = %d \n\n",
  sizeof c1, sizeof cerr, sizeof c2, sizeof c3, sizeof c4);
 printf("c1 = %12s, cerr = %12s \n", c1, cerr);
 printf("c2 = %12s, c3 = %12s, c4 = %12s \n\n", c2, c3, c4);

 //문자 배열의 각 원소를 하나 하나 출력.
 printf("문자 배열의 각 원소를 하나 하나 출력 >> ");
 while(c1[i] != '\0')
  printf("%c", c1[i++]);
 printf("\n");

 i=0;
 printf("문자 포인터의 각 원소를 하나 하나 출력 >> ");
 while(*(c4 + i) != '\0')
  printf("%c", *(c4 + i++));
 printf("\n");

 printf("문자 포인터의 각 원소를 하나 하나 출력 >> ");
 while(*(c4) != '\0')
  printf("%c", *(c4++));
 printf("\n");

 return 0;
 }


 




// gainax.c

#include <stdio.h>

int main(void)
{
 int i = 0;
 char strary[][5] = {"c", "c++", "java", "c#"};
 char *pary[] = {"AT&t", "AT&t", "Sun", "MS"};

 printf("각 문자열 출력 >> \n");
 for (i =0; i <4;)
  printf("%-8s", strary[i++]);
 printf("\n");
    for (i =0; i <4;)
  printf("%-8s", *(strary + i++));
 printf("\n");
 for (i =0; i <4;)
  printf("%-8s", pary[i++]);
 printf("\n");
 for (i =0; i <4;)
  printf("%-8s", *(pary + i++));
 printf("\n\n");

 printf("각 문자열의 첫 글자 출력 >> \n");
 for (i =0; i <4;)
  printf("%-8c", *strary[i++]);
 printf("\n");
 for (i =0; i <4;)
  printf("%-8c", *pary[i++]);
 printf("\n\n");

 printf("각 문자열의 개별 문자 출력 >> \n");
 printf("C++의 앞 + 출력 strary[1][1] = %c\n",
  strary[1][1]);
 printf("Sun의 앞 u 출력 *(*(pary + 2) + 1) = %c\n",
  *(*(pary + 2) + 1));

 return 0;
}






// gainax.c

#include <stdio.h>

void reverse(char *line);

int main(void)
{
 char line[81];
 char *ptr;
 int cnt;

 char *str = "객체지향 언어를 하나 써 보세요.";
 puts(str);
 gets(line);
 printf("%s를 아신다고요. 대단하십니다.\n", line);
 cnt = puts("아시는 클래스 이름(영어)을 적어보세요.");

 ptr = gets(line);
 while (*ptr)
  putchar(* ptr++);
 printf("\n");

 reverse(line);
 puts(", 아이고 아시는 것을 반대로 출력했네요!!");

 return 0;
}

void reverse(char *line)
{
 char ch = *line;
 if (ch)
 {
  reverse(++line);
  printf("%c", ch);
 }
}




// gainax.c

#include <stdio.h>
#include <conio.h>

int main(void)
{
 char ch;
 printf("문자를 계속 입력하고 Enter를 누르면 >> \n");
 while ((ch=getchar()) != 'q')
  putchar(ch);

 printf("\n문자를 누를 때마다 두 번 출력 >> \n");
 while ((ch=getchar()) != 'q')
  putchar(ch);

 printf("\n문자를 누르면 한 번 출력 >> \n");
 while ((ch=getch()) != 'q')
  putchar(ch);
 printf("\n");

return 0;
}

'study > programming' 카테고리의 다른 글

이분검색  (0) 2007.12.14
call by value  (0) 2007.12.14
소수구하기,이분검색  (0) 2007.12.09
정렬하기 (포인터함수)  (2) 2007.12.09
포인터  (2) 2007.12.07


본인의 아이피 주소 확인과 위치 추적
[Schizo!, 2007. 12. 9. 02:08, study/programming]
/*
#include <stdio.h>

int main(void){
    int i,number;
    printf("소수를 입력하세요\n");
    scanf("%d",&number);
    for(i=2;i<=number;i++){
        if(number%i==0){
            if(number==i)
                printf("소수입니다");
            else
                printf("소수가아닙니다");
                return ;
        }
           
    }
}




#include <stdio.h>

int main(void){
    int i,n;
    printf("소수를 입력하세요\n");
    scanf("%d",&n);
    for(i=2;i<n;i++){
        if(n%i==0){
            printf("소수가아닙니다");
            return 0;
        }
    }
    printf("%d는 소수입니다.",n);
    return 0;
}




*/
/*
        if(number%i==0){
            printf("%d는 소수가 아닙니다\n",number);
            return 0;
        }   
        else if ((number-1)==i){
            printf("소수입니다");
        }
        */

#include<stdio.h>

    int list[8] = {1,3,4,5,6,8,9,13};
    int key;
    location(int low, int high);

main(){
    printf("정수값을 입력하세요. : ");
    scanf("%d", &key);
    printf("%d\n",location(1,8)); // 이렇게 출력하는 것 말구요;ㅁ;
}

location(int low, int high){
    int mid;
    if(low > high)
        return 0;
    else {
        mid=(low + high)/2;
        if(key == list[mid])
            return mid +1;
    else if(key < list[mid])
        return location(low , mid -1);
    else
        return location(mid + 1, high);
    }
}

'study > programming' 카테고리의 다른 글

call by value  (0) 2007.12.14
문자열  (0) 2007.12.10
정렬하기 (포인터함수)  (2) 2007.12.09
포인터  (2) 2007.12.07
포인터  (0) 2007.12.07


본인의 아이피 주소 확인과 위치 추적
*1 *2