복합적 토폴로지 구축하기
라우터 하나를 가지고 명령어들에 익숙해지기에 충분하지만 더 복잡한 토폴로지를 구축하는 것도 좋을 것이다. GNS3를 가지고 더 복잡한 토폴로지를 구축할 수도 있다. VMware나 Virtual PC를 가지고 가상 머신을 구동할 때의 성능과 마찬가지로 실제 컴퓨터의 성능에 좌우되기 때문에 많은 라우터를 구동하는 것은 컴퓨터의 성능에 영향을 받을 것이다. CPU 성능이 좋고 RAM을 더 많이 가진다면 성능은 더 좋아질 것이다. 하지만 idlepc가 CPU 사용량에 많은 영향을 미친다. Ghostios와 sparsemem은 RAM 사용 효율을 늘이는 유틸리티이다. Ghostios는 GNS3에서 기본적으로 작동되고 있다. sparsemem은 디폴트로 작동하지 않기 때문에 설정을 켜두어야 한다. 이들을 메모리 사용에 관한 섹션에서 자세히 다룰 것이다. 예제에서 사용하는 2기가 RAM과 2.5 GHz 프로세서 PC로 6개의 라우터와 여러 개의 워크스테이션을 아무 무리없이 랩 환경을 구축할 수 있다.
라우터 3개의 토폴로지를 구축하도록 하자. GNS3를 실행한 후 IOS가 설정된 라우터 3개를 작업 판넬에 끌어다 놓자. 각 라우터에서 오른쪽 클릭을 한 후 Configure를 선택하자. Slots 탭에서 FastEthernet 어댑터와 PA-4T 시리얼 어댑터를 설정한다.

이제 세 라우터를 서로 연결한다. 툴바의 Add a link 버튼을 클릭한 후 드롭 다운 메뉴에서 Manual을 선택한다. 그러면 커서는 십자가 모양으로 변경되어 있늘 것을 볼 수 있다.
R0를 클릭한 후 s1/0를 선택하자. R1에서도 동일하게 s1/0을 선택한다. 다시 R1을 선택한 후 s1/1을 선택하고 R2에서도 s1/1을 선택한다.
이제 다시 Add a link 버튼을 클릭한다. (X표가 쓰인 Stop 사인이 원래의 커넥터 모양으로 변경될 것이다)

토폴로지 요약 판넬에서 각 라우터 옆의 '+' 표시를 클릭하면 커넥션 정보가 나타날 것이다.
GNS3는 라우터 이름을 R로 시작하는 것으로 할당한다. 변경하고자 할 경우 라우터에서 오른쪽 클릭한 후 Change the hostname을 선택한다. 본 예제에서는 기본값을 사용할 것이다.

툴바에는 아래와 같은 네개의 버튼이 있다.

첫번째 버튼은 Telnet to all IOS 버튼이다. 다음 버튼 세개는 각각 Start/Resume all IOS, Suspend all IOS, Stop all IOS 버튼이다. 링크는 모두 빨간색으로 표시된다. Start/Resume all IOS버튼을 클릭하여 라우터를 시동하자. 아래와 같은 메시지 창이 떠 라우터가 시동되고 있음을 표시하며 링크는 녹색으로 변경될 것이다. Telnet to all IOS 버튼을 클릭하면 각 라우터의 시동 과정을 관찰할 수 있다.

각 라우터에서 "Would you like to enter the initial configuration dialog?"에는 'no'로 답한다.
이제 라우터를 설정하자. 본 예제에서 호스트명을 변경하고 secret 패스워드를 설정한 후 로깅 설정을 하고 인터페이스에 IP를 할당한 후 라우터를 켜고 RIP version 2를 설정하여 마지막으로 ping으로 연결 상태를 점검한다.

