上机报告姓名学号9 专业班级计科普1002课程名称网络系统集成指导教师机房名称(I520)上机日期2012 年11 月1 日上机项目名称实验四:路由器广域网协议配置上机步骤及内容:一、实验目的通过实验了解在路由器上配置广域网协议的方法,掌握通过PPP和FR的配置,实现广域网络的互联。
二、实验要求1.使用路由器完成PPP协议的配置并实现PAP认证功能2.实现FR功能3.理解每一步实验的作用,并记录在实验报告上4.实验结束后上缴实验报告三、实验仪器设备和材料清单1.具备以太网端口和广域网端口的路由器2台2.两台具备以太网接口的PC机,分别连接路由器的以太网口,路由器端口、PC的IP地址可自己分配和设置,路由器之间用V.35线缆连接3.参考组网图图 1.1 实验组网图四、实验内容1.完成路由器的基本端口配置2.实现PAP认证3.完成FR功能五、实验步骤1.作路由器的端口IP地址配置,代码如下:路由器r2<H3C>sysSystem View: return to User View with Ctrl+Z.[H3C]sysname r2[r2]int e0/1[r2-Ethernet0/1]ip add 192.168.11.1 24[r2-Ethernet0/1]%Nov 1 12:58:20:946 2012 r2 IFNET/4/UPDOWN:Line protocol on the interface Ethernet0/1 is UP路由器r3<H3C>sysSystem View: return to User View with Ctrl+Z.[H3C]sysname r3[r3]int e0/0[r3-Ethernet0/0]ip add 192.168.33.1 242.配置PPP协议,PAP认证路由器r2[r2]int Serial 1/0[r2-Serial1/0]link-protocol ppp[r2-Serial1/0]ppp authentication-mode pap[r2-Serial1/0]quit[r2]local-user tangliuNew local user added.[r2-luser-tangliu]password simple 123456[r2-luser-tangliu]service-type ppp[r2-luser-tangliu]quit[r2]int Serial 1/0[r2-Serial1/0]ip add 192.168.22.1 24路由器r3[r3]int Serial 2/0[r3-Serial2/0]link-protocol ppp[r3-Serial2/0]ppp authentication-mode pap[r3-Serial2/0]ppp pap local-user tangliu password simple 123456 [r3-Serial2/0]ip add 192.168.22.2 24[r3-Serial2/0]%Nov 1 13:18:59:122 2012 r3 IFNET/4/UPDOWN:Protocol PPP IPCP on the interface Serial2/0 is UP3. ppp协议配置后我们可以让路由器能够ping通。
效果如下:[r2]ping 192.168.22.2PING 192.168.22.2: 56 data bytes, press CTRL_C to breakReply from 192.168.22.2: bytes=56 Sequence=1 ttl=255 time=27 msReply from 192.168.22.2: bytes=56 Sequence=2 ttl=255 time=27 msReply from 192.168.22.2: bytes=56 Sequence=3 ttl=255 time=28 msReply from 192.168.22.2: bytes=56 Sequence=4 ttl=255 time=27 msReply from 192.168.22.2: bytes=56 Sequence=5 ttl=255 time=28 ms--- 192.168.22.2 ping statistics ---5 packet(s) transmitted5 packet(s) received0.00% packet lossround-trip min/avg/max = 27/27/28 ms4. 由于还没有配置路由,所以实验过程中,是不能够ping通路由器下面的pc机。
而为了实验完整我们要配置静态路由,其配置代码以及效果如下所示:路由器r2[r2]ip route-static 192.168.33.0 24 192.168.22.2[r2]ping 192.168.33.1PING 192.168.33.1: 56 data bytes, press CTRL_C to breakReply from 192.168.33.1: bytes=56 Sequence=1 ttl=255 time=27 msReply from 192.168.33.1: bytes=56 Sequence=2 ttl=255 time=27 msReply from 192.168.33.1: bytes=56 Sequence=3 ttl=255 time=28 msReply from 192.168.33.1: bytes=56 Sequence=4 ttl=255 time=27 msReply from 192.168.33.1: bytes=56 Sequence=5 ttl=255 time=28 ms--- 192.168.33.1 ping statistics ---5 packet(s) transmitted5 packet(s) received0.00% packet lossround-trip min/avg/max = 27/27/28 ms路由器r3[r3]ip route-static 192.168.11.0 24 192.168.22.1[r3]ping 192.168.11.1PING 192.168.11.1: 56 data bytes, press CTRL_C to breakReply from 192.168.11.1: bytes=56 Sequence=1 ttl=255 time=28 msReply from 192.168.11.1: bytes=56 Sequence=2 ttl=255 time=28 msReply from 192.168.11.1: bytes=56 Sequence=3 ttl=255 time=27 msReply from 192.168.11.1: bytes=56 Sequence=4 ttl=255 time=27 msReply from 192.168.11.1: bytes=56 Sequence=5 ttl=255 time=28 ms--- 192.168.11.1 ping statistics ---5 packet(s) transmitted5 packet(s) received0.00% packet lossround-trip min/avg/max = 27/27/28 ms5. 查看路由表路由器r2[r2]display ip routing-tableRouting Tables: PublicDestinations : 10 Routes : 10Destination/Mask Proto Pre Cost NextHop Interface 127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0 127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0 192.168.1.0/24 Direct 0 0 192.168.1.1 Eth0/0 192.168.1.1/32 Direct 0 0 127.0.0.1 InLoop0 192.168.11.0/24 Direct 0 0 192.168.11.1 Eth0/1 192.168.11.1/32 Direct 0 0 127.0.0.1 InLoop0 192.168.22.0/24 Direct 0 0 192.168.22.1 S1/0 192.168.22.1/32 Direct 0 0 127.0.0.1 InLoop0 192.168.22.2/32 Direct 0 0 192.168.22.2 S1/0 192.168.33.0/24 Static 60 0 192.168.22.2 S1/0路由器r3[r3]display ip routing-tableRouting Tables: PublicDestinations : 8 Routes : 8Destination/Mask Proto Pre Cost NextHop Interface 127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0 127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0 192.168.11.0/24 Static 60 0 192.168.22.1 S2/0 192.168.22.0/24 Direct 0 0 192.168.22.2 S2/0 192.168.22.1/32 Direct 0 0 192.168.22.1 S2/0 192.168.22.2/32 Direct 0 0 127.0.0.1 InLoop0 192.168.33.0/24 Direct 0 0 192.168.33.1 Eth0/0 192.168.33.1/32 Direct 0 0 127.0.0.1 InLoop06.FR配置路由器r2[r2]int Serial 1/0[r2-Serial1/0]link-protocol fr[r2-Serial1/0]fr interface-type dce[r2-Serial1/0]fr dlci 30#Nov 1 13:50:21:779 2012 r2 FR/4/TRAP:1.3.6.1.2.1.10.32.0.1<frDLCIStatusChange> frDLCIStatusChange send already! Interface 2818096, DLCI 30, State is 3[r2-fr-dlci-Serial1/0-20]quit[r2-Serial1/0]fr inarp[r2-Serial1/0]ip add 192.168.22.1 24[r2-Serial1/0]fr map ip 192.168.22.2 20路由器r3[r3]int Serial 2/0[r3-Serial2/0]link-protocol fr[r3-Serial2/0]%Nov 1 14:10:04:605 2012 r3 IFNET/4/LINK UPDOWN:Serial2/0: link status is UP#Nov 1 14:10:04:616 2012 r3 FR/4/TRAP:1.3.6.1.2.1.10.32.0.1<frDLCIStatusChange> frDLCIStatusChange send already! Interface 2818144, DLCI 20, State is 2%Nov 1 14:10:04:617 2012 r3 IFNET/4/UPDOWN:Line protocol on the interface Serial2/0 is UP[r3-Serial2/0]fr interface-type dte[r3-Serial2/0]fr dlci 30#Nov 1 14:10:35:349 2012 r3 FR/4/TRAP:1.3.6.1.2.1.10.32.0.1<frDLCIStatusChange> frDLCIStatusChange send already! Interface 2818144, DLCI 20, State is 3[r3-fr-dlci-Serial2/0-30]quit[r3-Serial2/0]fr inarp[r3-Serial2/0]ip add 192.168.22.2 24[r3-Serial2/0]fr map ip 192.168.22.1 30[r3-Serial2/0]quit4.配置默认路由[r2]ip route-static 0.0.0.0 24 192.168.22.2[r3]ip route-static 0.0.0.0 24 192.168.22.16.验证配置路由器r2查看端口S1/0的显示情况[r2]dis int s1/0Serial1/0 current state: UPLine protocol current state: UPDescription: Serial1/0 InterfaceThe Maximum Transmit Unit is 1500, Hold timer is 10(sec)Internet Address is 192.168.22.1/24 PrimaryLink layer protocol is FR IETFLMI DLCI is 0, LMI type is Q.933a, frame relay DCELMI status enquiry timeout 39, LMI message discarded 0Output queue : (Urgent queuing : Size/Length/Discards) 0/100/0Output queue : (Protocol queuing : Size/Length/Discards) 0/500/0Output queue : (FIFO queuing : Size/Length/Discards) 0/75/0Physical layer is synchronous, Baudrate is 64000 bpsInterface is DCE, Cable type is V35, Clock mode is DCECLKLast clearing of counters: NeverLast 300 seconds input rate 1.29 bytes/sec, 10 bits/sec, 0.10 packets/sec Last 300 seconds output rate 1.38 bytes/sec, 11 bits/sec, 0.10 packets/sec Input: 160 packets, 2598 bytes0 broadcasts, 0 multicasts3 errors, 0 runts, 0 giants0 CRC, 3 align errors, 0 overruns0 dribbles, 0 aborts, 0 no buffers0 frame errorsOutput:137 packets, 2321 bytes0 errors, 0 underruns, 0 collisions0 deferredDCD=UP DTR=UP DSR=UP RTS=UP CTS=UP用ping命令验证配置成功与否[r2]ping 192.168.22.2PING 192.168.22.2: 56 data bytes, press CTRL_C to breakReply from 192.168.22.2: bytes=56 Sequence=1 ttl=255 time=27 msReply from 192.168.22.2: bytes=56 Sequence=2 ttl=255 time=27 msReply from 192.168.22.2: bytes=56 Sequence=3 ttl=255 time=28 msReply from 192.168.22.2: bytes=56 Sequence=4 ttl=255 time=27 msReply from 192.168.22.2: bytes=56 Sequence=5 ttl=255 time=28 ms --- 192.168.22.2 ping statistics ---5 packet(s) transmitted5 packet(s) received0.00% packet lossround-trip min/avg/max = 27/27/28 ms路由器r3查看端口S2/0的显示情况[r3]dis int s2/0Serial2/0 current state: UPLine protocol current state: UPDescription: Serial2/0 InterfaceThe Maximum Transmit Unit is 1500, Hold timer is 10(sec)Internet Address is 192.168.22.2/24 PrimaryLink layer protocol is FR IETFLMI DLCI is 0, LMI type is Q.933a, frame relay DTELMI status timeout 0, LMI message discarded 0Output queue : (Urgent queuing : Size/Length/Discards) 0/100/0Output queue : (Protocol queuing : Size/Length/Discards) 0/500/0Output queue : (FIFO queuing : Size/Length/Discards) 0/75/0Physical layer is synchronous, Virtual baudrate is 64000 bpsInterface is DTE, Cable type is V35, Clock mode is DTECLK1Last clearing of counters: NeverLast 300 seconds input rate 1.38 bytes/sec, 11 bits/sec, 0.10 packets/secLast 300 seconds output rate 1.29 bytes/sec, 10 bits/sec, 0.10 packets/secInput: 141 packets, 2378 bytes0 broadcasts, 0 multicasts2 errors, 0 runts, 0 giants0 CRC, 2 align errors, 0 overruns0 dribbles, 0 aborts, 0 no buffers0 frame errorsOutput:167 packets, 2698 bytes0 errors, 0 underruns, 0 collisions0 deferredDCD=UP DTR=UP DSR=UP RTS=UP CTS=UP用ping命令查看配置成功与否[r3]ping 192.168.22.1PING 192.168.22.1: 56 data bytes, press CTRL_C to breakReply from 192.168.22.1: bytes=56 Sequence=1 ttl=255 time=27 msReply from 192.168.22.1: bytes=56 Sequence=2 ttl=255 time=28 msReply from 192.168.22.1: bytes=56 Sequence=3 ttl=255 time=27 msReply from 192.168.22.1: bytes=56 Sequence=4 ttl=255 time=28 msReply from 192.168.22.1: bytes=56 Sequence=5 ttl=255 time=27 ms--- 192.168.22.1 ping statistics ---5 packet(s) transmitted5 packet(s) received0.00% packet lossround-trip min/avg/max = 27/27/28 ms六、思考题在路由器上做PPP配置,还有哪些认证方式?如何实现?在路由器上做ppp配置,还有chap认证方式。