반응형

 


작성일: 2023년 10월 15일

 


[ 강의 동영상 ]
계영수 님이 GNS3 강의 동영상을 만든지 4년이 지나서 지금 GNS3 버전과 GUI 구성이 조금 달라서 헷갈릴 수 있지만,
이 동영상이 큰 도움이 된다.

  https://www.youtube.com/playlist?list=PL30o9a_lTg-KN4UmwKj2txuY3Vrd1nMrx

 

 


GNS3 및 CISCO Switch 명령 예제 모음

 

 

테스트할 때마다 사용하는 명령을 명령어 수행 순서대로 기록해보았다.

 

 

CISCO Switch Port에 IP Address 설정하기

##
## CISCO Switch Port에 IP Address 설정하기
## 

R1# configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.

R1(config)# interface fastEthernet 0/0

R1(config-if)# ip address 10.1.1.1 255.255.255.0

R1(config-if)# no shutdown 

R1(config-if)# end
*Jul  2 21:14:42.231: %SYS-5-CONFIG_I: Configured from console by console

R1# ping 10.1.1.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/30/68 ms

R1#

 

 

CISCO Switch Loopback Port에 IP Address 설정하기

R1# configure terminal 
Enter configuration commands, one per line.  End with CNTL/Z.

R1(config)# interface loop0
R1(config-if)#
*Jul  3 12:59:03.859: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback0, changed state to up

R1(config-if)# ip address 1.1.1.1 255.255.255.255
R1(config-if)# end
R1#
*Jul  3 12:59:45.647: %SYS-5-CONFIG_I: Configured from console by console
R1#

 

 

CISCO Switch에 BGP 설정하기

##
## AS 100을 관리하는 라우터(R1) 설정
##

R1# configure terminal 
Enter configuration commands, one per line.  End with CNTL/Z.

R1(config)# router bgp 100
R1(config-router)# neighbor 10.1.1.2 remote-as 200
R1(config-router)# end
R1#
*Jul  3 13:05:03.939: %SYS-5-CONFIG_I: Configured from console by console
R1#


##
## AS 200을 관리하는 라우터(R2) 설정
##

R2# configure terminal 
Enter configuration commands, one per line.  End with CNTL/Z.

R2(config)# router bgp 200
R2(config-router)# neighbor 10.1.1.1 remote-as 100
R2(config-router)# end
R2#
*Jul  3 13:07:28.543: %SYS-5-CONFIG_I: Configured from console by console
R2#
*Jul  3 13:07:35.307: %BGP-5-ADJCHANGE: neighbor 10.1.1.1 Up 
R2#

 

 

BGP 설정 내용 확인하기

##
## 간략한 BGP 정보를 보는 명령
##

R1# show ip bgp summary

BGP router identifier 1.1.1.1, local AS number 100
BGP table version is 1, main routing table version 1

Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
10.1.1.2        4          200       7       7        1    0    0 00:02:53        0


##
## 상세한 BGP Neighbor 정보를 보는 명령
##

R1# show ip bgp neighbors 
BGP neighbor is 10.1.1.2,  remote AS 200, external link
  BGP version 4, remote router ID 2.2.2.2
  BGP state = Established, up for 00:05:43   ## <-- state 값을 확인해야 함.
  Last read 00:00:20, last write 00:00:14, hold time is 180, keepalive interval is 60 seconds
  Neighbor sessions:
    1 active, is not multisession capable (disabled)
  Neighbor capabilities:
    Route refresh: advertised and received(new)
    Four-octets ASN Capability: advertised and received
    Address family IPv4 Unicast: advertised and received
    Enhanced Refresh Capability: advertised and received
    Multisession Capability: 
    Stateful switchover support enabled: NO for session 1
  Message statistics:
    InQ depth is 0
    OutQ depth is 0
    
                         Sent       Rcvd
    Opens:                  1          1
    Notifications:          0          0
    Updates:                1          1
    Keepalives:             8          8
    Route Refresh:          0          0
    Total:                 10         10
  Default minimum time between advertisement runs is 30 seconds

 For address family: IPv4 Unicast
  Session: 10.1.1.2
  BGP table version 1, neighbor version 1/0
  Output queue size : 0
  Index 1, Advertise bit 0
  1 update-group member
  Slow-peer detection is disabled
  Slow-peer split-update-group dynamic is disabled
                                 Sent       Rcvd
  Prefix activity:               ----       ----
    Prefixes Current:               0          0
    Prefixes Total:                 0          0
    Implicit Withdraw:              0          0
    Explicit Withdraw:              0          0
    Used as bestpath:             n/a          0
    Used as multipath:            n/a          0

                                   Outbound    Inbound
  Local Policy Denied Prefixes:    --------    -------
    Total:                                0          0
  Number of NLRIs in the update sent: max 0, min 0
  Last detected as dynamic slow peer: never
  Dynamic slow peer recovered: never
  Refresh Epoch: 1
  Last Sent Refresh Start-of-rib: never
  Last Sent Refresh End-of-rib: never
  Last Received Refresh Start-of-rib: never
  Last Received Refresh End-of-rib: never
				       Sent	  Rcvd
	Refresh activity:	       ----	  ----
	  Refresh Start-of-RIB          0          0
	  Refresh End-of-RIB            0          0

  Address tracking is enabled, the RIB does have a route to 10.1.1.2
  Connections established 1; dropped 0
  Last reset never
  Transport(tcp) path-mtu-discovery is enabled
  Graceful-Restart is disabled
