第一章 计算机网络结构概述
1、> enable# config terminal Router (config)# interface fastethernet0/1 Switch (config)#interface vlan1 用户模式→特权模式特权模式→全局配置模式(路由器)全局配置模式→接口模式(交换机)全局配置模式→接口模式
2、# disable 特权模式→用户模式
3、(config)# end全局或接口模式→特权模式,等同于“ctrl+z”
4、exit从当前模式退回到前一模式
5、(config)#interface vlan 1 进入vlan 1接口
6、(config-if)# ip address 192.168.1.2 255.255.255.0配置当前接口的IP地址(注意给交换机 只能配置vlan1的IP,而对路由器可以对物理端口配置IP)
7、(config-if)# no shutdown打开当前接口
8、(config)# hostname R1配置主机名,例如为R1(接口模式下也可用该命令)
9、# show version显示系统IOS名称及版本信息
10、# show running-config显示当前配置信息
11、# show startup-config显示已保存的配置信息
12、# copy running-config startup-config保存当前已配置的信息(2种命令均可)
13、# write
14、# erase nvram删除已保存的配置信息(3种命令均可)
15、# delete nvram: startup-config
16、# erase startup-config
17、(config)# line console 0 (config-line)# exec-timeout 0 0修改会话超时时间,避免返回 到初始界面(此时需按下Enter键才进入用户界面)。
18、(config)# line con 0(config-line)# logging synchronous启动同步显示,避免在配置交 换机时,控制台显示的一些信息会打断配置过程。
19、(config)# no ip domain-lookup禁用DNS查找
1、> enable# config terminal Router (config)# interface fastethernet0/1 Switch (config)#interface vlan1 用户模式→特权模式特权模式→全局配置模式(路由器)全局配置模式→接口模式(交换机)全局配置模式→接口模式
2、# disable 特权模式→用户模式
3、(config)# end全局或接口模式→特权模式,等同于“ctrl+z”
4、exit从当前模式退回到前一模式
5、(config)#interface vlan 1 进入vlan 1接口
6、(config-if)# ip address 192.168.1.2 255.255.255.0配置当前接口的IP地址(注意给交换机 只能配置vlan1的IP,而对路由器可以对物理端口配置IP)
7、(config-if)# no shutdown打开当前接口
8、(config)# hostname R1配置主机名,例如为R1(接口模式下也可用该命令)
9、# show version显示系统IOS名称及版本信息
10、# show running-config显示当前配置信息
11、# show startup-config显示已保存的配置信息
12、# copy running-config startup-config保存当前已配置的信息(2种命令均可)
13、# write
14、# erase nvram删除已保存的配置信息(3种命令均可)
15、# delete nvram: startup-config
16、# erase startup-config
17、(config)# line console 0 (config-line)# exec-timeout 0 0修改会话超时时间,避免返回 到初始界面(此时需按下Enter键才进入用户界面)。
18、(config)# line con 0(config-line)# logging synchronous启动同步显示,避免在配置交 换机时,控制台显示的一些信息会打断配置过程。
19、(config)# no ip domain-lookup禁用DNS查找