GNS3 - Telnet 问题

网络工程 思科 路由器 gns3 实验室
2022-02-17 00:47:29

我在 GNS3 中创建了以下网络GNS3 简单网络图 让我解释一下设置:

  1. 互联网云Cloud 1连接到我的LAN而不是环回
  2. R1 路由器的 F0/0 正在从 DHCP 获取 IP,我可以从 LAN 中的任何远程主机远程登录和 ping。
  3. R1 还配置了 SNMP 访问(公共社区字符串)
  4. R1 路由器的 F0/1 接口的 IP 是手动配置的。
  5. 我可以从 LAN 上的任何远程主机 ping 这个接口,但是 Telnet 失败。R2 路由器的 F0/0 ip 是手动配置的。这里的情况是一样的,我可以ping但是telnet失败了。R1 和 R2 之间的所有配置都相同。

再次提一下,所有接口都可以从同一 LAN 中的任何远程主机 ping,但是只有 R1 的 F0/0 可以远程登录(希望这是一个词)

我可以做一些配置更改来获得对所有接口的 telnet 访问吗?

PS:我的云网关是10.226.22.1

R1的配置:

Building configuration...

Current configuration : 2016 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname Router
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
!
!
ip cef
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
 ip address dhcp
 duplex half
!
interface FastEthernet1/0
 ip address 10.226.22.34 255.255.255.224
 duplex auto
 speed auto
!
interface FastEthernet1/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface GigabitEthernet2/0
 no ip address
 shutdown
 negotiation auto
!
interface GigabitEthernet3/0
 no ip address
 shutdown
 negotiation auto
!
interface Ethernet4/0
 no ip address
 shutdown
 duplex half
!
interface Ethernet4/1
 no ip address
 shutdown
 duplex half
!
interface Ethernet4/2
 no ip address
 shutdown
 duplex half
!
interface Ethernet4/3
 no ip address
 shutdown
 duplex half
!
interface Ethernet4/4
 no ip address
 shutdown
 duplex half
!
interface Ethernet4/5
 no ip address
 shutdown
 duplex half
!
interface Ethernet4/6
 no ip address
 shutdown
 duplex half
!
interface Ethernet4/7
 no ip address
 shutdown
 duplex half
!
interface FastEthernet5/0
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface FastEthernet5/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface Serial6/0
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial6/1
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial6/2
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial6/3
 no ip address
 shutdown
 serial restart-delay 0
!
router rip
 network 10.0.0.0
!
ip route 0.0.0.0 0.0.0.0 10.226.22.1
!
ip http server
no ip http secure-server
ip http path flash:
!
!
snmp-server community public RO
no cdp advertise-v2
!
!
!
!
control-plane
!
!
!
!
!
!
gatekeeper
 shutdown
!
!
telephony-service
 max-conferences 4 gain -6
 web admin system name cisco secret 5 $1$1pTn$/eGx7afnUPhFB2AqoFApH.
 dn-webedit
 time-webedit
!
!
line con 0
 stopbits 1
line aux 0
line vty 0 4
!
!
end

R2的配置:

Building configuration...

Current configuration : 2119 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname Router
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
!
!
ip cef
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
 ip address 10.226.22.35 255.255.255.224
 duplex half
!
interface FastEthernet1/0
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface FastEthernet1/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface GigabitEthernet2/0
 no ip address
 shutdown
 negotiation auto
!
interface GigabitEthernet3/0
 no ip address
 shutdown
 negotiation auto
!
interface Ethernet4/0
 no ip address
 shutdown
 duplex half
!
interface Ethernet4/1
 no ip address
 shutdown
 duplex half
!
interface Ethernet4/2
 no ip address
 shutdown
 duplex half
!
interface Ethernet4/3
 no ip address
 shutdown
 duplex half
!
interface Ethernet4/4
 no ip address
 shutdown
 duplex half
!
interface Ethernet4/5
 no ip address
 shutdown
 duplex half
!
interface Ethernet4/6
 no ip address
 shutdown
 duplex half
!
interface Ethernet4/7
 no ip address
 shutdown
 duplex half
!
interface FastEthernet5/0
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface FastEthernet5/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface Serial6/0
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial6/1
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial6/2
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial6/3
 no ip address
 shutdown
 serial restart-delay 0
!
router rip
 network 10.0.0.0
!
ip route 0.0.0.0 0.0.0.0 10.226.22.34
!
ip http server
no ip http secure-server
ip http path flash:
!
!
no cdp advertise-v2
!
!
!
!
control-plane
!
!
!
!
!
!
gatekeeper
 shutdown
!
!
telephony-service
 max-conferences 4 gain -6
 web admin system name cisco secret 5 $1$/jP3$0HbV8qC5BIn8Ezww4Nuv7.
 dn-webedit
 time-webedit
!
!
line con 0
 stopbits 1
line aux 0
line vty 0 4
 login
 transport input telnet
 transport output telnet
line vty 5 15
 login
 transport input telnet
 transport output telnet
!
!
end

作为附加信息,我的 R1 网关是 10.226.22.1,无法从 R2 访问。(也许我需要以某种方式从 R2 获取网关?)

R1的路由信息​​:

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 10.226.22.1 to network 0.0.0.0

     10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks
S       10.238.60.13/32 [254/0] via 10.226.22.1, FastEthernet0/0
C       10.226.22.32/27 is directly connected, FastEthernet1/0
C       10.226.22.0/27 is directly connected, FastEthernet0/0
S*   0.0.0.0/0 [1/0] via 10.226.22.1

R2的路由信息​​:

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 10.226.22.34 to network 0.0.0.0

     10.0.0.0/27 is subnetted, 2 subnets
C       10.226.22.32 is directly connected, FastEthernet0/0
R       10.226.22.0 [120/1] via 10.226.22.34, 00:00:15, FastEthernet0/0
S*   0.0.0.0/0 [1/0] via 10.226.22.34
2个回答

当您想远程登录到 Cisco 设备时,您必须为 VTY 线路配置密码。使用这样的东西:

line vty 0 15
 logging synchronous
 exec-timeout 15 0
 password <your telnet password>
 login
 transport input telnet
!

在 Cisco 路由器上试试这个命令

line vty 0 15
transport input telnet
transport output telnet

上述这些命令将帮助您激活 telnet,原因是当您尝试从 lan telnet R1 时,会给出输入命令,但是当它通过 R1 到 R2 时,由于未给出输出命令,因此无法 telnet 试试这个