본문 바로가기
CCNA

CCNA -Rip 설정

by 북한산산적 2011. 12. 18.





router setting

--------------------------------
기본설정


Router (config)# no ip domain-lookup // 도메인을 찾지 말아라 (명령어를 잘못 쳤을때 도메인으로 인식하지 말

아라)

Router(config)#line console 0

Router(config-line)#exec-timeout 0 0 // 타임아웃 되어서 접속종료하지 말아라

Router(config-line)#logging synchronous


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

R1(config)#interface fastEthernet 0/0


R1(config-if)#no shutdown

%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up


R1(config-if)#ip address 192.168.1.1 255.255.255.0


R1(config)#interface serial 0/0
R1(config-if)#no sh
R1(config-if)#no shutdown

%LINK-5-CHANGED: Interface Serial0/0, changed state to down
R1(config-if)#clo
R1(config-if)#clock rate
R1(config-if)#clock rate 64000
R1(config-if)#ip add
R1(config-if)#ip address 172.16.1.1 255.255.255.252


-------------------------------
R1#show running-config

interface FastEthernet0/0
 ip address 192.168.1.1 255.255.255.0
 duplex auto
 speed auto

interface Serial0/0
 ip address 172.16.1.1 255.255.255.252

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

R1#show ip interface brief
Interface              IP-Address      OK? Method Status                Protocol
 
FastEthernet0/0        192.168.1.1     YES manual up                    up
 
FastEthernet0/1        unassigned      YES unset  administratively down down
 
Serial0/0              172.16.1.1      YES manual down                  down
 
Serial0/1              unassigned      YES unset  administratively down down
 
Serial0/2              unassigned      YES unset  administratively down down
 
Serial0/3              unassigned      YES unset  administratively down down
 
FastEthernet1/0        unassigned      YES unset  administratively down down
 
FastEthernet1/1        unassigned      YES unset  administratively down down


R1#copy run start                      // 설정값 저장
Destination filename [startup-config]?
Building configuration...

 

R1#ping 192.168.1.100

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.100, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 47/55/63 ms

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

R2 설정


R2(config)#interface serial 0/0
R2(config-if)#no shu
R2(config-if)#no shutdown
R2(config-if)#ip address 192.168.2.1 255.255.255.0

R2(config)#interface serial 0/1
R2(config-if)#ip ad
R2(config-if)#ip address 172.16.1.5 255.255.255.252
R2(config-if)#no shutdown
R2(config-if)#clock rate 6400

R2(config)#interface fastEthernet 0/0
R2(config-if)#ip add
R2(config-if)#ip address 192.16.2.1 255.255.255.0
R2(config-if)#no sh
R2(config-if)#no shutdown


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

R3 설정


R3#configure t
R3(config)#interface fastEthernet 0/0
R3(config-if)#ip address 192.168.3.1 255.255.255.0
R3(config-if)#no shutdown
R3(config)#interface serial 0/0/0
R3(config-if)#ip address 172.16.1.6 255.255.255.252
R3(config-if)#clock rate 64000
R3(config-if)#no shutdown

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

RIP 설정
R1#configure t
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)#router rip
R1(config)#router rip
R1(config-router)#ver
R1(config-router)#version 2
R1(config-router)#no au
R1(config-router)#no auto-summary
R1(config-router)#
R1(config-router)#network 172.16.0.0  // 172.16. 까지만 인식한다.
R1(config-router)#network 192.168.1.0

R1(config-router)#end


R1#show ip protocols
Routing Protocol is "rip" // rip 에 설정한 내용확인 | 해당 네트워크로 광고 하겠다 rip
Sending updates every 30 seconds, next due in 16 seconds // 30초에 한번씩 업데이트 다음 업데이트 까지 16초
Invalid after 180 seconds, hold down 180, flushed after 240 // 타이머 시간
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Redistributing: rip
Default version control: send version 2, receive 2
  Interface             Send  Recv  Triggered RIP  Key-chain
  FastEthernet0/0       2     2                                 
Automatic network summarization is not in effect
Maximum path: 4
Routing for Networks:
 172.16.0.0
 192.168.1.0
Passive Interface(s):
Routing Information Sources:
 Gateway         Distance      Last Update
Distance: (default is 120)

 

R1#debug ip rip          // 장비와 장비 간의 주고 받는 패킷을 볼수 있다 // rip 에 대한 패킷을 보겠다
RIP protocol debugging is on

