Cisco's routing redistribution

Source: Internet
Author: User

There may be many routing protocols in a large network, so it is related to the problem of routing redistribution. The network architecture looks like this:

650) this.width=650; "Src=" https://s5.51cto.com/wyfs02/M01/97/28/wKiom1kpjcaiKoebAADEN44abCc432.jpg-wh_500x0-wm_ 3-wmp_4-s_1065029666.jpg "title=" 2017-05-27_223019.jpg "width=" "height=" "border=" 0 "hspace=" 0 "vspace=" 0 " Style= "width:600px;height:330px;" alt= "Wkiom1kpjcaikoebaaden44abcc432.jpg-wh_50"/>

Schema Description:

1 R1 for the head office router;

2 R2, R5 for the Shanghai branch router;

3 R3, R4 for the Hangzhou branch router;

4 the OSPF protocol is used between the head office and the branch office, and the Shanghai branch uses the RIP protocol, while the Hangzhou branch uses the static routing protocol.

5 All branches access to the public network through the head office router R1 implementation;

6 Local host is simulated by LOOPBACK1 interface;

7 Loopback0 uses 192.168.255.0/24 network segment and as Router ID;


1) Configure basic information

The R1 configuration is as follows:

R1 (config) #hostname R1

R1 (config) #int f0/0

R1 (config-if) #ip add 10.0.0.1 255.255.255.252

R1 (config-if) #no sh

R1 (config-if) #int f1/0

R1 (config-if) #ip add 10.0.0.6 255.255.255.252

R1 (config-if) #no sh

R1 (config-if) #int f2/0

R1 (config-if) #ip add 172.16.31.1 255.255.255.252

R1 (config-if) #no sh

R1 (config) #int loopback 0

R1 (config-if) #ip add 192.168.255.1 255.255.255.0

R1 (config-if) #no sh

R1 (config) #int loopback 1

R1 (config-if) #ip add 192.168.1.1 255.255.255.0

R1 (config-if) #no sh


R1 (config) #router OSPF 1

R1 (config-router) #router-id 192.168.255.1

R1 (config-router) #network 192.168.1.0 0.0.0.255 area 0

R1 (config-router) #network 10.0.0.4 0.0.0.3 Area 1

R1 (config-router) #network 192.168.255.1 0.0.0.0 area 0

R1 (config-router) #network 10.0.0.0 0.0.0.3 area 0


R1 (config) #ip Route 0.0.0.0 0.0.0.0 172.16.31.2


The R2 configuration is as follows:

R2 (config) #hostname R2

R2 (config) #int f0/0

R2 (config-if) #ip add 10.0.0.2 255.255.255.252

R2 (config-if) #no sh

R2 (config-if) #int f1/0

R2 (config-if) #ip add 192.168.100.1 255.255.255.0

R2 (config-if) #no sh

R2 (config) #int loopback 0

R2 (config-if) #ip add 192.168.255.2 255.255.255.255

R2 (config-if) #no sh


R2 (config) #router OSPF 1

R2 (config-router) #router-id 192.168.255.2

R2 (config-router) #network 10.0.0.0 0.0.0.3 area 0

R2 (config-router) #network 192.168.255.2 0.0.0.0 area 0


R2 (config) #router rip

R2 (config-router) #version 2

R2 (config-router) #no auto-summary

R2 (config-router) #network 192.168.100.0


The R3 configuration is as follows:

R3 (config) #hostname R3

R3 (config) #int f1/0

R3 (config-if) #ip add 10.0.0.5 255.255.255.252

R3 (config-if) #no sh

R3 (config-if) #int f0/0

R3 (config-if) #ip add 10.0.0.10 255.255.255.252

R3 (config-if) #no sh

R3 (config) #int loopback 0

R3 (config-if) #ip add 192.168.255.3 255.255.255.255

R3 (config-if) #no sh


R3 (config) #router OSPF 1

R3 (config-router) #router-id 192.168.255.3

R3 (config-router) #network 10.0.0.4 0.0.0.3 Area 1

R3 (config-router) #network 192.168.255.3 0.0.0.0 Area 1


R3 (config) #ip Route 192.168.3.0 255.255.255.0 10.0.0.9


The R4 configuration is as follows:

R4 (config) #hostname R4

R4 (config) #int f0/0

R4 (config-if) #ip add 10.0.0.9 255.255.255.252

R4 (config-if) #no sh

R4 (config) #int loopback 0

