MPLS WITH OSPF PE-CE
---------------------
There is info on this on rfc 4577
On PE
router ospf 150 vrf C
network 10.0.0 0.0.0.255 area 0
with ospf vrf aware we specify a completely new process for the vrf aware ospf not like eigrp
or rip or bgp where we put it under an address family under the main process
With troubleshooting commands we just reference the process id we created for it
sh ip ospf 150 neighbors
sh ip ospf 150 databases
As we the other protocols we redistribute them into bgp and also redistribute bgp into them
to transport the routes over the MPBGP process
remeber the rules of ospf and bgp during redistribution if you just do
redistribute ospf 150 it will only redistribute internal routes not external
to redistribute external aswell
redistribute ospf 150 match internal external
If you look at the redistribute ospf routes in the bgp databases
sh ip bgp vpnv4 unicast all "ip address"
you will notice there is extra ospf files mainly the ospf domain id, ospf rt and ospf router
these are fields carried in bgp extended communities the purpose of them is when we are redistributing ospf we need to decide where to put the route in the ospf database i.e is it going to be type 3 inter area summary or type 5 external summary. THe way it works this out is by comparing the domain id field to our local domain id. If it matches they are considered coming from the same process and redistributed as inter area summary if it does not match they are send in as ospf external routes.
The domain id is inhereted by default from the process id.
To change it you can used the command
router ospf 150
domain id " domain id"
The only time we would really care about the type of route i.e interarea or external is if we have multiple paths witht he same longest path match.
SO for example we had a link through the mpls network and also a different link directly over
another connection. If we are learning ospf routes from the other connnection and it is OIA vs External .
OIA will always win. There is a few scenerios to this that i will go through in the lab
Sham Link
------------
A way of getting ospf to send in routes over the mpls as O or type 1 is to use a sham link
a sham link allows us to do an ospf p2p adjacencey over the mpls network
this way we keep area 0 network going through the provider
We create the p2p adjacency between the 2 PEs
WHen creating the sham link you need to make sure that the sham link source and destination
do not go into the customer network as it should never be possible to run the sham link over the customer network
Basically when you create a shamlink you assign a source and destination the source would be an interface on 1 pe and the destination is an interface on the other PE if the route to the other PE interface was better through the customer network than the mpls it would take that path in order to avoid this we filter the link advertismeents to the customer network so this could never happen. This will be done in the lab
LAB
----
OK for the lab we are going bring vrf c into the the equation all the other vrf routing + mpls is configured as per previous labs
I will start R6
R6
---
r6#sh ip protocols
Routing Protocol is "eigrp 200"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Default networks flagged in outgoing updates
Default networks accepted from incoming updates
EIGRP metric weight K1=1, K2=0, K3=1, K4=0, K5=0
EIGRP maximum hopcount 100
EIGRP maximum metric variance 1
Redistributing: eigrp 200
EIGRP NSF-aware route hold timer is 240s
Automatic network summarization is in effect
Maximum path: 4
Routing for Networks:
Routing Information Sources:
Gateway Distance Last Update
Distance: internal 90 external 170
Routing Protocol is "bgp 200"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
IGP synchronization is disabled
Automatic route summarization is disabled
Neighbor(s):
Address FiltIn FiltOut DistIn DistOut Weight RouteMap
4.4.4.4
5.5.5.5
Maximum path: 1
Routing Information Sources:
Gateway Distance Last Update
Distance: external 20 internal 200 local 200
Routing Protocol is "ospf 200"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Router ID 6.6.6.6
Number of areas in this router is 1. 1 normal 0 stub 0 nssa
Maximum path: 4
Routing for Networks:
6.6.6.6 0.0.0.0 area 0
155.0.2.0 0.0.0.255 area 0
Reference bandwidth unit is 100 mbps
Routing Information Sources:
Gateway Distance Last Update
3.3.3.3 110 00:11:54
5.5.5.5 110 00:11:54
4.4.4.4 110 00:11:54
Gateway Distance Last Update
2.2.2.2 110 00:11:57
1.1.1.1 110 00:11:57
Distance: (default is 110)
r6#
On r6 we can see we are running ospf internally on the mpls network
Lets start the config of vrf c
r6(config)#ip vrf C
r6(config-vrf)#rd 114:14
r6(config-subif)#int fa0/0.67
r6(config-subif)#ip vrf forwarding C
r6(config-subif)#ip address 172.25.15.6 255.255.255.0
% Configuring IP routing on a LAN subinterface is only allowed if that
subinterface is already configured as part of an IEEE 802.10, IEEE 802.1Q,
or ISL vLAN.
r6(config-subif)#encap dot1q 67
r6(config-subif)#ip address 172.25.15.6 255.255.255.0
r6(config-subif)#
r6(config)#router ospf 100 vrf C
r6(config-router)#network 172.25.15.0 0.0.0.255 area 0
r6(config-router)#
s1
---
We will leave the link to sw1 to sw2 out for the time being
s1(config)#router ospf 100
s1(config-router)#network 172.25.15.0 0.0.0.255 area 0
s1(config-router)#
00:23:01: %OSPF-5-ADJCHG: Process 100, Nbr 172.25.15.6 on Vlan67 from LOADING to FULL, Loading Done
s1(config-router)#network 12.1.1.1 0.0.0.255 area 0
s1(config-router)#exit
ok our adjacency is up
r6
---
back on r6
r6#sh ip route vrf C
Routing Table: C
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
172.25.0.0/24 is subnetted, 1 subnets
C 172.25.15.0 is directly connected, FastEthernet0/0.67
12.0.0.0/32 is subnetted, 1 subnets
O 12.1.1.1 [110/2] via 172.25.15.1, 00:01:26, FastEthernet0/0.67
r6#
r6#sh ip ospf 100 neigh
Neighbor ID Pri State Dead Time Address Interface
2.1.1.1 1 FULL/BDR 00:00:31 172.25.15.1 FastEthernet0/0.67
notice when we are doing ospf commands which specify the process id that we assigned to vrf this will then show the vrf process so there is not specfic vrf aware commands
ok we will redistribute BGP into ospf and ospf into bgp getting ready to recieve the routes over the mpls
r6(config)#router ospf 100
r6(config-router)#redistribute bgp 200 subnets
r6(config-router)#
r6(config)#router bgp 200
r6(config-router)#address-family ipv4 vrf C
r6(config-router-af)#redistribute ospf 100 match internal external
r6(config-router-af)#
notice i have added the match internal external to redistribute. If i just said redistribute ospf 100 it would just allow internal routes not ospf external routes probably be ok for this example but just to show
r5
---
r5(config)#ip vrf C
r5(config-vrf)#rd 114:14
r5(config-vrf)#exit
r5(config)#int fa0/0.58
r5(config-subif)#encap dot1q 58
r5(config-subif)#ip vrf forwarding C
r5(config-subif)#ip address 172.25.17.5 255.255.255.0
r5(config)#router ospf 100 vrf C
r5(config-router)#network 172.25.17.0 0.0.0.255 area 0
r5(config-router)#
r5(config)#router ospf 100
r5(config-router)#redistribute bgp 200 subnets
r5(config-router)#router bgp 200
r5(config-router)#address-family ipv4 vrf C
r5(config-router-af)#redistribute ospf 100 match internal external
r5(config-router-af)#exit
r5(config-router)#exit
r5(config)#exit
r5(config)#ip vrf C
r5(config-vrf)#route-target both 114:14
r5(config-vrf)#
r5#
r6
---
r6#sh ip route vrf C
Routing Table: C
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
172.25.0.0/24 is subnetted, 2 subnets
B 172.25.17.0 [200/0] via 5.5.5.5, 00:02:12
C 172.25.15.0 is directly connected, FastEthernet0/0.67
22.0.0.0/32 is subnetted, 1 subnets
B 22.1.1.1 [200/2] via 5.5.5.5, 00:02:12
12.0.0.0/32 is subnetted, 1 subnets
O 12.1.1.1 [110/2] via 172.25.15.1, 00:17:35, FastEthernet0/0.67
r6#
i can see i am getting the routes and redistributing into vrf c sucess
r6#sh bgp vpnv4 unicast vrf C 172.25.17.0
BGP routing table entry for 114:14:172.25.17.0/24, version 26
Paths: (1 available, best #1, table C)
Not advertised to any peer
Local
5.5.5.5 (metric 4) from 5.5.5.5 (5.5.5.5)
Origin incomplete, metric 0, localpref 100, valid, internal, best
Extended Community: RT:114:14 OSPF DOMAIN ID:0x0005:0x000000640200
OSPF RT:0.0.0.0:2:0 OSPF ROUTER ID:172.25.17.5:512
mpls labels in/out nolabel/28
r6#
if you notice the extra fields ospf domain id references the ospf domain id which by default is inhereted fromt he process id and if the routes domain id matches our domain id of 100 the ospf rtype is IA route. The purpose of these fields is to decide the placement of the route is the ospf database
S1
---
s1#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
155.0.0.0/24 is subnetted, 1 subnets
C 155.0.79.0 is directly connected, Vlan79
172.25.0.0/24 is subnetted, 2 subnets
O IA 172.25.17.0 [110/2] via 172.25.15.6, 00:09:15, Vlan67
C 172.25.15.0 is directly connected, Vlan67
22.0.0.0/32 is subnetted, 1 subnets
O IA 22.1.1.1 [110/3] via 172.25.15.6, 00:09:15, Vlan67
12.0.0.0/32 is subnetted, 1 subnets
C 12.1.1.1 is directly connected, Loopback0
s1#
if you notice we are learning the ospf routes as IA even though they are coming from area 0 they have been redistributed but ospf when the process id matches across the mpls will treat the PE router as an ABR rather than an ABR
r6
---
we will change the domain id on r6
r6(config-router)#router ospf 100
r6(config-router)#domain-id 66.66.66.66
S1
---
notice now on s1
s1#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
155.0.0.0/24 is subnetted, 1 subnets
C 155.0.79.0 is directly connected, Vlan79
172.25.0.0/24 is subnetted, 2 subnets
O E2 172.25.17.0 [110/1] via 172.25.15.6, 00:06:37, Vlan67
C 172.25.15.0 is directly connected, Vlan67
22.0.0.0/32 is subnetted, 1 subnets
O E2 22.1.1.1 [110/2] via 172.25.15.6, 00:06:37, Vlan67
12.0.0.0/32 is subnetted, 1 subnets
C 12.1.1.1 is directly connected, Loopback0
s1#
the routes come in as external type 5
r6(config-router)#
This is not much of an issue or difference if all s1 has is the one path to the networks on s2 but if a put scenerio that s1 is site a and s2 is site b and we have and old 100 mbs link between the s1 and s2 and we are using gig on the mpls
so first thing first i will bring up and point to point link between s1 and s2
S2
---
s2(config)#int fa0/14
s2(config-if)#no switchport
s2(config-if)#
01:21:22: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/14, changed state to downip address 172.
01:21:25: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/14, chan
s2(config-if)#ip address 172.25.16.2 255.255.255.0
s2(config-if)#ip ospf network point-to-point
s2(config-if)#
s2(config)#router ospf 100
s2(config-router)#network 172.25.16.0 0.0.0.255 area 0
s2(config-router)#
S1
---
s1(config)#int fa0/14
s1(config-if)#no switch
s1(config-if)#ip address 172.25.16.1 255.255.255.0
s1(config-if)#ip ospf network point-to-point
s1(config-if)#exit
s1(config)#exit
s1(config)#router ospf 100
s1(config-router)#network 172.25.16.0 0.0.0.255 area 0
notice now on s1
s1#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
155.0.0.0/24 is subnetted, 1 subnets
C 155.0.79.0 is directly connected, Vlan79
172.25.0.0/24 is subnetted, 3 subnets
O 172.25.17.0 [110/2] via 172.25.16.2, 00:00:48, FastEthernet0/14
C 172.25.16.0 is directly connected, FastEthernet0/14
C 172.25.15.0 is directly connected, Vlan67
22.0.0.0/32 is subnetted, 1 subnets
O 22.1.1.1 [110/2] via 172.25.16.2, 00:00:48, FastEthernet0/14
12.0.0.0/32 is subnetted, 1 subnets
C 12.1.1.1 is directly connected, Loopback0
s1#
we are taking the route via s2
on the link to s2 i will bump up the cost of the link to the maximum
s1(config-if)#int fa0/14
s1(config-if)#ip ospf cost 65535
s1(config-if)#
s1#clear ip route *
s1#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
155.0.0.0/24 is subnetted, 1 subnets
C 155.0.79.0 is directly connected, Vlan79
172.25.0.0/24 is subnetted, 3 subnets
O 172.25.17.0 [110/65536] via 172.25.16.2, 00:00:05, FastEthernet0/14
C 172.25.16.0 is directly connected, FastEthernet0/14
C 172.25.15.0 is directly connected, Vlan67
22.0.0.0/32 is subnetted, 1 subnets
O 22.1.1.1 [110/65536] via 172.25.16.2, 00:00:05, FastEthernet0/14
12.0.0.0/32 is subnetted, 1 subnets
C 12.1.1.1 is directly connected, Loopback0
s1#
no change the reason is no matter how much better the link is via r6 and the mpls because it is O vs E type 1. The o route will always be choose intra area routes always have preference over Inter Area or external so even i changed the domain id back it would still be IA vs O o will win
r6
---
r6(config-router)router ospf 100
r6(config-router)#no domain-id 66.66.66.66
r6(config-router)#exit
r6(config)#exit
S1
---
s1#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
155.0.0.0/24 is subnetted, 1 subnets
C 155.0.79.0 is directly connected, Vlan79
172.25.0.0/24 is subnetted, 3 subnets
O 172.25.17.0 [110/65536] via 172.25.16.2, 00:03:20, FastEthernet0/14
C 172.25.16.0 is directly connected, FastEthernet0/14
C 172.25.15.0 is directly connected, Vlan67
22.0.0.0/32 is subnetted, 1 subnets
O 22.1.1.1 [110/65536] via 172.25.16.2, 00:03:20, FastEthernet0/14
12.0.0.0/32 is subnetted, 1 subnets
C 12.1.1
eventhough r6 is advertising intraarea routes O is more prefered than IA
ok a resolution to this could be if we changed the area of the link between s1 and s2
s1(config)#router ospf 100
s1(config-router)#no network 172.25.16.0 0.0.0.255 area 0
s1(config-router)#netwo
01:55:19: %OSPF-5-ADJCHG: Process 100, Nbr 22.1.1.1 on FastEthernet0/14 from FULL to DOWN, Neighbor Down: Interface down or det
s1(config-router)#network 172.25.16.0 0.0.0.255 area 12
s1(config-router)#
s2
--
s2(config)#router ospf 100
s2(config-router)#no network 172.25.16.0 0.0.0.255 area 0
s2(config-router)#network 172.25.16.0 0.0.0.255 area 12
s2(config-router)#
s1
---
s1#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
155.0.0.0/24 is subnetted, 1 subnets
C 155.0.79.0 is directly connected, Vlan79
172.25.0.0/24 is subnetted, 3 subnets
O IA 172.25.17.0 [110/2] via 172.25.15.6, 00:00:07, Vlan67
C 172.25.16.0 is directly connected, FastEthernet0/14
C 172.25.15.0 is directly connected, Vlan67
22.0.0.0/32 is subnetted, 1 subnets
O IA 22.1.1.1 [110/3] via 172.25.15.6, 00:00:07, Vlan67
12.0.0.0/32 is subnetted, 1 subnets
C 12.1.1.1 is directly connected, Loopback0
s1#
routes are now going via the mpls as it is Inter Area vs Inter Area so it comes down to cost
s1(config)#int fa0/14
s1(config-if)#ip ospf cost 1
s1(config-if)#
s1#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
155.0.0.0/24 is subnetted, 1 subnets
C 155.0.79.0 is directly connected, Vlan79
172.25.0.0/24 is subnetted, 3 subnets
O IA 172.25.17.0 [110/2] via 172.25.15.6, 00:01:23, Vlan67
C 172.25.16.0 is directly connected, FastEthernet0/14
C 172.25.15.0 is directly connected, Vlan67
22.0.0.0/32 is subnetted, 1 subnets
O IA 22.1.1.1 [110/3] via 172.25.15.6, 00:01:23, Vlan67
12.0.0.0/32 is subnetted, 1 subnets
C 12.1.1.1 is directly connected, Loopback0
even though no i changed the link to fa0/14 to cost 1 which should have lower cost so more preference it is still going via the mpls the reason is because the mpls is running opsf area 0 and you will as prefer to transit area 0 then external area so no matter what cost i give the links it will go the mpls
Ok i wll change the config back and we will look at different solution which would not require us to redesign assign new ospf areas
s1#config t
Enter configuration commands, one per line. End with CNTL/Z.
s1(config)#router ospf 100
s1(config-router)#no network 172.25.16.0 0.0.0.255 area 12
s1(config-router)#no network 172.25.16.0 0.0.0.255 area 12
02:02:37: %OSPF-5-ADJCHG: Process 100, Nbr 22.1.1.1 on FastEthernet0/14 from FULL to DOWN, Neighbor Down: Interface down or detached
s1(config-router)#network 172.25.16.0 0.0.0.255 area 0
s1(config-router)#
s2(config)#router ospf
02:03:36: %OSPF-4-ERRRCV: Received invalid packet: mismatch area ID, from backbone area must be virtual-link but not found from 172.25.16.1, FastEthernet0/14 100
s2(config-router)#no network 172.25.16.0 0.0.0.255 area 12
s2(config-router)#network 172.25.16.0 0.0.0.255 area 0
s2(config-router)#
s1
--
ok we are back to the scenerio that s1 prefers the link via s2
s1#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
155.0.0.0/24 is subnetted, 1 subnets
C 155.0.79.0 is directly connected, Vlan79
172.25.0.0/24 is subnetted, 3 subnets
O 172.25.17.0 [110/2] via 172.25.16.2, 00:01:11, FastEthernet0/14
C 172.25.16.0 is directly connected, FastEthernet0/14
C 172.25.15.0 is directly connected, Vlan67
22.0.0.0/32 is subnetted, 1 subnets
O 22.1.1.1 [110/2] via 172.25.16.2, 00:01:11, FastEthernet0/14
12.0.0.0/32 is subnetted, 1 subnets
C 12.1.1.1 is directly connected, Loopback0
ok what we can use is an sham link between the two pe's r6 and r5 to run ospf across the mpls network
r6
---
so first thing first i create a new loopback an assign address for use of the sham link
and i put in vrf C
r6(config)#int lo2
r6(config-if)#ip vrf forward C
% Interface Loopback2 IP address 66.66.66.66 removed due to enabling VRF C
r6(config-if)#ip address 66.66.66.66 255.255.255.255
r6(config-if)#
I advertise this in BGP to get over to the other PE R5
we need to keep this route from ospf on the VRF C side of the network so the shamlink does not think it can use the path s1 to s2 to r5 ever
r6(config)#ip prefix-list SHAM-LINK permit 66.66.66.66/32
r6(config)#ip prefix-list SHAM-LINK permit 55.55.55.55/32
wr create a prefix-list with our local inteface for the shamlink and the remote interface for the sham link we do not want either PE sending this into ospf
r6(config)#route-map SHAM deny 10
r6(config-route-map)#match ip address prefix-list SHAM-LINK
r6(config-route-map)#route-map SHAM permit 20
r6(config-route-map)#
also a route map to match the prefix
r6(config)#router ospf 100
r6(config-router)#no redistribute bgp 200 subnets
r6(config-router)#redistribute bgp 200 subnets route-map SHAM-LINK
r6(config-router)#
we take off the redistribution then apply back to redistribution with the route-map filtering
ok we need to do a similar config on the other end of the sham-link r5
r5(config-if)#int lo2
r5(config-if)#ip vrf forwarding C
% Interface Loopback2 IP address 55.55.55.55 removed due to enabling VRF C
r5(config-if)#ip address 55.55.55.55 255.255.255.255
r5(config-if)#
r5(config)#ip prefix-list SHAM-LINK seq 5 permit 66.66.66.66/32
r5(config)#ip prefix-list SHAM-LINK seq 10 permit 55.55.55.55/32
r5(config)#
r5(config)#route-map SHAM deny 10
r5(config-route-map)# match ip address prefix-list SHAM-LINK
r5(config-route-map)#
r5(config-route-map)#route-map SHAM permit 20
r5(config-route-map)#
r5(config-route-map)#e
r5
---
r5#config t
Enter configuration commands, one per line. End with CNTL/Z.
r5(config)#router ospf 100
r5(config-router)#area 0 sham-link 55.55.55.55 66.66.66.66
r5(config-router)#
r6
---
r6(config)#router ospf 100
r6(config-router)#area 0 sham-link 66.66.66.66 55.55.55.55
r6#sh ip ospf sha
Sham Link OSPF_SL1 to address 55.55.55.55 is up
Area 0 source address 66.66.66.66
Run as demand circuit
DoNotAge LSA allowed. Cost of using 1 State POINT_TO_POINT,
Timer intervals configured, Hello 10, Dead 40, Wait 40,
Hello due in 00:00:06
Adjacency State FULL (Hello suppressed)
Index 2/2, retransmission queue length 0, number of retransmission 0
First 0x0(0)/0x0(0) Next 0x0(0)/0x0(0)
Last retransmission scan length is 0, maximum is 0
Last retransmission scan time is 0 msec, maximum is 0 msec
r6#
ok so the sham link is up now and active
on s1
------
we are learning the routes via the sham link as o and as of this it is down to cost and the mpls route has better cost but if i lowered the cost of fa0/14 on s1 the link would go straight over the link s1-s2 point being cost is now a factor.We can control the route via cost
s1#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
155.0.0.0/24 is subnetted, 1 subnets
C 155.0.79.0 is directly connected, Vlan79
172.25.0.0/24 is subnetted, 3 subnets
O 172.25.17.0 [110/3] via 172.25.15.6, 00:00:06, Vlan67
C 172.25.16.0 is directly connected, FastEthernet0/14
C 172.25.15.0 is directly connected, Vlan67
22.0.0.0/32 is subnetted, 1 subnets
O 22.1.1.1 [110/4] via 172.25.15.6, 00:00:06, Vlan67
12.0.0.0/32 is subnetted, 1 subnets
C 12.1.1.1 is directly connected, Loopback0
s1#sh ip
No comments:
Post a Comment