RIP routing information protocols 路由信息协议,是应用较早、使用较为普遍的igp内部网管协议,适用于小型同类网络,是距离矢量协议
RIP协议跳数作为衡量路径开销,RIP协议里规定最大跳数为15
RIP协议有两个版本v1和v2 v1属于有类路由协议,不支持VLSM,以广播形式进行路由信息的更新,更新周期为30s,v2属于无类路由协议,支持VLSM,以组播形式进行路由更新
PC2台,switch 3560 1台 routerpt 2台
ip 192.168.1.2
submask 255.255.255.0
gateway 192.168.1.1
ip 192.168.2.2
submask 255.255.255.0
gateway 192.168.2.1
en
conf t
hostname s3560
vlan 10
exit
vlan 20
exit
interface fa 0/10
switchport access vlan 10
exit
interface fa 0/20
switchport access vlan 20
exit
end
show vlan
conf t
interface vlan 10
ip address 192.168.1.1 255.255.255.0
no shutdown
exit
interface vlan 20
ip address 192.168.3.1 255.255.255.0
no shutdown
end
show ip route
show running
conf t
ip routing
router rip
network 192.168.1.0
network 192.168.3.0
version 2
end
show ip route
en
conf t
hostname r1
interface fa 0/0
no shutdown
ip address 192.168.3.2 255.255.255.0
interface serial 2/0
no shutdown
ip address 192.168.4.1 255.255.255.0
clock rate 64000
end
show ip route
conf t
router rip
network 192.168.3.0
network 192.168.4.0
version 2
exit
en
conf t
hostname r2
interface fa 0/0
no shutdown
ip address 192.168.2.1 255.255.255.0
interface serial 2/0
no shutdown
ip address 192.168.4.2 255.255.255.0
end
show ip route
conf t
router rip
network 192.168.2.0
network 192.168.4.0
version 2
end