|
一、名词解释
Router:路由器,路由器是互联网的主要结点设备。路由器通过路由决定数据的转发。转发策略称为路由选择(routing),这也是路由器名称的由来,路由发生在第三层,即网络层。路由器又称网关设备(Gateway)是用于连接多个逻辑上分开的网络,所谓逻辑网络是代表一个单独的网络或者一个子网。当数据从一个子网传输到另一个子网时,可通过路由器的路由功能来完成。
Switch:交换机,交换机工作于OSI参考模型的第二层,即数据链路层。交换机在同一时刻可进行多个端口对之间的数据传输。交换机的主要功能包括物理编址、网络拓扑结构、错误校验、帧序列以及流控。除了传统的二层交换机,还有三层交换机具备了一些新的功能,如对VLAN(虚拟局域网)的支持、对链路汇聚的支持,甚至有的还具有防火墙的功能。
二、路由器简单配置
路由器连接工具:SecureCRT
·四种配置模式:
·Router> 用户模式:最先登陆的基础模式
·Router>enable 特权模式:能进行简单查看操作,不会改变原有配置
·Router#configure terminal 进入全局配置模式
Router#(config)# 全局配置模式:需要改变原有配置,一般都在此模式下进行配置
·Router(config)#interface f0/0
Router(config-if)# 接口模式,可以用于配置接口信息
·查看信息:
·路由器启动时在控制台上的输出内容:
·按CTRl+C可以退出dialogue模式。
·Router>show version 查看版本信息
·Router#show running-config 查看当前的配置文件
·Router#show startup-config 查看保存的配置文件
·Router#copy running-config startup-config 保存配置
也可以用Router#write保存
·Router#hostname R1 修改设备名称为R1
·Router#banner motd%……% 以某个特殊字符开始,以这个特殊字符结尾,中间的字符即为所输入的banner信息。(一般为说明、授权、警告信息)
·Router(config)#line console 0
Router(config-line)#login
Router(config-line)#password XXX 设置控制台密码,不可恢复,不推荐
·Router(config)#service password-encryption 设置密码不可见
·Router(config)#line vty 0
Router(config-line)#password XXX
Router(config-line)#login 设置密码
·Router(config)#enable password XXX 设置特权模式密码(可见)
·优化操作:
·Router(config-if)#line console 0
Router(config-line)#exec-timeout 0 0 设置永不退出
·Router(config-if)#lin con 0
Router(config-line)#logging synchronous 遇到系统消息自动换行
·端口配置:
命名规则:从右往左,从下网上,以0开始
Router#show ip interface brief 查看
·配置地址
Router(config)#int serial 0/0/0
Router(config-if)#ip address 10.1.1.1 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#clock rate 64000
·CDP协议是一个提供关于直接相连的设备的工具,默认是开启的。在不清楚网络拓扑的情况下可以根据CDP查看。
Router#show cdp 查看
Router#show cdp neighbors detaile 查看详细
Router#show cdp interface 查看使用cdp的接口
Router(config)#no cdp run 关闭cdp
|
|
|
|
|
|
|