R1#un all
All possible debugging has been turned off

R1#configure t
R1#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)#router rip
R1(config-router)#passive-interface fa 0/0
R1(config-router)#router rip
R1(config-router)#router rip
R1(config-router)#end

 

R1#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
       * - candidate default, U - per-user static route, o - ODR
       P - periodic downloaded static route

Gateway of last resort is not set

C    192.168.1.0/24 is directly connected, FastEthernet0/0


R1#clear ip route *     // 라우팅 테이블의 내용을 지우고 다시 받겠다.

 


R2 설정


R2(config)#router rip
R2(config)#router rip
R2(config-router)#ver
R2(config-router)#version 2
R2(config-router)#no au
R2(config-router)#no auto-summary
R2(config-router)#
R2(config-router)#network 172.16.0.0  // 172.16. 까지만 인식한다.
R2(config-router)#network 192.168.2.0

 


R3 설정

R3(config)#router rip
R3(config-router)#versi
R3(config-router)#version 2
R3(config-router)#no au
R3(config-router)#no auto-summary
R3(config-router)#netwo
R3(config-router)#network 172.16.0.0
R3(config-router)#network 192.168.3.0
R3(config-router)#end

 

R1#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
       * - candidate default, U - per-user static route, o - ODR
       P - periodic downloaded static route

Gateway of last resort is not set

     172.16.0.0/30 is subnetted, 2 subnets
C       172.16.1.0 is directly connected, Serial0/0
R       172.16.1.4 [120/1] via 172.16.1.2, 00:00:16, Serial0/0
C    192.168.1.0/24 is directly connected, FastEthernet0/0
R    192.168.2.0/24 [120/1] via 172.16.1.2, 00:00:16, Serial0/0
R    192.168.3.0/24 [120/2] via 172.16.1.2, 00:00:16, Serial0/0
R1#RIP: sending  v2 update to 224.0.0.9 via Serial0/0 (172.16.1.1)
RIP: build update entries
      192.168.1.0/24 via 0.0.0.0, metric 1, tag 0

 

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


R1(config-if)#clock rate 64000

 

백업방법

R1#copy run tftp:
Address or name of remote host []? 192.168.3.200
Destination filename [R1-confg]? R1

 

백업 복구 방법

R1#copy tftp run
Address or name of remote host []? 192.168.3.200
Source filename []? R1
Destination filename [running-config]?

Accessing tftp://192.168.3.200/R1...
Loading R1 from 192.168.3.200: !
[OK - 950 bytes]

950 bytes copied in 0.125 secs (7600 bytes/sec)


telnet

R1#configure t
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)#line
R1(config)#line vty 0 4
R1(config-line)#login
% Login disabled on line 66, until 'password' is set
% Login disabled on line 67, until 'password' is set
% Login disabled on line 68, until 'password' is set
% Login disabled on line 69, until 'password' is set
% Login disabled on line 70, until 'password' is set

R1(config-line)#password cisco

 

복구 모드 // 패스워드 복구  주의 !!!!! 레지스트리 값을 잘못 넣으면 장비가 고장날수도 있다.

 

Router 리붓후 컨트롤 브레이크키

rommon 1 > confreg 0X2142
rommon 1 > reset


Router>en
Router#copy start run
Destination filename [running-config]?

%SYS-5-CONFIG_I: Configured from console by console

1037 bytes copied in 0.416 secs (2492 bytes/sec)
R1#

R1#configure t
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)#no enable secre
R1(config)#no enable secret

R1(config)#config-register 0x2102    /// 레지스트리 변환
R1#copy run start // nv ram 의 설정값 변환

 

 

 

 

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

R1#show flash:

System flash directory:
File  Length   Name/status
  3   5571584  c2600-i-mz.122-28.bin
  2   28282    sigdef-category.xml
  1   227537   sigdef-default.xml
[5827403 bytes used, 58188981 available, 64016384 total]
63488K bytes of processor board System flash (Read/Write)

 


R1#delete flash:c2600-i-mz.122-28.bin
Delete filename [c2600-i-mz.122-28.bin]?
Delete flash:/c2600-i-mz.122-28.bin? [confirm]

R1#show flash:

System flash directory:
File  Length   Name/status
  2   28282    sigdef-category.xml
  1   227537   sigdef-default.xml
[255819 bytes used, 63760565 available, 64016384 total]
63488K bytes of processor board System flash (Read/Write)


