Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Redistribute

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

Redistribute

Dynamips simulator

Cisco IOS Software, 3700 Software (C3745-ADVIPSERVICESK9-M), Version 12.4 (4) T, RELEASE SOFTWARE (fc1)

Topological structure

As shown in the following figure, a static route (default route) is used between R1 and R2, and RIP,R1 is used between R1 and R3, EIGRP,R1 is used between R4 and OSPF is used between R5.

The operation process is as follows

I. basic configuration

Set the port IP according to the network topology diagram to ensure that neighboring ports can ping each other.

Configuration is brief.

Second, routing configuration

To facilitate testing, use the no auto-summary command to turn off automatic summarization when configuring dynamic routes (OSPF does not summarize by default, and there is no no auto-summary command).

R1, each port is configured with different routes as required

R1 (config) # ip route 2.2.2.0 255.255.255.0 192.168.2.2

R1 (config) # router rip

R1 (config-router) # net 192.168.3.0

R1 (config-router) # version 2

R1 (config-router) # no auto-summary

R1 (config-router) # exit

R1 (config) # router eigrp 100

R1 (config-router) # net 192.168.4.0

R1 (config-router) # no auto-summary

R1 (config-router) # exit

R1 (config) # router ospf 1

R1 (config-router) # net 192.168.5.0 0.0.0.255 area 0

R1 (config-router) # exit

--

R2, configure default rout

R2 (config) # ip route 0.0.0.0 0.0.0.0 192.168.2.1

--

R3, configure RIP

R3 (config) # router rip

R3 (config-router) # net 192.168.3.0

R3 (config-router) # net 3.3.3.0

R3 (config-router) # version 2

R3 (config-router) # no auto-summary

R3 (config-router) # exit

--

R4, configure EIGRP

R4 (config) # router eigrp 100

R4 (config-router) # net 192.168.4.0

* Mar 100: 17 IP-EIGRP 48.019:% DUAL-5-NBRCHANGE: IP-EIGRP (0) 100: Neighbor 192.168.4.1 (FastEthernet1/4) is up: new adjacency

R4 (config-router) # net 4.4.4.0

R4 (config-router) # no auto-summary

* Mar 1 01VO8 Mar 34.239:% DUAL-5-NBRCHANGE: IP-EIGRP (0) 100: Neighbor 192.168.4.1 (FastEthernet1/4) is resync: summary configured

R4 (config-router) # exit

--

R5, configure OSPF

R5 (config) # router ospf 1

R5 (config-router) # net 192.168.5.0 0.0.0.255 area 0

* Mar 100 on FastEthernet1/5 from LOADING to FULL 1915 05.547:% OSPF-5-ADJCHG: Process 1, Nbr 192.168.5.1 on FastEthernet1/5 from LOADING to FULL, Loading Done

R5 (config-router) # net 5.5.5.0 0.0.255 area 0

R5 (config-router) # exit

--

After routing is configured, because R1 is at the network boundary and is running different routing protocols at the same time, R1 can learn the complete routing of the entire network. The show ip route command looks at the R1 route, as follows:

R1#sh ip route

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

2.0.0.0/24 is subnetted, 1 subnets

S 2.2.2.0 [1/0] via 192.168.2.2

3.0.0.0/24 is subnetted, 1 subnets

R 3.3.3.0 [120/1] via 192.168.3.3, 00:00:28, FastEthernet1/3

4.0.0.0/24 is subnetted, 1 subnets

D 4.4.4.0 [90/156160] via 192.168.4.4, 00:02:16, FastEthernet1/4

5.0.0.0/32 is subnetted, 1 subnets

O 5.5.5.5 [110/2] via 192.168.5.5, 01:09:20, FastEthernet1/5

C 192.168.4.0/24 is directly connected, FastEthernet1/4

C 192.168.5.0/24 is directly connected, FastEthernet1/5

C 192.168.2.0/24 is directly connected, FastEthernet1/2

C 192.168.3.0/24 is directly connected, FastEthernet1/3

--

R2, R3, R4, and R5 are invisible to each other in the current situation due to different routing protocols. Redistribution is required on R1.

III. Configuration redistribution

