一台路由器和两台PC机

实现PC机远程连接路由器终端

思科路由基本配置_第1张图片

R1#conf t

Enter configuration commands, one per line.  End with CNTL/Z.

R1(config)#hostname router1

router1(config)#enable password 123456

router1(config)#line vty 0 4

router1(config-line)#password 123.com

router1(config-line)#login

router1(config-line)#exit

router1(config)#int e0/0

router1(config-if)#ip add

router1(config-if)#ip address 192.168.10.1 255.255.255.0

router1(config-if)#no sh

router1(config-if)#int e0/1

router1(config-if)#

*Mar  1 00:03:01.931: %LINK-3-UPDOWN: Interface Ethernet0/0, changed state to up

*Mar  1 00:03:02.931: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/0, changed state to up

router1(config-if)#ip add

router1(config-if)#ip address 172.16.10.1 255.255.255.0

router1(config-if)#no sh

router1(config-if)#do sh

*Mar  1 00:03:17.319: %LINK-3-UPDOWN: Interface Ethernet0/1, changed state to up

*Mar  1 00:03:18.319: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/1, changed state to up

router1(config-if)#do sh ip int br

Interface                  IP-Address      OK? Method Status                Protocol

Ethernet0/0                192.168.10.1    YES manual up                    up

Ethernet0/1                172.16.10.1     YES manual up                    up

Ethernet0/2                unassigned      YES unset  administratively down down

Ethernet0/3                unassigned      YES unset  administratively down down

router1(config-if)#

router1#show running-config

Building configuration...


Current configuration : 926 bytes

!

version 12.4

service timestamps debug datetime msec

service timestamps log datetime msec

no service password-encryption

!

hostname router1

!

boot-start-marker

boot-end-marker

!

enable password 123456

!

no aaa new-model

memory-size iomem 5

no ip icmp rate-limit unreachable

ip tcp synwait-time 5

!

!

ip cef

no ip domain lookup

!


interface Ethernet0/0

 ip address 192.168.10.1 255.255.255.0

 half-duplex

!

interface Ethernet0/1

 ip address 172.16.10.1 255.255.255.0

 half-duplex

!

interface Ethernet0/2

 no ip address

 shutdown

 half-duplex

!

interface Ethernet0/3

 no ip address

 shutdown

 half-duplex

!

no ip http server

no ip http secure-server

!

!

control-plane

!

!

line con 0

 exec-timeout 0 0

 privilege level 15

 logging synchronous

line aux 0

 exec-timeout 0 0

 privilege level 15

 logging synchronous

line vty 0 4

 password 123.com

 login

!

!

end

用PC1和PC2互相ping通

思科路由基本配置_第2张图片

思科路由基本配置_第3张图片

用PC1和PC2远程连接路由器终端

在PC1上telnet 192.168.10.1   输入密码进入用户模式,再次输入密码进入特权模式

在PC2上telnet 172.16.10.1   输入密码进入用户模式,再次输入密码进入特权模式

思科路由基本配置_第4张图片

思科路由基本配置_第5张图片