복구 모드


라우터 fa 0/0  ----------tftp server 와 연결 되어 있어야 한다.

rommon 1 >
rommon 1 > IP_ADDRESS=1.1.12.1
rommon 2 > IP_SUBNET_MASK=255.255.255.0
rommon 3 > DEFAULT_GATEWAY=1.1.12.10
rommon 4 > TFTP_SERVER=1.1.12.10
rommon 5 >  TFTP_FILE=c2600-i-mz.122-28.bin
rommon 6 > tftpdnld

          IP_ADDRESS: 1.1.12.1
      IP_SUBNET_MASK: 255.255.255.0
     DEFAULT_GATEWAY: 1.1.12.10
         TFTP_SERVER: 1.1.12.10
           TFTP_FILE: c2600-i-mz.122-28.bin
Invoke this command for disaster recovery only.
WARNING: all existing data in all partitions on flash will be lost!

Do you wish to continue? y/n:  [n]:  y

rommon 7 > reset


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

ios 업데이트


R1#copy tftp flash:
Address or name of remote host []? 192.168.3.200
Source filename []? c2600-ipbasek9-mz.124-8.bin
Destination filename [c2600-ipbasek9-mz.124-8.bin]?

Accessing tftp://192.168.3.200/c2600-ipbasek9-mz.124-8.bin...
Loading c2600-ipbasek9-mz.124-8.bin from 192.168.3.200:

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[OK - 13169700 bytes]

13169700 bytes copied in 28.344 secs (10047 bytes/sec)
R1#


R1(config)#boot system flash:c2600-ipbasek9-mz.124-8.bin


------------------
RAS 장비


CCNA_R&S<36>#show user
    Line       User       Host(s)              Idle       Location
   2 tty 2                idle                 00:00:00  
   4 tty 4                idle                 00:00:00  
   5 tty 5                idle                 00:00:00  
   6 tty 6                idle                 00:00:05  
   9 tty 9                idle                 00:00:00  
  10 tty 10               idle                 00:00:00  
  11 tty 11               idle                 00:00:00  
  12 tty 12               idle                     2w3d  
  13 tty 13               idle                     2w3d  
  14 tty 14               idle                     2w3d  
* 18 vty 0     ccna3      idle                 00:00:00 1.212.198.221
  19 vty 1     ccna3      idle                 00:00:00 1.212.198.221
  20 vty 2     ccna3      idle                 00:00:00 1.212.198.221
  21 vty 3     ccna3      idle                 00:00:00 1.212.198.221
  22 vty 4     ccna3      idle                 00:00:03 1.212.198.221
  23 vty 5     ccna3      idle                 00:00:00 1.212.198.221

  Interface  User      Mode                     Idle Peer Address

CCNA_R&S<36>#show host
Default domain is not set
Name/address lookup uses static mappings

Host                     Flags      Age Type   Address(es)
RACK1R1                  (perm, OK) 54   IP    36.36.36.36
RACK2R3                  (perm, OK) 69   IP    36.36.36.36
RACK2R2                  (perm, OK) 67   IP    36.36.36.36
RACK1R3                  (perm, OK) 69   IP    36.36.36.36
RACK1R2                  (perm, OK) 54   IP    36.36.36.36
RACK2R1                  (perm, OK) 69   IP    36.36.36.36
RACK2SW3                 (perm, OK) **   IP    36.36.36.36
RACK1SW2                 (perm, OK) **   IP    36.36.36.36
RACK2SW2                 (perm, OK) **   IP    36.36.36.36
RACK2SW1                 (perm, OK) **   IP    36.36.36.36
RACK1SW3                 (perm, OK) **   IP    36.36.36.36
RACK1SW1                 (perm, OK) **   IP    36.36.36.36
CCNA_R&S<36>#RACK1R1

 

 


CCNA_R&S<36>clear line 03


CCNA_R&S<36>#RACK1R1
Translating "RACK1R1"
Trying RACK1R1 (36.36.36.36, 2001)... Open

Router>
Router>enable
Router#erase start
Router#erase startup-config

Router#reload
R1(config)#do show run


R1(config-if)#ip address 172.168.1.1 255.255.255.0 secondary
R1(config-if)#ip address 172.168.3.1 255.255.255.0 secondary
R1(config-if)#ip address 172.168.4.1 255.255.255.0 secondary // 여러개의 아이피값 설정 가능