The redistributed configuration is set on the border router, R1.

1. Static routing and redistribution of RIP

R1 (config) # router rip

R1 (config-router) # redistribute connected! Distribute directly connected routes into routing protocols

R1 (config-router) # redistribute static! Redistribute static routes into RIP

--

After the configuration, you can still only see the default route on R2, but you can already see the route to R2 on R3, and R2 ping 3.3.3.3 ping R3 ping 2.2.2.2 is all open.

In addition, after the configuration, the route to the 192.168.4.0 and 192.168.5.0 network segments can also be seen on R3, but R3 cannot ping R4 and R5 because R1 does not redistribute ospf and eigrp.

View the routing tables and ping tests for R2 and R3 at this time:

R2#sh ip route

……

2.0.0.0/24 is subnetted, 1 subnets

C 2.2.2.0 is directly connected, Loopback0

C 192.168.2.0/24 is directly connected, FastEthernet1/2

S* 0.0.0.0 via 0 [1max 0] 192.168.2.1

--

R2#ping 3.3.3.3

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:

!

Success rate is 100 percent (5amp 5), round-trip min/avg/max = 16-34-64 ms

--

R3#sh ip route

……

R 2.0.0.0/8 [120/1] via 192.168.3.1, 00:00:08, FastEthernet1/3

3.0.0.0/24 is subnetted, 1 subnets

C 3.3.3.0 is directly connected, Loopback0

R 192.168.4.0/24 [120/1] via 192.168.3.1, 00:00:08, FastEthernet1/3

R 192.168.5.0/24 [120/1] via 192.168.3.1, 00:00:08, FastEthernet1/3

R 192.168.2.0/24 [120/1] via 192.168.3.1, 00:00:08, FastEthernet1/3

C 192.168.3.0/24 is directly connected, FastEthernet1/3

--

R3#ping 2.2.2.2

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:

!

Success rate is 100 percent (5amp 5), round-trip min/avg/max = 16-39-64 ms

--

2. Static routing and redistribution of EIGRP

R1 (config) # router eigrp 100

R1 (config-router) # redistribute connected

R1 (config-router) # redistribute static! Redistribute static routes into eigrp

--

After the configuration, only the default route can be seen on R2, but the route to R2 can already be seen on R4, and R2 ping 4.4.4.4 ping 2.2.2.2 is connected.

View the routing table for R4 at this time:

R4#sh ip route

……

2.0.0.0/24 is subnetted, 1 subnets

D EX 2.2.2.0 [170/30720] via 192.168.4.1, 01:14:10, FastEthernet1/4

4.0.0.0/24 is subnetted, 1 subnets

C 4.4.4.0 is directly connected, Loopback0

C 192.168.4.0/24 is directly connected, FastEthernet1/4

D EX 192.168.5.0/24 [170/30720] via 192.168.4.1, 01:14:10, FastEthernet1/4

D EX 192.168.2.0/24 [170/30720] via 192.168.4.1, 01:14:10, FastEthernet1/4

D EX 192.168.3.0/24 [170/30720] via 192.168.4.1, 01:14:10, FastEthernet1/4

--

3. Static routing and redistribution of OSPF

R1 (config) # router ospf 1

R1 (config-router) # redistribute connected

% Only classful networks will be redistributed

R1 (config-router) # redistribute static subnets! Redistribute static routes into ospf

% Only classful networks will be redistributed

--

Note that when redistributing the route to OSPF, write the subnets option later, otherwise subnets other than the main class cannot be redistributed into the routing table. In the above command, if the subnets field is not added, R2 can ping 5.5.5.5, but R5 ping cannot reach 2.2.2.2 (R5 can ping R2).

After configuration, you can still only see static routes (default routes) on R2, but the route to R2 can already be seen on R5, and R2 ping 5.5.5.5 and R5 ping 2.2.2.2 are all connected.

View the routing table for R5 at this time:

R5#sh ip route

……

5.0.0.0/24 is subnetted, 1 subnets

C 5.5.5.0 is directly connected, Loopback0

O E2 192.168.4.0/24 [110/20] via 192.168.5.1, 01:14:13, FastEthernet1/5

