6.1

发布时间 2023-06-11 08:52:15作者: 意い十三章

实验二 路由器动态路由的配置方法
一、实验目的:
1.理解动态路由的工作原理;
2. 学习并掌握动态路由协议RIP的配置;
3.学习并掌握动态路由协议OSPF的配置;
4.进一步学习路由器的配置命令。
二、实验原理:
  RIP:Routing Information Protocol,路由信息协议,是应用较早、使用较普遍的IGP内部网关协议,适用于小型同类网络,是典型的距离矢量协议。
  RIP协议跳数作为衡量路径开销的,RIP协议里规定最大跳数为15。
  RIP协议有两个版本RIPv1和RIPv2。
  RIPv1属于有类路由协议,不支持VLSM(变长子网掩码),RIPv1是以广播的形式进行路由信息的更新的;更新周期为30秒。
  RIPv2属于无类路由协议,支持VLSM(变长子网掩码),RIPv2是以组播的形式进行路由信息的更新的,组播地址是224.0.0.9。RIPv2还支持基于端口的认证,提高网络的安全性。
  OSPF协议用链路状态来评估路由,可用于规模很大的网络。
  OSPF可通过区域划分网络,对于规模较小的网络一般只设置一个区域0,对于规模较大的网络,可划分多个区域,其中区域0是必不可少的,它用于连接其它各区域。
  OSPF协议采用组播方式进行OSPF包交换,组播地址为224.0.0.5(全部OSPF路由器)和224.0.06(指定路由器)。
  OSPF协议的管理距离是110,低于RIP协议的120,所以如果设备同时运行OSPF协议和RIP协议,则OSPF协议产生的路由优先级高。
三、实验设备:
计算机、三层交换机、路由器
四、实验拓扑图:

五、实验过程:
1)三层交换机的基本配置

Switch(config)#vlan 10
Switch(config-vlan)#
Switch(config-vlan)#
Switch(config-vlan)#end
Switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#interface FastEthernet0/1
Switch(config-if)#
%SYS-5-CONFIG_I: Configured from console by console

Switch(config-if)#exit
Switch(config)#interface FastEthernet0/1
Switch(config-if)#
Switch(config-if)#
Switch(config-if)#switchport access vlan 10
Switch(config-if)#exit
Switch(config)#vlan 50
Switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#interface FastEthernet0/1
Switch(config-if)#
%SYS-5-CONFIG_I: Configured from console by console

Switch(config-if)#exit
Switch(config)#interface FastEthernet0/2
Switch(config-if)#switchport access vlan 50
Switch(config-if)#exit
Switch(config)#interface vlan 10
Switch(config-if)#
%LINK-5-CHANGED: Interface Vlan10, changed state to up

Switch(config-if)#ip address 172.16.1.2 255.255.255.0
Switch(config-if)#exit
Switch(config)#interface vlan 50
Switch(config-if)#
%LINK-5-CHANGED: Interface Vlan50, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan50, changed state to up
Switch(config-if)#ip address 172.16.5.1 255.255.255.0
Switch(config-if)#no shutdown


验证测试:
Switch#show ip interface
FastEthernet0/1 is down, line protocol is down
Internet protocol processing disabled
FastEthernet0/2 is up, line protocol is up
Internet protocol processing disabled
FastEthernet0/3 is down, line protocol is down
Internet protocol processing disabled
FastEthernet0/4 is down, line protocol is down
Internet protocol processing disabled
FastEthernet0/5 is down, line protocol is down
Internet protocol processing disabled
FastEthernet0/6 is down, line protocol is down
Internet protocol processing disabled
FastEthernet0/7 is down, line protocol is down
Internet protocol processing disabled
FastEthernet0/8 is down, line protocol is down
Internet protocol processing disabled
FastEthernet0/9 is down, line protocol is down
Internet protocol processing disabled
FastEthernet0/10 is down, line protocol is down
Internet protocol processing disabled
FastEthernet0/11 is down, line protocol is down
Internet protocol processing disabled

--More--