《2022年全国计算机考试四级网络工程师复习考点总结——路由器配置命令大全 .pdf》由会员分享,可在线阅读,更多相关《2022年全国计算机考试四级网络工程师复习考点总结——路由器配置命令大全 .pdf(6页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。
1、1、进入特权模式enable router enable router # 2、进入全局配置模式configure terminal router enable router #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 r
2、outer #configure terminal router(conf)#hostname routerA routerA (conf)# enable password cisco 5、配置使能密码enable secret ciscolab 以 cicsolab为例router enable router #configure terminal router(conf)#hostname routerA routerA (conf)# enable secret ciscolab 6、进入路由器某一端口interface fastehernet 0/17 以 17 端口为例router
3、 enable 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 1 页,共 6 页 - - - - - - - - - router #configure terminal router(conf)#hostname routerA routerA (conf)# interface fastehernet 0/17 routerA (conf-if)# 进入路由器的某一子端口interface fastethernet 0/17.1 以 17 端口的 1 子端口为例router e
4、nable router #configure terminal router(conf)#hostname routerA routerA (conf)# interface fastehernet 0/17.1 7、设置端口 ip 地址信息router enable router #configure terminal router(conf)#hostname routerA routerA(conf)# interface fastehernet 0/17 以 17 端口为例routerA (conf-if)#ip address 192.168.1.1 255.255.255.0 配
5、置交换机端口ip 和子网掩码routerA (conf-if)#no shut 是配置处于运行中routerA (conf-if)#exit 8、查看命令show router enable router # show version 察看系统中的所有版本信息show interface vlan 1 查看交换机有关ip 协议的配置信息show running-configure 查看交换机当前起作用的配置信息show interface fastethernet 0/1 察看交换机 1 接口具体配置和统计信息名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - -
6、 - - - - - - - 名师精心整理 - - - - - - - 第 2 页,共 6 页 - - - - - - - - - show mac-address-table 查看 mac地址表show mac-address-table aging-time 查看 mac地址表自动老化时间show controllers serial + 编号 查看串口类型show ip router 查看路由器的路由表9、路由器 telnet远程登录设置routerenablerouter #configure terminal router (conf)#hostname routerA router
7、A (conf)#enable password cisco 以 cisco 为特权模式密码routerA (conf)#interface fastethernet 0/1 以 17 端口为 telnet 远程登录端口routerA (conf-if)#ip address 192.168.1.1 255.255.255.0 routerA (conf-if)#no shut routerA (conf-if)#exit routerA (conf)line vty 0 4 设置 0-4 个用户可以 telnet 远程登陆routerA (conf-line)#login routerA (
8、conf-line)#password edge 以 edge为远程登录的用户密码10、配置串口参数两台路由器通过串口连接需要一个做为DTE,一个做为 DCE。DCE 设备要向DTE 设备提供时钟频率和带宽。DCE 配置:routerenablerouter #configure terminal router (conf)#hostname routerA routerA(conf)#interface serial 0/0 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 3 页,
9、共 6 页 - - - - - - - - - routerA(conf_if)#clock rate 64000 提供时钟频率为64000 routerA(conf_if)#bandwidth 64 提供带宽为 64 DTE 配置:路由器串口配置ip 地址routeren router #configure terminal router (conf)#hostname routerB routerB(conf)#interface serial 0/0 routerB(conf_if)#ip address 192.168.1.1 255.255.255.0 11、静态路由的配置配置路由器
10、 A 的主机名和接口参数routerenable router#configure terminal router(conf)#hostname routerA routerA(conf)#interface fastethernet 0/1 路由器 A 的 1 端口为两路由器的连接端口routerA(conf-if)#ip address 192.168.2.1 255.255.255.0 routerA(conf-if)#no shutdown routerA(conf-if)#exit routerA(conf)# interface fastethernet 0/0 路由器 A 的 0
11、 端口为与主机的连接端口routerA(conf-if)#ip address 192.168.1.2 255.255.255.0 routerA(conf-if)#no shutdown 配置路由器 A 的静态路由表routerA(conf)#ip router 192.168.3.0 255.255.255.0 192.168.2.2 在 routerA 上配置默认路由routerA(conf)#ip route 0.0.0.0 0.0.0.0 192.168.2.2 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心
12、整理 - - - - - - - 第 4 页,共 6 页 - - - - - - - - - routerA(conf)#ip classless 在 routerA 上配置动态路由 (RIP) routerA(conf)#router rip routerA(conf)#network 192.168.1.0 routerA(conf)#network 192.168.2.0 12、动态路由的配置routerenable router#configure terminal routerA (config)#route ospf 10 配置 ospf 进程 idrouterA (config-
13、router)#network 192.168.0.0 0.0.0.255 area 013、访问控制列表配置router(config-if)#ip access-group 1 in 访问列表的入router(config-if)#ip access-group 1 out 访问列表的出router(config)#access-list 1 premit 192.168.10.0 0.0.0.255 允许 192.168.10.0的网段通过 router(config)#access-list 1 deny 192.168.10.0 2.0.0.255 拒绝 192.168.10.2的主
14、机通过router(config)#access-list 1 premit any any表示 0.0.0.0 255.255.255.255router(config)#access-list 1 premit host 172.30.16.29 host 表示 0.0.0.0router(config)#access-list 101 deny tcp 172.16.4.0 0.0.0.255 172.16.3.0 0.0.0.255 eq 21拒绝来自 172.16.4.0去往 172.16.3.0的 FTP 流量router(config)#ip access-list extend
15、ed cisco 创建名为 cisco的命名访问控制列表特别注意:1、当目的网络不可达时,路由表的跳数显示为16 2、Bandwidth 的带宽戴维为kbps 3、encapsulation表示封装4、pos接口的帧格式使用SDH:pos framing sdh 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 5 页,共 6 页 - - - - - - - - - 5、配置 ospf协议发布直连网段时会用的是反掩码6、划分子网的时候需要子网掩码名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 6 页,共 6 页 - - - - - - - - -