1. bbs.spoto.net/forum--.html -----雏鹰部落
  2.  
  3. GNS3安装
  4.  
  5. 、安装的所有目录不能使用中文
  6.  
  7. ISO如何操作
  8.  
  9. securecrt如何使用建立会话:之前总是连不上的原因是没有选 telnet协议,而不是ssh协议,要注意。
  10.  
  11. cmd如何进入GNS3模式:telnet localhost
  12.  
  13. GNS3使用过程以及两个路由怎样连接
  14.  
  15. 打开软件--添加镜像(c3640-jk9o3s-mz.-13a)--计算IDLE值直到出现*号选择即可,目的是降低cpu使用率在10%以下才可以--暂停双击--添加快速以太网口--add a link--两个路由连接起来
  16.  
  17. 命令+?=查看帮助
  18. 用户模式:》 输入exit 可以退出
  19. 特权模式:# 输入enable进入特权模式
  20. 全局模式(routerconfig)#模式--更高一级):输入configure terminal特权模式
  21. 全局模式退出:end 到上一级,exit 到用户模式
  22.  
  23. pc4(config)#default interface f / ------还原默认配置
  24.  
  25. 配置console密码,下次再插console就得输入密码
  26. R1(config)#line console 0 ---进入接口
  27. R1(config)#password spoto
  28. R1(config-line)#login 当其他设备连接这台设备时需要密码验证
  29. R1(config-line)#no login
  30. R1(config-line)#no pas spoto
  31.  
  32. 用户模式-特权模式 设置密码
  33. 到特权模式下
  34.  
  35. R1(config)#enable secret spoto
  36.  
  37. VTY口令-用于限制人员通过telnet访问设备,设备第一次现场调试,以后要通过远程telnet调试,
  38. 实验:
  39. R1作为被调试的设备,R2去登陆R1调试
  40.  
  41. R1(config)#line vty 0 4 vty:虚拟通道 0-4:要开5个通道
  42. R1(config-line)#password spototelnet
  43. R1#sh ip int
  44. R1#sh ip int b
  45. R1#conf t
  46. R1(config)#int f /
  47. R1(config-if)#ip add 1.1.1.1 255.255.255.0
  48. R1(config-if)#no sh
  49. R1(config-if)#no shutdown
  50. R2(config)#int f /
  51. R2(config-if)#ip add 1.1.1.2 255.255.255.0
  52. R2(config-if)#no sh
  53. R2(config-if)#no shutdown
  54. R1(config-if)#ping 1.1.1.2 ---------这个模式报错--Ping测试要在特权模式下
  55. ^
  56. % Invalid input detected at '^' marker
  57. R1#ping 1.1.1.2
  58.  
  59. Type escape sequence to abort.
  60. Sending , -byte ICMP Echos to 1.1.1.2, timeout is seconds:
  61. .!!!!
  62. Success rate is percent (/), round-trip min/avg/max = // ms
  63.  
  64. R2#telnet 1.1.1.1 -------------注意是特权模式下
  65. Trying 1.1.1.1 ... Open
  66.  
  67. User Access Verification
  68. Password:
  69. % Password: timeout expired!
  70. Password: spototelnet
  71. R1>enable
  72. Password:spoto
  73. R1#
  74.  
  75. 查看当前所有配置
  76. R1#show running-config ---注意在特权模式下 --保存在内存里面 即RAM里面,重启后会清空
  77. start-up-config 存储在NVRA里面 现在设备都放在flash里面 保存在这里面--再重启不丢失
  78. 保存配置 第一种
  79. R1#write
  80. Building configuration...
  81. [OK]
  82. 保存配置 第二种
  83. R1#copy running-config startup-config
  84. Destination filename [startup-config]?
  85. Building configuration...
  86. [OK]
  87. 清空配置
  88. R1#erase startup-config 针对旧设备, 都对当前配置没有影响,重启后才生效
  89. R1#delete flash:config.text 现在设备 都对当前配置没有影响,重启后才生效
  90.  
  91. IP步骤:
  92.  
  93. 先进入:用户模式-》特权模式-》全局模式-》进入接口
  94.  
  95. 接口区分:如果一台设备有两个插槽,第一个插槽编号是0,第二个插槽编号是1。第一个插槽里面只有一个接口编号是0;第二个插槽里面有两个接口编号,一个是0,一个是1
  96.  
  97. 一、配置以太网接口(就是以太网链路)--基于8..3标准走,用的ARP协议
  98.  
  99. 进入普通10M以太网口
  100. interface ethernet / -----进入第一个插槽编号,第0个接口
  101. interface ethernet / -----进入第二个插槽编号,第0个接口
  102. interface ethernet / -----进入第二个插槽编号,第1个接口
  103. ethernet / 第一个0表示10M 整个意思:10M以太网口
  104.  
  105. 进入快速以太网口
  106. interface fast-ethernet /
  107.  
  108. 添加ip
  109. R1(config-if)#ip add 1.1.1.1 255.255.255.0
  110.  
  111. 激活接口--------思科设备默认是关闭的
  112. R1(config-if)#no shutdown
  113.  
  114. 实验:
  115. R1#conf terminal
  116. R1(config)#interface fastEthernet /
  117. R1(config-if)#ip address 192.168.1.1 255.255.255.0 -----提示符已变成 -if
  118. R1(config-if)#no shutdown
  119. R1(config-if)#end
  120. R1#
  121.  
  122. R2#configure terminal
  123. R2(config)#interface f / interface s /
  124. R2(config-if)#ip address 192.168.1.2 255.255.255.0
  125. R2(config-if)#no shutdown
  126. R2(config-if)#end
  127. R2#
  128.  
  129. Ping测试要在特权模式下
  130.  
  131. R1#ping 192.168.1.2
  132.  
  133. Type escape sequence to abort.
  134. Sending , -byte ICMP Echos to 192.168.1.2, timeout is seconds:
  135. .!!!! ------5个包,第一个包超时
  136. Success rate is percent (/), round-trip min/avg/max = // ms
  137.  
  138. R1#ping 192.168.1.2
  139.  
  140. Type escape sequence to abort.
  141. Sending , -byte ICMP Echos to 192.168.1.2, timeout is seconds:
  142. !!!!!
  143. Success rate is percent (/), round-trip min/avg/max = // ms
  144.  
  145. 二、配置serial接口(就是串行接口) (就是串行链路)(广域网链路)
  146.  
  147. DCE
  148. R1(config)#interface serial /
  149. R1(config-if)#ip address 192.168.1.1 255.255.255.0
  150. R1(config-if)#no shutdown
  151. R1(config)#clock rate DCE端配置时钟信号。时钟信号在运营商,用户是DTE端,线缆两头分别写着DCEDTE,做模拟实验,需要一端模拟运营商,
  152.  
  153. DTE端不用配时钟
  154. R1(config)#interface serial /
  155. R1(config-if)#ip address 192.168.1.2 255.255.255.0
  156. R1(config-if)#no shutdown
  157.  
  158. 查看具体接口配置信息
  159. R1#show interfaces f0/ ----------注意模式
  160. FastEthernet0/ is up, line protocol is up ----物理接口和协议都是up
  161. Hardware is AmdFE, address is cc00.0b00. (bia cc00.0b00.) ---快速以太网口和MAC
  162. Internet address is 192.168.1.1/
  163. MTU bytes, BW Kbit, DLY usec, BW-带宽是100M, DLY--延迟
  164. reliability /, txload /, rxload /
  165. Encapsulation ARPA, loopback not set
  166.  
  167. R1#show ip int brief ------查看哪些接口配了哪些ip
  168. Interface IP-Address OK? Method Status Protocol
  169. FastEthernet0/ 192.168.1.1 YES manual up up
  170.  
  171. YES manual up---------是物理状态,如果连接路由器的线断了就是down了,
  172. Protocol up---------是协议状态,如果没有配置时钟信号,就是down
  173.  
  174. 路由选择原理;静态路由(S),直连路由(C
  175.  
  176. R1#show ip route
  177.  
  178. C 192.168.1.0/ is directly connected, FastEthernet0/
  179.  
  180. C:表示通过什么渠道获得,比如手工配置,C是直连,。S是手工配置的静态的
  181. 192.168.1.0/ :表示目标地址
  182. FastEthernet0/ :表示从哪出去,从接口出去还是吓一跳扔给谁。
  183.  
  184. 直连路由:路由接口配完IP后,接口激活,且双up:物理和协议都up,就会学习到紧邻路由的网络号,如:192.168.2.0/, ---C
  185. 静态路由:人工建表,指定去哪个网段,如果去的网段号很多,就得配好多表,--适合中小型网络。
  186. 动态路由:两个路由之间相互对话,从而学到远端路由所知道的,比如3.4.0;.0等网段。
  187.  
  188. 直连路由的获取:两端路由只能知道一侧的路由,中间的路由可以知道紧邻两侧的路由信息。
  189.  
  190. 静态路由配置: PC->网关->目的路由->目的路由后面是公网
  191.  
  192. 需要人工配置告诉网关去往目的地的路由信息,即网络号
  193.  
  194. 静态路由配置两种方式
  195.  
  196. R1config)#ip route 192.168.1.0 255.255.255.255. 192.168.12.1 192.168..0指的是公网IP 192.168..1指的是和目的路由器相连的左边的IP.------叫做扔给对端IP
  197.  
  198. R1config)#ip route 192.168.1.0 255.255.255.255. serial serial 0指的是网关紧挨着右边的接口 --------叫做扔给本地接口。
  199.  
  200. 通信是双向的,还需要配置回来的路由信息,也是这样的,
  201.  
  202. 实验:
  203. PC-> R1路由->R2路由->R3目的路由->目的路由后面的公网
  204.  
  205. -( R1路由)-S0/ 192.168.12.1/
  206.  
  207. 192.168.12.2/ S0/-( R2路由)-S0/ 192.16823./
  208.  
  209. 192.168.23.3/ S0/-( R3路由)
  210.  
  211. R1config)#ip route 192.168.23.0 255.255.255.0 192.168.12.2
  212. R3config)#ip route 192.168.12.0 255.255.255.255. serial s0/
  213.  
  214. 192.168.12.2------叫做扔给对端IP
  215. serial s0/0指的是网关紧挨着右边的接口 --------叫做扔给本地接口。
  216.  
  217. 通信是双向的,还需要配置回来的路由信息,也是这样的,
  218.  
  219. 默认路由 表示符号:S*
  220.  
  221. 实验(紧接着上面):PC-> R1路由->R2路由--后面接着好多网段IP,有1.2.03.04.0;多个隔离网络
  222.  
  223. R1config)#ip route 0.0.0.0 0.0.0.0 192.168.12.2 192.168..2相当于默认网关。
  224.  
  225. telnet七层访问构造 客户 A---网关路由---远端路由---客户 B
  226. 源端口是一个随机端口,目的端口一定是23端口。
  227.  
  228. osi七层:-5层不重要,4层把端口号封装TCP头部,然后建立三次握手连接在四层,源端口是一个随机端口,目的端口一定是23端口;3层报头加IP,源IP和目的IP2层是帧头,加上源mac和目标网关路由mac地址(mac只能在本地LAN有效)。A要把数据发给B,必须得先发给网关,所以必须得知道网关的mac地址。
  229.  
  230. A通过地址解析协议发送广播给网关,网关收到后再回一个给AA就会更新它的mac表,然后加上源mac和目标网关路由mac地址,最后变成10100的字样传给网关路由,网关收到后拆到第三层漏出IP,如果发现不是给自己的,就原封不动的打包回去,但是他要帮客户送出去,但是查了查路由没有到远端的路由表,所以我们就配置静态路由的方法告诉他怎么走。到远端路由后要拆封到帧,填上自己的mac地址和客户Bmac地址,所以也要广播得到,然后送给B计算机,B也要一层层拆,拆到应用层,看是23端口号,是telnet程序,所以就丢给了telnet程序处理。
  231.  
  232. 同理B回包的时候也得走这个过程。
  233.  
  234. cmd里面输入 arp -a 得到所有的mac地址。
  235.  
  236. lookback接口是虚拟接口,是个软件接口跟物理接口一样,可以配置IP地址。当物理接口不够用时,就可以用lookback接口。所以要开启这个、
  237.  
  238. 静态路由坏处:当有好多个路由时,基本每个路由都要配路由表,会很忙,而且有一个远端路由坏掉时 ,也不是道。
  239.  
  240. 动态路由协议
  241.  
  242. --------动态的更新,是一个对话。
  243.  
  244. 静态路由坏处:当有好多个路由时,基本每个路由都要配路由表,会很忙,而且有一个远端路由坏掉时 ,也不是道。
  245. 动态路由坏处:需要占用一定的cpu等资源,会占用一定带宽,但对网络不会造成太大影响
  246.  
  247. 动网路由协议分类:内部网关协议和外部网关协议。
  248. AS号:自治系统,-自我管理
  249. AS号内部---------选择内部网关协议
  250. 不同AS之间---------选择外部网关协议--------比如两个跨国公司之间,---比如两个农业银行之间
  251.  
  252. 内部网关协议包括:、距离矢量协议 、链路状态协议
  253. 外部网关协议包括:BGP--适用于超大型网络
  254.  
  255. 距离矢量协议
  256. 距离矢量协议包括:、RIPV1RIPV2 EIGRP
  257. 距离指的跳数--hop 一跳要跨越一台路由器,比如 R1要通过 R2 跨越2.0网段,这就是垮了一跳,以条数衡量一条路由的好坏,
  258. 矢量:R2要通告给R1R1要经过R2,这就是方向
  259. 一旦两台路由之间运行协议,路由就会更新自己的路由表,进行对话,周期性的更新,
  260. 更新方式:采用广播, 缺点:对链路和设备造成损耗,
  261.  
  262. 收敛完成的意思:动态路由学习完毕
  263.  
  264. 收敛分两步:、初次路由信息交换,进一步交欢
  265.  
  266. 度量值(Metric):衡量一条路由的好和坏 ----附图见网盘--动态路由--距离矢量路由协议。就是说路由 --------前提在同一协议中做比较A连接了两个分支路由。
  267.  
  268. -A-B-E-1.0 ---------A1.0经过了2 --------更忧 来源-RIP,网络号,viaB
  269. -A-C-D-E-1.0 --------A1.0经过了3
  270.  
  271. 这样以后都会走更忧的路径,但是当2跳的任何地方出了问题,就会选择3跳的路径
  272.  
  273. 度量值(Metric):同一台路由器收到多条去往同一个目的地的路由,会比较Metric值,Metric值忧的会被装进路由表,注:Metric值有比较条数的,有比较带宽的。如果两个Metric都相同就会同时使用,这就是负载均衡,
  274.  
  275. RIP缺点:当3跳的那条链路带宽比2跳的那条链路带宽大时,就是浪费,---附图见网盘--动态路由--距离矢量路由协议
  276.  
  277. 冗余:自动切换链路,当有一个链路挂掉时候,而静态的路由是无法自动切换的。
  278.  
  279. 查看度量值(Metric):show ip route ------附图见网盘--动态路由--距离矢量路由协议
  280.  
  281. Metric:在同一协议中做比较
  282. 管理距离(AD值):指的是不同动态协议之间做比较选择最优路径。
  283.  
  284. 总结:
  285. 一台路由器,当它从两种不同的动态路由协议选择协议中,学习到去往同一个目的地的路由,比较AD值。取信小的将路由装入路由表,进行数据转发,另一条路径,只有当优选的路径DOWN掉的时候,才会出现和使用;
  286. 一台路由器,当它从同种动态路由协议,但不同方向(邻居)学习 去往同一个目的地的路由,则比较metric度量值,选择忧的,装入路由表,进行数据转发。
  287.  
  288. 依照传闻的更新方式(广播、更新路由表) -----容易被骗,容易产生环路
  289. 逐跳更新
  290.  
  291. 环路的产生:-A-B-C-
  292.  
  293. C右端链路断掉时。但是仍然周期性的更新,当有pc访问C时,C告诉走B,B再告诉走C,往复循环,直到跑死,------------附图见网盘--动态路由--距离矢
  294. 还有达到无穷大
  295. 量路由协议
  296.  
  297. 消除环路的方法: A-B-C-x
  298. 、定义最大度量值防止计数至无穷大(最大跳数) ----这是RIP的最大上限
  299. 、水平分隔 --附图见网盘--动态路由--距离矢
  300. 、抑制计时器:抑制计时器:远端出问题时,BC先启动计时器。观察,如果恢复,就继续使用
  301.  
  302. 、路由中毒 ---路由无穷大--就是不可达-----泛红出去------附图见网盘--动态路由--距离矢
  303. 、毒性逆转 :带有路由中毒的水平分隔,:C告诉B路由不可达,B也告诉C我知道路由不可达,并等待C右边的线路好
  304. 、触发更新:拓扑发送变化时,路由立即发送更新消息
  305.  
  306. RIP:适用于金融行业,
  307. 基于UDP,端口520的应用层协议。
  308. 管理距离120
  309.  
  310. RIP实验
  311. R1 R2 R3
  312.  
  313. 如果有多个路由,依次宣告自己的网络号即可
  314. R1#conf t
  315. R1(config)#interface S /
  316. R1(config-if)#ip address 192.168.12.1 255.255.255.0
  317. R1(config-if)#no sh
  318. R1#ping 192.168.12.2
  319.  
  320. Type escape sequence to abort.
  321. Sending , -byte ICMP Echos to 192.168.12.2, timeout is seconds:
  322. !!!!!
  323. Success rate is percent (/), round-trip min/avg/max = // ms
  324. R1#ping 192.168.23.3
  325.  
  326. Type escape sequence to abort.
  327. Sending , -byte ICMP Echos to 192.168.23.3, timeout is seconds:
  328. .....
  329. Success rate is percent (/)
  330. R1#conf t
  331. R1(config)#router rip
  332. R1(config-router)#network 192.168.12.0
  333. R1(config-router)#end
  334. R1#sh ip ro
  335. Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
  336. D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
  337. N1 - OSPF NSSA external type , N2 - OSPF NSSA external type
  338. E1 - OSPF external type , E2 - OSPF external type
  339. i - IS-IS, su - IS-IS summary, L1 - IS-IS level-, L2 - IS-IS level-
  340. ia - IS-IS inter area, * - candidate default, U - per-user static route
  341. o - ODR, P - periodic downloaded static route
  342.  
  343. Gateway of last resort is not set
  344.  
  345. C 192.168.12.0/ is directly connected, Serial0/
  346.  
  347. (配置Rip后)
  348.  
  349. R1#ping 192.168.23.3
  350.  
  351. Type escape sequence to abort.
  352. Sending , -byte ICMP Echos to 192.168.23.3, timeout is seconds:
  353. .....
  354. Success rate is percent (/)
  355.  
  356. R2#configure t
  357. R2(config)#int s /
  358. R2(config-if)#ip address 192.168.12.2 255.255.255.0
  359. R2(config-if)#no sh
  360. R2(config-if)#int s /
  361. R2(config-if)#ip address 192.168.23.2 255.255.255.0
  362. R2(config-if)#no sh
  363. R2(config)#end
  364. R2#sh ip int b
  365. R2#ping 192.168.23.3
  366. Type escape sequence to abort.
  367. Sending , -byte ICMP Echos to 192.168.23.3, timeout is seconds:
  368. !!!!!
  369. Success rate is percent (/), round-trip min/avg/max = // ms
  370. R2#conf t
  371. R2(config)#router rip
  372. R2(config-router)#net
  373. R2(config-router)#network 192.168.12.0
  374. R2(config-router)#network 192.168.23.0
  375.  
  376. R3#conf t
  377. R3(config)#int s /
  378. R3(config-if)#ip address 192.168.23.3 255.255.255.0
  379. R3(config-if)#no sh
  380. R3(config-if)#end
  381. R3#conf t
  382. R3(config)#router rip
  383. R3(config-router)#network 192.168.23.0
  384. R3(config-router)#end
  385. R3#sh ip ro
  386. Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
  387. D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
  388. N1 - OSPF NSSA external type , N2 - OSPF NSSA external type
  389. E1 - OSPF external type , E2 - OSPF external type
  390. i - IS-IS, su - IS-IS summary, L1 - IS-IS level-, L2 - IS-IS level-
  391. ia - IS-IS inter area, * - candidate default, U - per-user static route
  392. o - ODR, P - periodic downloaded static route
  393.  
  394. Gateway of last resort is not set
  395.  
  396. R 192.168.12.0/ [/] via 192.168.23.2, ::, Serial0/
  397. C 192.168.23.0/ is directly connected, Serial0/
  398.  
  399. R3#ping 192.168.12.1
  400.  
  401. Type escape sequence to abort.
  402. Sending , -byte ICMP Echos to 192.168.12.1, timeout is seconds:
  403. !!!!!
  404. Success rate is percent (/), round-trip min/avg/max = // ms
  405.  
  406. EIGRP
  407.  
  408. --增强型内部网关路由协议 --思科私有---只能在思科设备上运行--前身是IGRP
  409. RFC文档 ----规范 www.rfc
  410. 特点:收敛速度比较快,减少带宽浪费,(触发性更新)--当网络拓扑发送变化时才更新,
  411. 支持多种网络层协议,(ipipxappletalk ---见截图
  412.  
  413. 无类路由:可以识别不同掩码
  414. 高级距离矢量协议:不只只是根据跳数,也可以根据带宽。
  415. %无环路,---DUAL算法
  416. 首先形成邻居表,再进行路由信息同步,然后启用DUAL算法,查看哪个更忧。
  417. 三种表:邻居表,拓扑表。路由表,
  418.  
  419. 通过组播方式泛红:224.0..10发送
  420.  
  421. metric计算==带宽+延迟 =BW+DLY BW=(107次方/带宽 )*
  422.  
  423. DLY= ((延迟(微妙)/)*
  424. 带宽:沿路所有数据出接口带宽最低值,且是接口的带宽,而不是链路的带宽
  425. 延迟:沿路所有数据出接口延迟的和
  426.  
  427. DUAL算法:提供无环路
  428.  
  429. 后继路由器:就是选择metric最优的那条路的下一个路由器。
  430. 可行距离:本地到达目标地的metric值,(FD 本地可以是A 可以是B
  431. 可行后继路由器:备份的那个 FS
  432.  
  433. A-B-D-
  434. A-C-D-
  435. 通告距离:C通告给A到达目的地的D右面网段的距离,(AD
  436.  
  437. 可行后继成立的条件:C通告给A到达目的地的D右面网段的距离,(AD)要小于 A通过B到达D右面网段的距离。(FD
  438.  
  439. 路由更新和数据包的方向是相反的
  440.  
  441. K值要相等
  442.  
  443. EIGRP的配置
  444.  
  445. AS:域,比如一个省份就是一个域,不同的AS用不同的号码区分,
  446.  
  447. debug:一般不要开启,开启后会出现大量调试信息,有可能把设备跑坏,
  448. 自动汇总:防止远端网络号down掉的反复计算DUAL值协议默认开启汇总,
  449.  
  450. 10.1.1.0/ 这是个子网 .网段是A类地址,进行了子网划分。
  451. 172.16.0.0/
  452.  
  453. 192.168.12.0 是个主类地址,
  454.  
  455. EIGRP的配置实验
  456. R1#conf t
  457. R1(config)#interface S /
  458. R1(config-if)#ip address 192.168.12.1 255.255.255.0
  459. R1(config-if)#no sh
  460. R1(config-if)#router eigrp
  461. R1(config-router)#network 192.168.12.0
  462. R1(config-router)#end
  463. R1#sh ip route
  464. Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
  465. D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
  466. N1 - OSPF NSSA external type , N2 - OSPF NSSA external type
  467. E1 - OSPF external type , E2 - OSPF external type
  468. i - IS-IS, su - IS-IS summary, L1 - IS-IS level-, L2 - IS-IS level-
  469. ia - IS-IS inter area, * - candidate default, U - per-user static route
  470. o - ODR, P - periodic downloaded static route
  471.  
  472. Gateway of last resort is not set
  473.  
  474. C 192.168.12.0/ is directly connected, Serial0/
  475.  
  476. R2#configure t
  477. R2(config)#int s /
  478. R2(config-if)#ip address 192.168.12.2 255.255.255.0
  479. R2(config-if)#no sh
  480. R2(config-if)#
  481. *Mar ::13.543: %LINK--UPDOWN: Interface Serial0/, changed state to up
  482. R2(config-if)#
  483. *Mar ::14.547: %LINEPROTO--UPDOWN: Line protocol on Interface Serial0/, changed state to up
  484. R2(config-if)#in
  485. R2(config-if)#int lo0
  486. R2(config-if)#
  487. *Mar ::40.851: %LINEPROTO--UPDOWN: Line protocol on Interface Loopback0, changed state to up
  488. R2(config-if)#ip add 2.2.2.2 255.255.255.0
  489. R2(config-if)#no sh
  490. R2(config-if)#no shutdown
  491. R2(config-if)#router eigrp
  492. R2(config-router)#networ
  493. R2(config-router)#network 192.168.12.0
  494. R2(config-router)#
  495. *Mar ::40.487: %DUAL--NBRCHANGE: IP-EIGRP() : Neighbor 192.168.12.1 (Serial0/) is up: new adjacency
  496. R2(config-router)#netw
  497. R2(config-router)#network 2.2..
  498.  
  499. R1#sh ip route
  500. Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
  501. D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
  502. N1 - OSPF NSSA external type , N2 - OSPF NSSA external type
  503. E1 - OSPF external type , E2 - OSPF external type
  504. i - IS-IS, su - IS-IS summary, L1 - IS-IS level-, L2 - IS-IS level-
  505. ia - IS-IS inter area, * - candidate default, U - per-user static route
  506. o - ODR, P - periodic downloaded static route
  507.  
  508. Gateway of last resort is not set
  509.  
  510. C 192.168.12.0/ is directly connected, Serial0/
  511. D 2.0.0.0/ [/] via 192.168.12.2, ::, Serial0/
  512.  
  513. R1#show ip eigrp neighbors
  514. IP-EIGRP neighbors for process
  515. H Address Interface Hold Uptime SRTT RTO Q Seq
  516. (sec) (ms) Cnt Num
  517. 192.168.12.2 Se0/ ::
  518. R1#show ip eigrp neighbors
  519. IP-EIGRP neighbors for process
  520. H Address Interface Hold Uptime SRTT RTO Q Seq
  521. (sec) (ms) Cnt Num
  522. 192.168.12.2 Se0/ ::
  523. R1#show ip eigrp neighbors
  524. IP-EIGRP neighbors for process
  525. H Address Interface Hold Uptime SRTT RTO Q Seq
  526. (sec) (ms) Cnt Num
  527. 192.168.12.2 Se0/ ::
  528. R1#
  529. Connected to Dynamips VM "R1" (ID , type c3600) - Console port
  530. Press ENTER to get the prompt.
  531.  
  532. R1#sh
  533. R1#show ip
  534. R1#show ip eifr
  535. R1#show ip eigrp
  536. R1#show ip eigrp nei
  537. R1#show ip eigrp neighbors
  538. IP-EIGRP neighbors for process
  539. H Address Interface Hold Uptime SRTT RTO Q Seq
  540. (sec) (ms) Cnt Num
  541. 192.168.12.2 Se0/ ::
  542. R1#show ip eigrp neighbors
  543. IP-EIGRP neighbors for process
  544. H Address Interface Hold Uptime SRTT RTO Q Seq
  545. (sec) (ms) Cnt Num
  546. 192.168.12.2 Se0/ ::
  547. R1#conf
  548. R1#configure t
  549. Enter configuration commands, one per line. End with CNTL/Z.
  550. R1(config)#int s /
  551. R1(config-if)#shu
  552. R1(config-if)#shutdown
  553. R1(config-if)#
  554. *Mar ::01.555: %DUAL--NBRCHANGE: IP-EIGRP() : Neighbor 192.168.12.2 (Serial0/) is down: interface down
  555. R1(config-if)#
  556. *Mar ::03.515: %LINK--CHANGED: Interface Serial0/, changed state to administratively down
  557. *Mar ::04.515: %LINEPROTO--UPDOWN: Line protocol on Interface Serial0/, changed state to down
  558. R1(config-if)#debu
  559. R1(config-if)#de
  560. R1(config-if)#debu
  561. R1(config-if)#debug ip eigr
  562. R1(config-if)#end
  563. R1#d
  564. *Mar ::59.195: %SYS--CONFIG_I: Configured from console by console
  565. R1#deb
  566. R1#debug ip eigr
  567. R1#debug ip eigrp ?
  568. <-> Autonomous System
  569. neighbor IP-EIGRP neighbor debugging
  570. notifications IP-EIGRP event notifications
  571. summary IP-EIGRP summary route processing
  572. vrf Select a VPN Routing/Forwarding instance
  573. <cr>
  574.  
  575. R1#debug ip eigrp
  576. IP-EIGRP Route Events debugging is on
  577. R1#conf
  578. R1#configure t
  579. Enter configuration commands, one per line. End with CNTL/Z.
  580. R1(config)#int s /
  581. R1(config-if)#no shu
  582. R1(config-if)#no shutdown
  583. R1(config-if)#
  584. *Mar ::34.855: %LINK--UPDOWN: Interface Serial0/, changed state to up
  585. R1(config-if)#
  586. *Mar ::35.859: %LINEPROTO--UPDOWN: Line protocol on Interface Serial0/, changed state to up
  587. R1(config-if)#
  588. *Mar ::44.755: %DUAL--NBRCHANGE: IP-EIGRP() : Neighbor 192.168.12.2 (Serial0/) is up: new adjacency
  589. *Mar ::44.915: IP-EIGRP(Default-IP-Routing-Table:): Processing incoming UPDATE packet
  590. *Mar ::44.919: IP-EIGRP(Default-IP-Routing-Table:): 192.168.12.0/ - do advertise out Serial0/
  591. *Mar ::44.987: IP-EIGRP(Default-IP-Routing-Table:): Processing incoming UPDATE packet
  592. *Mar ::44.991: IP-EIGRP(Default-IP-Routing-Table:): Int 2.0.0.0/ M - SM -
  593. *Mar ::44.991: IP-EIGRP(Default-IP-Routing-Table:): route installed for 2.0.0.0 ()
  594. *Mar ::44.995: IP-EIGRP(Default-IP-Routing-Table:): 192.168.12.0/ - do advertise out Serial0/
  595. R1(config-if)#
  596. *Mar ::45.083: IP-EIGRP(Default-IP-Routing-Table:): Processing incoming UPDATE packet
  597. *Mar ::45.087: IP-EIGRP(Default-IP-Routing-Table:): Int 2.0.0.0/ M - SM -
  598. R1(config-if)#end
  599. R1#sh
  600. *Mar ::41.339: %SYS--CONFIG_I: Configured from console by console
  601. R1#sh ip ro
  602. Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
  603. D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
  604. N1 - OSPF NSSA external type , N2 - OSPF NSSA external type
  605. E1 - OSPF external type , E2 - OSPF external type
  606. i - IS-IS, su - IS-IS summary, L1 - IS-IS level-, L2 - IS-IS level-
  607. ia - IS-IS inter area, * - candidate default, U - per-user static route
  608. o - ODR, P - periodic downloaded static route
  609.  
  610. Gateway of last resort is not set
  611.  
  612. C 192.168.12.0/ is directly connected, Serial0/
  613. D 2.0.0.0/ [/] via 192.168.12.2, ::, Serial0/
  614. R1#un all
  615. All possible debugging has been turned off
  616. R1#sh ip ro
  617. Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
  618. D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
  619. N1 - OSPF NSSA external type , N2 - OSPF NSSA external type
  620. E1 - OSPF external type , E2 - OSPF external type
  621. i - IS-IS, su - IS-IS summary, L1 - IS-IS level-, L2 - IS-IS level-
  622. ia - IS-IS inter area, * - candidate default, U - per-user static route
  623. o - ODR, P - periodic downloaded static route
  624.  
  625. Gateway of last resort is not set
  626.  
  627. C 192.168.12.0/ is directly connected, Serial0/
  628. D 2.0.0.0/ [/] via 192.168.12.2, ::, Serial0/ ---这个8见截图,
  629.  
  630. R1#show ip eigrp neigh
  631. R1#show ip eigrp neighbors
  632. IP-EIGRP neighbors for process
  633. H Address Interface Hold Uptime SRTT RTO Q Seq
  634. (sec) (ms) Cnt Num
  635. 192.168.12.2 Se0/ ::
  636. R1#ping 192.168.12.2
  637.  
  638. Type escape sequence to abort.
  639. Sending , -byte ICMP Echos to 192.168.12.2, timeout is seconds:
  640. !!!!!
  641. Success rate is percent (/), round-trip min/avg/max = // ms
  642.  
  643. R1#show ip eigrp topology
  644. IP-EIGRP Topology Table for AS()/ID(192.168.12.1)
  645.  
  646. Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
  647. r - reply Status, s - sia Status
  648.  
  649. P 2.0.0.0/, successors, FD is
  650. via 192.168.12.2 (/), Serial0/
  651. P 192.168.12.0/, successors, FD is
  652. via Connected, Serial0/
  653.  
  654. 实验:见截图 三个路由构成三角形。R3连接一个lookback接口
  655.  
  656. R1#conf
  657. R1#configure t
  658. Enter configuration commands, one per line. End with CNTL/Z.
  659. R1(config)#int f /
  660. ^
  661. % Invalid input detected at '^' marker.
  662.  
  663. R1(config)#int s /
  664. R1(config-if)#ip add 192.168.12.1 255.255.255.0
  665. R1(config-if)#no sh
  666. R1(config-if)#no shutdown
  667. R1(config-if)#
  668. *Mar ::39.935: %LINK--UPDOWN: Interface Serial0/, changed state to up
  669. R1(config-if)#
  670. *Mar ::40.939: %LINEPROTO--UPDOWN: Line protocol on Interface Serial0/, changed state to up
  671. R1(config-if)#int s /
  672. *Mar ::04.195: %LINEPROTO--UPDOWN: Line protocol on Interface Serial0/, changed state to down
  673. R1(config-if)#int s /
  674. R1(config-if)#ip add 192.168.13.1 255.255.255.0
  675. R1(config-if)#no sh
  676. R1(config-if)#no shutdown
  677. R1(config-if)#
  678. *Mar ::41.003: %LINK--UPDOWN: Interface Serial0/, changed state to up
  679. R1(config-if)#
  680. *Mar ::42.007: %LINEPROTO--UPDOWN: Line protocol on Interface Serial0/, changed state to up
  681. R1(config-if)#
  682. *Mar ::04.207: %LINEPROTO--UPDOWN: Line protocol on Interface Serial0/, changed state to down
  683. R1(config-if)#netw
  684. R1(config-if)#networ
  685. R1(config-if)#network 192.168.12.0
  686. ^
  687. % Invalid input detected at '^' marker.
  688.  
  689. R1(config-if)#rout
  690. R1(config-if)#routing i
  691. ^
  692. % Invalid input detected at '^' marker.
  693.  
  694. R1(config-if)#routing ei
  695. ^
  696. % Invalid input detected at '^' marker.
  697.  
  698. R1(config-if)#route
  699. R1(config-if)#router ei
  700. R1(config-router)#netw
  701. R1(config-router)#network 192.168.12.0
  702. R1(config-router)#network 192.168.13.0
  703. R1(config-router)#
  704. *Mar ::54.179: %LINEPROTO--UPDOWN: Line protocol on Interface Serial0/, changed state to up
  705. R1(config-router)#
  706. *Mar ::51.639: %DUAL--NBRCHANGE: IP-EIGRP() : Neighbor 192.168.12.2 (Serial0/) is up: new adjacency
  707. R1(config-router)#
  708. *Mar ::24.207: %LINEPROTO--UPDOWN: Line protocol on Interface Serial0/, changed state to up
  709. R1(config-router)#
  710. *Mar ::43.699: %DUAL--NBRCHANGE: IP-EIGRP() : Neighbor 192.168.13.3 (Serial0/) is up: new adjacency
  711. R1(config-router)#end
  712.  
  713. R2#conf
  714. R2#conf t
  715. Enter configuration commands, one per line. End with CNTL/Z.
  716. R2(config)#int s /
  717. R2(config-if)#ip add 192.168.12.2
  718. % Incomplete command.
  719.  
  720. R2(config-if)#ip add 192.168.12.2
  721. R2(config-if)#ip add 192.168.12.2 255.255.255.0
  722. R2(config-if)#no sh
  723. R2(config-if)#no shutdown
  724. R2(config-if)#
  725. *Mar ::48.531: %LINK--UPDOWN: Interface Serial0/, changed state to up
  726. R2(config-if)#
  727. *Mar ::49.535: %LINEPROTO--UPDOWN: Line protocol on Interface Serial0/, changed state to up
  728. R2(config-if)#int s /
  729. R2(config-if)#ip add 192.168.23.2 255.255.255.0
  730. R2(config-if)#no sh
  731. R2(config-if)#no shutdown
  732. R2(config-if)#
  733. *Mar ::14.087: %LINK--UPDOWN: Interface Serial0/, changed state to up
  734. R2(config-if)#
  735. *Mar ::15.091: %LINEPROTO--UPDOWN: Line protocol on Interface Serial0/, changed state to up
  736. R2(config-if)#rout
  737. R2(config-if)#router ei
  738. R2(config-router)#netw
  739. R2(config-router)#network
  740. *Mar ::42.515: %LINEPROTO--UPDOWN: Line protocol on Interface Serial0/, changed state to down
  741. R2(config-router)#network 192.168.12.0
  742. R2(config-router)#network 192.168.12.0
  743. *Mar ::50.183: %DUAL--NBRCHANGE: IP-EIGRP() : Neighbor 192.168.12.1 (Serial0/) is up: new adjacency
  744. R2(config-router)#network 192.168.23.0
  745.  
  746. R3#int
  747. R3#int
  748. R3#conf
  749. R3#configure t
  750. R3#configure terminal
  751. Enter configuration commands, one per line. End with CNTL/Z.
  752. R3(config)#ip add 192.168.13.3 255.255.255.0
  753. ^
  754. % Invalid input detected at '^' marker.
  755.  
  756. R3(config)#int s /
  757. R3(config-if)#ip add 192.168.13.3 255.255.255.0
  758. R3(config-if)#no sh
  759. R3(config-if)#no shutdown
  760. R3(config-if)#
  761. *Mar ::18.555: %LINK--UPDOWN: Interface Serial0/, changed state to up
  762. R3(config-if)#
  763. *Mar ::19.559: %LINEPROTO--UPDOWN: Line protocol on Interface Serial0/, changed state to up
  764. R3(config-if)#int s /
  765. R3(config-if)#ip add 192.168.23.3 255.255.255.0
  766. R3(config-if)#no sh
  767. R3(config-if)#no shutdown
  768. R3(config)#int lo0
  769. R3(config-if)#
  770. *Mar ::14.019: %LINEPROTO--UPDOWN: Line protocol on Interface Loopback0, changed state to up
  771. R3(config-if)#ip add 3.3.3.3 255.255.255.0
  772. R3(config-if)#no sh
  773. R3(config-if)#no shutdown
  774. R3(config-router)#router ei
  775. R3(config-router)#network 192.168.23.0
  776. R3(config-router)#network 192.168.13.0
  777. R3(config-router)#network 3.0.0.0
  778.  
  779. R1#show ip eigrp neighbors
  780. IP-EIGRP neighbors for process
  781. H Address Interface Hold Uptime SRTT RTO Q Seq
  782. (sec) (ms) Cnt Num
  783. 192.168.13.3 Se0/ ::
  784. 192.168.12.2 Se0/ ::
  785. R1#sho
  786. R1#show ip ro
  787. Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
  788. D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
  789. N1 - OSPF NSSA external type , N2 - OSPF NSSA external type
  790. E1 - OSPF external type , E2 - OSPF external type
  791. i - IS-IS, su - IS-IS summary, L1 - IS-IS level-, L2 - IS-IS level-
  792. ia - IS-IS inter area, * - candidate default, U - per-user static route
  793. o - ODR, P - periodic downloaded static route
  794.  
  795. Gateway of last resort is not set
  796.  
  797. C 192.168.12.0/ is directly connected, Serial0/
  798. C 192.168.13.0/ is directly connected, Serial0/
  799. D 3.0.0.0/ [/] via 192.168.13.3, ::, Serial0/
  800. D 192.168.23.0/ [/] via 192.168.13.3, ::, Serial0/
  801. [/] via 192.168.12.2, ::, Serial0/
  802. R1#sho
  803. R1#show ip ei
  804. R1#show ip eigrp to
  805. R1#show ip eigrp topology
  806. IP-EIGRP Topology Table for AS()/ID(192.168.13.1)
  807.  
  808. Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
  809. r - reply Status, s - sia Status
  810.  
  811. P 3.0.0.0/, successors, FD is
  812. via 192.168.13.3 (/), Serial0/
  813. P 192.168.12.0/, successors, FD is
  814. via Connected, Serial0/
  815. P 192.168.13.0/, successors, FD is
  816. via Connected, Serial0/
  817. P 192.168.23.0/, successors, FD is
  818. via 192.168.12.2 (/), Serial0/
  819. via 192.168.13.3 (/), Serial0/
  820. R1#show ip eigrp topology all
  821. R1#show ip eigrp topology all-links
  822. IP-EIGRP Topology Table for AS()/ID(192.168.13.1)
  823.  
  824. Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
  825. r - reply Status, s - sia Status
  826.  
  827. P 3.0.0.0/, successors, FD is , serno
  828. via 192.168.13.3 (/), Serial0/
  829. via 192.168.12.2 (/), Serial0/
  830. P 192.168.12.0/, successors, FD is , serno
  831. via Connected, Serial0/
  832. P 192.168.13.0/, successors, FD is , serno
  833. via Connected, Serial0/
  834. P 192.168.23.0/, successors, FD is , serno
  835. via 192.168.12.2 (/), Serial0/
  836. via 192.168.13.3 (/), Serial0/
  837.  
  838. R1#show ip protocols ------ 查看全局指令
  839.  
  840. 负载均衡
  841.  
  842. 负载均衡:同时出现了两条路由到达目的地。并且metric值相等。提高了带宽的利用率。
  843.  
  844. 不等价负载均衡: --见图
  845.  
  846. 允许两条优劣路由都放在路由表里。--防止闲置带宽:同时使用两条链路,
  847.  
  848. variance= 自定义这个数
  849.  
  850. (+)=<[*FD=] 这个时候30这个metric值就可以作为负载路由一起使用。
  851.  
  852. 网络工程师概念:不是机房,不是弱电,是整个路由器,交换机等设备组成的系统,上面跑了平台,又有各种协议,根据客户现场进需求行规划。变成实施方案,最终落实,
  853.  
  854. 多和行业内人士交流。
  855.  
  856. OSPF
  857.  
  858. OSPF协议:链路状态路由协议(开放式最短路径优先)---用的最广泛 --SPF算法 很多园区网都在用
  859. O:开放 共有的 没有跳数限制
  860.  
  861. 路由之间交流的是链路的状态而不是直接的路由信息,而距离矢量路由协议交流的直接是路由信息
  862.  
  863. 状态:这个接口到某个路由之间的开销或邻居关系。
  864.  
  865. 根据开销选择 路径,和带宽成反比,带宽越大,到达目的地的开销越小。
  866. cost=108次方/接口带宽 带宽=沿路入接口所有带宽之和
  867.  
  868. OSPF报文类型 相当于婚恋过程
  869. HELLO:建立初步关系 ,采用组播方式,224.0.0.5,发给所有运行OSPF协议的路由器
  870. DBD:链路状态表 LSA:具体信息,在LSDB --这一步了解基本信息,LSDB在拓扑表中,
  871. LSR:请求详细情况--链路状态信息
  872. LSU:给的答复(包括了多了LSA
  873. LSACK:确认报文的安全机制,对LSU中的LSA进行确认。
  874.  
  875. OSPF区域:
  876. 泛红,每台路由都要装在小区内的所有信息,浪费资源,所以区域要弄小点,且区域大,不易管理,且拓扑发生变化容易发生网络抖动,
  877.  
  878. OSPF 区域划分,以路由器为界限,
  879.  
  880. OSPF三张表:邻居表,拓扑表,OSPF路由表。
  881.  
  882. OSPF优势
  883. 几乎适应所有网络类型,包括以太网,点对点串行链路,就是运行在OS七层的第二层,比如物理层是以太网接口,在二层就会识别封装成以太网帧,如果是串行接口,就封装成HPLC的帧,接口不一样,封装时候叫的名字也不一样,然后OSPF就会根据这种不同的数据链路层进行操作,不同的数据链路就是不同的网络,
  884.  
  885. 一共4种网络类型
  886.  
  887. 广播型:就是以太网链路,比如在LAN中连接了多台路由器,简称BMA
  888.  
  889. 串行链路:就是点对点模式,一条线两头各连一个路由,只有两个
  890. NBMA:也是多路型网络,但是不支持广播和组播,最典型的封装方式就是 x.25和帧中
  891.  
  892. 通配符(反掩码):用来匹配,=255.255.255.255-接口的掩码
  893.  
  894. 实验--通配符
  895.  
  896. R1#configure t
  897. Enter configuration commands, one per line. End with CNTL/Z.
  898. R1(config)#int f /
  899. ^
  900. % Invalid input detected at '^' marker.
  901.  
  902. R1(config)#int s /
  903. R1(config-if)#ip add 192.168.12.1 255.255.255.0
  904. R1(config-if)#no shutdown
  905. R1(config-if)#
  906. *Mar ::55.751: %LINK--UPDOWN: Interface Serial0/, changed state to up
  907. R1(config-if)#
  908. *Mar ::56.755: %LINEPROTO--UPDOWN: Line protocol on Interface Serial0/, changed state to up
  909. R1(config-if)#
  910. *Mar ::23.955: %LINEPROTO--UPDOWN: Line protocol on Interface Serial0/, changed state to down
  911. R1(config-if)#rou
  912. R1(config-if)#router os
  913. R1(config-if)#ex
  914. R1(config)#router os
  915. R1(config)#router ospf
  916. R1(config-router)#netw
  917. R1(config-router)#network 192.168.12.0 0.0.0.255 ar
  918. R1(config-router)#network 192.168.12.0 0.0.0.255 area ---- 255.255.255.255-3255
  919. R1(config-router)#
  920. *Mar ::03.955: %LINEPROTO--UPDOWN: Line protocol on Interface Serial0/, changed state to up
  921. R1(config-router)#
  922. *Mar ::35.611: %OSPF--ADJCHG: Process , Nbr 192.168.23.2 on Serial0/ from LOADING to FULL, Loading Done
  923.  
  924. R2#conf
  925. R2#configure t
  926. R2#configure terminal
  927. Enter configuration commands, one per line. End with CNTL/Z.
  928. R2(config)#in
  929. R2(config)#interface s /
  930. R2(config-if)#ip add 192.168.12.2 255.255.255.0
  931. R2(config-if)#no sh
  932. R2(config-if)#no shutdown
  933. R2(config-if)#
  934. *Mar ::49.223: %LINK--UPDOWN: Interface Serial0/, changed state to up
  935. R2(config-if)#in
  936. *Mar ::50.227: %LINEPROTO--UPDOWN: Line protocol on Interface Serial0/, changed state to up
  937. R2(config-if)#in
  938. R2(config-if)#int
  939. R2(config-if)#ex
  940. R2(config)#int s /
  941. R2(config-if)#ip add 192.168.23.2 255.255.255.0
  942. R2(config-if)#no sh
  943. R2(config-if)#no shutdown
  944. R2(config-if)#
  945. *Mar ::47.295: %LINK--UPDOWN: Interface Serial0/, changed state to up
  946. R2(config-if)#
  947. *Mar ::48.299: %LINEPROTO--UPDOWN: Line protocol on Interface Serial0/, changed state to up
  948. R2(config-if)#ex
  949. R2(config)#rou
  950. R2(config)#router os
  951. R2(config)#router ospf
  952. R2(config-router)#
  953. *Mar ::13.151: %LINEPROTO--UPDOWN: Line protocol on Interface Serial0/, changed state to down
  954. R2(config-router)#netw
  955. R2(config-router)#network 192.168.12.0 0.0.0.255 a
  956. R2(config-router)#network 192.168.12.0 0.0.0.255 area
  957. R2(config-router)#
  958. *Mar ::34.371: %OSPF--ADJCHG: Process , Nbr 192.168.12.1 on Serial0/ from LOADING to FULL, Loading Done
  959. R2(config-router)#net
  960. R2(config-router)#network 192.168.23.0 0.0.0.255 ar
  961. R2(config-router)#network 192.168.23.0 0.0.0.255 area
  962. R2(config-router)#
  963. *Mar ::43.151: %LINEPROTO--UPDOWN: Line protocol on Interface Serial0/, changed state to up
  964.  
  965. R3#conf
  966. R3#conf t
  967. Enter configuration commands, one per line. End with CNTL/Z.
  968. R3(config)#int s /
  969. R3(config-if)#ip add 192.168.23.3 255.255.255.0
  970. R3(config-if)#no sh
  971. R3(config-if)#no shutdown
  972. R3(config-if)#
  973. *Mar ::30.879: %LINK--UPDOWN: Interface Serial0/, changed state to up
  974. R3(config-if)#
  975. *Mar ::31.883: %LINEPROTO--UPDOWN: Line protocol on Interface Serial0/, changed state to up
  976. R3(config-if)#ex
  977. R3(config)#rou
  978. R3(config)#routee
  979. R3(config)#router os
  980. R3(config)#router ospf
  981. R3(config-router)#netw
  982. R3(config-router)#network 192.168.23.0 0.0.0.255 a
  983. R3(config-router)#
  984. *Mar ::48.359: %OSPF--ADJCHG: Process , Nbr 192.168.23.2 on Serial0/ from LOADING to FULL, Loading Done
  985.  
  986. R1(config-router)#end
  987. R1#
  988. *Mar ::07.071: %SYS--CONFIG_I: Configured from console by console
  989. R1#sh
  990. R1#show ip os
  991. R1#show ip ospf ne
  992. R1#show ip ospf neighbor
  993.  
  994. Neighbor ID Pri State Dead Time Address Interface
  995. 192.168.23.2 FULL/ - :: 192.168.12.2 Serial0/
  996. R1#sh ip ro
  997. Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
  998. D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
  999. N1 - OSPF NSSA external type , N2 - OSPF NSSA external type
  1000. E1 - OSPF external type , E2 - OSPF external type
  1001. i - IS-IS, su - IS-IS summary, L1 - IS-IS level-, L2 - IS-IS level-
  1002. ia - IS-IS inter area, * - candidate default, U - per-user static route
  1003. o - ODR, P - periodic downloaded static route
  1004.  
  1005. Gateway of last resort is not set
  1006.  
  1007. C 192.168.12.0/ is directly connected, Serial0/
  1008. O 192.168.23.0/ [/] via 192.168.12.2, ::, Serial0/
  1009. R1#ping 192.168.23.3
  1010.  
  1011. Type escape sequence to abort.
  1012. Sending , -byte ICMP Echos to 192.168.23.3, timeout is seconds:
  1013. !!!!!
  1014. Success rate is percent (/), round-trip min/avg/max = // ms
  1015.  
  1016. 多区域配置:area0 area1 不一样而已。
  1017.  
  1018. 二层交换基础
  1019.  
  1020. VLAN概念
  1021.  
  1022. TRUNK概念
  1023. 二层交换基本配置
  1024. 交换机对帧进行转发,如果不知道数据包的走向就会泛红,不能隔绝广播域,
  1025.  
  1026. 园区网络分层结构
  1027.  
  1028. 接入层:用户接入,接入安全,防止PC中毒影响整个网络,接入层VLAN,接受用户流量
  1029. 汇聚层:流量汇聚,链路冗余,设备冗余,防止环路
  1030. 核心层:高速转发,服务器接入,路由选择,
  1031. 出口层:广域网接入,出口策略,带宽控制,链路备份。
  1032.  
  1033. 接入层交换机---二层交换机,二层:数据链路层,定义了MAC地址,
  1034. 作用:学习MAC地址,数据转发,帧:源和目的,还有data,环路避免,
  1035. 交换机为什么工作在第二层:能够识别帧,转发帧。
  1036. mac地址:硬件地址,叫做二层地址,,出厂时唯一的,
  1037.  
  1038. 工作原理:刚开始寻址,泛红,之后就是针对性的
  1039.  
  1040. VLAN概念
  1041.  
  1042. HUB:整个是个冲突域
  1043. 交换机:一个接口就是一个冲突域,整台是个广播域,是个LAN,比如192.168.1./,不能隔绝广播域,因为是根据MAC地址转发,
  1044. 路由器:每个接口就是个独立的广播域,
  1045.  
  1046. 交换机如何划分多个广播域
  1047.  
  1048. 192.168.1.1 192.168.1. 是一个VLAN 192.168..3H 192.168.1.4 是另一个LAN, 这两个LAN之间不能互访,要想互访需要借助路由器配置。
  1049.  
  1050. VLAN V:就是虚拟
  1051.  
  1052. 不同的LAN之间不能互访,要想通信就得知道MAC,而要知道MAC就得通过广播来获得,而不同的LAN是不同的广播,所以无法获得,
  1053.  
  1054. 、静态VLAN --人工配置
  1055. 、动态VLAN --通过VSPS服务器实现,防止人员位置发生变化,MAC注册后。一直跟踪MAC,别管电脑到哪里
  1056. 集成商:布线,强电弱电等,
  1057. 网络工程师:调试设备,运营。个根据客户需求,上架设备。100台设备,一个下午。善用工具,myBase管理脚本--复制粘贴,大型设备都是写脚本,复制粘贴,速度很快
  1058. trunk :一条链路需要承载多ALAN信息的时候,需要使用trunk来实现。标记不同颜色,存在于交换机之间或交换机与路由器之间。由人为手工配置,
  1059. trunk:要配在链路上,就是干道上,交换机之间用的Trunk
  1060. ISL:思科私有,一种封装协议,
  1061.  
  1062. .1Q又叫Qus:共有协议,使用里面插入tag来做标记,
  1063.  
  1064. 数据帧:又叫纯洁以太网数据帧,
  1065.  
  1066. VTP模式:思科私有,在大型网络中,动态管理VLAN,在server模式,发送并更新,让其他交换机也具有,放在flash里面的vlan.dat里面。删除配置文件,他也在,client端只能学习,transparent下不学习,只转发。 --------很少用。 -在Teunk之间运行,
  1067.  
  1068. vlan的基本配置
  1069.  
  1070. 跨交换机配置vlan
  1071. 等车排队的时候放些视频学习材料
  1072. c3600模拟交换机添加的模块是 GNS3里面的倒数第二个NM-16ESW,PC分配快速以太网口,
  1073.  
  1074. 路由器怎么模拟pc
  1075.  
  1076. no ip routing ---关掉路由功能
  1077. interface f/
  1078. ip address xxx
  1079. no shutdown
  1080. ip default-gateway xxxx ---指定网关
  1081.  
  1082. sw1(vlan)#ex -----这种方式退出才会保存
  1083.  
  1084. R1#conf
  1085. R1#configure t
  1086. Enter configuration commands, one per line. End with CNTL/Z.
  1087. R1(config)#host
  1088. R1(config)#hostname sw1
  1089. sw1(config)#end
  1090. sw1#
  1091. *Mar ::10.939: %SYS--CONFIG_I: Configured from console by console
  1092. sw1#conf t
  1093. Enter configuration commands, one per line. End with CNTL/Z.
  1094. sw1(config)#vlan
  1095. ^
  1096. % Invalid input detected at '^' marker.
  1097.  
  1098. sw1(config)#end
  1099. sw1#
  1100. *Mar ::38.879: %SYS--CONFIG_I: Configured from console by console
  1101.  
  1102. R2#conf
  1103. R2#configure t
  1104. Enter configuration commands, one per line. End with CNTL/Z.
  1105. R2(config)#host
  1106. R2(config)#hostname sw2
  1107. sw2(config)#end
  1108.  
  1109. R3#conf
  1110. R3#configure t
  1111. Enter configuration commands, one per line. End with CNTL/Z.
  1112. R3(config)#hos
  1113. R3(config)#hostname pc1
  1114. pc1(config)#no ip rou
  1115. pc1(config)#no ip routi
  1116. pc1(config)#no ip routing
  1117. pc1(config)#int f /
  1118. pc1(config-if)#ip add 192.168.10.1 255.255.255.0
  1119. pc1(config-if)#no sh
  1120. pc1(config-if)#no shutdown
  1121. pc1(config-if)#
  1122. *Mar ::58.447: %LINK--UPDOWN: Interface FastEthernet0/, changed state to up
  1123. *Mar ::59.447: %LINEPROTO--UPDOWN: Line protocol on Interface FastEthernet0/, changed state to up
  1124. pc1(config-if)#ip def
  1125. pc1(config-if)#ip defau
  1126. pc1(config-if)#ex
  1127. pc1(config)#ip defa
  1128. pc1(config)#ip default-gate
  1129. pc1(config)#ip default-gateway 192.168.10.254
  1130. pc1(config)#end
  1131.  
  1132. R4#conf
  1133. R4#configure t
  1134. Enter configuration commands, one per line. End with CNTL/Z.
  1135. R4(config)#host
  1136. R4(config)#hostname pc2
  1137. pc2(config)#no ip rou
  1138. pc2(config)#no ip rout
  1139. pc2(config)#no ip routi
  1140. pc2(config)#no ip routing
  1141. pc2(config)#int f /
  1142. pc2(config-if)#ip add 192.168.20.1 255.255.255.0
  1143. pc2(config-if)#no shu
  1144. pc2(config-if)#no shutdown
  1145. pc2(config-if)#
  1146. *Mar ::04.523: %LINK--UPDOWN: Interface FastEthernet0/, changed state to up
  1147. *Mar ::05.523: %LINEPROTO--UPDOWN: Line protocol on Interface FastEthernet0/, changed state to up
  1148. pc2(config-if)#ex
  1149. pc2(config)#end
  1150.  
  1151. R5#conf
  1152. R5#conf t
  1153. Enter configuration commands, one per line. End with CNTL/Z.
  1154. R5(config)#host
  1155. R5(config)#hostname pc3
  1156. pc3(config)#no ip rou
  1157. pc3(config)#no ip routti
  1158. pc3(config)#no ip routi
  1159. pc3(config)#no ip routing
  1160. pc3(config)#int f /
  1161. pc3(config-if)#ip add 192.168.10.2 255.255.255.0
  1162. pc3(config-if)#no sh
  1163. pc3(config-if)#no shutdown
  1164.  
  1165. R6#conf
  1166. R6#configure t
  1167. R6#configure terminal
  1168. Enter configuration commands, one per line. End with CNTL/Z.
  1169. R6(config)#hostn
  1170. R6(config)#hostname pc4
  1171. pc4(config)#no ip rout
  1172. pc4(config)#no ip routi
  1173. pc4(config)#no ip routing
  1174. pc4(config)#int f /
  1175. pc4(config-if)#ip add 192.168.20.2 255.255.255.0
  1176. pc4(config-if)#no sh
  1177. pc4(config-if)#no shutdown
  1178. pc4(config-if)#end
  1179.  
  1180. sw1#vlan da
  1181. sw1(vlan)#vlan
  1182. VLAN added:
  1183. Name: VLAN0010
  1184. sw1(vlan)#vlan
  1185. VLAN added:
  1186. Name: VLAN0020
  1187. sw1(vlan)#ex
  1188. APPLY completed.
  1189. Exiting....
  1190. sw1#conf
  1191. sw1#conf t
  1192. Enter configuration commands, one per line. End with CNTL/Z.
  1193. sw1(config)#int f /
  1194. sw1(config-if)#swit
  1195. sw1(config-if)#switchport mo
  1196. sw1(config-if)#switchport mode acc
  1197. sw1(config-if)#switchport mode access
  1198. sw1(config-if)#swi
  1199. sw1(config-if)#switchport ac vl
  1200. sw1(config-if)#switchport ac vlan
  1201. sw1(config-if)#ex
  1202. sw1(config)#int f /
  1203. sw1(config-if)#switchport mode access
  1204. sw1(config-if)#switchport ac vlan
  1205. sw1(config-if)#ex
  1206. sw1(config)#int f /
  1207. sw1(config-if)#sw
  1208. sw1(config-if)#swi
  1209. sw1(config-if)#switchport mo
  1210. sw1(config-if)#switchport mode ac
  1211. sw1(config-if)#sw mo
  1212. sw1(config-if)#sw mode ac vl
  1213. sw1(config-if)#sw mode ac vla
  1214. sw1(config-if)#sw acc
  1215. sw1(config-if)#sw access vl
  1216. sw1(config-if)#sw access vlan
  1217. sw1(config-if)#end
  1218. sw1#
  1219. *Mar ::44.411: %SYS--CONFIG_I: Configured from console by console
  1220. sw1#sho
  1221. sw1#show vl
  1222. sw1#show vlan-s
  1223.  
  1224. VLAN Name Status Ports
  1225. ---- -------------------------------- --------- -------------------------------
  1226. default active Fa0/, Fa0/, Fa0/, Fa0/
  1227. Fa0/, Fa0/, Fa0/, Fa0/
  1228. Fa0/, Fa0/, Fa0/, Fa0/
  1229. Fa0/
  1230. VLAN0010 active Fa0/, Fa0/
  1231. VLAN0020 active Fa0/
  1232. fddi-default active
  1233. token-ring-default active
  1234. fddinet-default active
  1235. trnet-default active
  1236.  
  1237. VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
  1238. ---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
  1239. enet - - - - -
  1240. enet - - - - -
  1241. enet - - - - -
  1242. fddi - - - - -
  1243. tr - - srb
  1244. fdnet - - ibm -
  1245. trnet - - ibm -
  1246. sw1#conf
  1247. sw1#conf t
  1248. Enter configuration commands, one per line. End with CNTL/Z.
  1249. sw1(config)#sw
  1250. sw1(config)#swi
  1251. sw1(config)#int f /
  1252. sw1(config-if)#swi
  1253. sw1(config-if)#switchport tru
  1254. sw1(config-if)#switchport trunk en
  1255. sw1(config-if)#switchport trunk encapsulation ?
  1256. dot1q Interface uses only .1q trunking encapsulation when trunking
  1257.  
  1258. sw1(config-if)#switchport trunk encapsulation do
  1259. sw1(config-if)#switchport trunk encapsulation dot1q
  1260. sw1(config-if)#swi
  1261. sw1(config-if)#switchport mo
  1262. sw1(config-if)#switchport mode tru
  1263. sw1(config-if)#switchport mode trunk
  1264. sw1(config-if)#
  1265. *Mar ::37.255: %DTP--TRUNKPORTON: Port Fa0/ has become dot1q trunk
  1266. sw1(config-if)#ex
  1267. sw1(config)#end
  1268. sw1#
  1269. *Mar ::58.959: %SYS--CONFIG_I: Configured from console by console
  1270. sw1#sho
  1271. sw1#show int
  1272. sw1#show interfaces tru
  1273. sw1#show interfaces trunk
  1274.  
  1275. Port Mode Encapsulation Status Native vlan
  1276. Fa0/ on .1q trunking
  1277.  
  1278. Port Vlans allowed on trunk
  1279. Fa0/ -
  1280.  
  1281. Port Vlans allowed and active in management domain
  1282. Fa0/ ,,
  1283.  
  1284. Port Vlans in spanning tree forwarding state and not pruned
  1285. Fa0/ ,,
  1286.  
  1287. sw2#vlan da
  1288. sw2(vlan)#vl
  1289. sw2(vlan)#vlan
  1290. VLAN added:
  1291. Name: VLAN0010
  1292. sw2(vlan)#vl
  1293. sw2(vlan)#vlan
  1294. VLAN added:
  1295. Name: VLAN0020
  1296. sw2(vlan)#ex
  1297. APPLY completed.
  1298. Exiting....
  1299. sw2#conf t
  1300. Enter configuration commands, one per line. End with CNTL/Z.
  1301. sw2(config)#int f /
  1302. sw2(config-if)#sw
  1303. sw2(config-if)#switchport ac
  1304. sw2(config-if)#switchport access vl
  1305. sw2(config-if)#switchport access vlan
  1306. sw2(config-if)#int f /
  1307. sw2(config-if)#sw
  1308. sw2(config-if)#switchport ac
  1309. sw2(config-if)#switchport access vl
  1310. sw2(config-if)#switchport access vlan
  1311. sw2(config-if)#int f /
  1312. sw2(config-if)#sw
  1313. sw2(config-if)#switchport mo
  1314. sw2(config-if)#switchport mode tru
  1315. sw2(config-if)#switchport mode trunk
  1316. sw2(config-if)#
  1317. *Mar ::10.931: %DTP--TRUNKPORTON: Port Fa0/ has become dot1q trunk
  1318. sw2(config-if)#sw
  1319. sw2(config-if)#switchport tru
  1320. sw2(config-if)#switchport trunk en
  1321. sw2(config-if)#switchport trunk encapsulation do
  1322. sw2(config-if)#switchport trunk encapsulation dot1q
  1323. sw2(config-if)#ex
  1324. sw2(config)#end
  1325. sw2#sho
  1326. *Mar ::47.155: %SYS--CONFIG_I: Configured from console by console
  1327. sw2#sho
  1328. sw2#show int
  1329. sw2#show interfaces tru
  1330. sw2#show interfaces trunk
  1331.  
  1332. Port Mode Encapsulation Status Native vlan
  1333. Fa0/ on .1q trunking
  1334.  
  1335. Port Vlans allowed on trunk
  1336. Fa0/ -
  1337.  
  1338. Port Vlans allowed and active in management domain
  1339. Fa0/ ,,
  1340.  
  1341. Port Vlans in spanning tree forwarding state and not pruned
  1342. Fa0/ ,,
  1343.  
  1344. pc1#show ip it
  1345. pc1#show ip ii
  1346. pc1#show ip in
  1347. pc1#show ip int
  1348. pc1#show ip interface b
  1349. Interface IP-Address OK? Method Status Protocol
  1350. FastEthernet0/ 192.168.10.1 YES manual up up
  1351. pc1#ping 192.168.10.2
  1352.  
  1353. Type escape sequence to abort.
  1354. Sending , -byte ICMP Echos to 192.168.10.2, timeout is seconds:
  1355. .!!!!
  1356. Success rate is percent (/), round-trip min/avg/max = // ms
  1357.  
  1358. pc2#ping 192.168.20.2
  1359.  
  1360. Type escape sequence to abort.
  1361. Sending , -byte ICMP Echos to 192.168.20.2, timeout is seconds:
  1362. .!!!!
  1363. Success rate is percent (/), round-trip min/avg/max = // ms
  1364. pc2#
  1365.  
  1366. 不同的VLAN要访问就得借助路由器,而路由器的接口少,非常宝贵,提出了单臂,必须是快速以太网口,就是一个物理接口承载两个vlan,通过创建子接口实现。
  1367.  
  1368. 单臂实验--接着上面的实验----不同的VLAN要访问---通过创建子接口实现
  1369.  
  1370. 单臂路由缺点:占用带宽,链路来回占用,
  1371.  
  1372. sw2#conf t
  1373. Enter configuration commands, one per line. End with CNTL/Z.
  1374. sw2(config)#int f /
  1375. sw2(config-if)#no sw ac vl
  1376. sw2(config-if)#no sw ac vlan -----------去掉vlan要改成Trunk
  1377. sw2(config-if)#sw
  1378. sw2(config-if)#switchport no
  1379. sw2(config-if)#switchport mo
  1380. sw2(config-if)#switchport mode tr
  1381. sw2(config-if)#switchport mode trunk
  1382. sw2(config-if)#
  1383. *Mar ::22.583: %DTP--TRUNKPORTON: Port Fa0/ has become dot1q trunk
  1384. sw2(config-if)#sw
  1385. sw2(config-if)#switchport tru
  1386. sw2(config-if)#switchport trunk en
  1387. sw2(config-if)#switchport trunk encapsulation d
  1388. sw2(config-if)#switchport trunk encapsulation dot1q
  1389. sw2(config-if)#ex
  1390. sw2(config)#end
  1391. sw2#sh
  1392. *Mar ::01.275: %SYS--CONFIG_I: Configured from console by console
  1393. sw2#sh int tr
  1394.  
  1395. Port Mode Encapsulation Status Native vlan
  1396. Fa0/ on .1q trunking
  1397. Fa0/ on .1q trunking
  1398.  
  1399. Port Vlans allowed on trunk
  1400. Fa0/ -
  1401. Fa0/ -
  1402.  
  1403. Port Vlans allowed and active in management domain
  1404. Fa0/ ,,
  1405. Fa0/ ,,
  1406.  
  1407. Port Vlans in spanning tree forwarding state and not pruned
  1408. Fa0/ ,,
  1409. Fa0/ ,,
  1410. sw2#sh ip ro
  1411. Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
  1412. D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
  1413. N1 - OSPF NSSA external type , N2 - OSPF NSSA external type
  1414. E1 - OSPF external type , E2 - OSPF external type
  1415. i - IS-IS, su - IS-IS summary, L1 - IS-IS level-, L2 - IS-IS level-
  1416. ia - IS-IS inter area, * - candidate default, U - per-user static route
  1417. o - ODR, P - periodic downloaded static route
  1418.  
  1419. Gateway of last resort is not set
  1420.  
  1421. pc4#conf
  1422. pc4#configure t
  1423. Enter configuration commands, one per line. End with CNTL/Z.
  1424. pc4(config)#ip rou
  1425. pc4(config)#ip routi
  1426. pc4(config)#ip routing
  1427. pc4(config)#defau
  1428. pc4(config)#default int
  1429. pc4(config)#default interface f / ---------恢复默认配置
  1430. Building configuration...
  1431.  
  1432. Interface FastEthernet0/ set to default configuration
  1433. pc4(config)#end
  1434. pc4#
  1435. *Mar ::57.819: %SYS--CONFIG_I: Configured from console by console
  1436. pc4#host
  1437. pc4#hostna
  1438. pc4#conf t
  1439. Enter configuration commands, one per line. End with CNTL/Z.
  1440. pc4(config)#hostn
  1441. pc4(config)#hostname
  1442. pc4(config)#hostname GW
  1443. pc4(config)#hostname GW
  1444. GW(config)#int f /
  1445. GW(config-if)#no shu
  1446. GW(config-if)#no shutdown
  1447. GW(config-if)#int f /0.10
  1448. GW(config-subif)#enca
  1449. GW(config-subif)#encapsulation do
  1450. GW(config-subif)#encapsulation dot1Q
  1451. GW(config-subif)#ip add 192.168.10.254 255.255.255.0
  1452. GW(config-subif)#no sh
  1453. GW(config-subif)#int f /0.20
  1454. GW(config-subif)#en
  1455. GW(config-subif)#encapsulation do
  1456. GW(config-subif)#encapsulation dot1Q
  1457. GW(config-subif)#ip add 192.168.20.254 255.255.255.0
  1458. GW(config-subif)#no sh
  1459. GW(config-subif)#ex
  1460. GW(config)#end
  1461. GW#sho
  1462. GW#show
  1463. *Mar ::16.787: %SYS--CONFIG_I: Configured from console by console
  1464. GW#show ip int b
  1465. GW#show ip int b
  1466. Interface IP-Address OK? Method Status Protocol
  1467. FastEthernet0/ unassigned YES TFTP up up
  1468. FastEthernet0/0.10 192.168.10.254 YES manual up up
  1469. FastEthernet0/0.20 192.168.20.254 YES manual up up
  1470.  
  1471. pc2#configure t
  1472. Enter configuration commands, one per line. End with CNTL/Z.
  1473. pc2(config)#ip def
  1474. pc2(config)#ip default-g
  1475. pc2(config)#ip default-gateway 192.168.10.254
  1476. pc2(config)#^Z
  1477. pc2#
  1478. *Mar ::01.843: %SYS--CONFIG_I: Configured from console by console
  1479. pc2#configure t
  1480. Enter configuration commands, one per line. End with CNTL/Z.
  1481. pc2(config)#ip default-gateway 192.168.20.254
  1482.  
  1483. pc3(config-if)#ip def
  1484. pc3(config-if)#ip defau
  1485. pc3(config-if)#ip defaul
  1486. pc3(config-if)#ip default-
  1487. pc3(config-if)#ip default-g
  1488. pc3(config-if)#ex
  1489. pc3(config)#ip def
  1490. pc3(config)#ip default-ge
  1491. pc3(config)#ip default-get
  1492. pc3(config)#ip default-g
  1493. pc3(config)#ip default-gateway 192.168.10.254
  1494.  
  1495. pc1#sh ip int b
  1496. pc1#sh ip int b
  1497. Interface IP-Address OK? Method Status Protocol
  1498. FastEthernet0/ 192.168.10.1 YES manual up up
  1499. pc1#sh ip ro
  1500. Default gateway is 192.168.10.254
  1501.  
  1502. Host Gateway Last Use Total Uses Interface
  1503. ICMP redirect cache is empty
  1504. pc1#ping 192.168.20.1
  1505.  
  1506. Type escape sequence to abort.
  1507. Sending , -byte ICMP Echos to 192.168.20.1, timeout is seconds:
  1508. ..!!!
  1509. Success rate is percent (/), round-trip min/avg/max = // ms
  1510. pc1#ping 192.168.20.1
  1511.  
  1512. Type escape sequence to abort.
  1513. Sending , -byte ICMP Echos to 192.168.20.1, timeout is seconds:
  1514. !!!!!
  1515. Success rate is percent (/), round-trip min/avg/max = // ms
  1516.  
  1517. 总结:
  1518.  
  1519. trunk只有在不同的vlan的时候才设置在链路上
  1520. 纯净的数据帧只有在trunk链路中才会打上封装。
  1521.  
  1522. 学会创建自己的个人笔记,要通过word来写,可以自定义格式。生成目录树。
  1523.  
  1524. VTP的基本配置
  1525.  
  1526. OSPF
  1527.  
  1528. STP生成树---在二层
  1529.  
  1530. 单点故障:、单链路,、单设备
  1531. 冗余又容易造成环路
  1532. 三层链路:两台路由器之间叫做三层链路,存在于广播中
  1533. 二层链路:存在于交换机与交换机之间。通过vlan接口互联的。
  1534. 二层还没有很好的机制避免环路,
  1535.  
  1536. 环路的缺点:
  1537.  
  1538. 、环路--广播风暴,资源耗尽,网络卡,ping丢包等都是这个环路造成。ping100个包,丢50个包。一旦有一台pc中毒,就会泛红产生广播风暴,、环路占用资源
  1539. MAC地址表乱,带来了MAC泛红攻击,---当MAC地址表满了以后就不能再学习新的mac,
  1540. 、造成MAC地址飘逸,--manc地址一会在这个接口一会在另一个接口,--紊乱,
  1541.  
  1542. 交换机对帧进行转发,
  1543.  
  1544. STP通过选举解决了环路--生成树协议 .1D标准
  1545.  
  1546. 做法:
  1547.  
  1548. 、选择根桥----路由---就是交换机
  1549.  
  1550. 、每个非根桥选择一个根端口。DP --距离根桥交换机距离最小,cost值来衡量---ospf里面用的
  1551.  
  1552. 、每一段选择一个指定端口,---距离根桥交换机距离最小
  1553. 、选择一个非指定端口,---阻塞掉
  1554.  
  1555. 通过BPDU包泛红来操作
  1556.  
  1557. 刚开始所有的交换机都认为自己的根桥,不断发送BPDU包,最后达成共识,选出根桥。
  1558.  
  1559. Bridge ID = 2个字节桥优先级(人为给路由器定的) + 6个字节桥MAC地址 (背板的MAC地址)
  1560.  
  1561. 都要比小,适用:路径相等时,
  1562.  
  1563. Bridge ID 装在BPDU报文中,BPDU泛红后,所有人达成共识,生成一个Root ID --根桥
  1564.  
  1565. 1Gb/s是千兆的 cost值--- 开销值
  1566.  
  1567. 10Mb/s 10M cost值----
  1568.  
  1569. 如果路径代价相等就比较 Bridge ID
  1570.  
  1571. 2.1 每个非根桥选择一个根端口 RP
  1572.  
  1573. 、最低的桥ID
  1574. 、最低的根路径代价
  1575. 、最低发送者桥ID Bridge ID
  1576. 、最低端口ID
  1577.  
  1578. 3.1、每一段选择一个指定端口 DP
  1579.  
  1580. 、最低的桥ID
  1581. 、最低的根路径代价
  1582. 、最低发送者桥ID Bridge ID
  1583. 、最低端口ID

CCIE总结:路由器、交换机的更多相关文章

  1. Atitit  undac网络设备管理法案 (路由器 交换机等)    法案编号USRr101510

    Atitit  undac网络设备管理法案 (路由器 交换机等)    法案编号USRr101510 1.1. 版本历史1 1.2. 密码设置规范 与原则1 1.3. 如何设置密码 ,设置一个简单又安 ...

  2. HCNP学习笔记之史上最全华为路由器交换机配置命令大合集

    先来一张思科和华为命令的对照表: 史上最全华为路由器交换机配置命令大合集,熟练掌握下面的华为路由器交换机配置知识点,你只需花几分钟的时间就能明白华为路由器交换机配置.交换机的配置命令等等. 华为路由器 ...

  3. 配置路由器/交换机的Telnet登录

    实验目的:给配置路由器/交换机管理IP地址.设置Telnet的登录帐号.密码. 第一步:配置路由器的名称.接口IP地址. Switch> Switch>en Switch# Switch# ...

  4. 路由器/交换机Console口登录密码丢失后如何恢复

    Console口登录密码丢失后如何恢复 如果忘记了Console口登录密码,用户可以通过以下两种方式来设置新的Console口登录密码. 通过STelnet/Telnet登录路由器/交换机设置新的Co ...

  5. 新CCIE笔记-路由器的配置

    CCIE重修笔记之路由器基本配置与最简单的路由. 路由器与交换机的基本配置命令 全局配置模式下有多种子模式 (华为可以跳跃切换模式) 思科命令行技巧 Tab键补全,也可以直接保留缩写 问号'?'类似l ...

  6. 网络拓扑_华三H3C的路由器+交换机

    最近在弄公司网络,目前的拓扑图长这样:点击查看网络拓扑图 华三的路由器和交换机都可以通过Console口进行配置,如下: 用SecureCRT.或者putty.或者windows的超级终端,打开ser ...

  7. CCNA学习笔记(1) IOS操作系统 路由器 交换机 启动 自检 以及部分命令

    注意:以下内容是以思科为学习环境 IOS操作系统启动: 路由和交换机和个人电脑启动没有区别,都会发送新号表示启动状态,也会进入系统自检.只得注意的是:1.一长两短的响声是显卡报警. 2.一声长鸣是内存 ...

  8. Cisco路由器交换机基础配置

    交换机配置 交换机基本状态: switch: # ROM状态, 路由器是rommon> hostname> # 用户模式 hostname# # 特权模式 hostname(config) ...

  9. Cisco路由器交换机配置命令详解

    1. 交换机支持的命令: 交换机基本状态:switch: :ROM状态, 路由器是rommon>hostname> :用户模式hostname# :特权模式hostname(config) ...

  10. 关于Type-C扩展坞干扰路由器交换机的解决方案

    近期看到网友反馈Type-C扩展坞干扰交换机的问题,具体表现为USB Type-C扩展坞在同时插上网线和PD充电的情况下,引起路由器或交换机死机,导致局域网断开的情况.经实测分析,原因为部分电脑默认设 ...

随机推荐

  1. javascript中如何判断数组是数组

    if (!Array.isArray) { Array.isArray = function(arg) { return Object.prototype.toString.call(arg) === ...

  2. jade继承

    代码的复用是jade非常突出的一个设计目标,jade不仅仅通过mixin来复用代码,他在文件的组织能力上也非常突出,说白了,就是继承和包涵   block定义的方式和调用的方式 block desc ...

  3. 开源框架---通过Bazel编译使用tensorflow c++ API 记录

    开源框架---通过Bazel编译使用tensorflow c++ API 记录 tensorflow python API,在python中借用pip安装tensorflow,真的很方便,几句指令就完 ...

  4. nagios安装部署及详细配置说明(转)

    一.Nagios简介 Nagios是一款开源的电脑系统和网络监视工具,能有效监控Windows.Linux和Unix的主机状态,交换机路由器等网络设置,打印机等.在系统或服务状态异常时发出邮件或短信报 ...

  5. 从客户端中检测到有潜在危险的 request.form值

    这里只说ASP.NET MVC的解决方法,ASP.NET已经不碰了. 给控制器加上[ValidateInput(false)]特性即可忽略含有HTML标记的内容. [HttpPost] [Valida ...

  6. jQuery匿名函数和自定义插件

    https://www.cnblogs.com/joey0210/p/3408349.html (function($){ //do something;   })(jQuery);

  7. Java8-Concurrency

    import java.util.UUID; import java.util.concurrent.ConcurrentHashMap; public class Concurrency1 { pu ...

  8. keyup([[data],fn]) 当按钮被松开时,发生 keyup 事件。它发生在当前获得焦点的元素上。

    keyup([[data],fn]) 概述 当按钮被松开时,发生 keyup 事件.它发生在当前获得焦点的元素上. 注释:如果在文档元素上进行设置,则无论元素是否获得焦点,该事件都会发生.直线电机选型 ...

  9. 002_C/C++笔试题_简单算法程序

    (一)冒泡排序法 #include <iostream> using namespace std; void bubblesort(int a[], int m); int main(vo ...

  10. 关闭tomcat8080端口

    netstat -ano | findstr 8080taskkill /F /PID 1234