본문 바로가기

CCNA 기초

라우터에 원격 접속 - Telnet


각각의 PC에서 각각의 라우터에 Telnet 접속이 가능하도록 하시오.



Router 0에서 설정

Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#int fa 0/0
Router(config-if)#ip add 10.1.12.1 255.255.255.0
Router(config-if)#no sh
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
Router(config-if)#exit
Router(config)#int fa 0/1
Router(config-if)#ip add 10.1.1.1 255.255.255.0
Router(config-if)#no sh
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
Router(config-if)#exit

- Dynamic Routing 중 하나인 Router rip 설정 -
Router(config)#router rip
Router(config-router)#network 10.1.1.0
Router(config-router)#version 2
Router(config-router)#end
%SYS-5-CONFIG_I: Configured from console by console

- Router rip 설정 확인 -
Router#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

     10.0.0.0/24 is subnetted, 3 subnets
C       10.1.1.0 is directly connected, FastEthernet0/1
R       10.1.2.0 [120/1] via 10.1.12.2, 00:00:21, FastEthernet0/0
C       10.1.12.0 is directly connected, FastEthernet0/0

- Router 0의 가상 터미널 비밀번호 설정 -
Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#line vty ?
  <0-15>  First Line number
Router(config)#line vty 0 ?
  <1-15>  Last Line number
  <cr>
Router(config)#line vty 0 1
Router(config-line)#password ?
  7     Specifies a HIDDEN password will follow
  LINE  The UNENCRYPTED (cleartext) line password
Router(config-line)#password cisco
Router(config-line)#login
Router(config-line)#exit
Router(config)#enable ?
  password  Assign the privileged level password
  secret    Assign the privileged level secret
Router(config)#enable password ?
  7     Specifies a HIDDEN password will follow
  LINE  The UNENCRYPTED (cleartext) 'enable' password
Router(config)#enable password cisco
Router(config)#end
%SYS-5-CONFIG_I: Configured from console by console

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

Router 1에서 설정

Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#int fa 0/0
Router(config-if)#ip add 10.1.12.2 255.255.255.0
Router(config-if)#no sh
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
Router(config-if)#exit
Router(config)#int fa 0/1
Router(config-if)#ip add 10.1.2.1 255.255.255.0
Router(config-if)#no sh
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
Router(config-if)#exit

- Dynamic Routing 중 하나인 Router rip 설정 -
Router(config)#router rip
Router(config-router)#network 10.1.2.0
Router(config-router)#version 2
Router(config-router)#end
%SYS-5-CONFIG_I: Configured from console by console

- Router rip 설정 확인 -
Router#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

     10.0.0.0/24 is subnetted, 3 subnets
R       10.1.1.0 [120/1] via 10.1.12.1, 00:00:21, FastEthernet0/0
C       10.1.2.0 is directly connected, FastEthernet0/1
C       10.1.12.0 is directly connected, FastEthernet0/0

- Router 1의 가상 터미널 비밀번호 설정 -
Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#line vty 0 1
Router(config-line)#pass
Router(config-line)#password cisco
Router(config-line)#login
Router(config-line)#exit
Router(config)#enable password cisco
Router(config)#end
%SYS-5-CONFIG_I: Configured from console by console

- 참고 Router 의 주터미널(콘솔) 비밀번호 설정 -
Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#line ?
  <0-81>   First Line number
  console  Primary terminal line
  vty      Virtual terminal
Router(config)#line console 0
Router(config-line)#password ?
  7     Specifies a HIDDEN password will follow
  LINE  The UNENCRYPTED (cleartext) line password
Router(config-line)#password cisco1
Router(config-line)#login
Router(config-line)#exit
Router(config)#enable password cisco1
Router(config)#end
%SYS-5-CONFIG_I: Configured from console by console


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

PC에서 접속

PC0에서 Router1로의 telnet 접속 확인

PC>ping 10.1.12.2
Pinging 10.1.12.2 with 32 bytes of data:

Request timed out.
Reply from 10.1.12.2: bytes=32 time=63ms TTL=254
Reply from 10.1.12.2: bytes=32 time=78ms TTL=254
Reply from 10.1.12.2: bytes=32 time=78ms TTL=254

Ping statistics for 10.1.12.2:
    Packets: Sent = 4, Received = 3, Lost = 1 (25% loss),
Approximate round trip times in milli-seconds:
    Minimum = 63ms, Maximum = 78ms, Average = 73ms

PC>telnet 10.1.12.2    - 라우터의 가상터미널에 비밀번호가 설정 되지 않았을 경우
Trying 10.1.12.2 ...


[Connection to 10.1.12.2 closed by foreign host]
PC>telnet 10.1.12.2
Trying 10.1.12.2 ...


User Access Verification

Password:
Router>en
Password:
Router#

PC3에서 Router0로의 telnet 접속 확인

PC>ping 10.1.12.1

Pinging 10.1.12.1 with 32 bytes of data:

Reply from 10.1.12.1: bytes=32 time=157ms TTL=254
Reply from 10.1.12.1: bytes=32 time=63ms TTL=254
Reply from 10.1.12.1: bytes=32 time=93ms TTL=254
Reply from 10.1.12.1: bytes=32 time=78ms TTL=254

Ping statistics for 10.1.12.1:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 63ms, Maximum = 157ms, Average = 97ms

PC>telnet 10.1.12.1
Trying 10.1.12.1 ...


User Access Verification

Password:
Router>en
Password:
Router#


'CCNA 기초' 카테고리의 다른 글

IP Routing - example 2  (0) 2008.12.08
IP Routing - example 1  (0) 2008.12.08
Overload NAT  (0) 2008.12.05
Dynamic NAT(Network Address Translation)  (0) 2008.12.05
Static NAT(Network Address Translation)  (0) 2008.12.05
ACL(Access List) - Extended Access List  (0) 2008.12.05