C 192.168.5.0/24 is directly connected, FastEthernet1/5

O E2 192.168.2.0/24 [110/20] via 192.168.5.1, 01:14:13, FastEthernet1/5

O E2 192.168.3.0/24 [110/20] via 192.168.5.1, 01:14:13, FastEthernet1/5

--

4. RIP and EIGRP redistribution

R1 (config) # router rip

R1 (config-router) # redistribute eigrp 100 metric 10! Redistribute eigrp to rip

R1 (config-router) # exit

R1 (config) # router eigrp 100

R1 (config-router) # redistribute rip metric 10000 255 1 1500! Redistribute rip to eigrp

--

Note that when redistributing eigrp to rip, you must specify the metric, that is, the command redistribute eigrp 100 metric 10, and if there is no "metric 10", R3 will not see the route to R4.

When redistributing the routing protocol to eigrp, you must also refer to the metric and specify the bandwidth and so on. The five parameters in the command "metric 10000 10000 255 1 1500" must be correct, otherwise the error "% Incomplete command" will be reported. Of these five parameters, the only one that can be modified is the bandwidth value, which can be set according to the actual situation, and the other four parameters cannot be changed. The five parameters are as follows:

Bandwidth in kilobytes=10000

Delay in 10s of microseconds=100

Reliability=255 (maximum)

Loading=1 (minimum)

Maximum Transmission Unit=1500

After the configuration is complete, the routes between each other can be seen on R3 and R4.

View the routing tables for R3 and R4 at this time:

R3#sh ip route

……

2.0.0.0/24 is subnetted, 1 subnets

R 2.2.2.0 [120/1] via 192.168.3.1, 00:00:23, FastEthernet1/3

3.0.0.0/24 is subnetted, 1 subnets

C 3.3.3.0 is directly connected, Loopback0

4.0.0.0/24 is subnetted, 1 subnets

R 4.4.4.0 [120/10] via 192.168.3.1, 00:00:23, FastEthernet1/3

R 192.168.4.0/24 [120/1] via 192.168.3.1, 00:00:23, FastEthernet1/3

R 192.168.5.0/24 [120/1] via 192.168.3.1, 00:00:23, FastEthernet1/3

R 192.168.2.0/24 [120/1] via 192.168.3.1, 00:00:23, FastEthernet1/3

C 192.168.3.0/24 is directly connected, FastEthernet1/3

--

R4#sh ip route

……

2.0.0.0/24 is subnetted, 1 subnets

D EX 2.2.2.0 [170/30720] via 192.168.4.1, 01:32:39, FastEthernet1/4

3.0.0.0/24 is subnetted, 1 subnets

D EX 3.3.3.0 [170/284160] via 192.168.4.1, 00:02:12, FastEthernet1/4

4.0.0.0/24 is subnetted, 1 subnets

C 4.4.4.0 is directly connected, Loopback0

C 192.168.4.0/24 is directly connected, FastEthernet1/4

D EX 192.168.5.0/24 [170/30720] via 192.168.4.1, 01:32:39, FastEthernet1/4

D EX 192.168.2.0/24 [170/30720] via 192.168.4.1, 01:32:39, FastEthernet1/4

D EX 192.168.3.0/24 [170/30720] via 192.168.4.1, 01:32:39, FastEthernet1/4

--

5. Redistribute RIP and OSPF

R1 (config) # router rip

R1 (config-router) # redistribute ospf 1 metric 10

R1 (config-router) # exit

R1 (config) # router ospf 1

R1 (config-router) # redistribute rip metric 200 subnets

--

Note that when redistributing ospf to rip, the metric must be specified, that is, the command redistribute ospf 1 metric 10.

When redistributing rip to ospf, you must also refer to the metric and use the subnets option, otherwise R5 will not see the route for R3. The subnets option ensures that classless subnet routes in RIP networks are published correctly.

After the configuration is complete, you can see the routes between each other on R3 and R5.

R3#sh ip route

……

2.0.0.0/24 is subnetted, 1 subnets

R 2.2.2.0 [120/1] via 192.168.3.1, 00:00:08, FastEthernet1/3

3.0.0.0/24 is subnetted, 1 subnets

