There are 3 routing protocols running: RIPv2, OSPF, and EIGRP. In order to accomplish the below solution we must implement VRF-lite and mutual-redistribution between neighboring protocols.
The Topology:
The Solution:
My EVE-NG Topology:
To do this we should break this down into a few manageable chunks.
- Interface/VRF configuration
- Basic Routing Protocols Neighbor/Adjacencies
- Route Redistribution
- Test/Verify
Initial configs:
Interface configurations and Basic VRF creation. For this basic VRF configuration you do NOT need to configure a route-distinguisher or route-targets.
R1:
hostname R1
ip vrf ospf-to-eigrp
exit
interface Loopback1
no shutdown
ip address 1.1.1.1 255.255.255.255
interface GigabitEthernet0/0
no shutdown
ip address 10.1.11.1 255.255.255.0
interface GigabitEthernet0/1
no shutdown
ip vrf forwarding ospf-to-eigrp
ip address 10.1.22.1 255.255.255.0
interface GigabitEthernet0/2
no shutdown
ip vrf forwarding ospf-to-eigrp
ip address 10.1.33.1 255.255.255.0
|
R2:
hostname R2
ip vrf eigrp
exit
interface Loopback2
no shutdown
ip vrf forwarding eigrp
ip address 2.2.2.2 255.255.255.255
interface GigabitEthernet0/0
no shutdown
ip address 10.1.11.2 255.255.255.0
interface GigabitEthernet0/1
no shutdown
ip address 10.1.22.2 255.255.255.0
interface GigabitEthernet0/2
no shutdown
ip vrf forwarding eigrp
ip address 10.1.33.2 255.255.255.0
|
Verify:
At this point you should be able to ping all directly connected interfaces.
NOTE: If you have not used VRF's before you must know this "IF YOU DON'T INCLUDE A VRF YOU ARE USING THE GLOBAL ROUTING TABLE"
Pay close attention to the ping verification commands below. We will ping in order from our lab starting with the first link, then the second link, then the third.
From R1:
! ping the next-hop upstream from the global routing table
ping 10.1.11.2
From R2:
! ping the next-hop upstream from the global routing table
ping 10.1.22.1
From R1:
! ping the next-hop upstream from the ospf-to-eigrp VRF
ping vrf ospf-to-eigrp 10.1.33.2
|
Routing Protocols
Now, lets introduce our routing protocols. For OSPF on R1 I am using the "network" command and on R2 I am using interface config level commands to activate OSPF.
- RIPv2 (GRT) R1 <--> R2 (GRT) RIPv2
- OSPF (VRF: ospf-to-eigrp) R1<--> R2 (GRT) OSPF
- EIGRP (VRF: ospf-to-eigrp) R1 <--> R2 (VRF: eigrp) EIGRP
R1:
! We will put all routing protocols needed for the entire lab in this single step.
router rip
version 2
network 1.0.0.0
network 10.0.0.0
! I am using the router config based "network" command to
! activate OSPF on the correct interface.
router ospf 1 vrf ospf-to-eigrp
router-id 1.1.1.1
network 10.1.22.1 0.0.0.0 area 0
router eigrp 1
!
address-family ipv4 vrf ospf-to-eigrp autonomous-system 1
network 10.1.33.1 0.0.0.0
exit-address-family
|
R2:
! We will put all routing protocols needed for the lab in this single step.
router rip
version 2
redistribute ospf 2 metric 2 match external 1 external 2
network 10.0.0.0
router ospf 2
router-id 2.2.2.2
router eigrp 2
!
address-family ipv4 vrf eigrp autonomous-system 1
network 2.2.2.2 0.0.0.0
network 10.1.33.2 0.0.0.0
exit-address-family
! Here I am using the interface level command to activate OSPF on
! the correct interface
interface GigabitEthernet0/1
ip ospf 2 area 0
|
Verify:
Now, we need to verify our routing protocols have neighbors/adjacencies and are propagating the routes. We will verify checking that path starting with the GRT and RIPv2 protocol on R1 and working our way through the path.
From R1:
R1# show ip route rip | begin Gateway
Gateway of last resort is not set
10.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
R 10.1.22.0/24 [120/1] via 10.1.11.2, 00:00:17, GigabitEthernet0/0
! Here you can see from R1 we are learning the prefix 10.1.22.0/24 from R2. This is what we would expect to see at this point because R2 is activating all interfaces in the 10.0.0.0/8 space in the GRT and advertising them to R1.
! Alternative commands: show ip rip database
From R2:
R1# show ip route rip
Gateway of last resort is not set
R 1.0.0.0/8 [120/1] via 10.1.11.1, 00:00:00, GigabitEthernet0/0
! Here you can see we are learning the 1.0.0.0/8 network from R1. This is what we expect at this point.
! Alternative command: show ip rip database
From R2:
Here we will not be able to check for OSPF routes, and their shouldn't be any yet, but we can check for OSPF neighbors.
R2# show ip route ospf
! We don't see any routes because OSPF is only advertising the shared link between R1 and R2 at this point.
R2# show ip ospf neighbors
Neighbor ID Pri State Dead Time Address Interface
1.1.1.1 1 FULL/BDR 00:00:31 10.1.22.1 GigabitEthernet0/1
From R1:
We already verified the OSPF neighbor with R2 in the previous step. You can run the same commands if you choose: "TRUST BUT VERIFY"
Let's check for our EIGRP neighbor and routes.
R1# show ip route vrf ospf-to-eigrp eigrp | begin Gateway
Gateway of last resort is not set
2.0.0.0/32 is subnetted, 1 subnets
D 2.2.2.2 [90/130816] via 10.1.33.2, 01:03:31, GigabitEthernet0/2
R1# show ip eigrp vrf ospf-to-eigrp neighbors
EIGRP-IPv4 Neighbors for AS(1) VRF(ospf-to-eigrp)
H Address Interface Hold Uptime SRTT RTO Q Seq
(sec) (ms) Cnt Num
0 10.1.33.2 Gi0/2 13 01:05:35 1308 5000 0 4
R1# show ip eigrp topology
EIGRP-IPv4 Topology Table for AS(1)/ID(10.1.33.1) VRF(ospf-to-eigrp)
Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
r - reply Status, s - sia Status
P 2.2.2.2/32, 1 successors, FD is 130816
via 10.1.33.2 (130816/128256), GigabitEthernet0/2
P 10.1.33.0/24, 1 successors, FD is 2816
via Connected, GigabitEthernet0/2
! You can see we have an adjacency with R2 and we are learning 2.2.2.2 from R2.
|
Route Redistribution
For final end-to-end connectivity we need to do mutual redistribution between the protocols.
- R2: RIPv2 <--> OSPF
- R1: OSPF <--> EIGRP
R2: (Starting with R2 this time as it's the first place to start redistributing, the order doesn't really matter)
router ospf 2
router-id 2.2.2.2
redistribute rip subnets
router rip
redistribute ospf 2 metric 2 match external 1 external 2
! The routes we want to redistribute from OSPF are external OSPF Routes "O E2" we include the "match external" keywords.
R1:
router eigrp 1
!
address-family ipv4 vrf ospf-to-eigrp autonomous-system 1
redistribute ospf 1 metric 1000 1000 255 1 1500
exit-address-family
! I used a somewhat random metric, you could easily use "1 1 1 1 1" as the metric and everything would still work.
router ospf 1 vrf ospf-to-eigrp
redistribute eigrp 1 subnets
|
No comments:
Post a Comment