Cisco系列之CCNP Lab Exercise
[align=center][b]Cisco系列之CCNP Lab Exercise(AAA)[/b][/align][align=left][font=宋体][size=9pt]【实验拓扑】[/size][/font][/align][align=left][font=宋体][size=9pt][img]http://blog.bitscn.com/UploadFiles/2006-12/1230638326.jpg[/img][/size][/font][/align][font=宋体][size=9pt][font=宋体][size=9pt]【配置[/size][/font][font=宋体][size=9pt]AAA[/size][/font][font=宋体][size=9pt]服务器】 [/size][/font][font=宋体][size=9pt]加管理员帐号,点“[/size][/font][font=宋体][size=9pt]Administration Control[/size][/font][font=宋体][size=9pt]”[/size][/font][font=宋体][size=9pt]按钮,在添加管理员帐号 [/size][/font]
[align=left][font=宋体][size=9pt]配置[/size][/font][font=宋体][size=9pt]cisco secure acs HTML interface[/size][/font][font=宋体][size=9pt],点[/size][/font][font=宋体][size=9pt]interface configuration[/size][/font][font=宋体][size=9pt]。在选择所需的服务,对这次实验,选[/size][/font][font=宋体][size=9pt]shell [/size][/font][font=宋体][size=9pt]([/size][/font][font=宋体][size=9pt]exec[/size][/font][font=宋体][size=9pt])即可。[/size][/font][/align][align=left][font=宋体][size=9pt][img=434,315]http://blog.bitscn.com/UploadFiles/2006-12/1230639040.jpg[/img][/size][/font][/align][align=left][font=宋体][size=9pt][font=宋体][size=9pt]Network configuration[/size][/font][font=宋体][size=9pt],添加对应的[/size][/font][font=宋体][size=9pt]AAA client[/size][/font][font=宋体][size=9pt],设置其[/size][/font][font=宋体][size=9pt]IP[/size][/font][font=宋体][size=9pt]地址及[/size][/font][font=宋体][size=9pt]Key[/size][/font][font=宋体][size=9pt]。如下图:[/size][/font][/size][/font][/align][align=left][font=宋体][size=9pt][font=宋体][size=9pt][img=434,315]http://blog.bitscn.com/UploadFiles/2006-12/1230131857.jpg[/img][/size][/font][/size][/font][/align][font=宋体][size=9pt][font=宋体][size=9pt][font=宋体][size=9pt]配置用户信息,点“[/size][/font][font=宋体][size=9pt]User Setup[/size][/font][font=宋体][size=9pt]”[/size][/font][font=宋体][size=9pt],设置用户密码,选中[/size][/font][font=宋体][size=9pt]shell[/size][/font][font=宋体][size=9pt]([/size][/font][font=宋体][size=9pt]exec[/size][/font][font=宋体][size=9pt]),设置[/size][/font][font=宋体][size=9pt]Privilege Level [/size][/font]
[font=宋体][size=9pt][img=434,315]http://blog.bitscn.com/UploadFiles/2006-12/1230965939.jpg[/img][/size][/font]
[font=宋体][size=9pt][font=宋体][size=9pt]【路由器上的配置】 [/size][/font]
[font=宋体][size=9pt] [/size][/font][b][font=宋体][size=9pt]1[/size][/font][/b][font=宋体][size=9pt]、 [/size][/font][b][font=宋体][size=9pt]enable AAA[/size][/font][/b][font=宋体][size=9pt]: [/size][/font]
[font=宋体][size=9pt]Router(config)#[b]aaa new-model [/b][/size][/font]
[align=left][font=宋体][size=9pt][/size][/font][/align][b][font=宋体][size=9pt]2[/size][/font][/b][font=宋体][size=9pt]、[/size][/font][b][font=宋体][size=9pt]Configuring TACACS+ and RADIUS clients[/size][/font][/b][font=宋体][size=9pt]: [/size][/font]
[font=宋体][size=9pt]对[/size][/font][font=宋体][size=9pt]TACACS[/size][/font][font=宋体][size=9pt]+: [/size][/font]
[font=宋体][size=9pt]Router(config)#[b]tacacs-server host [/b][i]ip-address [/i][/size][/font]
[font=宋体][size=9pt]Router(config)#[b]tacacs-server key [/b][i]word [/i][/size][/font]
[font=宋体][size=9pt]对[/size][/font][font=宋体][size=9pt]RADIUS[/size][/font][font=宋体][size=9pt]: [/size][/font]
[font=宋体][size=9pt]Router(config)#[b]radius-server host [/b][i]ip-address [/i][/size][/font]
[font=宋体][size=9pt]Router(config)#[b]radius-server key [/b][i]word [/i][/size][/font]
[b][font=宋体][size=9pt]3[/size][/font][/b][font=宋体][size=9pt]、[/size][/font][b][font=宋体][size=9pt]Configuring AAA authentication[/size][/font][/b][font=宋体][size=9pt]: [/size][/font]
[font=宋体][size=9pt]Router(config)#aaa authentication [i]type [/i]{default|[i]list-name[/i]} [i]method1 […[method4]] [/i][/size][/font]
[b][font=宋体][size=9pt]type[/size][/font][/b][font=宋体][size=9pt]分为:[/size][/font][b][font=宋体][size=9pt]login[/size][/font][/b][font=宋体][size=9pt]、[/size][/font][b][font=宋体][size=9pt]enable[/size][/font][/b][font=宋体][size=9pt]、[/size][/font][b][font=宋体][size=9pt]ppp[/size][/font][/b][font=宋体][size=9pt]、[/size][/font][b][font=宋体][size=9pt]local-override[/size][/font][/b][font=宋体][size=9pt]、[/size][/font][b][font=宋体][size=9pt]arap[/size][/font][/b][font=宋体][size=9pt]、[/size][/font][b][font=宋体][size=9pt]nasi[/size][/font][/b][font=宋体][size=9pt]、[/size][/font][b][font=宋体][size=9pt]password-prompt[/size][/font][/b][font=宋体][size=9pt]和[/size][/font][b][font=宋体][size=9pt]username-prompt[/size][/font][/b][font=宋体][size=9pt],其中常用的为前面四个。 [/size][/font]
[b][font=宋体][size=9pt]login[/size][/font][/b][font=宋体][size=9pt]:为想进入到[/size][/font][font=宋体][size=9pt]EXEC[/size][/font][font=宋体][size=9pt]命令行模式的用户认证。 [/size][/font]
[b][font=宋体][size=9pt]enable[/size][/font][/b][font=宋体][size=9pt]:决定用户是否可以访问特权级命令级。 [/size][/font]
[b][font=宋体][size=9pt]ppp[/size][/font][/b][font=宋体][size=9pt]:在运行[/size][/font][font=宋体][size=9pt]PPP[/size][/font][font=宋体][size=9pt]的串行口上指定认证。 [/size][/font]
[b][font=宋体][size=9pt]local-override[/size][/font][/b][font=宋体][size=9pt]:用于某些特殊用户(如系统管理员)快速登录,先使用本地数据库,如果失败再使用后面的认证方式。 [/size][/font]
[b][font=宋体][size=9pt]List type[/size][/font][/b][font=宋体][size=9pt]分两种,一种是[/size][/font][b][font=宋体][size=9pt]default[/size][/font][/b][font=宋体][size=9pt],一种是命名[/size][/font][font=宋体][size=9pt]list[/size][/font][font=宋体][size=9pt]。用来指代后面的认证方式列表[/size][/font][i][font=宋体][size=9pt]method1 […[method4]] [/size][/font][/i][font=宋体][size=9pt][/size][/font]
[font=宋体][size=9pt]不同的[/size][/font][b][font=宋体][size=9pt]type[/size][/font][/b][font=宋体][size=9pt]对应不同的[/size][/font][b][font=宋体][size=9pt]Method[/size][/font][/b][font=宋体][size=9pt],后面的认证方式只有当前面的认证方式返回了一个出错信息时使用(最多四种[/size][/font][font=宋体][size=9pt]Method[/size][/font][font=宋体][size=9pt]),而不是在前面的认证失败时使用。一般分为以下几种: [/size][/font][table][tr][td][b][font=宋体][size=9pt]enable [/size][/font][/b][font=宋体][size=9pt][/size][/font]
[/td][td][font=宋体][size=9pt]使用[/size][/font][font=宋体][size=9pt]enable[/size][/font][font=宋体][size=9pt]口令进行认证 [/size][/font]
[/td][/tr][tr][td][b][font=宋体][size=9pt]krb5 [/size][/font][/b][font=宋体][size=9pt][/size][/font]
[/td][td][font=宋体][size=9pt]使用[/size][/font][font=宋体][size=9pt]Kerberos 5[/size][/font][font=宋体][size=9pt]进行认证 [/size][/font]
[/td][/tr][tr][td][b][font=宋体][size=9pt]line [/size][/font][/b][font=宋体][size=9pt][/size][/font]
[/td][td][font=宋体][size=9pt]使用线路口进行认证 [/size][/font]
[/td][/tr][tr][td][b][font=宋体][size=9pt]local [/size][/font][/b][font=宋体][size=9pt][/size][/font]
[/td][td][font=宋体][size=9pt]使用本地用户数据库进行认证 [/size][/font]
[/td][/tr][tr][td][b][font=宋体][size=9pt]none [/size][/font][/b][font=宋体][size=9pt][/size][/font]
[/td][td][font=宋体][size=9pt]不认证 [/size][/font]
[/td][/tr][tr][td][b][font=宋体][size=9pt]group radius [/size][/font][/b][font=宋体][size=9pt][/size][/font]
[/td][td][font=宋体][size=9pt]使用[/size][/font][font=宋体][size=9pt]RADIUS[/size][/font][font=宋体][size=9pt]进行认证 [/size][/font]
[/td][/tr][tr][td][b][font=宋体][size=9pt]group tacacs+ [/size][/font][/b][font=宋体][size=9pt][/size][/font]
[/td][td][font=宋体][size=9pt]使用[/size][/font][font=宋体][size=9pt]TACACS[/size][/font][font=宋体][size=9pt]+进行认证 [/size][/font]
[/td][/tr][tr][td][b][font=宋体][size=9pt]krb5-telnet [/size][/font][/b][font=宋体][size=9pt][/size][/font]
[/td][td][font=宋体][size=9pt]当用[/size][/font][font=宋体][size=9pt]Telnet[/size][/font][font=宋体][size=9pt]连接路由器时,使用[/size][/font][font=宋体][size=9pt]Kerberos 5 Telnet[/size][/font][font=宋体][size=9pt]认证协议 [/size][/font]
[/td][/tr][tr][td][b][font=宋体][size=9pt]if-neede [/size][/font][/b][font=宋体][size=9pt][/size][/font]
[/td][td][font=宋体][size=9pt]如果用户已在[/size][/font][font=宋体][size=9pt]TTY[/size][/font][font=宋体][size=9pt]上进行了认证,就不再进行认证(用于[/size][/font][font=宋体][size=9pt]enable type[/size][/font][font=宋体][size=9pt])[/size][/font]
[/td][/tr][/table][align=left][font=宋体][size=9pt][/size][/font][/align][b][font=宋体][size=9pt]4[/size][/font][/b][font=宋体][size=9pt]、[/size][/font][b][font=宋体][size=9pt]Configuring AAA authorization[/size][/font][/b][font=宋体][size=9pt]: [/size][/font]
[font=宋体][size=9pt]Router(config)#aaa authorization [i]type [/i]{default|[i]list-name[/i]} [i]method1 […[method2]] [/i][/size][/font]
[b][font=宋体][size=9pt]type[/size][/font][/b][font=宋体][size=9pt]分为: [/size][/font][table][tr][td][b][font=宋体][size=9pt]network [/size][/font][/b][font=宋体][size=9pt][/size][/font]
[/td][td][font=宋体][size=9pt]所有网络服务,包括[/size][/font][font=宋体][size=9pt]SLIP[/size][/font][font=宋体][size=9pt]、[/size][/font][font=宋体][size=9pt]PPP[/size][/font][font=宋体][size=9pt]和[/size][/font][font=宋体][size=9pt]ARAP [/size][/font]
[/td][/tr][tr][td][b][font=宋体][size=9pt]Exec [/size][/font][/b][font=宋体][size=9pt][/size][/font]
[/td][td][font=宋体][size=9pt]EXEC[/size][/font][font=宋体][size=9pt]进程 [/size][/font]
[/td][/tr][tr][td][b][font=宋体][size=9pt]commands [/size][/font][/b][i][font=宋体][size=9pt]level [/size][/font][/i][font=宋体][size=9pt][/size][/font]
[/td][td][font=宋体][size=9pt]所指定级别([/size][/font][font=宋体][size=9pt]0[/size][/font][font=宋体][size=9pt]到[/size][/font][font=宋体][size=9pt]15[/size][/font][font=宋体][size=9pt])的所有[/size][/font][font=宋体][size=9pt]EXEC[/size][/font][font=宋体][size=9pt]命令 [/size][/font]
[/td][/tr][tr][td][b][font=宋体][size=9pt]config-commands[/size][/font][/b][font=宋体][size=9pt][/size][/font]
[/td][td][font=宋体][size=9pt]配置命令 [/size][/font]
[/td][/tr][tr][td][b][font=宋体][size=9pt]reverse-access [/size][/font][/b][font=宋体][size=9pt][/size][/font]
[/td][td][font=宋体][size=9pt]用于反向[/size][/font][font=宋体][size=9pt]Telnet [/size][/font]
[/td][/tr][/table][align=left][font=宋体][size=9pt][/size][/font][/align][b][font=宋体][size=9pt]Method[/size][/font][/b][font=宋体][size=9pt]分为: [/size][/font][table][tr][td][b][font=宋体][size=9pt]if-authenticated [/size][/font][/b][font=宋体][size=9pt][/size][/font]
[/td][td][font=宋体][size=9pt]如果用户已经通过认证,则允许该用户使用所要求的功能 [/size][/font]
[/td][/tr][tr][td][b][font=宋体][size=9pt]local [/size][/font][/b][font=宋体][size=9pt][/size][/font]
[/td][td][font=宋体][size=9pt]使用本地用户数据库进行授权 [/size][/font]
[/td][/tr][tr][td][b][font=宋体][size=9pt]none [/size][/font][/b][font=宋体][size=9pt][/size][/font]
[/td][td][font=宋体][size=9pt]不进行授权 [/size][/font]
[/td][/tr][tr][td][b][font=宋体][size=9pt]group radius [/size][/font][/b][font=宋体][size=9pt][/size][/font]
[/td][td][font=宋体][size=9pt]使用[/size][/font][font=宋体][size=9pt]RADIUS[/size][/font][font=宋体][size=9pt]进行授权 [/size][/font]
[/td][/tr][tr][td][b][font=宋体][size=9pt]group tacacs+ [/size][/font][/b][font=宋体][size=9pt][/size][/font]
[/td][td][font=宋体][size=9pt]使用[/size][/font][font=宋体][size=9pt]TACACS+[/size][/font][font=宋体][size=9pt]进行授权 [/size][/font]
[/td][/tr][tr][td][b][font=宋体][size=9pt]krb5-instance [/size][/font][/b][font=宋体][size=9pt][/size][/font]
[/td][td][font=宋体][size=9pt]使用由“[/size][/font][font=宋体][size=9pt]kerberos instance map”[/size][/font][font=宋体][size=9pt]命令所定义的例子 [/size][/font]
[/td][/tr][/table][align=left][font=宋体][size=9pt][/size][/font][/align][b][font=宋体][size=9pt]List type[/size][/font][/b][font=宋体][size=9pt]与[/size][/font][font=宋体][size=9pt]authentication[/size][/font][font=宋体][size=9pt]一样分两种:[/size][/font][b][font=宋体][size=9pt]default[/size][/font][/b][font=宋体][size=9pt]和命名[/size][/font][font=宋体][size=9pt]list [/size][/font]
[b][font=宋体][size=9pt]5[/size][/font][/b][font=宋体][size=9pt]、[/size][/font][b][font=宋体][size=9pt]Configuring AAA accounting[/size][/font][/b][font=宋体][size=9pt]: [/size][/font]
[font=宋体][size=9pt]Router(config)#[b]aaa accounting [/b][i]type [/i]{default|[i]list-name[/i]} [i]Record-type method1 […[method2]] [/i][/size][/font]
[b][font=宋体][size=9pt]type[/size][/font][/b][font=宋体][size=9pt]分为: [/size][/font][table][tr][td][b][font=宋体][size=9pt]commonds [/size][/font][/b][i][font=宋体][size=9pt]level [/size][/font][/i][font=宋体][size=9pt][/size][/font]
[/td][td][font=宋体][size=9pt]监察所指定特权级([/size][/font][font=宋体][size=9pt]0[/size][/font][font=宋体][size=9pt]到[/size][/font][font=宋体][size=9pt]15[/size][/font][font=宋体][size=9pt])的所有命令 [/size][/font]
[/td][/tr][tr][td][b][font=宋体][size=9pt]Connection [/size][/font][/b][font=宋体][size=9pt][/size][/font]
[/td][td][font=宋体][size=9pt]监察所有外出连接,例如[/size][/font][font=宋体][size=9pt]Telnet[/size][/font][font=宋体][size=9pt]和[/size][/font][font=宋体][size=9pt]rlogin [/size][/font]
[/td][/tr][tr][td][b][font=宋体][size=9pt]Exec [/size][/font][/b][font=宋体][size=9pt][/size][/font]
[/td][td][font=宋体][size=9pt]监察[/size][/font][font=宋体][size=9pt]EXEC[/size][/font][font=宋体][size=9pt]进程 [/size][/font]
[/td][/tr][tr][td][b][font=宋体][size=9pt]Network [/size][/font][/b][font=宋体][size=9pt][/size][/font]
[/td][td][font=宋体][size=9pt]监察所有网络请求服务,如[/size][/font][font=宋体][size=9pt]SLIP[/size][/font][font=宋体][size=9pt]、[/size][/font][font=宋体][size=9pt]PPP[/size][/font][font=宋体][size=9pt]和[/size][/font][font=宋体][size=9pt]ARAP [/size][/font]
[/td][/tr][tr][td][b][font=宋体][size=9pt]System [/size][/font][/b][font=宋体][size=9pt][/size][/font]
[/td][td][font=宋体][size=9pt]监察所有系统级事件,例如系统重启 [/size][/font]
[/td][/tr][/table][align=left][font=宋体][size=9pt][/size][/font][/align][b][font=宋体][size=9pt]Record[/size][/font][/b][font=宋体][size=9pt]-[/size][/font][b][font=宋体][size=9pt]type[/size][/font][/b][font=宋体][size=9pt]分为: [/size][/font][table][tr][td][b][font=宋体][size=9pt]Start-stop [/size][/font][/b][font=宋体][size=9pt][/size][/font]
[/td][td][font=宋体][size=9pt]在一个进程开始和结束分别发送一个开始统计和停止统计的通知 [/size][/font]
[/td][/tr][tr][td][b][font=宋体][size=9pt]Stop-only [/size][/font][/b][font=宋体][size=9pt][/size][/font]
[/td][td][font=宋体][size=9pt]只在用户所请求的进程结束后发送一个停止统计通知 [/size][/font]
[/td][/tr][tr][td][b][font=宋体][size=9pt]wait-start [/size][/font][/b][font=宋体][size=9pt][/size][/font]
[/td][td][font=宋体][size=9pt]和“[/size][/font][font=宋体][size=9pt]start-stop[/size][/font][font=宋体][size=9pt]”[/size][/font][font=宋体][size=9pt]不同在于开始统计通知被服务器确认之前,用户所请求的服务不会开始 [/size][/font]
[/td][/tr][/table][align=left][font=宋体][size=9pt][/size][/font][/align][b][font=宋体][size=9pt]Method[/size][/font][/b][font=宋体][size=9pt]分为:[/size][/font][b][font=宋体][size=9pt]group tacacs+[/size][/font][/b][font=宋体][size=9pt]和[/size][/font][b][font=宋体][size=9pt]group radius [/size][/font][/b][font=宋体][size=9pt][/size][/font]
[b][font=宋体][size=9pt]List type[/size][/font][/b][font=宋体][size=9pt]与[/size][/font][font=宋体][size=9pt]authentication[/size][/font][font=宋体][size=9pt]一样,分为:[/size][/font][font=宋体][size=9pt]default[/size][/font][font=宋体][size=9pt]和命名[/size][/font][font=宋体][size=9pt]list [/size][/font]
[font=宋体][size=9pt]【配置示例】 [/size][/font][font=宋体][size=9pt](RADIUS[/size][/font][font=宋体][size=9pt]的[/size][/font][font=宋体][size=9pt]authentication[/size][/font][font=宋体][size=9pt]配置与下相似,可选做,但其不能实行[/size][/font][font=宋体][size=9pt]authorization [/size][/font]
[font=宋体][size=9pt]Building configuration... [/size][/font]
[font=宋体][size=9pt]Current configuration : 4102 bytes [/size][/font]
[font=宋体][size=9pt]! [/size][/font]
[font=宋体][size=9pt]version 12.2 [/size][/font]
[font=宋体][size=9pt]aaa new-model [/size][/font]
[font=宋体][size=9pt]! [/size][/font]
[font=宋体][size=9pt]! [/size][/font]
[font=宋体][size=9pt]aaa authentication login TELNET group tacacs+ local enable none [/size][/font]
[font=宋体][size=9pt]aaa authorization exec TELNET group tacacs+ local [/size][/font]
[font=宋体][size=9pt]aaa accounting exec TELNET start-stop group tacacs+ [/size][/font]
[font=宋体][size=9pt]aaa accounting commands 15 TELNET start-stop group tacacs+ [/size][/font]
[font=宋体][size=9pt]aaa accounting network TELNET start-stop group tacacs+ [/size][/font]
[font=宋体][size=9pt]aaa accounting connection TELNET start-stop group tacacs+ [/size][/font]
[font=宋体][size=9pt]aaa accounting system default start-stop group tacacs+ [/size][/font]
[font=宋体][size=9pt]aaa session-id common [/size][/font]
[font=宋体][size=9pt]enable password 7 070C285F4D060D00161F [/size][/font]
[font=宋体][size=9pt]! [/size][/font]
[font=宋体][size=9pt]tacacs-server host 10.2.0.1 [/size][/font]
[font=宋体][size=9pt]tacacs-server key ciscoteam [/size][/font]
[font=宋体][size=9pt]privilege configure level 7 snmp-server host [/size][/font]
[font=宋体][size=9pt]privilege configure level 7 snmp-server enable [/size][/font]
[font=宋体][size=9pt]privilege configure level 7 snmp-server [/size][/font]
[font=宋体][size=9pt][/size][/font]
[font=宋体][size=9pt]privilege exec level 7 ping [/size][/font]
[font=宋体][size=9pt]privilege exec level 7 configure terminal [/size][/font]
[font=宋体][size=9pt]privilege exec level 7 configure [/size][/font]
[font=宋体][size=9pt]! [/size][/font]
[font=宋体][size=9pt]line con 0 [/size][/font]
[font=宋体][size=9pt]exec-timeout 0 0 [/size][/font]
[font=宋体][size=9pt]logging synchronous [/size][/font]
[font=宋体][size=9pt]line aux 0 [/size][/font]
[font=宋体][size=9pt]line vty 0 4 [/size][/font]
[font=宋体][size=9pt]insecure [/size][/font]
[font=宋体][size=9pt]authorization exec TELNET [/size][/font]
[font=宋体][size=9pt]accounting connection TELNET [/size][/font]
[font=宋体][size=9pt]accounting commands 15 TELNET [/size][/font]
[font=宋体][size=9pt]accounting exec TELNET [/size][/font]
[font=宋体][size=9pt]logging synchronous [/size][/font]
[font=宋体][size=9pt]login authentication TELNET [/size][/font]
[font=宋体][size=9pt]transport input telnet [/size][/font]
[font=宋体][size=9pt]! [/size][/font]
[font=宋体][size=9pt]no scheduler allocate [/size][/font]
[font=宋体][size=9pt]end [/size][/font]
[font=宋体][size=9pt][/size][/font]
[/size][/font]
[/size][/font][/size][/font][/size][/font]
[[i] 本帖最后由 heart_dream_fly 于 2006-12-30 15:18 编辑 [/i]]
Cisco系列之CCNP Lab Exercise(DHCP)
[font=宋体][size=9pt][color=#000000]一[b]. [/b]实验目的 [/color][/size][/font][color=#000000][font=宋体][size=9pt]本实验的目的是让学员掌握在路由器上配置[/size][/font][font=宋体][size=9pt]DHCP[/size][/font][font=宋体][size=9pt]服务器的方法,并通过配置帮助地址将客户向[/size][/font][font=宋体][size=9pt]DHCP[/size][/font][font=宋体][size=9pt]服务器发出的广播转发成定点广播,以通过路由器到达服务器。 [/size][/font][/color]
[color=#000000][font=宋体][size=9pt]二[b]. [/b]实验设备 [/size][/font][font=宋体][size=9pt][/size][/font][/color]
[color=#000000][font=宋体][size=9pt]Cisco[/size][/font][font=宋体][size=9pt]路由器两部(1600系列一部,1700系列一部),带超级终端的PC机两台。 [/size][/font][/color]
[font=宋体][size=9pt]三[/size][/font][b][font=宋体][size=9pt]. [/size][/font][/b][font=宋体][size=9pt]实验拓朴 [/size][/font]
[font=宋体][size=9pt][img]http://blog.bitscn.com/UploadFiles/2006-12/1230681063.jpg[/img][/size][/font]
[font=宋体][size=9pt][font=宋体][size=9pt][font=宋体][size=9pt]四[/size][/font][b][font=宋体][size=9pt]. [/size][/font][/b][font=宋体][size=9pt]实验步骤 [/size][/font][font=宋体][size=9pt][/size][/font]
[font=宋体][size=9pt]1[/size][/font][font=宋体][size=9pt]. 配置路由器端口的[/size][/font][font=宋体][size=9pt]IP[/size][/font][font=宋体][size=9pt]地址: [/size][/font]
[font=宋体][size=9pt]1[/size][/font][font=宋体][size=9pt])[/size][/font][font=宋体][size=9pt]Cisco1600[/size][/font][font=宋体][size=9pt]的配置: [/size][/font]
[font=宋体][size=9pt]Cisco1600#config t [/size][/font]
[font=宋体][size=9pt]Cisco1600 (config)#int e0 [/size][/font]
[font=宋体][size=9pt]Cisco1600 (config-if)#ip address 192.168.1.1 255.255.255.0 [/size][/font]
[font=宋体][size=9pt]Cisco1600 (config-if)#no shut [/size][/font]
[font=宋体][size=9pt]Cisco1600 (config-if)#int s0 [/size][/font]
[font=宋体][size=9pt]Cisco1600 (config-if)#ip address 192.168.3.1 255.255.255.0 [/size][/font]
[font=宋体][size=9pt]Cisco1600 (config-if)#clock rate 56000 [/size][/font]
[font=宋体][size=9pt]Cisco1600(config-if)#no shut [/size][/font]
[font=宋体][size=9pt]2[/size][/font][font=宋体][size=9pt])[/size][/font][font=宋体][size=9pt]Cisco1700[/size][/font][font=宋体][size=9pt]的配置: [/size][/font]
[font=宋体][size=9pt]Cisco1700#config t [/size][/font]
[font=宋体][size=9pt]Cisco1700 (config)#int e0 [/size][/font]
[font=宋体][size=9pt]Cisco1700 (config-if)#ip address 192.168.2.1 255.255.255.0 [/size][/font]
[font=宋体][size=9pt]Cisco1700 (config-if)#no shut [/size][/font]
[font=宋体][size=9pt]Cisco1700 (config-if)#int s0 [/size][/font]
[font=宋体][size=9pt]Cisco1700 (config-if)#ip address 192.168.3.2 255.255.255.0 [/size][/font]
[font=宋体][size=9pt]Cisco1700(config-if)#no shut [/size][/font]
[font=宋体][size=9pt] [/size][/font]
[font=宋体][size=9pt]2[/size][/font][font=宋体][size=9pt].使用[/size][/font][font=宋体][size=9pt]RIP[/size][/font][font=宋体][size=9pt]协议作为该网络的路由协议,实现网络的动态路由配置。完成配置后使用[/size][/font][font=宋体][size=9pt]show ip route,show interface,show running-configuration[/size][/font][font=宋体][size=9pt]查看路由配置的正确性或者使用[/size][/font][font=宋体][size=9pt]ping[/size][/font][font=宋体][size=9pt]命令验证网络之间是否完全互连。 [/size][/font]
[font=宋体][size=9pt]1[/size][/font][font=宋体][size=9pt])[/size][/font][font=宋体][size=9pt]Cisco1600[/size][/font][font=宋体][size=9pt]的配置: [/size][/font]
[font=宋体][size=9pt]Cisco1600#config t [/size][/font]
[font=宋体][size=9pt]Cisco1600 (config)#router rip [/size][/font]
[font=宋体][size=9pt]Cisco1600(config-router)#network 192.168.1.0 [/size][/font]
[font=宋体][size=9pt]Cisco1600(config-router)#network 192.168.3.0 [/size][/font]
[font=宋体][size=9pt]2[/size][/font][font=宋体][size=9pt])[/size][/font][font=宋体][size=9pt]Cisco1700[/size][/font][font=宋体][size=9pt]的配置: [/size][/font]
[font=宋体][size=9pt]Cisco1700#config t [/size][/font]
[font=宋体][size=9pt]Cisco1700(config)#router rip [/size][/font]
[font=宋体][size=9pt]Cisco1700(config-router)#network 192.168.2.0 [/size][/font]
[font=宋体][size=9pt]Cisco1700(config-router)#network 192.168.3.0 [/size][/font]
[font=Times New Roman][size=3] [/size][/font]
[font=宋体][size=9pt]3[/size][/font][font=宋体][size=9pt].在[/size][/font][font=宋体][size=9pt]Cisco1700[/size][/font][font=宋体][size=9pt]路由器上配置[/size][/font][font=宋体][size=9pt]DHCP[/size][/font][font=宋体][size=9pt]服务: [/size][/font]
[font=宋体][size=9pt]1[/size][/font][font=宋体][size=9pt])配置[/size][/font][font=宋体][size=9pt]192.168.1.0[/size][/font][font=宋体][size=9pt]网段的[/size][/font][font=宋体][size=9pt]DHCP[/size][/font][font=宋体][size=9pt]服务: [/size][/font]
[font=宋体][size=9pt]Cisco1700#config t [/size][/font]
[font=宋体][size=9pt]Cisco1700(config)#ip dhcp pool Host1 [/size][/font]
[font=宋体][size=9pt]Cisco1700(dhcp-config)#network 192.168.1.0 255.255.255.0 [/size][/font]
[font=宋体][size=9pt]Cisco1700(dhcp-config)#default-router 192.168.1.1 [/size][/font]
[font=宋体][size=9pt]Cisco1700(dhcp-config)#dns-server 202.116.64.1 [/size][/font]
[font=宋体][size=9pt]Cisco1700(config)#ip dhcp excluded-address 192.168.1.1 [/size][/font]
[font=宋体][size=9pt]2[/size][/font][font=宋体][size=9pt])配置[/size][/font][font=宋体][size=9pt]192.168.2.0[/size][/font][font=宋体][size=9pt]网段的[/size][/font][font=宋体][size=9pt]DHCP[/size][/font][font=宋体][size=9pt]服务: [/size][/font]
[font=宋体][size=9pt]Cisco1700#config t [/size][/font]
[font=宋体][size=9pt]Cisco1700(config)#ip dhcp pool Host2 [/size][/font]
[font=宋体][size=9pt]Cisco1700(dhcp-config)#network 192.168.2.0 255.255.255.0 [/size][/font]
[font=宋体][size=9pt]Cisco1700(dhcp-config)#default-router 192.168.2.1 [/size][/font]
[font=宋体][size=9pt]Cisco1700(dhcp-config)#dns-server 202.116.64.1 [/size][/font]
[font=宋体][size=9pt]Cisco1700(config)#ip dhcp excluded-address 192.168.2.1 [/size][/font]
[font=Times New Roman][size=3] [/size][/font]
[font=宋体][size=9pt]4[/size][/font][font=宋体][size=9pt].在[/size][/font][font=宋体][size=9pt]Cisco1600[/size][/font][font=宋体][size=9pt]路由器上配置[/size][/font][font=宋体][size=9pt]IP helper address[/size][/font][font=宋体][size=9pt]: [/size][/font]
[font=宋体][size=9pt]Cisco1600#config t [/size][/font]
[font=宋体][size=9pt]Cisco1600(config)#int e0 [/size][/font]
[font=宋体][size=9pt]Cisoc1600(config-if)ip helper-address 192.168.3.2 [/size][/font]
[font=Times New Roman][size=3] [/size][/font]
[font=宋体][size=9pt]5[/size][/font][font=宋体][size=9pt].验证[/size][/font][font=宋体][size=9pt]DHCP[/size][/font][font=宋体][size=9pt]和[/size][/font][font=宋体][size=9pt]IP helper address: [/size][/font]
[font=宋体][size=9pt]在[/size][/font][font=宋体][size=9pt]Host1[/size][/font][font=宋体][size=9pt]和[/size][/font][font=宋体][size=9pt]Host2[/size][/font][font=宋体][size=9pt]两台主机的网络[/size][/font][font=宋体][size=9pt]IP/TCP[/size][/font][font=宋体][size=9pt]属性上分别设置为自动获取[/size][/font][font=宋体][size=9pt]IP[/size][/font][font=宋体][size=9pt]地址,然后在主机的[/size][/font][font=宋体][size=9pt]MS-DOS[/size][/font][font=宋体][size=9pt]下执行[/size][/font][font=宋体][size=9pt]ipconfig /all[/size][/font][font=宋体][size=9pt]命令,可以查看到[/size][/font][font=宋体][size=9pt]Host1[/size][/font][font=宋体][size=9pt]和[/size][/font][font=宋体][size=9pt]Host2[/size][/font][font=宋体][size=9pt]自动获取到的[/size][/font][font=宋体][size=9pt]IP[/size][/font][font=宋体][size=9pt]地址,[/size][/font][font=宋体][size=9pt]DHCP[/size][/font][font=宋体][size=9pt]服务器地址,[/size][/font][font=宋体][size=9pt]DNS[/size][/font][font=宋体][size=9pt]服务器地址等信息[/size][/font]
[/size][/font]
[/size][/font]
Cisco系列之CCNP Lab Exercise(Eigrp Troubleshooting)
【实验拓扑】[img=652,301]http://blog.bitscn.com/UploadFiles/2006-12/1230679923.jpg[/img]
说明:以RTE为界分为内部网络(左边)和外部网络(右边),内部网络运行EIGRP协议,外部网络运行RIP协议。
【实验目的】
1. 网络可以正常工作,所有路由器可以看以网络172.168.1.0/24, 172.168.2.0/24, 172.168.2.0/24, 172.168.4.0/24, 162.16.1.0/24, 150.150.0.0/16。
2. RTD上有两条到达网络172.168.2.0/24的路径,而只有一条到达网络172.168.4.0/24的路径(事先已经配置好让RTC不在以太网口发布这个网络)。
3. 外部网络除150.150.0.0/16外全部不能被内部网络看到,内部网络只能通过缺省网络访问其它外部网络。
【错误设计】
一、二层出错,帧中继交换机被配成单向链路(即少一条frame-relay map)
[color=red]RTA#sh ip route[/color]
172.168.0.0/24 is subnetted, 3 subnets
C 172.168.1.0 is directly connected, FastEthernet0
C 172.168.2.0 is directly connected, Serial0.1
D 172.168.3.0 [90/21026560] via 172.168.2.3, 00:34:08, Serial0.1
162.16.0.0/24 is subnetted, 1 subnets
D 162.16.1.0 [90/20514560] via 172.168.2.3, 00:37:34, Serial0.1
D EX 150.150.0.0/16 [170/21282560] via 172.168.2.3, 00:24:00, Serial0.1
[color=red]RTA#sh ip eigrp neighbors[/color]
IP-EIGRP neighbors for process 1
H Address Interface Hold Uptime SRTT RTO Q Seq Type
(sec) (ms) Cnt Num
1 172.168.2.3 Se0.1 13 00:38:21 308 1848 0 23
[color=red]RTA#sh frame-relay pvc[/color]
PVC Statistics for interface Serial0 (Frame Relay DTE)
Active Inactive Deleted Static
Local 1 0 1 0
Switched 0 0 0 0
Unused 0 0 0 0
DLCI = 101, DLCI USAGE = LOCAL, PVC STATUS = DELETED, INTERFACE = Serial0.1
input pkts 886 output pkts 97 in bytes 73955
out bytes 7548 dropped pkts 0 in FECN pkts 0
in BECN pkts 0 out FECN pkts 0 out BECN pkts 0
in DE pkts 0 out DE pkts 0
out bcast pkts 40 out bcast bytes 2560
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
pvc create time 01:04:01, last time pvc status changed 00:01:42
DLCI = 201, DLCI USAGE = LOCAL, PVC STATUS = ACTIVE, INTERFACE = Serial0.1
input pkts 874 output pkts 97 in bytes 70019
out bytes 7068 dropped pkts 0 in FECN pkts 0
in BECN pkts 0 out FECN pkts 0 out BECN pkts 0
in DE pkts 0 out DE pkts 0
out bcast pkts 42 out bcast bytes 2688
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
pvc create time 01:03:55, last time pvc status changed 01:00:26
[color=red]RTB#sh frame-relay pvc[/color]
PVC Statistics for interface Serial0 (Frame Relay DTE)
Active Inactive Deleted Static
Local 0 1 0 0
Switched 0 0 0 0
Unused 0 0 0 0
DLCI = 102, DLCI USAGE = LOCAL, PVC STATUS = INACTIVE, INTERFACE = Serial0.1
input pkts 97 output pkts 891 in bytes 7548
out bytes 74544 dropped pkts 0 in FECN pkts 0
in BECN pkts 0 out FECN pkts 0 out BECN pkts 0
in DE pkts 0 out DE pkts 0
out bcast pkts 863 out bcast bytes 72401
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
pvc create time 01:17:38, last time pvc status changed 00:02:43
[color=red]RTB#sh ip route[/color]
172.168.0.0/24 is subnetted, 3 subnets
D 172.168.1.0 [90/20517120] via 162.16.1.3, 00:03:03, FastEthernet0
D 172.168.2.0 [90/20514560] via 162.16.1.3, 00:03:03, FastEthernet0
D 172.168.3.0 [90/2172416] via 162.16.1.1, 00:36:45, FastEthernet0
162.16.0.0/24 is subnetted, 1 subnets
C 162.16.1.0 is directly connected, FastEthernet0
D EX 150.150.0.0/16 [170/2428416] via 162.16.1.1, 00:26:38, FastEthernet0
二、共亨链路带宽问题,让B和C到帧中继网络有不同的带宽,但必须让D有两条到A的路由。
[color=red]RTB#conf t[/color]
Enter configuration commands, one per line. End with CNTL/Z.
RTB(config)#int s0.1
RTB(config-subif)#bandwidth 2040
RTC(config)#int s0.1
RTC(config-subif)#bandwidth 2048
RTD#sh ip route
172.168.0.0/24 is subnetted, 3 subnets
D 172.168.1.0 [90/1789952] via 162.16.1.3, 00:00:03, FastEthernet0/0
D 172.168.2.0 [90/1787392] via 162.16.1.3, 00:00:03, FastEthernet0/0
C 172.168.3.0 is directly connected, Serial0/0
162.16.0.0/24 is subnetted, 1 subnets
C 162.16.1.0 is directly connected, FastEthernet0/0
D EX 150.150.0.0/16 [170/2425856] via 172.168.3.2, 00:00:03, Serial0/0
[color=red]RTD#sh ip eigrp topology 172.168.2.0 255.255.255.0[/color]
IP-EIGRP (AS 1): Topology entry for 172.168.2.0/24
State is Passive, Query origin flag is 1, 1 Successor(s), FD is 1787392
Routing Descriptor Blocks:
162.16.1.3 (FastEthernet0/0), from 162.16.1.3, Send flag is 0x0
Composite metric is (1787392/1761792), Route is Internal
Vector metric:
Minimum bandwidth is 2048 Kbit
Total delay is 21000 microseconds
Reliability is 255/255
Load is 1/255
Minimum MTU is 1500
Hop count is 1
162.16.1.2 (FastEthernet0/0), from 162.16.1.2, Send flag is 0x0
Composite metric is (1792256/1766656), Route is Internal
Vector metric:
Minimum bandwidth is 2040 Kbit
Total delay is 21000 microseconds
Reliability is 255/255
Load is 1/255
Minimum MTU is 1500
Hop count is 1
加入Variance 2
[color=red]RTD#sh ip route[/color]
172.168.0.0/24 is subnetted, 3 subnets
D 172.168.1.0 [90/1789952] via 162.16.1.3, 00:00:03, FastEthernet0/0
D 172.168.2.0 [90/1787392] via 162.16.1.3, 00:00:03, FastEthernet0/0
[90/1792256] via 162.16.1.2, 00:00:03, FastEthernet0/0
C 172.168.3.0 is directly connected, Serial0/0
162.16.0.0/24 is subnetted, 1 subnets
C 162.16.1.0 is directly connected, FastEthernet0/0
D EX 150.150.0.0/16 [170/2425856] via 172.168.3.2, 00:00:03, Serial0/0
三、水平分割问题,A的多少接口上的水平分割让网络172.168.4.0/25只能被A收到,当然还要配分发列表。
RTC(config)#int loopback 0
RTC(config-if)#ip addr 172.168.4.1 255.255.255.0
RTC(config-if)#exit
RTC(config)#router eigrp 1
RTC(config-router)#distribute-list 1 out fastEthernet 0
RTC(config-router)#exit
RTC(config)#access
RTC(config)#access-list 1 deny 172.168.4.0 0.0.0.255
RTC(config)#access-
RTC(config)#access-list 1 permit any
[color=red]RTA#sh ip rout[/color]
172.168.0.0/24 is subnetted, 4 subnets
D 172.168.4.0 [90/20640000] via 172.168.2.3, 00:01:47, Serial0.1
C 172.168.1.0 is directly connected, FastEthernet0
C 172.168.2.0 is directly connected, Serial0.1
D 172.168.3.0 [90/21026560] via 172.168.2.2, 00:01:06, Serial0.1
[90/21026560] via 172.168.2.3, 00:01:06, Serial0.1
162.16.0.0/24 is subnetted, 1 subnets
D 162.16.1.0 [90/20514560] via 172.168.2.3, 00:12:05, Serial0.1
[90/20514560] via 172.168.2.2, 00:12:06, Serial0.1
D EX 150.150.0.0/16 [170/21282560] via 172.168.2.2, 00:01:07, Serial0.1
[170/21282560] via 172.168.2.3, 00:01:07, Serial0.1
[color=red]RTB#sh ip route[/color]
172.168.0.0/24 is subnetted, 3 subnets
D 172.168.1.0 [90/1769216] via 172.168.2.1, 00:02:21, Serial0.1
C 172.168.2.0 is directly connected, Serial0.1
D 172.168.3.0 [90/2172416] via 162.16.1.1, 00:12:38, FastEthernet0
162.16.0.0/24 is subnetted, 1 subnets
C 162.16.1.0 is directly connected, FastEthernet0
D EX 150.150.0.0/16 [170/2428416] via 162.16.1.1, 00:12:38, FastEthernet0
RTA(config-subif)#no ip split-horizon eigrp 1
[color=red]RTB#sh ip route[/color]
172.168.0.0/24 is subnetted, 4 subnets
D 172.168.4.0 [90/21152000] via 172.168.2.1, 00:00:06, Serial0.1
D 172.168.1.0 [90/1769216] via 172.168.2.1, 00:00:06, Serial0.1
C 172.168.2.0 is directly connected, Serial0.1
D 172.168.3.0 [90/2172416] via 162.16.1.1, 00:00:06, FastEthernet0
162.16.0.0/24 is subnetted, 1 subnets
C 162.16.1.0 is directly connected, FastEthernet0
D EX 150.150.0.0/16 [170/2428416] via 162.16.1.1, 00:00:06, FastEthernet0
四、是否允许广播,当在多点接口上不加入关键字broadcast时,会出现hello包无法发送
因为它使用了组播地址。
RTA(config-subif)#no frame-relay map ip 172.168.2.2 101 broadcast
RTA(config-subif)#frame-relay map ip 172.168.2.2 101
RTA(config-subif)#no frame-relay map ip 172.168.2.3 201 broadcast
RTA(config-subif)#frame-relay map ip 172.168.2.3 201
RTA(config-subif)#
[color=red]RTA#sh ip eigrp nei[/color]
IP-EIGRP neighbors for process 1
为空,加入后的输出:
[color=red]RTA#sh ip eigrp nei[/color]
IP-EIGRP neighbors for process 1
H Address Interface Hold Uptime SRTT RTO Q Seq Type
(sec) (ms) Cnt Num
1 162.16.1.3 Fa0 11 00:00:18 4 200 0 104
0 162.16.1.1 Fa0 10 00:00:18 8 200 0 106
五、不连续子网问题,B、C、D之间的网络把172.168.0.0/16分开,如果不在这些路由器中配置no auto-summary命令会造成有的网络收不到。
RTD(config)#router eigrp 1
RTD(config-router)#auto-summary
[color=red]RTB#sh ip route
[/color]172.168.0.0/16 is variably subnetted, 4 subnets, 2 masks
D 172.168.4.0/24 [90/21152000] via 172.168.2.1, 00:02:15, Serial0.1
D 172.168.0.0/16 [90/1794816] via 162.16.1.1, 00:00:32, FastEthernet0
D 172.168.1.0/24 [90/1769216] via 172.168.2.1, 00:02:15, Serial0.1
C 172.168.2.0/24 is directly connected, Serial0.1
162.16.0.0/24 is subnetted, 1 subnets
C 162.16.1.0 is directly connected, FastEthernet0
D EX 150.150.0.0/16 [170/2428416] via 162.16.1.1, 00:00:35, FastEthernet0
六、不共同子网,当配错D的以太网口时,无法建立邻居关系,而且有错误提示。
RTD(config-if)#ip addr 162.16.11.1 255.255.255.0
RTD(config-if)#
02:32:24: IP-EIGRP: Neighbor 162.16.1.2 not on common subnet for FastEthernet0/0 (162.16.11.1 255.255.255.0
七、K不同也会造成邻居问题
RTD(config)#router eigrp 1
RTD(config-router)#metric weights 0 1 1 1 1 0
RTD(config)#^Z
RTD#
02:36:36: %SYS-5-CONFIG_I: Configured from console by consoleear
[color=red]RTD#sh ip eigrp nei[/color]
IP-EIGRP neighbors for process 1
RTD(config-router)#metric weights 0 1 0 1 0 0
RTD(config-router)#exit
RTD(config)#exit
RTD#
02:37:57: %SYS-5-CONFIG_I: Configured from console by console
RTD#clear ip eigrp nei
[color=red]RTD#sh ip eigrp nei[/color]
IP-EIGRP neighbors for process 1
H Address Interface Hold Uptime SRTT RTO Q Seq Type
(sec) (ms) Cnt Num
2 162.16.1.3 Fa0/0 14 00:00:02 1 3000 2 167
1 162.16.1.2 Fa0/0 13 00:00:03 1 3000 2 191
0 172.168.3.2 Se0/0 14 00:00:05 26 200 0 70
八、发布列表,在E上不进行路由发布过滤时会让内部路由器看到所有路由。
[color=red]RTD#sh ip route
[/color]D EX 170.170.0.0/16 [170/2425856] via 172.168.3.2, 00:00:06, Serial0/0
172.168.0.0/24 is subnetted, 4 subnets
D 172.168.4.0 [90/21177600] via 162.16.1.2, 00:01:33, FastEthernet0/0
D 172.168.1.0 [90/1794816] via 162.16.1.3, 00:01:33, FastEthernet0/0
[90/1794816] via 162.16.1.2, 00:01:33, FastEthernet0/0
D 172.168.2.0 [90/1792256] via 162.16.1.3, 00:01:33, FastEthernet0/0
[90/1792256] via 162.16.1.2, 00:01:33, FastEthernet0/0
C 172.168.3.0 is directly connected, Serial0/0
162.16.0.0/24 is subnetted, 1 subnets
C 162.16.1.0 is directly connected, FastEthernet0/0
D EX 160.160.0.0/16 [170/2425856] via 172.168.3.2, 00:00:06, Serial0/0
131.66.0.0/24 is subnetted, 1 subnets
D EX 131.66.20.0 [170/2425856] via 172.168.3.2, 00:00:07, Serial0/0
D EX 150.150.0.0/16 [170/2425856] via 172.168.3.2, 00:00:15, Serial0/0
RTE(config)#router eigrp 1
RTE(config-router)#distribute-list 1 out
Access-list 1 permit 150.150.0.0 0.0.255.255
RTD#sh ip route
172.168.0.0/24 is subnetted, 4 subnets
D 172.168.4.0 [90/21177600] via 162.16.1.2, 00:03:26, FastEthernet0/0
D 172.168.1.0 [90/1794816] via 162.16.1.3, 00:03:26, FastEthernet0/0
[90/1794816] via 162.16.1.2, 00:03:26, FastEthernet0/0
D 172.168.2.0 [90/1792256] via 162.16.1.3, 00:03:26, FastEthernet0/0
[90/1792256] via 162.16.1.2, 00:03:26, FastEthernet0/0
C 172.168.3.0 is directly connected, Serial0/0
162.16.0.0/24 is subnetted, 1 subnets
C 162.16.1.0 is directly connected, FastEthernet0/0
D EX 150.150.0.0/16 [170/2425856] via 172.168.3.2, 00:00:03, Serial0/0
九、重发布,没有default-metric命令的话重发布是不会发生。
[color=red]RTD#sh ip route[/color]
172.168.0.0/24 is subnetted, 4 subnets
D 172.168.4.0 [90/21177600] via 162.16.1.2, 00:05:01, FastEthernet0/0
D 172.168.1.0 [90/1794816] via 162.16.1.3, 00:05:01, FastEthernet0/0
[90/1794816] via 162.16.1.2, 00:05:01, FastEthernet0/0
D 172.168.2.0 [90/1792256] via 162.16.1.3, 00:05:01, FastEthernet0/0
[90/1792256] via 162.16.1.2, 00:05:01, FastEthernet0/0
C 172.168.3.0 is directly connected, Serial0/0
162.16.0.0/24 is subnetted, 1 subnets
C 162.16.1.0 is directly connected, FastEthernet0/0
RTE(config)#router eigrp 1
RTE(config-router)#default-metric 10000 1000 255 1 1500
[color=red]RTD#sh ip route[/color]
172.168.0.0/24 is subnetted, 4 subnets
D 172.168.4.0 [90/21177600] via 162.16.1.2, 00:06:45, FastEthernet0/0
D 172.168.1.0 [90/1794816] via 162.16.1.3, 00:06:45, FastEthernet0/0
[90/1794816] via 162.16.1.2, 00:06:45, FastEthernet0/0
D 172.168.2.0 [90/1792256] via 162.16.1.3, 00:06:45, FastEthernet0/0
[90/1792256] via 162.16.1.2, 00:06:45, FastEthernet0/0
C 172.168.3.0 is directly connected, Serial0/0
162.16.0.0/24 is subnetted, 1 subnets
C 162.16.1.0 is directly connected, FastEthernet0/0
D EX 150.150.0.0/16 [170/2425856] via 172.168.3.2, 00:00:25, Serial0/0
十、从复ID,A和E都使用环回地址192.168.1.1,所以E重发布的路由A不接爱。
[color=red]RTA#sh ip route[/color]
172.168.0.0/24 is subnetted, 4 subnets
D 172.168.4.0 [90/20640000] via 172.168.2.3, 00:00:30, Serial0.1
C 172.168.1.0 is directly connected, FastEthernet0
C 172.168.2.0 is directly connected, Serial0.1
D 172.168.3.0 [90/21026560] via 172.168.2.3, 00:00:30, Serial0.1
[90/21026560] via 172.168.2.2, 00:00:30, Serial0.1
162.16.0.0/24 is subnetted, 1 subnets
D 162.16.1.0 [90/20514560] via 172.168.2.3, 00:00:30, Serial0.1
[90/20514560] via 172.168.2.2, 00:00:30, Serial0.1
C 192.168.1.0/24 is directly connected, Loopback0
[color=red]RTD#sh ip route[/color]
172.168.0.0/24 is subnetted, 4 subnets
D 172.168.4.0 [90/21177600] via 162.16.1.2, 00:01:15, FastEthernet0/0
D 172.168.1.0 [90/1794816] via 162.16.1.3, 00:01:15, FastEthernet0/0
[90/1794816] via 162.16.1.2, 00:01:15, FastEthernet0/0
D 172.168.2.0 [90/1792256] via 162.16.1.3, 00:02:15, FastEthernet0/0
[90/1792256] via 162.16.1.2, 00:02:15, FastEthernet0/0
C 172.168.3.0 is directly connected, Serial0/0
162.16.0.0/24 is subnetted, 1 subnets
C 162.16.1.0 is directly connected, FastEthernet0/0
D EX 150.150.0.0/16 [170/2425856] via 172.168.3.2, 00:02:53, Serial0/0
改了E的环回地址,重启后就正常了。
[color=red]RTA#sh ip route[/color]
172.168.0.0/24 is subnetted, 4 subnets
D 172.168.4.0 [90/20640000] via 172.168.2.3, 00:09:38, Serial0.1
C 172.168.1.0 is directly connected, FastEthernet0
C 172.168.2.0 is directly connected, Serial0.1
D 172.168.3.0 [90/21026560] via 172.168.2.3, 00:00:41, Serial0.1
[90/21026560] via 172.168.2.2, 00:00:41, Serial0.1
162.16.0.0/24 is subnetted, 1 subnets
D 162.16.1.0 [90/20514560] via 172.168.2.3, 00:09:38, Serial0.1
[90/20514560] via 172.168.2.2, 00:09:38, Serial0.1
C 192.168.1.0/24 is directly connected, Loopback0
D EX 150.150.0.0/16 [170/21282560] via 172.168.2.3, 00:00:27, Serial0.1
[170/21282560] via 172.168.2.2, 00:00:27, Serial0.1
十一、认证问题,当D上没有配论证,而E上配了时,它们会无法建立邻居关系。
RTE(config)#int s0/0
RTE(config-if)#ip authentication mode eigrp 1 md5
RTE(config-if)#ip authentication key-chain eigrp 1 holly
RTE(config-if)#key chain holly
RTE(config-keychain)#key 1
RTE(config-keychain-key)#key-string 123
[color=red]RTE#sh ip eigrp nei[/color]
IP-EIGRP neighbors for process 1
RTD(config)#int s0/0
RTD(config-if)#ip au
RTD(config-if)#ip authentication mode ei
RTD(config-if)#ip authentication mode eigrp 1 md5
RTD(config-if)#ip au
RTD(config-if)#ip authentication key
RTD(config-if)#ip authentication key-chain eig
RTD(config-if)#ip authentication key-chain eigrp 1 mikey
RTD(config-if)#key chain mikey
RTD(config-keychain)#key 1
RTD(config-keychain-key)#key
RTD(config-keychain-key)#key-string 123
RTD(config-keychain-key)#^Z
RTD#
03:22:16: %SYS-5-CONFIG_I: Configured from console by console
[color=red]RTD#sh ip eigrp nei[/color]
IP-EIGRP neighbors for process 1
H Address Interface Hold Uptime SRTT RTO Q Seq Type
(sec) (ms) Cnt Num
2 172.168.3.2 Se0/0 14 00:00:00 1 2000 1 0
1 162.16.1.2 Fa0/0 14 00:00:04 1 3000 3 291
0 162.16.1.3 Fa0/0 14 00:00:05 4 200 0 276
[color=red]RTD#sh ip route[/color]
172.168.0.0/24 is subnetted, 4 subnets
D 172.168.4.0 [90/21177600] via 162.16.1.2, 00:00:10, FastEthernet0/0
D 172.168.1.0 [90/1794816] via 162.16.1.2, 00:00:10, FastEthernet0/0
[90/1794816] via 162.16.1.3, 00:00:10, FastEthernet0/0
D 172.168.2.0 [90/1792256] via 162.16.1.2, 00:00:10, FastEthernet0/0
[90/1792256] via 162.16.1.3, 00:00:10, FastEthernet0/0
C 172.168.3.0 is directly connected, Serial0/0
162.16.0.0/24 is subnetted, 1 subnets
C 162.16.1.0 is directly connected, FastEthernet0/0
D EX 150.150.0.0/16 [170/2425856] via 172.168.3.2, 00:00:06, Serial0/0
十二、默认路由问题
在EIGRP中是不能用ip route 0.0.0.0 0.0.0.0 next-hop命令来通告默认路由的,只能用ip default-network命令来进行配置,比如在RTE上使用ip default-network 150.150.0.0 255.255.0.0,这样将使其它路由器上的150.150.0.0/16网络变成缺省网络(有*号)。
2513#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default
[color=blue]Gateway of last resort is 161.44.192.2 to network 198.10.1.0[/color]
161.44.0.0 255.255.255.0 is subnetted, 1 subnets
C 161.44.192.0 is directly connected, Ethernet0
S 161.44.0.0 255.255.0.0 [1/0] via 161.44.192.0
S* 198.10.1.0 [1/0] via 161.44.192.2
131.108.0.0 255.255.255.0 is subnetted, 1 subnets
C 131.108.99.0 is directly connected, TokenRing0
注:上面的输出不是基于本实验拓扑,只作为说明用。在上面的结果的蓝色部分可以看到有最后的网关了。
【路由器上的错误配置】
注:[color=blue]蓝色[/color]为正常时要用的,排错时去掉;[color=green]绿色[/color]为在设错时添加的
[color=red]帧中继交换机[/color]
(Config) # frame-relay switching
(Config) # int s0
! 进入s0端口
(config-if) # enacapsulation frame-relay
(config-if) # frame-relay intf-type dce
! 设置端口类型为DCE
(config-if) # frame-relay lmi-type cisco ! 配置lmi类型
(config-if) # clock rate 56000
(config-if) # [color=blue]frame-relay route 101 interface s1 102[/color] !建立一条交换记录
(config-if) # frame-relay route 201 interface s2 202 ! 建立第二条交换记
(config-if) # no shut
(config-if) # exit
(Config) # int s1 !进入s1端口
(config-if) # encapsulation frame-relay
(config-if) # frame-relay intf-type dce
(config-if) # frame-relay lmi-type cisco
(config-if) # clock rate 56000
(config-if) # frame-relay route 102 interface s0 101
(config-if) # no shut
(config-if) # exit
(Config) # int s2 !进入s2端口
(config-if) # enacapsulation frame-relay
(config-if) # frame-relay intf-type dce
(config-if) # frame-relay lmi-type cisco
(config-if) # clock rate 56000
(config-if) # frame-relay route 202 interface s0 201
(config-if) # no shut
(config-if) # exit
[color=red]路由器RTA的配置[/color]
int e 0
ip addr 172.168.1.1 255.255.255.0
no shut
int s0
encapsulation frame-relay
frame-relay lmi-type cisco
int s0.1 multipoint
ip addr 172.168.2.1 255.255.255.0
frame-relay map ip 172.168.2.2 101 broadcast([color=green]frame-relay map ip 172.168.2.2 102[/color])
frame-relay map ip 172.168.2.3 201 broadcast([color=green]frame-relay map ip 172.168.2.2 202[/color])
[color=blue]no ip split-horizon eigrp 1[/color]
no shut
int loopback 0
ip addr 192.168.1.1 255.255.255.0
exit
router eigrp 1
network 172.168.0.0
exit
[color=red]路由器RTB的配置[/color]
int e 0
ip addr 162.16.1.2 255.255.255.0
no shut
int s0
no ip addr
encapsulation frame-relay
frame-relay lmi-type cisco
int s0.1 point-to-point
bandwidth 2048 ([color=green]bandwidth 2040[/color])
ip addr 172.168.2.2 255.255.255.0
frame-relay interface-dlci 102
exit
no shut
router eigrp 1
network 172.168.0.0
network 162.16.0.0
no auto-summary
exit
路由器RTC的配置
int e 0
ip addr 162.16.1.3 255.255.255.0
no shut
RTC(config)#int loopback 0
RTC(config-if)#ip addr 172.168.4.1 255.255.255.0
int s0
encapsulation frame-relay
frame-relay lmi-type cisco
int s0.1 point-to-point
bandwidth 2048
ip addr 172.168.2.3 255.255.255.0
frame-relay interface-dlci 202
exit
no shut
router eigrp 1
distribute-list 1 out fastEthernet 0
network 172.168.0.0
network 162.16.0.0
[color=blue]no auto-summary[/color]
Exit
access-list 1 deny 172.168.4.0 0.0.0.255
access-list 1 permit any
[color=red]路由器RTD的配置[/color]
int e 0
ip addr 162.16.1.1 255.255.255.0 (ip addr 162.16.11.1 255.255.255.0)
no shut
int s0
RTD(config-if)#ip authentication mode eigrp 1 md5
RTD(config-if)#ip authentication key-chain eigrp 1 mikey
RTD(config-if)#key chain mikey
RTD(config-keychain)#key 1
RTD(config-keychain-key)#key-string 123
ip addr 172.168.3.1 255.255.255.0
clock rate 56000
no shut
router eigrp 1
network 172.168.0.0
network 162.16.0.0
[color=blue]no auto-summary[/color]
[color=green]metric weights 0 1 1 1 1 0[/color]
exit
[color=red]路由器RTE的配置[/color]
int s 0
RTE(config-if)#ip authentication mode eigrp 1 md5
RTE(config-if)#ip authentication key-chain eigrp 1 holly
RTE(config-if)#key chain holly
RTE(config-keychain)#key 1
RTE(config-keychain-key)#key-string 123
ip addr 172.168.3.2 255.255.255.0
clock rate 56000
no shut
int s1
ip addr 131.66.20.1 255.255.255.0
clock rate 56000
no shut
int loopback 0
[color=blue]ip addr 192.168.6.1 255.255.255.0[/color]([color=green]ip addr 192.168.1.1 255.255.255.0[/color])
exit
router eigrp 1
network 172.168.0.0
redistribute rip
[color=blue]default-metric 10000 100 255 1 1500
distribute-list 1 out[/color]
exit
router rip
network 131.66.0.0
[color=blue]access-list 1 permit 150.150.0.0 0.0.255.255[/color]
[color=red]外部的配置[/color]
int s0
ip addr 131.66.20.2
clock rate 56000
no shut
int loopback 0
ip addr 150.150.0.1 255.255.0.0
int loopback 1
ip addr 160.160.0.1 255.255.0.0
int loopback 2
ip addr 170.170.0.1 255.255.0.0
router rip
Cisco系列之CCNP Lab Exercise(IS-IS)
【实验目的】:掌握IS-IS路由协议的基本配置,理解在CLNS和IP两种不同的第三层协议下,IS-IS配置的不同;理解DIS选举过程;熟悉IS-IS相关的配置命令与监视命令,并懂得在同一router上配置Multiarea。【实验设备】:2500系列路由器两台,2600路由器3台,要求IOS为支持IS-IS协议的电信级版本
【实验拓扑】:拓扑结构如下:其中图一是用于第一部分实验,图二是用于第二部分实验;图三是用于第三部分实验;
[img]http://blog.bitscn.com/UploadFiles/2006-12/1230542786.jpg[/img]
[img]http://blog.bitscn.com/UploadFiles/2006-12/1230421497.jpg[/img]
[img]http://blog.bitscn.com/UploadFiles/2006-12/1230936811.jpg[/img]
【实验步骤】:
第一部份:DIS选举过程与single area 配置;
1 按图1连接好3台2600系列路由器,并按图上标出的地址配置好各个端口;检查各个配置端口是否出于正常状态;
2 启动IS-IS路由进程:在各个路由器的全局配置模式下按如下步骤启动路由进程:
R1:
router isis //configuration of is-is process
is-type level-1
net 49.0001.1111.1111.1111.00
R2:
router isis //configuration of is-is process
is-type level-1
net 49.0001.2222.2222.2222.00
R3:
router isis //configuration of is-is process
is-type level-1
net 49.0001.3333.3333.3333.00
3 将IS-IS进程应用到端口上:在各个路由器中,分别对于 f0/0和lo0,运行IS-IS路由。在接口模式下,配置如下命令:
ip router isis //在某一接口上运行IS-IS
4 观察DIS:要查看IS-IS的数据库信息,可以用show isis database命令来查看LSP包的情况。通过该命令可查看出在LAN中哪一台路由器作为DIS。
5 改变接口优先级以便人为干涉DIS选举过程:由于DIS选举是首先基于优先级的,因此我们可以通过改变接口优先级来控制DIS的选举,所用到的命令如下:
Router(config-if)#[color=red]isis priority 100 //change priority to 100
[/color]6 此时可以再用show isis database 来查看DIS的变化;
7 另外几个重要的观察IS-IS的命令是:
show isis topology //查看IS-IS所生成的拓扑结构
show ip route, show clns route, //查看IP路由和CLNS路由
show clns neighbors //查看邻居情况
第二部份:区域间路由(FOR IP and CLNS)
For IP 协议
1 按图2连接好设备并配置好IP地址;
2 类似于第一部分那样给各个路由器启动IS-IS进程,但NET有所不同,差别如下:
R1:
router isis //configuration of is-is process
is-type level-1
net 49.0001.1111.1111.1111.00
R2:
router isis //configuration of is-is process
is-type level-1-2
net 49.0001.2222.2222.2222.00
R3:
router isis //configuration of is-is process
is-type level-1-2
net 49.0002.3333.3333.3333.00
3 在接口上运行IS-IS:在R1的f0/0,lo0,R2的f0/0,lo0,s0上以及R3的lo0,s0上分别运行IS-IS
4 用上面介绍的观察命令检查数据库和路由表,并尝试是否能在不同网段间互相通信(ping测试)。
5 观察IS-IS database中level-1和level-2的信息,比较他们之间的不同,据此理解level-1和level-2他们之间的功能差别。
For CLNS 协议
6 用no命令将上面第3步中对端口所设的ip router isis命令取消,并改为clns router isis,此时IS-IS所支持的第三层协议为CLNS,此时我们可以用show clns route和show isis route来查看clns 的路由信息。比较这两个命令所显示的路由信息与IP路由信息的不同。
7 检查CLNS网络的连通性:有几种途径:一个可行的方法是用show clns route看路由,也可以在特权模式下用which-route命令来查看到某一个NSAP是否能找到相应的路由,请在路由器上试运行该命令查看。但最直接的方法当然用ping命令和traceroute命令,如下:
ping clns <CLNS 地址>
traceroute clns <CLNS 地址>
第三部份:CISCO路由器的对multiarea特性的支持:在此部分实验中,我们将在其中一台路由器上启动多个IS-IS路由进程,并将不同的进程应用到相应的接口上,使一个路由器可以支持多个area。
1 按图3连接好设备并配置好IP地址;
2 在R1上启动三个路由进程:
router isis A1 //configuration of is-is process A1
is-type level-1-2
net 49.0001.1111.1111.1111.00
router isis A2 //configuration of is-is process A2
is-type level-1
net 49.0002.1111.1111.1111.00
router isis A3 //configuration of is-is process A3
is-type level-1
net 49.0003.1111.1111.1111.00
3 在R1的loopback0,loopback1,s0上分别运行不同的路由进程,配置如下:
[color=red]interface s0
ip router isis A1
interface loopback 0
ip router isis A2
interface loopback 1
ip router isis A3[/color]
4 与R1的配置方法相似,按图3在R2上配置IS-IS进程。
5 检查路由表及IS-IS数据库,并用ping测试网络是否能连通。
6 去掉for IP协议的配置,将其改为for CLNS协议,以与上面类似的方法配置IS-IS routing for CLNS
【注意事项】:
1 IS-IS路由协议在CISCO路由器中只在电信级的IOS中支持;
2 要看到DIS选举过程的变化,可先通过 debug isis updatepackets命令打开debug功能;
3 对于CLNS和IP协议,IS-IS的配置有所不同,要主要他们配置的不同主要在于端口模式下的启动形
式,对于IP协议是ip router isis,而对于CLNS则是clns router isis。比较这两种设置不同所造成的路由表的差别。
4 DIS只存在在LAN里面,点对点连接中不存在DIS,这可以在IS-IS database里面看出来
Cisco系列之CCNP Lab Exercise(Modem)
实验目的:1) 了解modem的基本配置
2) 通过modem登陆到路由器上配置路由器(用serial口和aux口两种)
3) 两台路由器通过modem连接
实验设备:
两台路由器(带serial<->com口连线),两台modem,一台程控交换机
实验内容:
1、 通过serial 口和modem连接,并且能登陆到路由上配置路由,如图
[img]http://blog.bitscn.com/UploadFiles/2006-12/1230250015.jpg[/img]
enable password cisco
!
interface Serial1――配置serial为异步线路(配置modem连接必要的第一步)
physical-layer async
no ip address
!
line 2――serial上modem的物理层配置(line模式下为物理配置、int模式下为逻辑配置)
password cisco
login //以上两步配置和line vty中配置原理相同
modem InOut //modem既可被拨入,又可以拨出
modem autoconfigure discovery //modem自动检测
transport input all //允许所有的协议都可以通过该线路送入访问服务器
stopbits 1 //设置每个字节的停止位数
speed 115200 //设置modem和路由器之间的最大数据传输速率
flowcontrol hardware //使用RTS/CTS信号进行硬件流控
配置好后,配置主机的拨号设置为“连接后显示终端”,然后用超级终端或者拨号连接就能登陆到路由器上,对路由器进行配置:
User Access Verification
Password:
为Serial配置一个ip地址,用show line命令确定端口后(line号+2000),反向telnet
1
到modem上(telnet host_ip port)试用一下modem上AT指令(由于标准和指令的不统一,所以不作实验要求)。用ctrl-shift-6 x或disconnect退出。
2、配置广域网拨号连接,如图
[img]http://blog.bitscn.com/UploadFiles/2006-12/1230311373.jpg[/img]
line号(例如1720:con 0为line 0、serial 0-3为line 1-4、aux 0为 serial的数目+1=5、vty 0 4为line 6-9。)用show line来确定,注意的是,不同端口的最高传输速率是不同的。
中心路由配置如下:
enable password cisco
!
interface loopback 0
ip address 172.16.0.1 255.255.255.0
!
interface Serial1
physical-layer async
ip address 10.20.1.1 255.255.255.0
encapsulation ppp
keepalive 10 //规定发送keepalive包到其他路由器的时间
async mode dedicated //访问端口为dedicated,用户不能执行任何命令和改变任何配置
no cdp enable
line 2
password cisco
login
modem InOut
modem autoconfigure discovery
transport input all
stopbits 1
speed 115200
flowcontrol hardware
!
ip route 0.0.0.0 0.0.0.0 10.20.1.2
配置远程节点路由器
!
enable password cisco
!
2
interface loopback 0
ip address 192.168.0.1 255.255.255.0
!
interface Serial3
physical-layer async
ip address 10.20.1.2 255.255.255.0
encapsulation ppp
keepalive 10
dialer in-band //启用DDR和V.25bis(一个带内信令标准)拨号
dialer idle-timeout 300 //如果空闲5分钟则关闭连接
dialer wait-for-carrier-time 60 //连接发生等待最多一分钟
dialer map ip 10.10.1.1 name as200-e broadcast 84――84为对方号码
dialer hold-queue 50
dialer-group 1 //类似ip access-group
async mode dedicated
no cdp enable
!
line 4
password cisco
login
modem InOut
stopbits 1
speed 115200
flowcontrol hardware
!
dialer-list 1 protocol ip permit //类似access-list
!
ip route 0.0.0.0 0.0.0.0 10.20.1.1
!
由于异步modem不是完全标准化,用户必须写出定制的chat-scripts以执行下列任务:modem配置、拨号和远程登陆命令、失败检测。其基本形式如下:
Router(config)#chat-script script-name expect-string send-string
其中expect-string为本地系统期望从远端系统收到的字符串,send-string为本地系统应发送的字符串。一句话,就是告诉路由器当收到某些信号时采取什么行动(例如断开连接,或者向modem发出AT指令等)。例如ABORT ERROR就是收到ERROR信号就停止执行该chat-script、”” “ATZ”就是不必收到什么信号都发送”ATZ”复位指令、OK “ATDT\T”为收到OK信号就发送”ATDT\T”指令、TIMEOUT 30 CONNECT表示最多为收到”CONNECT”字符串等待30秒、\c表示不再发送的字符串后加回车符。
Cisco系列之CCNP Lab Exercise(PPP)
实验目的1) 了解拨号上网的基本配置,了解地址分配的几种方法
2) 了解认证协议的配置
实验拓扑:
[img]http://blog.bitscn.com/UploadFiles/2006-12/1230981828.jpg[/img]
实验步骤:
1) 配置静态接入地址
在路由器上配置为:
RTA#show run
!
hostname RTA
!
enable password cisco
!
no ip domain-lookup
!
chat-script aa56k ABORT ERROR "" "AT Z" OK "ATDT\T" TIMEOUT 30 CONNECT \c
!
interface Serial0
physical-layer async ――串口设置为异步模式
ip address 10.1.1.2 255.255.255.0 ――分配串口地址
encapsulation ppp ――启动PPP协议
keepalive 10 ――规定发送keepalive包到其他路由器的时间
async mode interactive ――相应PPP连接与EXEC连接
peer default ip address 10.1.1.3 ――配置接入地址为固定IP
!
ip classless
ip route 0.0.0.0 0.0.0.0 10.1.1.1 ――定义最后默认路由
!
line 1
password cisco
login
modem InOut
modem autoconfigure discovery
transport input all
autoselect ppp ――判断,选择PPP协议
stopbits 1
speed 115200
flowcontrol hardware
line vty 0 4
password cisco
!
启动PPP:配置好路由器后,在主机上连接modem,然后启动拨号连接,只需要填写接入号码,不需要填写任何其他信息。拨号后,在主机上运行winipcfg可以看到拨号所获得的IP地址,在主机上可以ping通网关。证明主机自动发出PPP连接请求,路由器能响应PPP连接
2) 配置动态地址分配
修改配置为:
interface Serial0
physical-layer async
ip address 10.1.1.2 255.255.255.0
encapsulation ppp
keepalive 10
async mode interactive
peer default ip address pool ippool
!
ip local pool ippool 10.1.1.5 10.1.1.15
配置好后,在主机上进行同样的拨号,应该可以获得10.1.1.5的IP地址。断开后再进行拨号,可以获得下一个IP。
启动EXEC:在拨号属性里选择“拨号后出现终端窗口”属性,再次拨号。拨号后提示输入密码,输入cisco就可以进入路由配置EXEC模式(即路由用户配置模式)。这里的cisco是line 1的login password。如果输入cisco后输入ppp的话,路由将启动PPP协议。
3) 自动地址分配(由用户手动定义IP地址)
配置为:
interface Serial0
physical-layer async
ip address 10.1.1.2 255.255.255.0
encapsulation ppp
keepalive 10
async dynamic address
async mode interactive
no peer default ip address
!
可以在拨号属性的TCP/IP配置里面填写IP地址,或者在“终端窗口”的用户提示
模式下输入ppp,然后输入你所需要的IP地址。在主机上运行winipcfg查看所获得的IP地址。
4) 配置密码认证
在路由器上配置:
interface Serial0
physical-layer async
ip address 10.1.1.2 255.255.255.0
encapsulation ppp
keepalive 10
async dynamic address
async mode interactive
peer default ip address pool ippool
ppp authentication chap
!
username abc password cisco
!
在拨号的时候要加上用户名与密码。检验一下用户名,密码有错的时候能否接入。
5) 通过拨号认证连接两台路由器
实验拓扑如下:
[img]http://blog.bitscn.com/UploadFiles/2006-12/1230276450.jpg[/img]
为两台路由器之间的拨号连接加上密码认证
路由器RTA的配置为:
hostname RTA
username RTB password ciscob
!
chat-script aa56k ABORT ERROR "" "AT Z" OK "ATDT\T" TIMEOUT 30 CONNECT \c
!
interface Serial0
physical-layer async
ip address 10.1.1.2 255.255.255.0
encapsulation ppp
keepalive 10
async mode dedicated
ppp authentication pap
ppp pap sent-username RTA password ciscoa
!
路由器RTB的配置为:
hostname RTB
!
username RTA password ciscoa
chat-script abc56k ABORT ERROR "" "AT Z" OK "ATDT\T" TIMEOUT 30 CONNECT \c
!
interface Serial0
physical-layer async
ip address 10.1.1.1 255.255.255.0
encapsulation ppp
keepalive 10
dialer in-band //让路由器发起拨号连接
dialer map ip 10.1.1.2 name RTA modem-script abc56k broadcast 88
//88为对端的电话号码,以实际的为准
dialer-group 1
async mode dedicated
ppp authentication pap //认证方式为pap方式
ppp pap sent-username RTB password ciscob //发送认证用户名、密码
!
ip route 0.0.0.0 0.0.0.0 10.1.1.2
!
dialer-list 1 protocol ip permit
!
line 1
password cisco
login
modem InOut
modem autoconfigure discovery
transport input all
stopbits 1
speed 115200
flowcontrol hardware
然后在RTB上通过ping来连接RTA。通过debug ppp authentication与debug ppp negotiation。在两台路由器上用show line 来看线路的情况,如果线路忙,要发连接的话先用clear line 1来清除原来的连接。若速率不匹配(即不为115200)请重启modem,再用show line 来观测,直到两端的异步端口速率都为115200。
若认证方式改为chap,则要在端口模式下输入ppp authentication chap 删除 ppp pap sent-username *** password *****,而且输入对方的主机名,且使用相同的密码
如在RTA 上输入username RTB password cisco ;在RTB上输入 username RTA password cisco
Cisco系列之CCNP Lab Exercise(queueing)
[实验目的]配置验证加权公平队列,优先级队列和可定制队列,
观察比较各自的特点。
[知识概述]
在router上,数据包传输的经典算法是先进先出(FIFO)算法。采用FIFO,数据包的传输与其被接收的顺序一致。当在WAN上由于突发性流量和相对低速流量的同时存在,可能引起暂时性的拥塞,这时候可以采用对数据流进行优先级划分的方法来解决拥塞,保证为用户提供适当的服务质量。CISCO IOS提供了另外3种队列技术:加权公平队列(WFQ),优先级队列(PQ),可定制队列(CQ)。
[实验拓扑]
[img]http://blog.bitscn.com/UploadFiles/2006-12/1230400143.jpg[/img]
Router_A Router_B
F0
192.168.1.1/24 S0 S0 F0
192.168.2.2/24 192.168.2.1/24 10.2.*.*/16 GW:10.2.0.1
server:ftp.zsu.edu.cn
Host A
192.168.1.2/24 Router B控制台
本实验由Host A触发数据流,观察实验现象;在RouterB配置并观察队列。
Router B的以太口接至实验室内部网,默认路由指向内部网关:10.2.0.1
由服务器[url=ftp://ftp.zsu.edu.cn]ftp.zsu.edu.cn[/url]提供FTP服务。
因为网关没有192.168.*.*网段的正确路由,所以需要设置NAT。
[实验过程]
基本配置:
RouterA:
interface FastEthernet0
ip address 192.168.1.1 255.255.255.0 //配置 IP地址
no shutdown
interface Serial 0
ip address 192.168.2.2 255.255.255.0
clock rate 56000
no shutdown
router rip //配置路由
network 192.168.1.0
network 192.168.2.0
ip route 0.0.0.0 0.0.0.0 10.2.0.1
RouterB
ip route 0.0.0.0 0.0.0.0 10.2.0.1 [color=blue]//配置默认路由
[/color]ip nat inside source static 192.168.1.2 10.2.*.*[color=blue] //配置NAT[/color]
interface FastEthernet0
ip address 10.2.*.* 255.255.0.0
ip nat outside
no shutdown
interface Serial 0
ip address 192.168.2.1 255.255.255.0
clock rate 56000
ip nat inside
no shutdown
router rip
network 10.0.0.0
network 192.168.2.0
passive-interface FastEthernet0 [color=blue]//使RIP不在内部网交换信息[/color]
一. 加权公平队列(WFQ)
加权公平队列是一种为所有数据流提供公平带宽分配的自动方式。该算法将数据流分成对话(conversation)信息,在传输数据之前将各个对话的数据包放到公平队列(fair queue)中进行排序,将数据包从WFQ中提取出来的次序是由每个到达的packet的最后一个bit的虚拟发送时间决定的,小数据量对话的packet优先级高于大数据量对话的packet。当小数据量的数据包被发送之后,其他各个大数据量对话的数据包将公平地分享剩下的带宽。
将数据流划为对话(conversation)的方法是根据数据包头的信息,例如源/目的网络地址、MAC地址、端口号、socket号、frame relay的DLCI值……WFQ在E1速率(2.048Mb/s)或E1以下速率的物理接口上是被默认启用的。
!
queque 绑定在RouterB的Serial0端口上
interface Serial0
[color=red]fair-queue
(fair-queue 128)[/color] //[color=blue]128是拥塞丢弃门限值,默认为64
//在这个实验中没有配置门限值,采用默认值64
[/color]!
验证fair queue:
[color=darkolivegreen]正常状态(无流量):[/color]
#show queueing int s0
Interface Serial0 queueing strategy: fair Input queue: 0/75/0 (size/max/drops); Total output drops: 0 Queueing strategy: weighted fair
Output queue: 0/1000/64/0 (size/max total/threshold/drops) Conversations 0/1/256 (active/max active/max total) //会话序号
Reserved Conversations 0/0 (allocated/max allocated)
#[color=blue]sh queueing fair[/color]
Current fair queue configuration:
Interface Discard Dynamic Reserved Link Priority
threshold queues queues queues queues
Serial0 64 16 0 8 1
[color=darkolivegreen]观察WFQ[/color]:在host A上Ping [url=ftp://ftp.zsu.edu.cn]ftp.zsu.edu.cn[/url],同时拉[url=ftp://ftp.zsu.edu.cn]ftp.zsu.edu.cn[/url]的文件
[color=blue]show queueing int s0/0[/color]
[color=darkolivegreen]与FIFO比较:[/color]
interface Serial0
[color=red]no fair-queue[/color]
clockrate 56000
!
#show queueing int s0
结论:WFQ 确保了低数据量的数据流(例如telnet,ping)能被及时传输。
ps ,也可以利用http触发多个数据流观察.
二. 优先级队列(PQ)
有4个队列:high,medium,normal,low。高优先级队列中的数据包总是在优先级别低于它的队列之前被发送出去。好处:管理员可以设置关键型的数据流总是优先于其他数据被传输。弊端:高优先级队列中的数据包有可能会占用所有可以获得的带宽,在低优先级队列中的数据包有可能不能被及时发送或者根本就没机会被发送了。
在RouterB上配置
interface Serial0
[color=magenta]ip access-group 103 out[/color]
[color=red]priority-group 1[/color]
clockrate 56000
!
[color=red]access-list 101 permit icmp any host 192.168.1.2[/color]
[color=red]access-list 103 permit ip any any log[/color] //记录数据包数量
[color=red]priority-list 1 protocol ip high tcp ftp
priority-list 1 protocol ip medium list 101
priority-list 1 interface Serial1 normal[/color]
[color=red]priority-list 1 default low[/color] //默认队列的优先级默认为normal,这里改为low
[color=red]priority-list 1 queue-limit 5 10 15 20[/color] //每个队列的数据包默认容量为20 40 60 80
!
[color=blue]#sh queueing priority
[/color]Current DLCI priority queue configuration:
Current priority queue configuration:
List Queue Args
1 low default
1 high protocol ip tcp port ftp
1 medium protocol ip list 101
1 normal interface Serial1
1 high limit 5
1 medium limit 10
1 normal limit 15
1 low limit 20
为较好的观察优先对列对数据优先级的影响,
建议通过同时触发多条数据流并更改优先级队列观察比较。
注:telnet 可以用 telnet bbs.zsu.edu.cn
如:ftp-data为high时,ping与telnet等完全无法工作,显示为time out; ftp-data为medium时, 设ping为high,则telnet无法工作,
ping正常,但延迟大于正常状态。
ftp-data为low时,telnet设normal,则虽有延迟,但可工作。
同时可观察 队列缓冲看统计
三. 可定制队列(CQ)
最多有16个队列可用。避免了优先级队列可能出现的独占带宽的弊端。用户可以采用命令[color=blue]queue-list[/color] list-No [color=blue]queue[/color] queue-No [color=blue]byte-count[/color] limit-num为每个队列分配一定比例的带宽,路由器采用循环机制依次为每个队列服务。这样,没有一种类型的数据流有独占全部带宽的可能性。(使用Round-robin算法,达到队列门限值或者队列为空后转入下一队列工作)
注:若无定制default队列,则数据流并入队列1.
在RouterB上配置
interface Serial0
[color=magenta]ip access-group 103 out
[/color][color=magenta][color=red]custom-queue-list 1[/color]
[/color]clockrate 56000
!
[color=red]access-list 101 permit icmp any host 192.168.1.2[/color]
[color=magenta]access-list 103 permit ip any any log[/color]
[color=red]queue-list 1 protocol ip 1 tcp ftp
queue-list 1 protocol ip 2 list 101
queue-list 1 protocol cdp 3[/color]
[color=red]queue-list 1 interface Serial1 4
queue-list 1 default 5
queue-list 1 queue 1 byte-count 1400
[/color]! // 规定了这个队列在一个循环周期中可以传
// 输的最小字节数。默认为1500字节。
[color=blue]#sh queueing custom[/color]
Current custom queue configuration:
List Queue Args
1 5 default
1 1 protocol ip tcp port ftp
1 2 protocol ip list 101
1 3 protocol cdp
1 4 interface Serial1
1 1 limit 4500
[color=blue]#sh queueing int s0[/color]
Interface Serial0 queueing strategy: custom
Output queue utilization (queue/count)
0/33 1/0 2/294 3/8 4/0 5/0 6/0 7/0 8/0
9/0 10/0 11/0 12/0 13/0 14/0 15/0 16/0
同PQ,建议通过同时触发多条数据流观察比较。
观察到的现象:同时ftp与ping,ping的延迟较PQ大,但比FIFO好。
Cisco系列之CCNP Lab Exercise(SEMESTER 6 FANAL CASE)
[实验拓扑][img=498,315]http://blog.bitscn.com/UploadFiles/2006-12/1230656303.jpg[/img]
[size=1]Router5[/size] [size=1]Computer[/size]
[实验内容]
1. 配置各个路由器,实现以上拓扑
hostname R?
enable password
vty
各个端口(包括Loop back口)的IP及DCE时钟(注意Router6作为FR switch相连的都为DCE)
2. 以Router6作为帧中继交换机,并配置FR cloud边界各个路由端口。
参考命令:
#(config)frame-relay switching
#(config-if)encapsulation frame-relay
frame-relay lmi-type cisco
frame-relay intf-type dce
frame-relay route [local dlci No] interface [remote intface] [remote dlci No]
3. 配置两种远程接入ospf中心网络:管理员单机接入Router9和远程路由接入Router3,Router3并反向回拨
参考命令:
􀁺 chat-script hayes56k ABORT ERROR "" "AT Z" OK "ATDT\T" TIMEOUT 30 CONNECT \c
􀁺 物理端口:
line 1
password cisco
login
modem InOut
modem autoconfigure discovery
transport input all
stopbits 1
speed 115200
flowcontrol hardware
􀁺 异步线路serial:
interface Serial0
physical-layer async
no ip address
encapsulation ppp
dialer in-band
dialer rotary-group 0
async mode dedicated
􀁺 配置chap验证
􀁺 配置callback
ppp callback request
ppp callback accept
4. 启动路由协议,使得路由信息完整,各网段能够通信
[参考配置结果]
R1#show run
Building configuration...
Current configuration : 844 bytes
!
。。。
!
hostname R1
!
enable password cisco
!
。。。
!
。。。
!
interface Serial0
ip address 202.116.78.1 255.255.255.0
clockrate 56000
!
interface Serial1
no ip address
shutdown
!
router ospf 1
log-adjacency-changes
network 202.116.78.0 0.0.0.255 area 0
network 202.116.64.0 0.0.0.255 area 0
!
ip classless
no ip http server
ip pim bidir-enable
!
line con 0
line aux 0
line vty 0 4
password cisco
login
!
no scheduler allocate
end
R2#show run
Current configuration : 797 bytes
!
version 12.2
。。。
hostname R2
!
enable password cisco
!
。。。
!
interface FastEthernet0/0
ip address 10.0.1.3 255.255.255.0
duplex auto
speed auto
!
interface Serial0/0
ip address 202.116.78.2 255.255.255.0
no fair-queue
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
interface Serial0/1
no ip address
shutdown
!
router ospf 1
log-adjacency-changes
network 10.0.1.0 0.0.0.255 area 0
network 202.116.78.0 0.0.0.255 area 0
!
ip http server
ip classless
ip pim bidir-enable
!
line con 0
exec-timeout 0 0
line aux 0
line vty 0 4
password cisco
login
!
end
R3#show run
Building configuration...
…
hostname R3
!
enable password cisco
!
username R5 password 0 cisco
!
no ip domain-lookup
ip host modem 2002 192.168.168.1
!
…
chat-script modem56k ABORT ERROR "" "AT Z" OK "ATDT\T" TIMEOUT 30 CONNECT \c
!
!
interface Loopback0
ip address 192.168.168.1 255.255.255.0
!
interface BRI0
no ip address
shutdown
!
interface FastEthernet0
ip address 10.0.1.1 255.255.255.0
speed auto
!
interface Serial0
no ip address
shutdown
no fair-queue
!
interface Serial1
physical-layer async
ip address 192.168.1.1 255.255.255.0
encapsulation ppp
dialer in-band
dialer map ip 192.168.1.2 name R5 class dialback modem-script modem56k broadcast 81
async default routing
async mode dedicated
ppp callback accept
ppp authentication chap
dialer-group 1
!
router ospf 1
log-adjacency-changes
redistribute static subnets
redistribute igrp 100 metric 100 subnets
network 10.0.1.0 0.0.0.255 area 0
!
router igrp 100
network 192.168.1.0
!
ip classless
ip route 192.168.10.0 255.255.255.0 192.168.1.2
no ip http server
ip pim bidir-enable
!
!
map-class dialer dialback
dialer callback-server username
dialer-list 1 protocol ip permit
!
line con 0
line 2
password cisco
modem InOut
modem autoconfigure discovery
transport input all
stopbits 1
speed 115200
flowcontrol hardware
line aux 0
line vty 0 4
password cisco
login
!
no scheduler allocate
end
R4#show run
Building configuration...
Current configuration : 803 bytes
!
。。。
!
hostname R4
!
enable password cisco
!
。。。
!
interface FastEthernet0/0
ip address 10.0.1.2 255.255.255.0
duplex auto
speed auto
!
interface Serial0/0
ip address 10.0.2.1 255.255.255.0
encapsulation frame-relay
ip ospf network point-to-multipoint
no fair-queue
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
interface Serial0/1
no ip address
clockrate 56000
!
router ospf 1
log-adjacency-changes
network 10.0.1.0 0.0.0.255 area 0
network 10.0.2.0 0.0.0.255 area 1
!
ip http server
ip classless
ip pim bidir-enable
!
line con 0
line aux 0
line vty 0 4
password cisco
login
!
end
R5#show run
Building configuration...
Current configuration : 1699 bytes
!
。。。
hostname R5
!
enable password cisco
!
username R3 password 0 cisco
。。。
!
no ip domain-lookup
!
ip audit notify log
ip audit po max-events 100
chat-script hayes56k ABORT ERROR "" "AT Z" OK "ATDT\T" TIMEOUT 30 CONNECT \c
!
interface Loopback0
ip address 10.1.1.1 255.255.255.0
!
interface Loopback1
ip address 192.168.10.1 255.255.255.0
!
。。。
!
interface Serial0
physical-layer async
ip address 192.168.1.2 255.255.255.0
encapsulation ppp
dialer in-band
async default routing
dialer map ip 192.168.1.1 name R3 modem-script hayes56k broadcast 83
dialer-group 1
async mode dedicated
ppp callback request
ppp authentication chap
!
interface Serial1
no ip address
shutdown
!
interface Serial2
no ip address
shutdown
!
interface Serial3
no ip address
shutdown
!
router igrp 100
network 192.168.1.0
network 192.168.10.0
!
ip classless
ip route 0.0.0.0 0.0.0.0 192.168.1.1
no ip http server
ip pim bidir-enable
!
dialer-list 1 protocol ip permit
!
line con 0
line 1
password cisco
login
modem InOut
modem autoconfigure discovery
transport input all
stopbits 1
speed 115200
flowcontrol hardware
line aux 0
line vty 0 4
password cisco
login
!
no scheduler allocate
end
R6#show run
Building configuration...
Current configuration : 1199 bytes
。。。
!
hostname R6
!
。。。
frame-relay switching
!
crypto mib ipsec flowmib history tunnel size 200
crypto mib ipsec flowmib history failure size 200
!
interface FastEthernet0
no ip address
shutdown
speed auto
!
interface Serial0
no ip address
encapsulation frame-relay
clockrate 56000
frame-relay lmi-type cisco
frame-relay intf-type dce
frame-relay route 18 interface Serial2 16
!
interface Serial1
no ip address
encapsulation frame-relay
clockrate 56000
frame-relay lmi-type cisco
frame-relay intf-type dce
frame-relay route 17 interface Serial2 19
!
interface Serial2
no ip address
encapsulation frame-relay
clockrate 56000
frame-relay lmi-type cisco
frame-relay intf-type dce
frame-relay route 16 interface Serial0 18
frame-relay route 19 interface Serial1 17
!
interface Serial3
no ip address
shutdown
!
ip classless
no ip http server
ip pim bidir-enable
!
line con 0
line aux 0
line vty 0 4
!
no scheduler allocate
end
router7#show run
Building configuration...
。。。
!
hostname router7
!
enable password cisco
!
memory-size iomem 15
ip subnet-zero
!
。。。
!
interface Serial0
ip address 10.0.2.2 255.255.255.0
encapsulation frame-relay
ip ospf network point-to-multipoint
no fair-queue
!
interface Serial1
no ip address
shutdown
!
router ospf 1
log-adjacency-changes
network 10.0.2.0 0.0.0.255 area 1
!
ip classless
no ip http server
ip pim bidir-enable
!
line con 0
line aux 0
line vty 0 4
password cisco
login
!
no scheduler allocate
end
R8#show run
Building configuration...
。。。
!
hostname Router8
!
enable password cisco
!
。。。
!
interface Serial0
ip address 10.0.2.3 255.255.255.0
encapsulation frame-relay
ip ospf network point-to-multipoint
frame-relay lmi-type cisco
!
interface Serial1
no ip address
shutdown
!
router ospf 1
log-adjacency-changes
network 10.0.2.0 0.0.0.255 area 1
!
ip classless
no ip http server
ip pim bidir-enable
!
line con 0
line aux 0
line vty 0 4
password cisco
login
!
no scheduler allocate
end
R9#show run
Building configuration...
Current configuration : 1157 bytes
!
version 12.2
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname R9
!
enable password cisco
!
memory-size iomem 15
ip subnet-zero
no ftp-server write-enable
chat-script aa56k ABORT ERROR "" "AT Z" OK "ATDT\T" TIMEOUT CONNECT\c
!
!
!
interface Loopback0
ip address 1.1.1.1 255.255.255.0
!
!
interface FastEthernet0/0
ip address 10.0.1.4 255.255.255.0
duplex auto
speed auto
!
interface Serial0/0
physical-layer async
ip address 192.168.2.1 255.255.255.0
encapsulation ppp
async mode interactive
peer default ip address pool ippool
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
interface Serial0/1
no ip address
shutdown
!
router ospf 1
log-adjacency-changes
network 10.0.1.0 0.0.0.255 area 0
network 192.168.2.0 0.0.0.255 area 0
!
ip local pool ippool 192.168.2.2 192.168.2.15
ip http server
ip classless
ip pim bidir-enable
!
!
!
!
line con 0
line 1
password cisco
login
modem InOut
modem autoconfigure discovery
transport input all
autoselect ppp
stopbits 1
speed 115200
flowcontrol hardware
line aux 0
line vty 0 4
password cisco
login
!
end
Cisco系列之CCNP Lab Exercise(VLSM AND IP unnumbered)
Part1:VLSM实验目的:
使用两种不同的路由选择协议,RIPv1和RIPv2来配置VLSM,并测试其功能。
实验拓扑:
[img]http://blog.bitscn.com/UploadFiles/2006-12/1230993061.jpg[/img]
实验内容:
一)配置不支持VLSM的协议RIP version 1
在早期的路由协议中,如RIPv1。一般可以把网络划分子网,来满足网络中网段的需求。比如一个公司得到一个C类网络192.168.1.0,一共有254个可用地址。公司内部有2个部门,分别在HUB1和HUB2下。
因为RIP version 1不支持VLSM,在发送路由表的时候,网段信息中没有子网掩码,所以我们分配的网络大小应该等长,这样RIP协议才能通过自己的子网掩码判断发送过来路由更新信息中网段的子网掩码。我们需要把192.168.1.0分成4段,分别是
192.168.1.0/26—192.168.1.1-192.168.1.62(供department1使用)
192.168.1.64/26—192.168.1.65-192.168.1.126(作为串口网段)
192.168.1.128/26—192.168.1.129-192.168.1.190 (供department2使用)
192.168.1.192/26—192.168.1.193-192.168.1.254(作为串口网段)
分配好端口ip地址和子网掩码,并启动rip协议
配置rip协议命令为:
router#config t
router(config)#router rip
router(config-router)#network 192.168.1.0
配置好后的,用show ip protocol查看运行的协议细节内容。再用show ip route查看路由表:
R1602#show ip route
192.168.1.0/26 is subnetted, 4 subnets
1
R 192.168.1.64 [120/1] via 192.168.1.129, 00:00:07, Serial0
R 192.168.1.0 [120/1] via 192.168.1.254, 00:00:01, Ethernet0
C 192.168.1.192 is directly connected, Ethernet0
C 192.168.1.128 is directly connected, Serial0
用debug ip rip查看路由更新信息。
用u all(undebug all)命令关掉debug。
􀁺 总结:
整个网络运行正常,但是对于两条点对点链路网段192.168.1.64/26 和192.168.1.192/26将分别只使用到两个IP地址,那么也就是说将有近60个IP地址被浪费了。
二)配置支持VLSM的协议 RIP version 2
在拓扑中所用到的串行口只需要两个ip地址,但配置中分配了62个地址,用了头尾两个,浪费了60个地址。那么我们可以通过配置端口的ip/mask调整每段的ip数量。分配如:
192.168.1.0/30—192.168.1.1-192.168.1.2(作为串口网段)
192.168.1.4/30—192.168.1.5-192.168.1.6(作为串口网段)
192.168.1.64/26—192.168.1.65-192.168.1.126(共有62个IP 供department2使用)
192.168.1.128/25—192.168.1.129-192.168.1.254(共有126个IP 供department1使用)
实验拓扑:
[img]http://blog.bitscn.com/UploadFiles/2006-12/1230943678.jpg[/img]
当配置好IP/MASK后,用debug ip rip查看路由更新信息:
00:50:09: RIP: sending v1 update to 255.255.255.255 via Ethernet0 (192.168.1.129
) - suppressing null update
00:50:09: RIP: sending v1 update to 255.255.255.255 via Serial0 (192.168.1.5) -
suppressing null update
这是因为rip version1 只能通过自己的MASK来判断接收到的路由更新信息的子网大小,如果发现自己有不等大小的网段,它就抑制更新信息发布。所以各个路由器都会收不到路由更新报文。
配置路由器RIPv2协议支持VLSM。具体配置为 2
router#config t
router(config)#router rip
router(config)#version 2
配置好后的,用show ip protocol查看运行的协议细节内容。再用show ip route查看路由表:
R1602#show ip route
192.168.1.0/24 is variably subnetted, 4 subnets, 3 masks
R 192.168.1.64/26 [120/1] via 192.168.1.6, 00:00:22, Serial0
R 192.168.1.0/30 [120/1] via 192.168.1.254, 00:00:17, Ethernet0
C 192.168.1.4/30 is directly connected, Serial0
C 192.168.1.128/25 is directly connected, Ethernet0
R1602#
注意路由表中,网段信息后面有子网掩码信息。用debug ip rip查看路由更新信息。
􀁺 总结:
整个网络运行正常,由于对两条点对点链路网段进行了可变长度子网划分,两个网段192.168.1.0/30 和192.168.1.4/30的IP地址一个都没有被浪费,这样就使紧张的IP资源得到了有效的利用。
三)配置路由归纳
RIPv2协议能自动归纳路由,如果在2514/1703的串行口连接一台路由器RouterISP,配置串行线的网段为192.168.8.0/24,那么在RouterISP上能看到路由表为:
R 192.168.1.0/24 [120/1] via 192.168.3.1, 00:00:01, Serial0
C 192.168.8.0/24 is directly connected, Serial0
路由归纳在路由器上是可以去掉的,具体配置为:
router(config)#router rip
router(config)#no auto-summary
可以查看路由表为:
192.168.1.0/24 is variably subnetted, 5 subnets, 4 masks
R 192.168.1.64/26 [120/2] via 192.168.8.1, 00:00:04, Serial0
R 192.168.1.0/30 [120/2] via 192.168.8.1, 00:00:04, Serial0
R 192.168.1.4/30 [120/2] via 192.168.8.1, 00:00:04, Serial0
R 192.168.1.128/25 [120/1] via 192.168.8.1, 00:00:04, Serial0
我们可以在端口上手动的聚合一条路由,具体配置为:
router(config)#int s0
router(config-if)#ip summary-address rip 192.168.1.0 255.255.255.248
把192.168.1.0/30和192.168.1.4/30两个网段聚合为192.168.1.0/29网段。最后结果为:
RouterISP#show ip route
192.168.1.0/24 is variably subnetted, 3 subnets, 3 masks
3
R 192.168.1.64/26 [120/2] via 192.168.8.1, 00:00:00, Serial0
R 192.168.1.0/29 [120/2] via 192.168.8.1, 00:00:00, Serial0
R 192.168.1.128/25 [120/1] via 192.168.8.1, 00:00:00, Serial0
C 192.168.8.0/24 is directly connected, Serial0
Part2:IP unnumbered
实验目的:
掌握ip unnumbered命令以及命令适用范围。
在接口上配置无编号IP地址讲义上给出了两条原则:
1. 接口必须都是串行接口,并且是被一条点到点链路连接着;
2. 在该广域网链路两端“借给”它们IP地址的局域网接口地址应属于同一个主类网络,并有相同长度的子网掩码。或者,在该广域网链路两端的局域网接口地址属于没有被划分子网的不同主类网络。
实验拓扑:
[img]http://blog.bitscn.com/UploadFiles/2006-12/1230684345.jpg[/img]
实验内容:
为了验证讲义中两条规则,我们将分几种情况配置IP unnumbered。首先,我们先对路由器进行一些基本配置:
Router A#config t Router A(config)#interface Serial0/0 Router A(config-if)#ip unnumbered FastEthernet0/0 Router A(config-if)#clockrate 56000
Router A(config-if)#no shut
Router A(config)#router rip
Router B#config t Router B(config)#interface Serial0/0 Router B(config-if)#ip unnumbered FastEthernet0/0
Router B(config-if)#clock rate 56000
Router B(config-if)#no shut
Router B(config)#router rip
规则1:同一个主类网络,并有相同长度的子网掩码
Router A#config t Router A(config)# interface FastEthernet0/0 Router A(config-if)# ip address 172.16.1.1 255.255.255.0
Router A(config-if)#no shut
Router A(config)#router rip
S0
S0
F0
F0
4
Router A(config)#network 172.16.0.0
Router B#config t Router B(config)# interface FastEthernet0/0 Router Bonfig-if)# ip address 172.16.2.1 255.255.255.0
Router Bconfig-if)#no shut
Router A(config)#router rip
Router A(config)#network 172.16.0.0
规则2:没有被划分子网的不同主类网络
Router A#config t Router A(config)# interface FastEthernet0/0 Router A(config-if)# ip address 172.16.1.1 255.255.0.0
Router A(config-if)#no shut
Router A(config)#router rip
Router A(config)#network 172.16.0.0
Router B#config t Router B(config)# interface FastEthernet0/0 Router Bonfig-if)# ip address 192.168.1.1 255.255.255.0
Router Bconfig-if)#no shut
Router A(config)#router rip
Router A(config)#network 192.168.1.0
使用show ip route查看路由表
debug ip rip events查看路由的更新信息
用ping命令检查网络的连通性
debug ip icmp查看数据包的转发情况
Cisco系列之CCNP Lab Exercise(网络安全)
一.实验目的:1. 理解Lock-and-Key的主要用途及配置方法;
2. 理解Reflexive access list的主要用途;Reflexive access list的配置步骤;
3. 掌握CBAC的主要用途和配置方法;
4. 比较三种访问控制的优缺点,所用场合的差异,以便根据不同的环境灵活选择不同的配置策略;
二.实验设备:
1700系列路由器两台,装有超级终端的计算机三台,集线器两个,网线等。
三.实验拓扑:
[img]http://blog.bitscn.com/UploadFiles/2006-12/1230572518.jpg[/img]
四.实验内容:
(一). Lock-and-Key配置实验
1.配置Lock-and-Key的常用命令:
Lock-and-Key常用的命令有以下几个:access-list,ip access-group, login tacacs , username, password&login local ,show ip interface, show access-lists。我们简单介绍一下:
access-list access-list-number dynamic dynamic-name [timeout minutes] {deny|permit} protocol source-address source-wildcard destination-address destination-wildcard :该命令使用关键字“dynamic”,它创建一个动态访问控制列表。“timeout minutes”参数指定了动态访问控制列表的绝对超时值,它代表该动态访问控制列表中每个条目的最大时间限制(以分为单位),时间到后,就算连接仍在传输数据,我们也需要重新认证。
ip access-group access-list-number {in|out}:把一个ACL表应用于路由器的具体的端口。“in”是入方向,“out”是出方向。
username username password password:“username”参数配置一个用户名,以标识用户的身份,它可以保证对用户的验证更为有效。“password”参数配置一个认证密码。“login local”一个注册命令,它将所有线路配置为根据本地用户名/口令数据库对用户进行认证。
autocommand access-enable [host] [timeout minutes]:该命令用于自动创建一个临时性访问控制列表条目,关键字“host”使该临时性条目不包括我们所在子网的其他地址,“timeout minutes”参数指定连接的闲置时间,如果连接闲置超过该时间,我们不得不重新进行认证。
show ip interface:这个命令不是ACL的特有命令,但是它可以看到一个端口上的ACL的配置信息。
show access-lists:这个命令用于查看某个ACL表里的访问控制规则。
2注意事项:
A.ACL规则
路由器是根据ACL里面的规则对数据包进行检验的,如果发现一个数据包不符合表里定义的所有规则,路由器就会把数据包丢弃。所以在写ACL规则时,如果前面几条规则是deny某种类型的数据包通过的话,那么一定要在最后加上一条perimt any,让其它不满足条件的数据包通过。
B.Lock-and-Key使用的是IP的扩展ACL,所以你在配置Lock-and-Key之前必须对ACL访问控制的原理有一个深入的理解。
C.在开始这个实验之前,建议删除各路由器的初始配置后再重新启动路由器,这样可以防止由残留配置所造成的问题。
D.在配置中带关键字“dynamic”的语句是同一个扩展ACL100的一部分。记住,对于一种协议,一个接口和一个方向只能有一个访问控制列表。
3.实验步骤
1.按上面实验拓扑图连接好设备,并配置好各设备的ip地址;
2.使用RIP协议作为该网络的路由协议,实现网络的动态路由配置。完成配置后使用show ip route,show interface,show running-configuration查看路由配置的正确性或者使用ping命令验证网络之间是否完全互连。
3. Router-A上配置动态访问控制列表:
(1)建立一个访问控制列表号为100的访问控制列表:
Router-A#config t
Router-A(config)#access-list 100 permit tcp any host 172.32.3.1 eq telnet
Router-A(config)#access-list 100 dynamic CISCO timeout 5 permit ip any any
(2)将建立的访问控制列表100应用在Router-A的f0端口上,一切从该端口进入的数据流都需要通过ACL的验证:
Router-A(config)#int f0
Router-A(config-if)# ip access-group 100 in
Router-A(config-if)#exit
(3)定义将使用Lock-and-Key的虚拟终端:
单台主机:
Router-A(config)#line vty 0 4
Router-A(config-line)#login local
Router-A(config-line)# autocommand access-enable host timeout 2
Router-A(config-line)#exit
整个子网:
Router-A(config)#line vty 0 4
Router-A(config-line)#login local
Router-A(config-line)# autocommand access-enable timeout 2
Router-A(config-line)#exit
(4)为所有需要通过Router-A而访问外部网络的用户配置用户的验证
证明(包括用户名和密码):
Router-A(config)#username CISCO password CISCO
Router-A(config)#^z
4. 验证Lock-and-Key配置是否成功:
1)使用了host命令,仅允许单台主机通过:
(1) 试着从HostB去ping HostA,到主机的ping应该失败。
(2) 在确认了防火墙阻止我们到达172.32.4.0网段之后,我们可以从HostB telnet到Router-A,我们会被提示输入用户名和密码以进行认证,输入正确的登陆信息后,telnet会话立刻被切断。这时RouterA已经在防火墙上打开了一个通道,让数据报通过。
(3) 再试着从HostB ping一下172.32.4.0网段主机,该ping是成功的。从RouterB上ping 172.32.4.0网段主机,ping不成功,因为我们用host参数规定了只有单台主机能够使用这个通道传输数据
(4) 此时可以使用show ip access lists来查看lock and key的配置:
Router-A#show ip access_lists
Extended IP access list 100
permit tcp any host 172.32.3.1 eq telnet (94 matches)
Dynamic cisco permit ip any any
permit ip host 172.32.4.2 any (19 matches) (time left 52)
可见其数据包头源地址被动态的替换为了172.32.4.2,这就是参数host的作用
2)不使用host命令,允许整个子网的所有主机通过:
(1)试着从Host_2去ping Host_1,到主机的ping应该失败。
(2)在确认了防火墙阻止我们到达172.32.4.0网段之后,我们可以从HostB telnet到Router-A,我们会被提示输入用户名和密码以进行认证,输入正确的登陆信息后,telnet会话立刻被切断。这时RouterA已经在防火墙上打开了一个通道,让数据报通过。
(3)再试着从HostB ping一下172.32.4.0网段主机,该ping是成功的,从RouterB上 ping 172.32.4.0网段主机,ping也是成功的,因为我们没有使用host参数,这使得该网段内的所有主机都能够使用这个通道传输数据
(4)此时可以使用show ip access lists来查看lock and key的配置:
Router-A#show ip access_lists
Extended IP access list 100
permit tcp any host 172.32.3.1 eq telnet (94 matches)
Dynamic cisco permit ip any any
permit ip any any (20 matches) (time left 45)
可见路由器还是让任何ip包通过。
(二). Reflexive Access List 配置实验
1概述:
按上图拓扑,在该实验中,我们在两个路由器之间启动rip路由协议。其中RouterA担当防火墙的角色,即将Reflexive access list放在RouterA的f0口处,在RouterB的f0口处连接的是172.32.2.0网段。HostB上安装FTP服务器软件,作为外部网络的一台FTP服务器.
Reflexive access list 的放置有两种方法:放在internal接口处或者放在external接口处,要弄清出两种放置方法有什么不同之处,他们分别用于什么场合上。
该实验可分别以ping命令,telnet,ftp请求三种方式来验证配置的可行性:
A: 以ping命令来证明配置是否可行:当配置完成后,在HostA上ping RouterB的f0网段内的主机ip地址,都可以有icmp包返回;但在防火墙外ping RouterA内部的网络设备时,则不能ping通。
B:以FTP方式来验证:注意,由于FTP的控制端口为21,而传输数据的端口为20,因此,当FTP client以普通方式尝试与FTP server建立会话时,会发现虽然双方已经在控制与同步方面都磋商完毕,但当FTP server开始发送第一个数据包过来时,由于它是以端口20传输的,而基于这个端口的会话的发起方属于防火墙外部,因此reflexive access list会认为该会话非法,从而不允许通过.因此在FTP client方看来,尽管已经连上了FTP server,但却看不到任何服务器的FTP目录上的内容;要想得到FTP服务,必须将client的FTP工作方式设为passive模式(这是FTP的两种工作方式之一,详细内容可参考RFC1635,RFC1579).
2.实验步骤:
1.按拓图连接好设备并打开电源;
2.按图配置好各设备地址,并在两个路由器之间启动默认路由;
3.验证路由配置的正确性:以ping命令分别在各设备上ping其他网段的设备,应保证整个网络都能互通;
4.在RouterA上配置Reflexive access list:
(1) 首先,定义一个名为FILTER-IN的inbound access list,该ACL将运行在RouterA的f0口处检查所有进入的数据包,并在其上定义了一条entry,该entry允许所有ip包通过,并且创建了一个名为IPTraffic的reflexive access list,当一个inbound packet第一次通过该接口和外面建立起会话的时候,路由器就会相应的在IPTraffic中加入一条entry,以便双方能通过该路由器对话。
RouterA(config)#ip access-list extended FILTER-IN
RouterA(config-ext-nacl)#permit ip any any reflect IPTraffic
RouterA(config-ext-nacl)#exit
(2)然后,定义一个名为FILTER-OUT的outbound access list,并将IPTraffic嵌套在该ACL中;
RouterA(config)#ip access-list extended FILTER-OUT
RouterA(config-ext-nacl)#evaluate IPTraffic
RouterA(config-ext-nacl)#exit
(3)将两个ACL应用在f0口上;
RouterA(config)#int f0
RouterA(config-if)#ip access-group FILTER-IN in
RouterA(config-if)#ip access-group FILTER-OUT out
5. 用show命令确认配置正确后,在在防火墙外部ping防火墙内部的设备时,这时是不能ping通的;而在防火墙内部设备上(如 Host A)ping外部的设备,这时icmp包则可返回,想想原因。同样,telnet方式的结果也一样.
需要注意的就是FTP访问时的问题.如果想防火墙内部的client能访问外部的FTP server,可以有两种方案选择:第一,将client的FTP访问方式设为passive模式,如果用ftp软件的话(如leapftp)一般可以设置,或者在比较高版本的ie下,在internet选项下的高级子菜单,选中”enable folder view for FTP sites”,则可以正确访问.但这需要client方懂得设置的方法;另外一种方案就是在作为防火墙的路由器端口上加上一条entry,让所有原端口为20而目的端口大于1024的包通过,比如在上面的实验中,我们可以在控制表FILTER-OUT中加入这样一条:
permit tcp any eq 20 any gt 1024 , 则可以让所有从原端口为20且目标端口大于1024的数据包通过,相当于开了一道后门,当然,这也会存在着安全隐患.
3.注意事项:
1.Reflexive access list只能定义成扩展的命名ACL,不能定义成数字的或者是标准的命名ACL;
2.由于Reflexive access list的内容是动态生成的,所以开始的时候它是一个空表,而cisco路由器对于空的ACL它是不显示出来的,因此当没有会话建立起来时,用show命令是看不到你所定义的reflexive access list的;但当实验过程中内部与外部之间建立起对话后,再用show命令查看的时候,你就会发现存在该表了;
3.必须注意,reflexive access list并不直接应用到端口上,而是嵌套在应用于该端口的另一个扩展的命名ACL上,因此它并不象其他的ACL那样,在最后用缺省的deny any any的条项;
4.弄清楚一般的ACL中关键词established与reflexive access list的区别:虽然他们表面上都似乎完成相同的功能,但事实上他们的实现原理和安全程度都不同:
established是通过检查数据包中的ACK和RST位来决定该数据包是否合法;而reflexive access list不仅仅检查这个,而且检查数据包的源地址,目标地址,端口号等,并且它有可调节的timeout,因此它比established更安全。
5.由于自反访问控制表的作用是为防火墙内部的设备提供安全保护并能正确访问外部网络,因此它必须保持内外路由信息的正确交换,换句话说,就是reflexive access list既要有效阻止外部网络设备的非法访问,也应保证路由包能在正常通过该路由器,而不被访问表所拦截.由于rip协议包是有路由器内部发出传到相邻路由器的,因此reflexive access list 不能将它所在的路由器上所发出的rip包过滤掉.因此,对于运行rip协议的网络中,reflexive access list不须做额外的配置; 而对于igrp,eigrp,ospf等路由协议来说,由于他们是可以跨路由器转发的,因此,当在防火墙外部的路由器想将其路由信息跨过运行reflexive access list的路由器送给防火墙内部的路由器时,reflexive access list将把该路由包视为由外面初始的数据包,因此会被过滤掉,从而造成路由信息交换失败.因此,要避免这种情况的出现,我们必须在用于控制进入防火墙内部的扩展访问控制表中(该实验中为FILTER-OUT)加入相应的条目,如permit eigrp any any , permit ospf any any 等.
(三). CBAC(Context-Based Access Control)配置实验 (选做)
注意:由于当前所用的2600系列路由器的IOS仍未升级,因此不支持CBAC,所以以1720路由器作为CBAC的配置平台。
配置步骤:
1. 主要的配置命令:
应用层协议审查配置:
Router(config-if)# ip inspect name inspection-name protocol [timeout seconds]
在接口上应有检查规则命令:
Router(config)#int e0
Router(config-if)#ip inspect FIREWALL out
2. 一个简单例子:一个审查HTTP协议的CBAC配置:
审查HTTP协议
Router(config-if)# ip inspect name checkhttp http
在接口上应用检查规则命令:
Router(config)#int e0
Router(config-if)#ip inspect checkhttp out
Cisco系列之CCNP Lab Exercise(BGP)
【实验目的】1. 了解BGP的基本配置
2. 了解multihop,next-hop-self的配置方法
3. 了解BGP中local preference和MED的概念与配置方法
【实验设备】
cisco1720 ----5台
实验拓扑:
[img]http://blog.bitscn.com/UploadFiles/2006-12/1230344346.jpg[/img]
【实验内容】
一、基本配置路由器,并启动BGP协议
as65500-A:
hostname as65500-a
!
enable password cisco
!
interface Loopback0
ip address 10.10.1.1 255.255.255.0
!
1
interface Serial0
ip address 172.16.1.1 255.255.255.0
!
interface Serial1
ip address 172.16.5.1 255.255.255.0
!
router bgp 65500
no synchronization
network 10.10.1.0 mask 255.255.255.0
network 172.16.1.0 mask 255.255.255.0
network 172.16.5.0 mask 255.255.255.0
neighbor 172.16.1.2 remote-as 100
neighbor 172.16.5.2 remote-as 100
no auto-summary
!
line vty 0 4
password cisco
login
as100-B:
hostname as100-b
!
enable password cisco
!
interface Loopback0
ip address 172.16.6.1 255.255.255.0
!
interface Serial0
ip address 172.16.2.1 255.255.255.0
clockrate 56000
!
interface Serial1
ip address 172.16.1.2 255.255.255.0
clockrate 56000
!
router rip
version 2
network 172.16.0.0
!
router bgp 100
no synchronization
network 172.16.1.0 mask 255.255.255.0
network 172.16.2.0 mask 255.255.255.0 2
network 172.16.6.0 mask 255.255.255.0
neighbor 172.16.1.1 remote-as 65500
neighbor 172.16.2.2 remote-as 100
!
line vty 0 4
password cisco
login
!
as100-C:
hostname AS100-C
!
enable password cisco
!
interface Loopback0
ip address 172.16.4.1 255.255.255.0
!
interface FastEthernet0/0
ip address 172.16.3.1 255.255.255.0
!
interface Serial0
ip address 172.16.2.2 255.255.255.0
!
interface Serial1
ip address 172.16.5.2 255.255.255.0
!
router rip
version 2
network 172.16.0.0
!
router bgp 100
no synchronization
network 172.16.2.0 mask 255.255.255.0
network 172.16.3.0 mask 255.255.255.0
network 172.16.4.0 mask 255.255.255.0
network 172.16.5.0 mask 255.255.255.0
neighbor 172.16.2.1 remote-as 100
neighbor 192.168.1.2 remote-as 300
neighbor 172.16.5.1 remote-as 65500
!
line vty 0 4
password cisco
login
3
as300-D
!
hostname AS300-D
!
enable password cisco
!
interface FastEthernet0/0
ip address 172.16.3.2 255.255.255.0
!
interface Serial0/0
ip address 192.168.1.1 255.255.255.0
!
router eigrp 300
network 192.168.1.0
!
ip route 0.0.0.0 0.0.0.0 172.16.3.1
line vty 0 4
password cisco
login
!
as300-E
hostname AS300-E
!
enable password cisco
!
interface Loopback0
ip address 192.168.2.1 255.255.255.0
!
interface Serial0/0
ip address 192.168.1.2 255.255.255.0
!
router eigrp 300
network 192.168.1.0
network 192.168.2.0
!
router bgp 300
network 192.168.1.0
network 192.168.2.0
neighbor 172.16.3.1 remote-as 100
!
line vty 0 4
password cisco
4
login
!
完成了路由器基本配置后,查看路由器运行BGP协议的情况。用show ip bgp查看bgp表,用show ip route 查看路由表
二、multihop
as100-C与as300-E之间不能成功建立bgp邻居关系,是因为as300中,as300-D路由器并不运行bgp协议,所以我们需要在AS300-E与AS100-C两台路由器上附加multihop配置.静态路由的添加是为了这两台路由器之间能通过tcp/ip协议互相访问,这样bgp协议才能正常工作.
具体配置如下:
as100-C:
router bgp 100
neighbor 192.168.1.2 remote-as 300
neighbor 192.168.1.2 ebgp-multihop 2
!
ip route 192.168.1.0 255.255.255.0 172.16.3.2
!
as300-E
router bgp 300
neighbor 172.16.3.1 remote-as 100
neighbor 172.16.3.1 ebgp-multihop 2
!
ip route 172.16.3.0 255.255.255.0 192.168.1.1
!
三、理解next-hop-self
通过以上配置,全部bgp邻居都建立起来了.观察bgp表,能看到全部网段的信息.但在路由表中,发现as100-B路由器并没有192.168.1.0和192.168.2.0网段的信息.是因为,as100-B并不知道192.168.1.2在哪里,所以不会把通过这个路由学来的bgp路由放到路由表中.我们需要通过next-hop-self配置,让as100-B获得的192.168.1.0和192.168.2.0网段信息不再是从192.168.1.2获得,而是从172.16.2.2获得,这样as100-B就会把这条bgp路由放到路由表中了.
配置next-hop-self前请看清楚bgp表与路由表,并与配置后的作对比
具体配置为
as100-C
router bgp 100
neighbor 172.16.2.1 next-hop-self
!
通过以上配置,我们配通了全部bgp协议,请用ping命令检查网络全部正常运行.
四、配置MED
配置MED是一个as用来控制其他as从哪个入口进来本as的方法,比如as100上,能通过配置MED,使as65500优先选择其中一条路径进入as100:
5
在as100-C上配置
router bgp 100
neighbor 172.16.5.1 remote-as 65500
neighbor 172.16.5.1 route-map setmed out
!
route-map setmed permit 10
set metric 100
!
配置后,用clear ip bgp *从起bgp协议,并用show ip bgp和show ip route查看结果
五、配置本地优先
本地优先是指as内部路由器控制自己as几个出口的优先级.比如as65500有两个出口,那么到底选择哪个作为优先呢,我们可以通过配置本地优先来控制.
as65500-a:
router bgp 65500
no synchronization
network 10.10.1.0 mask 255.255.255.0
network 172.16.1.0 mask 255.255.255.0
network 172.16.5.0 mask 255.255.255.0
neighbor 172.16.1.2 remote-as 100
neighbor 172.16.5.2 remote-as 100
neighbor 172.16.5.2 route-map setlocalpre in
!
route-map setlocalpre permit 10
set local-preference 200
!
!
line vty 0 4
password cisco
login
!
配置后,用clear ip bgp *从起bgp协议,并用show ip bgp和show ip route查看结果
六、去掉保留AS
在AS号码中65001后面的是保留AS部分,一般用作ISP内部分配用,所以在广域网上面得去掉保留得AS号码.在这里,65500是保留AS,所以as100-C发送给as300-E的时候,应该去掉这个AS,具体配置为:
as100-C
6
router bgp 100
neighbor 192.168.1.2 remove-private-as
配置后,用clear ip bgp *从起bgp协议,并用show ip bgp和show ip route查看结果 支持原创,学习中... 多谢分享 看了很多帖子,这版主真的很牛
如果能做成doc或pdf就好了,还是要谢一下
佩服,但看起来花费时间太多,应该搞个附件会更好回复 #16 cjc8915 的帖子
非常感谢 有点看不懂/顶了 真是好东西,正在学CCNP 不抛弃也不放弃!!:handshake页:
[1]