第一章、路由概念
1.1、路由器初始配置
1.1.1、路由器的功能
提供许多网络连接功能
如果没有路由器确定通往目的地的最佳路径并将流量转发到路径沿途
的下一跳路由器,就不可能实现网络之间的通信,路由器负责网络间流量的路由。
一台路由器可以连接多个网络,也就是说,具有多个接口,每个接口
属于不同的ip网络。
局域网LAN
广域网WAN
路由器的主要功能:
1、确定发送数据包的最佳路径
2、将数据包转发到其他目的地
连接设备
默认网关 要启用网络访问 必须为设备配置ip地址信息
ip地址 标识本地网络中的唯一主机
子网掩码 标识主机可以使用哪个网络子网进行通信
默认网关 标识当目标未处于同一本地网络子网时将数据包发送到的路由器
的ip地址。
记录网络编址:
设备名称
设计中用到的接口
ip地址和子网掩码
默认网关地址
4、在主机上启用ip
静态:为主机手动分配唯一的ip地址,子网掩码和默认网关 还可以配置dns服务器ip地址
动态:主机从dhcp服务器自动接收其ip地址信息。
(dhcp服务器为主机提供一个有效ip地址、子网掩码和默认网关信息)
5、设备LED
6、控制台访问
控制台电缆
终端仿真软件:TeraTerm PuTTY
7、在交换机上启用IP
1.1.3、路由器基本设置
1、配置路由器的基本设置
给设备命名:将设备与其他路由器分开
安全管理访问:保护特权EXEC、用户EXEC和远程访问
配置标语:提供未授权访问的法律通知
路由器基本配置
在Cisco 上拖拽一个路由器进行基础配置
是否继续配置对话框?[是/否]:
Continue with configuration dialog? [yes/no]:
是否要进入基本管理设置?[是/否]:
would you like to enter basic management setup? [yes/no]:
设置路由器名称:
Enter host name [Router]: R1
输入密码 加密显示
Enter enable secret:123456
输入密码 不加密显示
Enter enable password:123
输入虚拟终端密码(防止未经授权的用户通过console口以外的口访问路由器):
Enter virtual terminal password:
是否设置snmp(简单网络管理协议):
Configure SNMP Network Management? [no]:yes
输入要设置的接口:
management network from the above interface summary: fastethernet0/0
是否为这个端口配置ip:
Configure IP on this interface? [yes]: yes
输入ip地址:
IP address for this interface: 192.168.1.1
输入网关:
Subnet mask for this interface [255.255.255.0] : 255.255.0.0
[0] Go to the IOS command prompt without saving this config.
[1] Return back to the setup without saving this config.
[2] Save this configuration to nvram and exit.
选择2保存设置
Enter your selection [2]: 2
Press RETURN to get started!
https://blog.csdn.net/weixin_30929011/article/details/97174221
用户模式
Router>
1:进入特权模式 enable
router>enable
router#
2:进入全局配置模式 configure terminal
router>enable
rouer#configure terminal
router(conf)#
3:交换机命名 hostname routera 以routerA为例
router>enable
router #configure terminal
router(conf)#hostname routerA
routera(conf)#
4:配置使能口令 enable password cisco 以cisco为例
router>enable
router# configure terminal
router(conf)#hostname routerA
routerA(conf)#enable password cisco
5:配置使能密码
https://wenku.baidu.com/view/31a58cbdbc64783e0912a21614791711cc7979ca.html
Router>en
Router#
Router#
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#
Router(config)#
Router(config)#hostname R1
R1(config)#
R1(config)#
R1(config)#enable secret class
R1(config)#line console 0
R1(config-line)#password cisco
R1(config-line)#login\
^
% Invalid input detected at '^' marker.
R1(config-line)#login
R1(config-line)#exit
R1(config)#line vty 0 4
R1(config-line)#password cisco
R1(config-line)#login
R1(config-line)#exit
R1(config)#service password-encryption
R1(config)#banner motd $ Authorized Access only!`
R1(config)#banner motd $ Authorized Access only!
Enter TEXT message. End with the character '$'.
R1(config)#banner motd $ Authorized Access only!
Enter TEXT message. End with the character '$'.
R1(config)#banner motd $ Authorized Access only $
R1(config)#end
R1#
%SYS-5-CONFIG_I: Configured from console by console
R1#copy running-config startup-config
Destination filename [startup-config]?
Building configuration...
[OK]
R1#
R1#write
Building configuration...
[OK]
R1#
https://wenku.baidu.com/view/1b861a18ff00bed5b9f31d5a.html
https://wenku.baidu.com/view/ae96d068af1ffc4ffe47acb7.html