TTEP.CN > 手机 >
动态路由RIP的配置
动态路由RIP的配置
RIP用UDP 报文交换路由信息。路由器每30秒发送一次路由更新通告。如果路由器超过180秒没有从另一路由器获得路由更新报文。则认为先前来自那个路由器的路由不能使用。如果在240秒任然没有收到更新报文则删除路由RIP的特点:
属于典型的距离向量路由协议。
路由选择的度量值是跳数。最大跳数为15,16 代表无穷大——不可达。
缺省情况下每30秒发送一次路由更新。
支持在多条路径上均衡流量。
RIP1是有类的,不支持CIDR和VLSM;RIP2是无类的支持CIDR和VLSM。
简单的RIP配置:
拓扑图:
首先对router0进行配置:
Router>en
Router#config
Configuring from terminal, memory, or network [terminal]? t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#config ter
%Invalid hex value
Router(config)#inter s1/0
Router(config-if)#ip add 192.168.7.254 255.255.255.0
Router(config-if)#no shutd
%LINK-5-CHANGED: Interface Serial1/0, changed state to down
Router(config-if)#
Router(config-if)#exit
Router(config)#interface Serial1/0
Router(config-if)#clock rate 64000
Router(config-if)#inter s1/1
Router(config-if)#ip add 192.168.1.1 255.255.255.0
Router(config-if)#no shutd
%LINK-5-CHANGED: Interface Serial1/1, changed state to down
Router(config-if)#inter f0/0
Router(config-if)#ip add 192.168.5.254 255.255.255.0
Router(config-if)#no shutd
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
Router(config-if)#exit
Router(config)#router rip
Router(config-router)#network 192.168.5.0
Router(config-router)#network 192.168.7.0
Router(config-router)#network 192.168.1.0
对router1进行配置:
Router>en
Router#config ter
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#inter s1/0
Router(config-if)#ip add 192.168.1.2 255.255.255.0
Router(config-if)#no shutd
%LINK-5-CHANGED: Interface Serial1/0, changed state to up
Router(config-if)#exit
Router(config)#inter s1/0
Router(config-if)#clock rate 64000
Router(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/0, changed state to up
Router(config-if)#exit
Router(config)#inter f0/0
Router(config-if)#ip add 172.168.1.1 255.255.255.0
Router(config-if)#no shutd
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
Router(config-if)#exit
Router(config)#router rip
Router(config-router)#network 192.168.1.0
Router(config-router)#network 172.168.1.0
Router(config-router)#
router2进行配置:
Router>en
Router#config ter
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#inter s1/0
Router(config-if)#ip add 192.168.7.21 255.255.255.0
Router(config-if)#no shutd
%LINK-5-CHANGED: Interface Serial1/0, changed state to up
Router(config-if)#in
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/0, changed state to upt
^
% Invalid input detected at '^' marker.
Router(config-if)#inter f0/0
Router(config-if)#ip add 192.168.25.1 255.255.255.0
Router(config-if)#no shutd
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
Router(config-if)#exit
Router(config)#router rip
Router(config-router)#network 192.168.7.0
Router(config-router)#network 192.168.25.0
Router(config-router)#
主机pc0ping主机pc1和pc2.
RIP用UDP 报文交换路由信息。路由器每30秒发送一次路由更新通告。如果路由器超过180秒没有从另一路由器获得路由更新报文。则认为先前来自那个路由器的路由不能使用。如果在240秒任然没有收到更新报文则删除路由RIP的特点:
属于典型的距离向量路由协议。
路由选择的度量值是跳数。最大跳数为15,16 代表无穷大——不可达。
缺省情况下每30秒发送一次路由更新。
支持在多条路径上均衡流量。
RIP1是有类的,不支持CIDR和VLSM;RIP2是无类的支持CIDR和VLSM。
简单的RIP配置:
拓扑图:
首先对router0进行配置:
Router>en
Router#config
Configuring from terminal, memory, or network [terminal]? t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#config ter
%Invalid hex value
Router(config)#inter s1/0
Router(config-if)#ip add 192.168.7.254 255.255.255.0
Router(config-if)#no shutd
%LINK-5-CHANGED: Interface Serial1/0, changed state to down
Router(config-if)#
Router(config-if)#exit
Router(config)#interface Serial1/0
Router(config-if)#clock rate 64000
Router(config-if)#inter s1/1
Router(config-if)#ip add 192.168.1.1 255.255.255.0
Router(config-if)#no shutd
%LINK-5-CHANGED: Interface Serial1/1, changed state to down
Router(config-if)#inter f0/0
Router(config-if)#ip add 192.168.5.254 255.255.255.0
Router(config-if)#no shutd
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
Router(config-if)#exit
Router(config)#router rip
Router(config-router)#network 192.168.5.0
Router(config-router)#network 192.168.7.0
Router(config-router)#network 192.168.1.0
对router1进行配置:
Router>en
Router#config ter
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#inter s1/0
Router(config-if)#ip add 192.168.1.2 255.255.255.0
Router(config-if)#no shutd
%LINK-5-CHANGED: Interface Serial1/0, changed state to up
Router(config-if)#exit
Router(config)#inter s1/0
Router(config-if)#clock rate 64000
Router(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/0, changed state to up
Router(config-if)#exit
Router(config)#inter f0/0
Router(config-if)#ip add 172.168.1.1 255.255.255.0
Router(config-if)#no shutd
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
Router(config-if)#exit
Router(config)#router rip
Router(config-router)#network 192.168.1.0
Router(config-router)#network 172.168.1.0
Router(config-router)#
router2进行配置:
Router>en
Router#config ter
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#inter s1/0
Router(config-if)#ip add 192.168.7.21 255.255.255.0
Router(config-if)#no shutd
%LINK-5-CHANGED: Interface Serial1/0, changed state to up
Router(config-if)#in
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/0, changed state to upt
^
% Invalid input detected at '^' marker.
Router(config-if)#inter f0/0
Router(config-if)#ip add 192.168.25.1 255.255.255.0
Router(config-if)#no shutd
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
Router(config-if)#exit
Router(config)#router rip
Router(config-router)#network 192.168.7.0
Router(config-router)#network 192.168.25.0
Router(config-router)#
主机pc0ping主机pc1和pc2.
- 最近发表
- 赞助商链接