Connection state is ESTAB, I/O status: 1, unread input bytes: 0            
Connection is ECN Disabled, Mininum incoming TTL 0, Outgoing TTL 1
Local host: 10.1.1.1, Local port: 37711
Foreign host: 10.1.1.2, Foreign port: 179
Connection tableid (VRF): 0
Maximum output segment queue size: 50

Enqueued packets for retransmit: 0, input: 0  mis-ordered: 0 (0 bytes)

Event Timers (current time is 0x118E84):
Timer          Starts    Wakeups            Next
Retrans            10          0             0x0
TimeWait            0          0             0x0
AckHold             9          6             0x0
SendWnd             0          0             0x0
KeepAlive           0          0             0x0
GiveUp              0          0             0x0
PmtuAger            1          0        0x157854
DeadWait            0          0             0x0
Linger              0          0             0x0
ProcessQ            0          0             0x0

iss: 1109643795  snduna: 1109644028  sndnxt: 1109644028
irs:  864525182  rcvnxt:  864525415

sndwnd:  16152  scale:      0  maxrcvwnd:  16384
rcvwnd:  16152  scale:      0  delrcvwnd:    232
          
SRTT: 737 ms, RTTO: 2506 ms, RTV: 1769 ms, KRTT: 0 ms
minRTT: 48 ms, maxRTT: 1000 ms, ACK hold: 200 ms
Status Flags: active open
Option Flags: nagle, path mtu capable
IP Precedence value : 6

Datagrams (max data segment is 1460 bytes):
Rcvd: 19 (out of order: 0), with data: 10, total data bytes: 232
Sent: 20 (retransmit: 0, fastretransmit: 0, partialack: 0, Second Congestion: 0), with data: 10, total data bytes: 232

 Packets received in fast path: 0, fast processed: 0, slow path: 0
 fast lock acquisition failures: 0, slow path: 0
TCP Semaphore      0x6AA22B60  FREE 

R1#

 

 

IP Routing Table 정보 조회하기

R1# show ip route 

Codes: L - local, C - connected, S - static, 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
       i - IS-IS, su - IS-IS summary, 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, H - NHRP, l - LISP
       + - replicated route, % - next hop override

Gateway of last resort is not set

      1.0.0.0/32 is subnetted, 1 subnets
C        1.1.1.1 is directly connected, Loopback0
      10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        10.1.1.0/24 is directly connected, FastEthernet0/0
L        10.1.1.1/32 is directly connected, FastEthernet0/0

R1#

 

 

BGP 이용하여 Network Route 광고(Advertisement)

##
## R1 라우터가 이웃 라우터에게 Advertisement하기
##

R1# configure terminal 
Enter configuration commands, one per line.  End with CNTL/Z.

R1(config)# router bgp 100
R1(config-router)# network 1.1.1.1 mask 255.255.255.255   ## <-- Route 광고하기
R1(config-router)# end
*Jul  3 14:26:39.559: %SYS-5-CONFIG_I: Configured from console by console
R1#


##
## 이웃 라이터(예: R2)에서 수신한 Route Advertisement 정보를 확인
##

R2# show ip bgp summary 
BGP router identifier 2.2.2.2, local AS number 200
BGP table version is 2, main routing table version 2
1 network entries using 148 bytes of memory
1 path entries using 64 bytes of memory
1/1 BGP path/bestpath attribute entries using 136 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 372 total bytes of memory
BGP activity 1/0 prefixes, 1/0 paths, scan interval 60 secs

Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
10.1.1.1        4          100      83      82        2    0    0 01:11:20        1  ## <- 이 값이 1로 변경되었는지 확인
R2#

 

 

BGP Network Route 광고 정보 조회

##
## 라우터 R1에서 BGP 정보 조회
##

R1# show ip bgp
BGP table version is 2, local router ID is 1.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, 
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, 
              x best-external, a additional-path, c RIB-compressed, 
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
 *>  1.1.1.1/32       0.0.0.0                  0         32768 i
 R1#
 
 
##
## 라우터 R2에서 BGP 정보 조회
##

R2# show ip bgp
BGP table version is 2, local router ID is 2.2.2.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, 
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, 
              x best-external, a additional-path, c RIB-compressed, 
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
 *>  1.1.1.1/32       10.1.1.1                 0             0 100 i
R2#

 

 

 

 

 

 

 

반응형

 


 

작성일: 2023년 9월 19일

 

어찌저찌 하다가 얻어 걸린 정보라서 메모를 해둔다.  (곧 까먹을 것 같아서...)

 

##
## Google 검색어 입력란(Text Box)에 아래 문장을 입력하고 검색하기.
##

intitle:index.of ios parent directory bin

 

위 검색어로 검색하면, 아래와 같은 결과가 출력될 것이다.

 

 

검색 결과에 여러 웹 사이트가 있지만, 아래 웹 사이트 가장 괜찮은 것 같다.

 

 

Index of /pustaka/docs/GNS3/images

 

lms.onnocenter.or.id

 

위 웹 사이트에서 CISCO C7200 Router에 대한 ios를 다운로드한 후, 아래 동영상을 보면서 따라하면 아주 쉽게 GNS3에 Router Image를 등록할 수 있다.

 

 

 

 

+ Recent posts