Dynamic Routing
Dynamic Routing
- Based on some kind of routing protocol
Dynamic Routing Features
-
Reducing the administrative tasks
- Take up network bandwidth
Dynamic Routing Protocol Overview
- Routers used to exchange information between the language of
metric
- Article number (as possible)
- Bandwidth (the bigger the better)
- Load cutover routing is generally done at night
- Delay (in the case of multi-broadcast, when routing long ....)
- reliability
- Cost (path cost, bandwidth, link costs)
convergence
- So that all routing tables are consistent state of the process
Comparative static routing and dynamic routing
- Network, static routing and dynamic routing complement each other
According to the classification routing algorithm executed
Distance vector routing protocol
-
Based router from a source network to a target network through which the number of routing
- RIP、IGRP
Link-state routing protocol
-
Considering all network paths from source to destination network routing case
- OSPF、IS-IS
RIP routing
RIP routing protocol works
RIP is a distance - vector routing protocol
The basic concept of the RIP
-
Regularly update
-
neighbor
-
Radio Update
- Full routing table updates
Forming the routing table
- Routing learn to direct routes
- When the update cycle to the 30s, the router sends a routing table to neighbors
- A few 30s, the second update cycle to again transmit routing table
RIP metric value Article Number
- The maximum number of 15 hops 16 hops is unreachable
RIP update
- Every 30s sends routing update messages, UDP520 port
RIP routing update messages
- Transmitting entire routing table information
Routing loops
- While maintaining the routing table information, if changes in the topology, the network had a slow convergence of contradictory or inconsistent entries in routing, route loops will occur under these conditions, the router can not reach the network routing ignored, causing the user's data packets sent over the network constantly circulating, eventually leading to serious waste of network resources.
Perform split horizon prevents routing loops may occur
- Learn from one interface to the routing information is no longer sent out from this interface
- While also reducing the link bandwidth resource occupied by routing update information
RIP configuration
Enable RIP
router rip
Declared the network ID
network network-number
View the configuration of routing protocols
show ip portocols
The difference between RIP v1 and RIP v2 of
version | RIP v1 | RIP v2 |
---|---|---|
the difference | There are class routing protocol | Classless routing protocol |
Radio update (255.255.225.255) | Multicast update (224.0.0.9) | |
Does not support VLSM | Support VLSM | |
Automatic route summarization, can not be closed | Automatically closable summary, the summary can be manually | |
It does not support discontinuous subnets | Support discontinuous subnets |
RIP v2 Configuration
-
Enable version v2
router rip
version 2
-
RIP v2 turn off the automatic route summarization
no auto-summary
Demo
Transformation experiments:
GNS 3 installed software, and the software installed in the routing mirror
GNS 3 download use c3725 routing image files
Construction of the experiment topology
1, constructed in GNS 3 network topology, using three routing device provided in the dynamic routing RIP routing device, PC1 and PC2 are interconnected. (Note that the interface is divided into segments)
2, all the equipment is turned on, and the first routing device R2, and adds information network interfaces
R2#conf t //进入全局模式
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#int f0/0 //进入f0/0接口
R2(config-if)#ip add 192.168.10.1 255.255.255.0 //添加网段
R2(config-if)#no shut //开启接口
R2(config-if)#
*Mar 1 00:03:21.759: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
*Mar 1 00:03:22.759: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
R2(config-if)#exit //退出接口
R2(config)#int f0/1 //进入f0/1接口
R2(config-if)#ip add 192.168.20.1 255.255.255.252 //添加网段
R2(config-if)#no shut //开启接口
R2(config-if)#
*Mar 1 00:04:13.043: %LINK-3-UPDOWN: Interface FastEthernet0/1, changed state to up
*Mar 1 00:04:14.043: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
R2(config)#do show ip rout //查看路由表,查看网段是否成功添加
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
C 192.168.10.0/24 is directly connected, FastEthernet0/0 //成功添加网段
192.168.20.0/30 is subnetted, 1 subnets
C 192.168.20.0 is directly connected, FastEthernet0/1
3, into the routing device R1, and adds information on the interface network
R1#conf t //进入全局模式
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#int f0/0 //进入f0/0接口
R1(config-if)#ip add 192.168.20.2 255.255.255.252 //添加网段
R1(config-if)#no shut //开启接口
R1(config-if)#
*Mar 1 00:11:18.063: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
*Mar 1 00:11:19.063: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
R1(config-if)#exit //退出接口
R1(config)#int f0/1 //进入f0/1接口
R1(config-if)#ip add 192.168.30.1 255.255.255.252 //添加网段
R1(config-if)#no shut //开启接口
R1(config-if)#
*Mar 1 00:12:22.463: %LINK-3-UPDOWN: Interface FastEthernet0/1, changed state to up
*Mar 1 00:12:23.463: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
R1(config-if)#exit
R1(config)#do show ip rout //查看路由表,查看网段是否成功添加
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
192.168.30.0/30 is subnetted, 1 subnets
C 192.168.30.0 is directly connected, FastEthernet0/1 //成功添加网段
192.168.20.0/30 is subnetted, 1 subnets
C 192.168.20.0 is directly connected, FastEthernet0/0
4, into the routing device R3, and adds information network interfaces
R3#conf t //进入全局模式
Enter configuration commands, one per line. End with CNTL/Z.
R3(config)#int f0/0 //进入f0/0接口
R3(config-if)#ip add 192.168.30.2 255.255.255.252 //添加网段
R3(config-if)#no shut //开启接口
R3(config-if)#
*Mar 1 00:15:54.763: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
*Mar 1 00:15:55.763: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
R3(config-if)#exit //退出接口
R3(config)#int f0/1 //进入f0/1接口
R3(config-if)#ip add 192.168.40.1 255.255.255.0 //添加网段
R3(config-if)#no shut //开启接口
R3(config-if)#
*Mar 1 00:16:36.811: %LINK-3-UPDOWN: Interface FastEthernet0/1, changed state to up
*Mar 1 00:16:37.811: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
R3(config-if)#exit
R3(config)#do show ip rout //查看路由表,查看网段是否成功添加
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
192.168.30.0/30 is subnetted, 1 subnets
C 192.168.30.0 is directly connected, FastEthernet0/0 //成功添加网段
C 192.168.40.0/24 is directly connected, FastEthernet0/1
5, respectively, configured IP addresses on both the PC
PC1> ip 192.168.10.2 192.168.10.1 //添加IP地址及网关
Checking for duplicate address...
PC1 : 192.168.10.2 255.255.255.0 gateway 192.168.10.1 //成功配置IP地址
PC2> ip 192.168.40.2 192.168.40.1 //添加IP地址及网关
Checking for duplicate address...
PC1 : 192.168.40.2 255.255.255.0 gateway 192.168.40.1 //成功配置IP地址
6, back to the R2 routing device, add the RIP routing protocol
R2(config)#router rip //进入路由进程
R2(config-router)#network 192.168.10.0 //宣告直连网段
R2(config-router)#network 192.168.20.0 //宣告直连网段
R2(config-router)#version 2 //启用版本 2
R2(config-router)#no auto-summary //关闭路由自动汇总功能
R2(config-router)#exit //完成后退出路由进程
7, the routing device R1, the RIP routing protocol is added
R1(config)#router rip //进入路由进程
R1(config-router)#network 192.168.20.0 //宣告直连网段
R1(config-router)#network 192.168.30.0 //宣告直连网段
R1(config-router)#version 2 //启用版本 2
R1(config-router)#no auto-summary //关闭路由自动汇总功能
R1(config-router)#exit //完成后退出路由进程
8, the routing device R3, the RIP routing protocol is added
R3(config)#router rip //进入路由进程
R3(config-router)#network 192.168.30.0 //宣告直连网段
R3(config-router)#network 192.168.40.0 //宣告直连网段
R3(config-router)#version 2 //启用版本 2
R3(config-router)#no auto-summary //关闭路由自动汇总功能
R3(config-router)#exit //完成后退出路由进程
9, respectively, view the routing device in the routing table, the success of automatic learning network segment information
R2(config)#do show ip rout //查看R2路由设备路由表
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
192.168.30.0/30 is subnetted, 1 subnets
R 192.168.30.0 [120/1] via 192.168.20.2, 00:00:14, FastEthernet0/1 //成功学习网段
C 192.168.10.0/24 is directly connected, FastEthernet0/0
R 192.168.40.0/24 [120/2] via 192.168.20.2, 00:00:14, FastEthernet0/1 //成功学习网段
192.168.20.0/30 is subnetted, 1 subnets
C 192.168.20.0 is directly connected, FastEthernet0/1
R1(config)#do show ip rout //查看R1路由设备路由表
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
192.168.30.0/30 is subnetted, 1 subnets
C 192.168.30.0 is directly connected, FastEthernet0/1
R 192.168.10.0/24 [120/1] via 192.168.20.1, 00:00:05, FastEthernet0/0 //成功学习网段
R 192.168.40.0/24 [120/1] via 192.168.30.2, 00:00:05, FastEthernet0/1 //成功学习网段
192.168.20.0/30 is subnetted, 1 subnets
C 192.168.20.0 is directly connected, FastEthernet0/0
R3(config)#do show ip rout //查看R3路由设备路由表
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
192.168.30.0/30 is subnetted, 1 subnets
C 192.168.30.0 is directly connected, FastEthernet0/0
R 192.168.10.0/24 [120/2] via 192.168.30.1, 00:00:15, FastEthernet0/0 //成功学习网段
C 192.168.40.0/24 is directly connected, FastEthernet0/1
192.168.20.0/30 is subnetted, 1 subnets
R 192.168.20.0 [120/1] via 192.168.30.1, 00:00:15, FastEthernet0/0 //成功学习网段
10, use the ping command in the PC to see if two PC communicate with each other
PC1> ping 192.168.40.2 //使用ping命令查看是否与PC2通信
192.168.40.2 icmp_seq=1 timeout
192.168.40.2 icmp_seq=2 timeout
192.168.40.2 icmp_seq=3 timeout
84 bytes from 192.168.40.2 icmp_seq=4 ttl=61 time=52.159 ms //成功通信
84 bytes from 192.168.40.2 icmp_seq=5 ttl=61 time=52.522 ms