Dynamips : West console
Router>
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname West
West(config)#enable secret cisco
West(config)#line con 0
West(config-line)#logging syn
West(config-line)#exit
West(config)#interface s1/0
West(config-if)#ip address 10.0.0.1 255.255.255.0
West(config-if)#clock rate 64000
West(config-if)#no shutdown
West(config-if)#exit
West(config)#router
*Mar 1 00:33:32.091: %LINK-3-UPDOWN: Interface Serial0/1, changed state to up
*Mar 1 00:33:33.091: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/0, changed state to up
West(config)#router rip
West(config-router)#vers
West(config)#
*Mar 1 00:33:55.059: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/0, changed state to down
West(config)#router rip
West(config-router)#version 2
West(config-router)#network 10.0.0.0
West(config-router)#no auto-summary
West(config-router)#end
West#
*Mar 1 00:34:29.963: %SYS-5-CONFIG_I: Configured from console by console
West#
Dynamips : Central console
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname Central
Central(config)#enable secret cisco
Central(config)#line con 0
Central(config-line)#loggin synchronous
Central(config-line)#exit
Central(config)#interface s1/0
Central(config-if)#ip address 10.0.0.2 255.255.255.0
Central(config-if)#no shutdown
Central(config-if)#interface 2
*Mar 1 00:40:01.107: %LINK-3-UPDOWN: Interface Serial1/0, changed state to up
*Mar 1 00:40:02.107: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/0, changed state to up
Central(config-if)#interface s1/1
Central(config-if)#ip address 10.0.1.1 255.255.255.0
Central(config-if)#clock rate 64000
Central(config-if)#no shutdown
Central(config-if)#exit
Central(config)#router r
*Mar 1 00:41:04.867: %LINK-3-UPDOWN: Interface Serial1/1, changed state to up
*Mar 1 00:41:05.867: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial01/1, changed state to up
Central(config)#router rip
Central(config-router)#version 2
Central(config-router)#network 10.0.0.0
Central(config-router)#network 10.0.1.0
Central(config-router)#no auto-summary
Central(config-router)#end
Central#
*Mar 1 00:41:31.059: %SYS-5-CONFIG_I: Configured from console by console
Central#
*Mar 1 00:41:35.343: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/1, changed state to down
Central#
Dynamips : East console
Router>
Router>enable
Password:
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname East
East(config)#enable secret cisco
East(config)#line con 0
East(config-line)#loggin syn
East(config-line)#exit
East(config)#interface s1/1
East(config-if)#ip address 10.0.1.2 255.255.255.0
East(config-if)#no shutdown
East(config-if)#exit
East(config)#router rip
*Mar 1 00:43:58.255: %LINK-3-UPDOWN: Interface Serial1/1, changed state to up
*Mar 1 00:43:59.255: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/1, changed state to up
East(config)#router rip
East(config-router)#version 2
East(config-router)#network 10.0.1.0
East(config-router)#no auto-summary
East(config-router)#end
East#
*Mar 1 00:44:13.551: %SYS-5-CONFIG_I: Configured from console by console
East#sh ip route
Codes: 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
Gateway of last resort is not set
10.0.0.0/24 is subnetted, 1 subnetsR 10.0.0.0 [120/1] via 10.0.1.1, 00:00:14, Serial1/1
C 10.0.1.0 is directly connected, Serial1/1
East#ping 10.0.0.1
Type escape sequence to abort
Sending 5, 100-byte ICMP Echos to 10.0.0.1, timeout is 2 seconds;
!!!!!
Success rate is 100 percent (5/5), routd-trip min/avg/max = 168/177/216 ms
East#
위에서 보듯이 East는 West로 ping을 보낼 수 있어 연결 상태를 확인할 수 있다. 또한 East는 라우팅 테이블에 10.0.0.0/24 네트워크를 가지고 있음을 볼 수 있다.
이제 Ethernet 스위치를 끌어다 각 라우터 아래에 놓는다. Add a link 버튼을 클릭하여 라우터의 Fa0/0포트를 스위치의 1번 포트와 연결한다. 내장 Ethernet 스위치는 8포트를 가지고 있다. 이들은 억세스 포트 또는 dot1q 트렁크 포트도 될 수 있다. 이들은 디폴트로 억세스 포트로 동작한다. 스위치에서 오른쪽 클릭한 후 configure를 선택하면 몇가지 옵션을 설정할 수 있다. 여기서는 기본값을 사용할 것이다. 스위치의 고급 옵션을 설정하고자 한다면 라우터에 NM-16ESW EtherSwitch 어댑터를 추가하여야 한다. 이 어댑터는 전부는 아니지만 많은 스위칭 기능을 제공한다. 이와 관련해서는 나중에 설명하도록 하자.
다음에는 토폴로지에 PC를 추가하기로 한다.
댓글 없음:
댓글 쓰기