做防水的网站有哪些,凡科网站建设如何植入代码,企业推广的成功,静态网站更新文章目录 构建拓扑图配置IP地址配置路由器命令说明测试效果 构建拓扑图 1#xff0c;添加2811路由器。 2#xff0c;添加pc0。 3#xff0c;使用交叉线连接路由器和pc#xff08;注意线路端口#xff09;。
4#xff0c;使用配置线连接路由器和pc#xff08;注意线路… 文章目录 构建拓扑图配置IP地址配置路由器命令说明测试效果 构建拓扑图 1添加2811路由器。 2添加pc0。 3使用交叉线连接路由器和pc注意线路端口。
4使用配置线连接路由器和pc注意线路端口。
配置IP地址
1单击pc进入配置面板。 2选择【desktop】——单击【ip configuration】。 3输入IP地址子网掩码和网关。
配置路由器
1单击路由器进入配置面板。 2选择cli。 3输入no不进人对话直接进入配置。 4如下配置路由器。 Would you like to enter the initial configuration dialog? [yes/no]: noPress RETURN to get started!Routeren
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R1
R1(config)#enable secret cisco
R1(config)#exit
R1#
%SYS-5-CONFIG_I: Configured from console by consoleR1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#line vty 0 4
R1(config-line)#password cisco
R1(config-line)#login
R1(config-line)#exit
R1(config)#int f0/0
R1(config-if)#ip address 192.168.1.1 255.255.255.0
R1(config-if)#no shutdownR1(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to upR1(config-if)#end
R1#
%SYS-5-CONFIG_I: Configured from console by consoleR1#wri
Building configuration...
[OK]
R1#命令说明 进入特权模式 Routeren说明en 是 enable 的缩写用于从用户模式User EXEC mode切换到特权模式Privileged EXEC mode。在特权模式下用户可以执行更多的命令包括配置命令。 进入全局配置模式 Router#conf t说明conf t 是 configure terminal 的缩写用于从特权模式切换到全局配置模式Global Configuration mode。在这个模式下用户可以对路由器进行各种配置。 设置路由器的主机名 Router(config)#hostname R1说明此命令将路由器的主机名设置为 R1。设置主机名有助于在命令行界面中更清晰地识别路由器。 设置启用密码 R1(config)#enable secret cisco说明此命令设置了启用特权模式的秘密密码为 cisco。这个密码比简单的 enable password 命令设置的密码更加安全。 退出全局配置模式 R1(config)#exit说明此命令将用户从全局配置模式退回到特权模式。 再次进入全局配置模式 R1#conf t说明重复此步骤是为了继续配置路由器。 配置VTY线路 R1(config)#line vty 0 4说明此命令进入虚拟终端线VTY的配置模式配置编号 0 4 表示配置从第0条到第4条VTY线路。VTY线路用于远程访问路由器。 设置VTY线路的密码 R1(config-line)#password cisco说明此命令为VTY线路设置登录密码为 cisco。 启用VTY线路的登录验证 R1(config-line)#login说明此命令要求用户登录到VTY线路时输入用户名和密码。 退出VTY线路配置模式 R1(config-line)#exit说明此命令将用户从VTY线路配置模式退回到全局配置模式。 配置接口 R1(config)#int f0/0说明此命令进入FastEthernet 0/0接口的配置模式。f0/0 表示第一个插槽中的第一个FastEthernet接口。 为接口分配IP地址 R1(config-if)#ip address 192.168.1.1 255.255.255.0说明此命令为接口分配IP地址 192.168.1.1 和子网掩码 255.255.255.0。 启用接口 R1(config-if)#no shutdown说明默认情况下Cisco接口是关闭的。no shutdown 命令用于启用接口使其能够转发数据包。 退出接口配置模式 R1(config-if)#exit说明此命令将用户从接口配置模式退回到全局配置模式。 退出全局配置模式 R1(config)#end说明此命令将用户从全局配置模式退回到特权模式。 保存配置 R1#wri说明wri 是 write memory 的缩写用于将当前运行的配置保存到路由器的非易失性RAMNVRAM中。这样即使路由器重启配置也不会丢失。
测试效果
1单击pc选择【desktop】——单击【command prompt】打开命令行。 2输入telnet 192.168.1.1命令远程登录路由器成功登录如下图所示。 3在路由器配置面板输入查看一下路由器的配置。
R1#show running
Building configuration...Current configuration : 678 bytes
!
version 15.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname R1
!
!
!
enable secret 5 $1$mERr$hx5rVt7rPNoS4wqbXKX7m0
!
!
!
!
!
!
ip cef
no ipv6 cef
!
!
!
!
license udi pid CISCO2811/K9 sn FTX101705UT-
!
!
!
!
!
!
!
!
!
!
!
spanning-tree mode pvst
!
!
!
!
!
!
interface FastEthernet0/0ip address 192.168.1.1 255.255.255.0duplex autospeed auto
!
interface FastEthernet0/1no ip addressduplex autospeed autoshutdown
!
interface Vlan1no ip addressshutdown
!
ip classless
!
ip flow-export version 9
!
!
!
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4password ciscologin
!
!
!
end