上机报告
姓名 指导教师 学号 机房名称 9 专业班级 (I520) 实验四:路由器广域网协议配置 计科普1002 课程名称 上机日期 网络系统集成 2012 年11 月 1 日 上机项目名称 上机步骤及内容: 一、实验目的 通过实验了解在路由器上配置广域网协议的方法,掌握通过PPP和FR的配置,实现广域网络的互联。 二、实验要求 1.使用路由器完成PPP协议的配置并实现PAP认证功能 2.实现FR功能 3.理解每一步实验的作用,并记录在实验报告上 4.实验结束后上缴实验报告 1.具备以太网端口和广域网端口的路由器2台 2.两台具备以太网接口的PC机,分别连接路由器的以太网口,路由器端口、PC的IP地址可自3. 参考组网图 三、实验仪器设备和材料清单 己分配和设置,路由器之间用V.35线缆连接 图 1.1 实验组网图 四、实验内容 1.完成路由器的基本端口配置 2.实现PAP认证 3.完成FR功能 五、实验步骤 1.作路由器的端口IP地址配置,代码如下: 路由器r2 sys System 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 sys System View: return to User View with Ctrl+Z. [H3C]sysname r3 [r3]int e0/0 [r3-Ethernet0/0]ip add 192.168.33.1 24 2.配置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 tangliu New 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 UP 3. ppp协议配置后我们可以让路由器能够ping通。效果如下: [r2]ping 192.168.22.2 PING 192.168.22.2: 56 data bytes, press CTRL_C to break Reply from 192.168.22.2: bytes=56 Sequence=1 ttl=255 time=27 ms Reply from 192.168.22.2: bytes=56 Sequence=2 ttl=255 time=27 ms Reply from 192.168.22.2: bytes=56 Sequence=3 ttl=255 time=28 ms Reply from 192.168.22.2: bytes=56 Sequence=4 ttl=255 time=27 ms Reply from 192.168.22.2: bytes=56 Sequence=5 ttl=255 time=28 ms --- 192.168.22.2 ping statistics --- 5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 27/27/28 ms 4. 由于还没有配置路由,所以实验过程中,是不能够ping通路由器下面的pc机。而为了实验完整我们要配置静态路由,其配置代码以及效果如下所示: 路由器r2 [r2]ip route-static 192.168.33.0 24 192.168.22.2 [r2]ping 192.168.33.1 PING 192.168.33.1: 56 data bytes, press CTRL_C to break Reply from 192.168.33.1: bytes=56 Sequence=1 ttl=255 time=27 ms Reply from 192.168.33.1: bytes=56 Sequence=2 ttl=255 time=27 ms Reply from 192.168.33.1: bytes=56 Sequence=3 ttl=255 time=28 ms Reply from 192.168.33.1: bytes=56 Sequence=4 ttl=255 time=27 ms Reply from 192.168.33.1: bytes=56 Sequence=5 ttl=255 time=28 ms --- 192.168.33.1 ping statistics --- 5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-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.1 PING 192.168.11.1: 56 data bytes, press CTRL_C to break Reply from 192.168.11.1: bytes=56 Sequence=1 ttl=255 time=28 ms Reply from 192.168.11.1: bytes=56 Sequence=2 ttl=255 time=28 ms Reply from 192.168.11.1: bytes=56 Sequence=3 ttl=255 time=27 ms Reply from 192.168.11.1: bytes=56 Sequence=4 ttl=255 time=27 ms Reply from 192.168.11.1: bytes=56 Sequence=5 ttl=255 time=28 ms --- 192.168.11.1 ping statistics --- 5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 27/27/28 ms 5. 查看路由表 路由器r2 [r2]display ip routing-table Routing Tables: Public Destinations : 10 Routes : 10 Destination/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-table Routing Tables: Public Destinations : 8 Routes : 8 Destination/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 InLoop0 6.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 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 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 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]quit 4.配置默认路由 [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.1 6.验证配置 路由器r2 查看端口S1/0的显示情况 [r2]dis int s1/0 Serial1/0 current state: UP Line protocol current state: UP Description: Serial1/0 Interface The Maximum Transmit Unit is 1500, Hold timer is 10(sec) Internet Address is 192.168.22.1/24 Primary Link layer protocol is FR IETF LMI DLCI is 0, LMI type is Q.933a, frame relay DCE