NETWORK笔记7:思科命令实验

网友投稿 250 2022-09-26


NETWORK笔记7:思科命令实验

实验名称:PC、交换机、路由通信

实验拓扑:

实验步骤:PC配置IP、交换机配置IP网关开启用户远程登录、路由器配置IP开启远程登录

实验总结:Ping正常,Telnet正常。 ip default-gateway 192.168.1.254

实验命令:

Switch>enable

Switch#configure terminal

Switch(config)#hostname CiscoSwitch1

CiscoSwitch1(config)#no IP domain-lookup

CiscoSwitch1(config)#line console 0

CiscoSwitch1(config-line)#password 111111

CiscoSwitch1(config-line)#login

CiscoSwitch1(config-line)#exit

CiscoSwitch1(config)#line vty 0 4

CiscoSwitch1(config-line)#password 222222

CiscoSwitch1(config-line)#login

CiscoSwitch1(config-line)#exit

CiscoSwitch1(config)#enable password 333333

CiscoSwitch1(config)#interface vlan 1

CiscoSwitch1(config-if)#no shutdown

CiscoSwitch1(config-if)#ip address 192.168.1.10 255.255.255.0

CiscoSwitch1(config-if)#exit

CiscoSwitch1(config)#ip default-gateway 192.168.1.254

CiscoSwitch1(config)#exit

CiscoSwitch1#

CiscoSwitch1#show running-config

Building configuration...

Current configuration : 1186 bytes

!

version 12.2

no service timestamps log datetime msec

no service timestamps debug datetime msec

no service password-encryption

!

hostname CiscoSwitch1

!

enable password 333333

!

!

!

no ip domain-lookup

!

!

spanning-tree mode pvst

!

interface FastEthernet0/1

!

interface FastEthernet0/2

!

interface FastEthernet0/3

!

interface FastEthernet0/4

!

interface FastEthernet0/5

!

interface FastEthernet0/6

!

interface FastEthernet0/7

!

interface FastEthernet0/8

!

interface FastEthernet0/9

!

interface FastEthernet0/10

!

interface FastEthernet0/11

!

interface FastEthernet0/12

!

interface FastEthernet0/13

!

interface FastEthernet0/14

!

interface FastEthernet0/15

!

interface FastEthernet0/16

!

interface FastEthernet0/17

!

interface FastEthernet0/18

!

interface FastEthernet0/19

!

interface FastEthernet0/20

!

interface FastEthernet0/21

!

interface FastEthernet0/22

!

interface FastEthernet0/23

!

interface FastEthernet0/24

!

interface GigabitEthernet0/1

!

interface GigabitEthernet0/2

!

interface Vlan1

ip address 192.168.1.10 255.255.255.0

!

ip default-gateway 192.168.1.254

!

!

!

!

line con 0

password 111111

login

!

line vty 0 4

password 222222

login

line vty 5 15

login

!

!

!

end

CiscoSwitch1#write

CiscoSwitch1#config terminal

CiscoSwitch1(config)#service password-encryption

CiscoSwitch1(config)#exit

CiscoSwitch1#write

CiscoSwitch1#reload

Router>enable

Router#configure terminal

Router(config)#hostname CiscoRouter

CiscoRouter(config)#no ip domain-lookup

CiscoRouter(config)#enable password 111111

CiscoRouter(config)#line console 0

CiscoRouter(config-line)#password 222222

CiscoRouter(config-line)#login

CiscoRouter(config-line)#exit

CiscoRouter(config)#line vty 0 4

CiscoRouter(config-line)#password 333333

CiscoRouter(config-line)#login

CiscoRouter(config-line)#exit

CiscoRouter(config)#interface GigabitEthernet 0/1

CiscoRouter(config-if)#no shutdown

CiscoRouter(config-if)#ip address 192.168.1.254 255.255.255.0

CiscoRouter(config-if)#exit

CiscoRouter(config)#interface gigabitEthernet 0/2

CiscoRouter(config-if)#no shutdown

CiscoRouter(config-if)#ip address 192.168.2.254 255.255.255.0

CiscoRouter(config-if)#end

CiscoRouter#

CiscoRouter#show running-config

Building configuration...

Current configuration : 809 bytes

!

version 15.1

no service timestamps log datetime msec

no service timestamps debug datetime msec

no service password-encryption

!

hostname CiscoRouter

!

!

!

enable password 111111

!

!

!

!

!

!

ip cef

no ipv6 cef

!

!

!

!

license udi pid CISCO2911/K9 sn FTX1524MK72

!

!

!

!

!

!

!

!

!

no ip domain-lookup

!

!

spanning-tree mode pvst

!

!

!

!

!

!

interface GigabitEthernet0/0

no ip address

duplex auto

speed auto

shutdown

!

interface GigabitEthernet0/1

ip address 192.168.1.254 255.255.255.0

duplex auto

speed auto

!

interface GigabitEthernet0/2

ip address 192.168.2.254 255.255.255.0

duplex auto

speed auto

!

interface Vlan1

no ip address

shutdown

!

ip classless

!

ip flow-export version 9

!

!

!

!

!

!

!

line con 0

password 222222

login

!

line aux 0

!

line vty 0 4

password 333333

login

!

!

!

end

CiscoRouter#configure terminal

CiscoRouter(config)#service password-encryption

CiscoRouter(config)#end

CiscoRouter#

CiscoRouter#write

CiscoRouter#reload


版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:ICMP网络控制信息协议(二)(对网络控制协议ICMP描述错误的是)
下一篇:Java中关于二叉树层序遍历深入了解
相关文章

 发表评论

暂时没有评论,来抢沙发吧~