(1)按照要求配置路由器各个端口的IP地址,保证直连链路通。
(2)配置OSPF路由协议,保证OSPF各区域路由正常;①将区域2配置成nssa区域;R2:area 2 nssa no-sunmmaryR4:area 2 nssa②区域0需要MD5认证,密码为cisco;区域2需要简单口令认证,密码ccna R1:router ospf 1area 0 authentication message-digestint s0/0ip ospf message-digest-key 1 md5 ciscoint e1/0ip ospf message-digest-key 1 md5 ciscoR2:router ospf 1area 0 authentication message-digestint s0/0ip ospf message-digest-key 1 md5 ciscoint e1/0ip ospf message-digest-key 1 md5 ciscoexitint s0/2ip ospf authenticationip ospf authentication-key ccnaR4:int s0/2ip ospf authenticationip ospf authentication-key ccna③R1的s0/0的hello interval 设置为5秒,dead-interval设置为20秒int s0/0ip ospf hell-interval 5ip ospf dead-interval 20④控制DR选举,使得R2没有机会成为DR.R2:int e1/0ip ospf priority 0(3)配置RIP V2路由协议,KEYCHAIN名字为CCIE,路由器R1和R5采用MD5验证,key的ID为1,密码为cisco,路由器R4和R6采用明文验证,密码是cisco。
R1:router ripversion 2network 192.15.1.0network 1.1.1.0no auto-summarykey chain CCIEkey 1key-string ciscoexitint e1/1ip rip authentication key-chain CCIER5:router ripversion 2network 5.0.0.0network 192.15.1.0no auto-summarykey chain CCIEkey 1key-string ciscoexitint e1/0ip rip authentication key-chain CCIER4:router ripversion 2network 192.46.1.0no auto-summaryexitdo sh ip routekey chain CCIEkey 1key-string ciscoexitint e1/0ip rip authentication key-chain CCIER6:router ripversion 2network 192.46.1.0network 6.6.6.6no auto-summaryexitkey chain CCIEkey 1key-string ciscoexitint e1/0ip rip authentication key-chain CCIE(4)配置EIGRP路由协议,采用MD5验证,KEYCHAIN名字为EI,,key的ID为1,密码为cisco,并且关闭自动汇总。
R2:key chain EIkey 1key-string ciscoexitrouter eigrp 1network 192.23.1.2 0.0.0.0no auto-summaryexitint s0/1ip authentication mode eigrp 1 md5ip authentication key-chain eigrp 1 EIR3:router eigrp 1no auto-summarynetwork 3.3.3.3 0.0.0.0network 3.3.64.3 0.0.0.0network 3.3.65.3 0.0.0.0network 3.3.66.3 0.0.0.0network 3.3.67.3 0.0.0.0network 192.23.1.3 0.0.0.0no auto-summaryexitkey chain EIkey 1key-string ciscoexitint s0/1ip authentication mode eigrp 1 md5ip authentication key-chain eigrp 1 EI(5)R1和R5配置EBGP路由协议,用环回接口做更新源,通告R5的L50和L55。
在路由器R1上配置BGP属性,使得:A: L50的as-path属性追加300 400 500B: L55的起源为EGP 600C:L50的local-preference值为2000R1:Router bgp 100bgp router-id 1.1.1.1no synchronizationneighbor 5.5.5.5 remote-as 500neighbor 5.5.5.5 ebgp-multihop 255neighbor 5.5.5.5 update-source Loopback0neighbor 5.5.5.5 route-map BGP inexitaccess-list 50 permit 50.50.50.0access-list 55 permit 55.55.55.0route-map BGP permit 10match ip address 50set local-preference 2000set as-path prepend 300 400 500!route-map BGP permit 20match ip address 55set origin egp 600R5:router bgp 500no synchronizationbgp router-id 5.5.5.5bgp log-neighbor-changesnetwork 50.50.50.0 mask 255.255.255.0network 55.55.55.0 mask 255.255.255.0neighbor 1.1.1.1 remote-as 100neighbor 1.1.1.1 ebgp-multihop 255neighbor 1.1.1.1 update-source Loopback0no auto-summary(6)在R1上向OSPF网络注入一条默认路由,并将OSPF网络重分布到BGP中,为了确保网络的畅通,请在R5上配置一条指向192.15.1.1的默认路由。
R1:router ospf 1default-information originate alwaysrouter bgp 100redistribute ospf 1R5:ip route 0.0.0.0 0.0.0.0 192.15.1.1(7)在路由器R2上执行EIGRP和OSPF的双向重分布:①将EIGRP路由重分布到OSPF时,用route-map实现,第三位为奇数的路由条目,类型为1,度量值为130,第三位为偶数的路由条目,类型为2,度量值为50,其他路由条目采用默认,不做控制。
②将OSPF路由重分布到EIGRP。
R2:access-list 1 permit 3.3.0.0 0.0.254.0access-list 2 permit 3.3.1.0 0.0.254.0route-map test permit 10match ip address 1set metric 50exitroute-map test permit 20match ip address 2set metric 130set metric-type type-1exitroute-map test permit 30exitrouter ospf 1redistribute eigrp 1 subnets route-map testexitrouter eigrp 1redistribute ospf 1 metric 100000 100 255 1 1500exit(8)在路由器R4上执行RIP和OSPF的双向重分布,RIP重分布到OSPF参数均采用默认,OSPF重分布到RIP中,metric为5。
R4:router ospf 1redistribute rip subnetsexitrouter ripredistribute ospf 1 metric 5exit(9)将R6配置成DHCP服务器,具体如下:DHCP:网络:172.1.1.0/24 默认网关:172.1.1.1 域名: ,地址排除:172.1.1.1-172.1.1.5(不需要测试)。
R6:ip dhcp excluded-address 172.1.1.1 172.1.1.5ip dhcp pool testnetwork 172.1.1.0 255.255.255.0default-router 172.1.1.1domain-name (10)配置RIPng 或者OSPFv3协议,保证IPv6路由通。
OSPF v3用MD5或者sha1的验证。
R6:ipv6 router ospf 1router-id 6.6.6.6area 0 authentication ipsec spi 2346 sha1 0123456789012345678901234567890123456789(11)在R1上配置策略路由,使从R5方向来的HTTP数据流走R1的s0/0接口,使从R5方向来的TELNET和FTP数据流走R1的F2/0接口。
R1:access-list 110 remark HTTPaccess-list 110 permit tcp any any eq wwwaccess-list 120 remark FTP and TELNETaccess-list 120 permit tcp any any eq telnetaccess-list 120 permit tcp any any eq ftp-dataaccess-list 120 permit tcp any any eq ftp route-map ABC permit 10match ip address 110set interface Serial0/0exitroute-map ABC permit 20match ip address 120set interface Ethernet1/0exitint e1/1ip policy route-map ABC。