R4 (config-if) #ip add 192.168.255.4 255.255.255.255

R4 (config-if) #no sh

R4 (config) #int loopback 1

R4 (config-if) #ip add 192.168.3.1 255.255.255.0

R4 (config-if) #no sh


R4 (config) #ip Route 0.0.0.0 0.0.0.0 10.0.0.10


The R5 configuration is as follows:

R5 (config) #hostname R5

R5 (config) #int f0/0

R5 (config-if) #ip add 192.168.100.2 255.255.255.0

R5 (config-if) #no sh

R5 (config) #int loopback 1

R5 (config-if) #ip add 192.168.2.1 255.255.255.0

R5 (config-if) #no sh


R5 (config) #router rip

R5 (config-router) #version 2

R5 (config-router) #no auto-summary

R5 (config-router) #network 192.168.100.0

R5 (config-router) #network 192.168.2.0


The Internet configuration is as follows:

Internet (config) #hostname internet

Internet (config) #int f0/0

Internet (config-if) #ip add 172.16.31.2 255.255.255.252

Internet (config-if) #no sh

Internet (config) #int loopback 1

Internet (config-if) #ip add 59.56.61.1 255.255.255.0

Internet (config-if) #no sh


To view the routing table:

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 are 172.16.31.2 to network 0.0.0.0


172.16.0.0/30 is subnetted, 1 subnets

C 172.16.31.0 is directly connected, fastethernet2/0

10.0.0.0/30 is subnetted, 2 subnets

C 10.0.0.0 is directly connected, fastethernet0/0

C 10.0.0.4 is directly connected, fastethernet1/0

192.168.255.0/24 is variably subnetted, 3 subnets, 2 masks

O 192.168.255.3/32 [110/2] via 10.0.0.5, 00:21:37, fastethernet1/0

O 192.168.255.2/32 [110/2] via 10.0.0.2, 00:31:22, fastethernet0/0

C 192.168.255.0/24 is directly connected, Loopback0

C 192.168.1.0/24 is directly connected, Loopback1

s* 0.0.0.0/0 [1/0] via 172.16.31.2


2) Configure route redistribution:

Router R1 re-publishes the default route:

R1 (config) #router OSPF 1

R1 (config-router) #default-information originate always


Router R2 redistribution:

R2 (config) #router OSPF 1

R2 (config-router) #redistribute RIP subnets

R2 (config) #router rip

R2 (config-router) #redistribute OSPF 1 metric 3


Router R3 re-publishes static routes and direct-attached routes:

R3 (config) #router OSPF 1

R3 (config-router) #redistribute static subnets

R3 (config-router) #redistribute connected subnets


3) Verify that network communication is normal

R3#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 are 10.0.0.6 to network 0.0.0.0


10.0.0.0/30 is subnetted, 3 subnets

C 10.0.0.8 is directly connected, fastethernet0/0

O IA 10.0.0.0 [110/2] via 10.0.0.6, 00:02:31, fastethernet1/0

C 10.0.0.4 is directly connected, fastethernet1/0

192.168.255.0/32 is subnetted, 3 subnets

C 192.168.255.3 is directly connected, Loopback0

O IA 192.168.255.2 [110/3] via 10.0.0.6, 00:02:31, fastethernet1/0

O IA 192.168.255.1 [110/2] via 10.0.0.6, 00:02:31, fastethernet1/0

192.168.1.0/32 is subnetted, 1 subnets

O IA 192.168.1.1 [110/2] via 10.0.0.6, 00:02:33, fastethernet1/0

O E2 192.168.2.0/24 [110/20] via 10.0.0.6, 00:02:33, fastethernet1/0

O E2 192.168.100.0/24 [110/20] via 10.0.0.6, 00:02:33, fastethernet1/0

S 192.168.3.0/24 [1/0] via 10.0.0.9

O*e2 0.0.0.0/0 [110/1] via 10.0.0.6, 00:02:35, fastethernet1/0


r4#ping 192.168.2.1 Source 192.168.3.1


Type escape sequence to abort.

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

Packet sent with a source address of 192.168.3.1

!!!!!


r5#ping 10.0.0.5 Source 192.168.2.1


Type escape sequence to abort.

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

Packet sent with a source address of 192.168.2.1

!!!!!



This article from "10,000 years too long, seize" blog, please be sure to keep this source http://zengwj1949.blog.51cto.com/10747365/1930402

Cisco's routing redistribution

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.