C 3.3.3.0 is directly connected, Loopback0

4.0.0.0/24 is subnetted, 1 subnets

R 4.4.4.0 [120/10] via 192.168.3.1, 00:00:08, FastEthernet1/3

5.0.0.0/32 is subnetted, 1 subnets

R 5.5.5.5 [120/10] via 192.168.3.1, 00:00:08, FastEthernet1/3

R 192.168.4.0/24 [120/1] via 192.168.3.1, 00:00:08, FastEthernet1/3

R 192.168.5.0/24 [120/1] via 192.168.3.1, 00:00:08, FastEthernet1/3

R 192.168.2.0/24 [120/1] via 192.168.3.1, 00:00:08, FastEthernet1/3

C 192.168.3.0/24 is directly connected, FastEthernet1/3

--

R5#sh ip route

……

3.0.0.0/24 is subnetted, 1 subnets

O E2 3.3.3.0 [110/200] via 192.168.5.1, 00:00:43, FastEthernet1/5

5.0.0.0/24 is subnetted, 1 subnets

C 5.5.5.0 is directly connected, Loopback0

O E2 192.168.4.0/24 [110/20] via 192.168.5.1, 01:38:10, FastEthernet1/5

C 192.168.5.0/24 is directly connected, FastEthernet1/5

O E2 192.168.2.0/24 [110/20] via 192.168.5.1, 01:38:10, FastEthernet1/5

O E2 192.168.3.0/24 [110/20] via 192.168.5.1, 01:38:10, FastEthernet1/5

--

6. Redistribution of EIGRP and OSPF

R1 (config) # router eigrp 100

R1 (config-router) # redistribute ospf 1 metric 10000 100 255 1 1500

R1 (config-router) # exit

R1 (config) # router ospf 1

R1 (config-router) # redistribute eigrp 100 metric 200 subnets

--

Note that, as mentioned earlier, when redistributing routes to eigrp, five parameters, such as bandwidth and delay, must be correct. When redistributing the route to ospf, the subnets option is written later.

After the configuration is complete, you can see the routes between each other on R4 and R5.

R4#sh ip route

……

2.0.0.0/24 is subnetted, 1 subnets

D EX 2.2.2.0 [170/30720] via 192.168.4.1, 01:51:06, FastEthernet1/4

3.0.0.0/24 is subnetted, 1 subnets

D EX 3.3.3.0 [170/284160] via 192.168.4.1, 00:20:39, FastEthernet1/4

4.0.0.0/24 is subnetted, 1 subnets

C 4.4.4.0 is directly connected, Loopback0

5.0.0.0/32 is subnetted, 1 subnets

D EX 5.5.5.5 [170/284160] via 192.168.4.1, 00:03:03, FastEthernet1/4

C 192.168.4.0/24 is directly connected, FastEthernet1/4

D EX 192.168.5.0/24 [170/30720] via 192.168.4.1, 01:51:06, FastEthernet1/4

D EX 192.168.2.0/24 [170/30720] via 192.168.4.1, 01:51:06, FastEthernet1/4

D EX 192.168.3.0/24 [170/30720] via 192.168.4.1, 01:51:06, FastEthernet1/4

--

R5#sh ip route

……

3.0.0.0/24 is subnetted, 1 subnets

O E2 3.3.3.0 [110/200] via 192.168.5.1, 00:07:21, FastEthernet1/5

4.0.0.0/24 is subnetted, 1 subnets

O E2 4.4.4.0 [110/200] via 192.168.5.1, 00:02:27, FastEthernet1/5

5.0.0.0/24 is subnetted, 1 subnets

C 5.5.5.0 is directly connected, Loopback0

O E2 192.168.4.0/24 [110/20] via 192.168.5.1, 01:50:19, FastEthernet1/5

C 192.168.5.0/24 is directly connected, FastEthernet1/5

O E2 192.168.2.0/24 [110/20] via 192.168.5.1, 01:50:19, FastEthernet1/5

O E2 192.168.3.0/24 [110/20] via 192.168.5.1, 01:50:19, FastEthernet1/5

--

At this point, the whole network is interoperable.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report