Beruflich Dokumente
Kultur Dokumente
CCNP
ROUTE
Labs
with
solutions
BY Redouane MEDDANE
Lab 1: ABRs election and Forward Address in NSSA with
OSPFv3
Lab 2: loop prevention mechanism of inter-area ospf
Lab 3: Forward Address and path selection in OSPFv2
Lab 4: OSPFv3 and the Forwarding Address
Lab 5: OSPF path selection for external route
Lab 6: OSPFv2 and OSPFv3 comparison
Lab 7: OSPF Lab Case Study
Lab 8: OSPF over Frame-Relay and redistribution between two
OSPF Processes-ID
Lab 9: Redistribution between two OSPF Processes-ID
Lab 10: OSPFv3 external path selection and Forward Address
Lab 11: Forwarding Address selection
Lab 12: Forward Address selection among two LSAs Type 7 for
the same destination
Lab 13: NSSA with OSPFv3
Lab 14: Virtual-Link OSPF
Lab 15: Effects of ABR Loop Prevention with OSPFv3
Lab 16: Forwarding Address
Lab 17: OSPFv3 and the use of forwarding address
Lab 18: The Forwarding Address and path selection
Lab 19: Routing Problem with OSPF Forwarding Address with
all possible solutions
Lab 20: How an ABR sets the Forward Address in the LSA Type
7
Lab 21: Routing Problem with OSPFv3 when advertising
external routes in NSSA:
Lab 22: OSPFv3 LSAs : Types 2001 and 2002, Types 0008 and
2009 (Router and
Network, Link and Intra-AreaPrefix)
Lab 23: Redistribution between two EIGRP autonomous
systems
Lab 24: Redistribution between two AS EIGRP
Lab 25: EIGRP over Frame-Relay
Lab 26: Troubleshooting EIGRP
Lab 27: EIGRP redisstribution between two AS and the nexthop field
Lab 28: Next-Hop Field with EIGRP over IPv4
We have two ABRs R2(router-id 2.2.2.2 and R3(router-id 3.3.3.3) and the
area 1 is configured as an NSSA ,the two output shown that R3 will do the
translation of the LSA Type 7 to the LSA Type 5 because the highest routerid 3.3.3.3 comparing with the router-id of R2 2.2.2.2:
R1#show ipv6 ospf database | begin Type-5
Type-5 AS External Link States
ADV Router Age Seq# Prefix
3.3.3.3 17 0x80000001 4::/64
How to ensure that R2 will do the translation of the LSA Type 7 to Type 5
without changing or increasing the router-id of R2 to be higher than
3.3.3.3(the router-id of R3) with only one command?
Let's dissect ,some shows and behaviors and before showing the solution of
the question asked above:
The routing table and the traceroute shown that the best path to reach the
external prefix 4::/64 is via R3 :
R1#show ipv6 route 4::/64
Routing entry for 4::/64
Known via "ospf 1", distance 110, metric 20, type extern 2
Route count is 1/1, share count 0
Routing paths:
FE80::C803:EFF:FE2C:8, FastEthernet0/0
Last updated 00:00:26 ago
R1#traceroute 4::4
Type escape sequence to abort.
Tracing the route to 4::4
Why ? because the Forward Address received by R1 in the LSA Type 5 from
the translator R3 is 34::3, the highest ip address among the physical
interfaces running OSPFv3 as shown by the show ipv6 ospf database
external | include...command,R1 looks at the best path in the inter-area
route to reach this FA which is via R3 as shown by show ipv6 route 34::/64
command (notice the outgoing interface fa0/0 and the link-local address as
the next hop which is the link-local address of R3):
R1#show ipv6 ospf database external | include Advertising Router|Forward Address
Advertising Router: 3.3.3.3
Forward Address: 34::4
The command which allow us to have R2 the translator of the LSA Type 7 to
the LSA Type 5 is :area 1 nssa translate type7 always*
Let's go:
R2(config)#ipv6 router ospf 1
R2(config-rtr)#area 1 nssa translate type7 always
Now the advertising router is R2 because R2 is now the ABR which do the
translation of the LSA Type 7 to Type 5 and the FA is 34::4:
R1#$spf database external | include Advertising Router|Forward Address
Advertising Router: 2.2.2.2
Forward Address: 34::4
So R2 now is the ABR doing the translation but the forward address is set
to 34::4 which is the address of R4's fa0/0.This means that traffic does not
need
to pass through R2 to reach the external prefix 4::/64. The router will
lookup the 34::/64 prefix (the best inter-area route to reach 34::/64 as
described above) and use the routing information to reach the 4::/64, the
following commands confirm the result:
R1#show ipv6 route 4::/64
Routing entry for 4::/64
Known via "ospf 1", distance 110, metric 20, type extern 2
Route count is 1/1, share count 0
Routing paths:
FE80::C803:EFF:FE2C:8, FastEthernet0/0
Last updated 00:10:32 ago
R1#traceroute 4::4
Type escape sequence to abort.
Tracing the route to 4::4
1 13::3 92 msec 104 msec 36 msec
2 34::4 76 msec 116 msec 88 msec
Now what happen if the Forwarding address is choosen among the loopback
interfaces running OSPFv3:
let's configure another loopback on R4 and activate OSPFv3 in area 1:
R4(config)#int lo1
R4(config-if)#ipv6 address 40::4/64
R4(config-if)#ipv6 ospf 1 area 1
The translator is still R2 but the FA is now 40::4 the ip address of R4's
loopback 1:
R1#$spf database external | include Advertising Router|Forward Address
Advertising Router: 2.2.2.2
Now we have load balancing to reach 4::/64 (via R2 and R3) the external
prefix as shown by show ipv6 route 4::/64 command because R1 has a load
balancing to reach the forward address 40::4 (via R2 and R3)as shown by
R1#show ipv6 route | begin 40:: command:
R1#show ipv6 route 4::/64
Routing entry for 4::/64
Known via "ospf 1", distance 110, metric 20, type extern 2
Route count is 2/2, share count 0
Routing paths:
FE80::C803:EFF:FE2C:8, FastEthernet0/0
Last updated 00:17:43 ago
FE80::C801:14FF:FE78:6, FastEthernet0/1
Last updated 00:02:33 ago
R1#traceroute 4::4
Type escape sequence to abort.
Tracing the route to 4::4
1 12::2 76 msec
13::3 100 msec
12::2 60 msec
2 34::4 112 msec
24::4 84 msec
34::4 92 msec
Even if R3 receives the LSA Type 3 for the network 192.168.1.0 it does not
install this route in its routing table because the loop prevention
mechanism of inter-area ospf which tells that an LSA Type 3 is not
advertised into nonbackbone area and then advertised back into the
backbone area so ABRs ignore LSA Type 3 created by other ABRs when
learned from a nonbackbone area:
R3#show ip route ospf
10.0.0.0/24 is subnetted, 3 subnets
O
So R4 will never learn the LSA Type 3 for the network 192.168.1.0 as shown
by the following output because R3 ignore or reject this LSA when it receive
it from the ABR R1,thus R4 does not install the route toward 192.168.1.0 :
R4#show ip ospf database summary | include Link State ID
Link State ID: 10.1.12.0 (summary Network Number)
Link State ID: 10.1.23.0 (summary Network Number)
O IA
another question following the logic of the loop prevention in OSPF for the
inter-area ,why R1(ABR) unlike R3(ABR) installs then the route for the
subnet 10.1.34.0 which is configured in backbone and advertised into nonbackbone area and back into backbone?
R1#show ip route ospf
10.0.0.0/24 is subnetted, 3 subnets
O
O IA
so what is the conclusion? when R1 does not have adjacency with another
router (R5 is removed) R1 does not apply the loop prevention mechanism
for the inter-area,but if there is another router running adjacencies
(example shown with R5) R1 applies the rule .
let's shutdown the link between R1 and R5:
R1:
int fa0/0
shutdown
the subnet appears now because there is no router with ospf adjacencies
connected to R1:
we return now at the first case where we don't have a route in R4 to reach
192.168.1.0
R4#show ip route 192.168.1.0
% Network not in table
my question is: how to see the network 192.168.1.0 in the routing table of
R4 and override the loop prevention without changing the design of the
topology?
First solution:configure virtual link between R1 and R3:
R1(config-router)# area 1 virtual-link 3.3.3.3
R3(config-router)# area 1 virtual-link 1.1.1.1
Now we can see the route in both R3 and R4 's routing tables
R2:
interface Tunnel0
ip address 192.168.12.2 255.255.255.0
ip ospf 1 area 0
tunnel source Serial0/0
tunnel destination 10.1.12.1
R4#ping 192.168.1.1
Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds:
!!!!!
In this case the FA for both the LSA Type 5 advertised by R1 and R2 is set to
0.0.0.0:
R3#show ip ospf database external | include Forward Address|Advertising Router
Advertising Router: 1.1.1.1
Forward Address: 0.0.0.0
Advertising Router: 2.2.2.2
Forward Address: 0.0.0.0
interesting output ,R1 advertises the LSA Type 5 with FA=192.168.1.4 and
R3 advertises its LSA Type 5 with FA=0.0.0.0
so R3 what will do ?in this case R3 compares the cost to reach the two
Forward Address
let's examine the costs for both FA:
1-The LSA Type 5 advertised by R2 with FA 0.0.0.0 ,R3 looks the metric to
reach FA 0.0.0.0 which means the metric to reach the ASBR R2 which is
10 ,we can verify by the following output:
R3#show ip ospf border-routers | include 10.1.23.2
i 2.2.2.2 [10] via 10.1.23.2, FastEthernet0/1, ASBR, Area 0, SPF 6
The traceroute shown that the packet from R3 is going through the less
faster link through the serial link R2:
R3#traceroute 172.16.1.4
1 10.1.23.2 28 msec 28 msec 32 msec
2 192.168.2.5 32 msec 24 msec 48 msec
3 172.16.1.4 60 msec * 64 msec
In this case we return at the first case where we have load balancing
because the forward metric =10 to reach both ASBRs is the same
2-case:
R1(config)#int fa0/0
R1(config-if)#no ip ospf network point-to-point
R2(config-if)#int s0/0
R3#traceroute 172.16.1.5
1 10.1.13.1 32 msec 32 msec 32 msec
2 192.168.1.4 76 msec 64 msec 68 msec
3 172.16.1.5 52 msec * 64 msec
now we have the good result ,the show ip route shown that the route is
installed with the next hop R1 (10.1.13.1) with the forward metric 20 and
the traceroute shown that the packet is going through R1.
why because if we look the FA received by R3:
we can see that now R3 received two FA for each LSA Type 5 advertised by
R1 and R2:
-R3 looks the metric to reach the FA 192.168.1.4 advertised by R1 which is
20(the forward metric shown above):
to see the forward metric 74 to reach FA 192.168.2.5 ,we disable the fa0/0
of R1
we can see now that the packet is going through R2 with the forward metric
of 74 as explained above:
we can verify this cost by looking the LSA Type 4 created by the ABRs R2
and R3 which tells R1 how to reach the two ASBRs with the following
command:
2.2.2.2 R2 and 3.3.3.3 R3 are the ABRs which create the LSA Type 4 and
Destination Router ID is the ASBR ,the metric is the same =1:
R1#show ipv6 ospf data inter-area router | include Destination Router ID|Advertising
Router|Metric
Advertising Router: 2.2.2.2
Metric: 1
Destination Router ID: 4.4.4.4
Advertising Router: 3.3.3.3
Metric: 1
Destination Router ID: 5.5.5.5
Metric: 1
Prefix Address: 24::
Advertising Router: 3.3.3.3
Metric: 1
Prefix Address: 35::
An important point to notice also is the next-hop of the route toward the
external prefix 2001:45::/64 in R2 and R3 :
before configuring the area 1 as nssa:
Notice the next-hop in both R2 and R3 ,it's the link-local addresses or R4
and R5 respectively (FE80::C803:21FF:FE7C:6 and FE80::C804:20FF:FE20:8)
We can see that R1 installs one route to reach the external prefix ,the path
is via R3 as confirmed by the outgoing interface fa0/1 connected to R3
R1#show ipv6 route | s 2001:45::/64
OE2 2001:45::/64 [110/20]
via FE80::C802:21FF:FE7C:6, FastEthernet0/1
the reason is that even if R1 receives two LSA Type 5 with from R2 and
R3 ,R1 will choose the path via R3 as shown:
R1#show ipv6 spf database external | include Advertising Router|Forward Address
Advertising Router: 2.2.2.2
Forward Address: 24::4
Advertising Router: 3.3.3.3
Forward Address: 35::5
why?
because the cost now to reach the FA 35::5 advertised by R3 (1)is less than
the cost to reach the FA 24::4 advertised by R2 (2) as shown by the
following output:
R1#show ipv ospf data inter-area prefix | include Advertising Router|Prefix Address|
Metric
Advertising Router: 2.2.2.2
Metric: 2
Prefix Address: 24::
Advertising Router: 3.3.3.3
Metric: 1
Prefix Address: 35::
R4(config)#router ospf 1
R4(config-router)#redistribute eigrp 1 subnets metric-type 1
R1#show ip route 10.1.6.0
Routing entry for 10.1.6.0/24
Known via "ospf 1", distance 110, metric 22, type extern 1
Last update from 10.1.12.2 on FastEthernet0/0, 00:00:05 ago
Routing Descriptor Blocks:
* 10.1.12.2, from 4.4.4.4, 00:00:05 ago, via FastEthernet0/0
Route metric is 22, traffic share count is 1
The metric now is set to 22 (20+2) Cost 2 to ASBR and Cost 20 advertised
R1(config)#interface Fa0/0
R1(config-subif)#ip ospf cost 100
The cost via R2 is calculated as follow: cost to R2 100+ cost the link of R4
1+99(redistributed metric)=200
The cost via R3 is calculated as follow:cost to R3 1+ cost the link of R5
1+198(redistributed metric)=200
We have load balancing on R1:
R1#show ip route 10.1.6.0
Routing entry for 10.1.6.0/24
Known via "ospf 1", distance 110, metric 200, type extern 1
Last update from 10.1.13.3 on FastEthernet0/1, 00:00:06 ago
Routing Descriptor Blocks:
10.1.13.3, from 5.5.5.5, 00:00:06 ago, via FastEthernet0/1
Route metric is 200, traffic share count is 1
* 10.1.12.2, from 4.4.4.4, 00:00:06 ago, via FastEthernet0/0
Route metric is 200, traffic share count is 1
R1 looks the LSA Type 1 and finds that the cost to R2:2.2.2.2 (DR) is 100
and the cost to R3 :3.3.3.3 (DR) is 1 as shown by the show ip ospf database
router 1.1.1.1 command
the total cost to reach 10.1.6.0 via R2 is: cost to R2:100 + cost the link R4:1
+ the redistributed metric:1=102
The total cost via R3 is :cost to R3:1 + cost the link R5:1 + the redistributed
metric:1=3
LSA Type 1 in OSPFv2 and the new LSAs Type 8/Type 9 in OSPFv3:
The Type 1 LSA for OSPFv3 does not include any ipv6 addresses unlike with
OSPFv2 as shown by the two following output about router LSA in both
scenario with OSPFv3 and OSPFv2:
In OSPFv3:there is only reference to the router-id of the neighbor
R11#show ipv6 ospf database router
OSPFv3 Router with ID (1.1.1.1) (Process ID 1)
Router Link States (Area 0)
LS age: 3
Options: (V6-Bit E-Bit R-bit DC-Bit)
LS Type: Router Links
Link State ID: 0
Advertising Router: 1.1.1.1
LS Seq Number: 80000005
Checksum: 0x805D
Length: 40
Number of Links: 1
this point is resolved in OSPFv3 by adding the new LSAs Type 8 and Type 9
in ospf:
Here there are two Type LSA 8 ,one originated by R11 and another from
R22,this LSA is used to advertise the link local addresses ,in this
example ,R11 advertises its own link local address
(FE80::C206:DFF:FE94:0),R22 advertises its own link local address which
is:FE80::C207:7FF:FED8:0,both LSA advertises the same prefixes
2001:1122:: which is the subnet shared between R11 and R22,the purpose
of this Type LSA 8 is that in OSPFv3 the link local address is used as nexthop in the routing table so the routers running OSPFv3 need to know the
link addresses of the directly connected routers:
LS age: 619
Options: (V6-Bit E-Bit R-bit DC-Bit)
LS Type: Link-LSA (Interface: FastEthernet0/0)
Link State ID: 4 (Interface ID)
Advertising Router: 2.2.2.2
LS Seq Number: 80000002
Checksum: 0x1827
Length: 56
Router Priority: 1
Link Local Address: FE80::C207:7FF:FED8:0
Number of Prefixes: 1
Prefix Address: 2001:1122::
Prefix Length: 64, Options: None
But what about the intra-area subnet of 2001:11::/64 (lo0's R11),if we will
enter the following command below to see the Type LSA 9 in R11 , R11
create one Type LSA 9 including the prefix 2001:11::(Lo0's R11) and the
second Type LSA 9 advertised by R22 with the prefix address
2001:1122::/64 so this is the purpose of Type 9 LSA called Intra-area Prefix
LSA,it allow the routers to know the intra-area prefix:
R11#show ipv6 ospf database prefix
OSPFv3 Router with ID (1.1.1.1) (Process ID 1)
Intra Area Prefix Link States (Area 0)
Routing Bit Set on this LSA
LS age: 35
LS Type: Intra-Area-Prefix-LSA
Link State ID: 0
Advertising Router: 1.1.1.1
LS Seq Number: 80000006
Checksum: 0xEB9A
Length: 44
Referenced LSA Type: 2001
Referenced Link State ID: 0
Referenced Advertising Router: 1.1.1.1
Number of Prefixes: 1
Prefix Address: 2001:11::
Prefix Length: 64, Options: None, Metric: 1
notice unlike the router R33, R11 advertise only one prefix address
2001:11::/64 in its own LSA Type 9 (prefix for loopback,looks Number of
Prefixes: 1 in the output above) but not for 2001:1122::/64 (the subnet
shared betw R11 and R22),but R33 advertises two prefixes one for
2001:33::/64 and another for 2001:2233::/64(the subnet shared betw R33
and R22 (looks Number of Prefixes: 2 in the output below),also R33 includes
the metric for both the two prefixes, Metric= 1 for 2001:33::/64, Metric=
64(s0/0 of R33) for 2001:2233::/64 ,also in the LSA Type 9 of R11, R22
advertises the prefix 2001:1122::/64 in the LSA 9 with the metric 0 (the
output above) unlike with the LSA Type 9 in R33 where R22 advertises the
prefix 2001:2233:: with metric 64 (s0/0 of R22) as shown below :
Number of Prefixes: 2
Prefix Address: 2001:33::
Prefix Length: 64, Options: None, Metric: 1
Prefix Address: 2001:2233::
Prefix Length: 64, Options: None, Metric: 64
Now how to ensure that the two prefixes (2001:11::/64 and 2001:1122::/64)
appear in the LSA Type 9 of R11 like in R33 and in this LSA we should see
the Advertising Router R22 sets the metric to non-zero for the prefix
2001:1122::/64 (so 10 the cost 's fa0/0 of R22) like in the LSA Type 9 of R33
where R22 advertises the prefix 2001:2233:: with the metric 64(cost of s0/0
's R22)?
R11(config)#int fa0/0
R11(config-if)#ipv6 ospf network point-to-point
R22(config)#int fa0/0
R22(config-if)#ipv6 ospf network point-to-point
the desired result is displayed ,in the LSA Type 9 generated by R11 , there
are two prefixes (look Number of Prefixes: 2),one for the Lo0's R11 with the
metric =1 and another for 2001:1122::/64 with the metric 10(the cost of the
int fa0/0),R22 also advertises the prefix 2001:1122::/64 with the metric 10
as displayed by the following output:
R11#show ipv6 ospf database prefix
OSPFv3 Router with ID (1.1.1.1) (Process ID 1)
Intra Area Prefix Link States (Area 0)
Routing Bit Set on this LSA
LS age: 35
LS Type: Intra-Area-Prefix-LSA
Link State ID: 0
Advertising Router: 1.1.1.1
LS Seq Number: 80000007
Checksum: 0xB920
Length: 56
Referenced LSA Type: 2001
LS age: 16
LS Type: Intra-Area-Prefix-LSA
Link State ID: 0
Advertising Router: 2.2.2.2
LS Seq Number: 80000001
Checksum: 0x8ACD
Length: 44
Referenced LSA Type: 2001
Referenced Link State ID: 0
Referenced Advertising Router: 2.2.2.2
Number of Prefixes: 1
Prefix Address: 2001:1122::
Prefix Length: 64, Options: None, Metric: 10
Requirements:
1. Use the addressing scheme shown in the diagram.
Router R1 Hostname HQ
hostname HQ
interface Loopback0
ip address 10.1.1.9 255.255.255.252
ip ospf network point-to-point
!
interface Serial0/1
encapsulation frame-relay ietf
no shutdown
!
interface Serial0/1.102 point-to-point
ip address 10.1.1.1 255.255.255.252
bandwidth 64
frame-relay interface-dlci 102
!
interface Serial0/1.103 point-to-point
ip address 10.1.1.5 255.255.255.252
bandwidth 64
interface Serial0/1
encapsulation frame-relay ietf
clock rate 64000
no shutdown
!
interface Serial0/1.201 point-to-point
ip address 10.1.1.2 255.255.255.252
bandwidth 64
frame-relay interface-dlci 201
!
router ospf 1
log-adjacency-changes
area 100 virtual-link 10.1.1.9
area 200 range 10.1.1.96 255.255.255.224
network 10.1.1.0 0.0.0.3 area 100
network 10.1.1.100 0.0.0.3 area 200
network 10.1.1.104 0.0.0.3 area 200
network 10.1.1.108 0.0.0.3 area 200
network 10.1.1.112 0.0.0.3 area 200
!
interface Serial0/0.301 point-to-point
ip address 10.1.1.6 255.255.255.252
bandwidth 64
frame-relay interface-dlci 301
!
router ospf 1
log-adjacency-changes
area 300 nssa
redistribute connected subnets
network 10.1.1.4 0.0.0.3 area 300
end
clockrate 64000
bandwidth 64
frame-relay intf-type dce
frame-relay route 201 interface Serial0/0/0 102
no shutdown
!
interface Serial0/2
encapsulation frame-relay ietf
bandwidth 64
frame-relay intf-type dte
frame-relay route 301 interface Serial0/0/0 103
no shutdown
R1 is the hub ,R2 and R4 are the spoke routers in Frame-Relay ,the three
routers are running OSPF process ID 1.
The link between R2 and R4 is configured as a point-to-multipoint network
type and the two routers are running OSPF process ID 2.
To ensure that all routers on Frame-relay can ping each others'serial
interfaces we enter the following command in each routers:
R1(config)#interface serial 0/1
R1(config-if)#frame-relay map ip 10.0.0.2 102 broadcast
R1(config-if)#frame-relay map ip 10.0.0.4 104 broadcast
R2(config)#router ospf 1
R2(config-router)#router-id 2.2.2.2
R2(config-router)#neighbor 10.0.0.1
R2(config)#interface serial 0/1
R2(config-if)#ip ospf 1 area 0
4(config)#router ospf 1
R4(config-router)#router-id 4.4.4.4
R4(config)#interface serial 0/0
R4(config-if)#ip ospf 1 area 0
Pri State
Interface
2.2.2.2
0 FULL/DROTHER
00:01:56
10.0.0.2
Serial0/1
4.4.4.4
0 FULL/DROTHER
00:01:58
10.0.0.4
Serial0/1
We will configure the link between R2 and R4 with OSPF 2 and network
point-to-multipoint to prevent the election of DR and BDR:
R2(config)#router ospf 2
R2(config-router)#router-id 22.22.22.22
R2(config)#interface fastethernet 0/0
R2(config-if)#ip ospf network point-to-multipoint
R2(config-if)#ip ospf 2 area 0
R4(config)#router ospf 2
R4(config-router)#router-id 44.44.44.44
R4(config)#interface fastethernet 0/0
R4(config-if)#ip ospf network point-to-multipoint
R4(config-if)#ip ospf 2 area 0
R2 and R4 redistribute between OSPF 1 and OSPF 2 ,to ensure that the
routes from OSPF 1 are not re-advertised back to OSPF 2 and vice versa we
configure the route-tag:
R2:
route-map OSPF1-INTO-OSPF2 deny 10
match tag 4
!
route-map OSPF1-INTO-OSPF2 permit 20
set tag 2
!
route-map OSPF2-INTO-OSPF1 deny 10
match tag 4
!
route-map OSPF2-INTO-OSPF1 permit 20
set tag 2
!
router ospf 1
redistribute ospf 2 subnets route-map OSPF2-INTO-OSPF1
!
router ospf 2
redistribute ospf 1 subnets route-map OSPF1-INTO-OSPF2
R4:
route-map OSPF1-INTO-OSPF2 deny 10
match tag 2
!
route-map OSPF1-INTO-OSPF2 permit 20
set tag 4
!
route-map OSPF2-INTO-OSPF1 deny 10
match tag 2
!
route-map OSPF2-INTO-OSPF1 permit 20
set tag 4
!
router ospf 1
redistribute ospf 2 subnets route-map OSPF2-INTO-OSPF1
!
router ospf 2
redistribute ospf 1 subnets route-map OSPF1-INTO-OSPF2
O E2
O E2
O E2
O E2
R4(config)#router ospf 1
R4(config-router)#redis ospf 2 subnet route-ma OSPF2-INTO-OSPF1 metric 4
Process ID number
counters
OSPF counters
process
Now the best path to reach 150.1.1.0 is the external route learned from
R2 ,notice nthe next-hop is R2's ip address (150.5.5.2):
R4(config-router)#do show ip route 150.1.1.0
Routing entry for 150.1.1.0/24
Known via "ospf 2", distance 105, metric 74
Tag 2, type extern 2, forward metric 10
Redistributing via ospf 1
R1 allow redistribution only for external routes Type 2 which match the ACL
1 and learned from ospf 2. in this case the only subnet which is permitted
by the ACL 1 and originating from ospf 2 as E2 is 10.22.22.0/24.So R1
redistribute this subnet as type 1 into ospf 1 because the route-map
configured with the set metric-type type 1 Thus R3 installs the E1 route in
its routing table.
R3#show ip route
10.0.0.0/24 is subnetted, 3 subnets
C
O E1
C
FE80::C802:5FF:FEC4:6, FastEthernet0/1
Last updated 00:00:56 ago
FE80::C801:13FF:FEF8:8, FastEthernet0/0
Last updated 00:00:38 ago
R1 receives one LSA Type 5 for the external prefix 2001::/64 from R4 (the
ASBR )as shown by the show ipv6 ospf database external ,first R1 looks
that the cost to reach the ASBR R4 is equal through R2 and R3:
R1#show ipv6 ospf database external
OSPFv3 Router with ID (1.1.1.1) (Process ID 1)
Type-5 AS External Link States
Routing Bit Set on this LSA
LS age: 492
LS Type: AS External Link
Link State ID: 0
Advertising Router: 4.4.4.4
LS Seq Number: 80000001
Checksum: 0xF496
Length: 36
Prefix Address: 2001::
Prefix Length: 64, Options: None
Metric Type: 2 (Larger than any link state path)
Metric: 20
to calculate this cost, R1 uses the LSAs Type 4 received from the ABRs R2
and R3 as show by the show ipv6 ospf database inter-area router
command , we can see that there is two LSAs Type 4 with two Advertising
Routers (2.2.2.2 which is R2 and 3.3.3.3 which is R3) and with the same
Destination Router ID 4.4.4.4 which is R4,(notice in OSPFv2 the LSA Type 4
uses the link state identifier LSID and in OSPFv3 the LSA 4 uses Destination
Router ID),these LSAs includes the costs to reach the ASBR from the two
ABRs (R2 and R3) which is equal to 1 in this case,then R1 calculates the
cost to reach the ASBR via each ABR by adding the R1's intra-area cost to
reach the ABRs to the cost listed in the corresponding Type 4 LSAs,so here
when R1 calculates two possible routes to reach 2001::/64 ,it find routes
both have a metric of 20 so R1 looks at the cost to reach the ASBR over
each route by adding its intra-area cost to reach the ABRs to the ABR's cost
to reach the ASBR listed in the LSA Type 4,in this case R1 finds that the
cumulative cost is the same via R2 and via R3,thus R1 installs a loadbalancing:
R1#show ipv6 ospf database inter-area router
OSPFv3 Router with ID (1.1.1.1) (Process ID 1)
Inter Area Router Link States (Area 0)
Routing Bit Set on this LSA
LS age: 865
Options: (V6-Bit, E-Bit, R-bit, DC-Bit)
LS Type: Inter Area Router Links
Link State ID: 67372036
Advertising Router: 2.2.2.2
LS Seq Number: 80000001
Checksum: 0xB22B
Length: 32
Metric: 1
Destination Router ID: 4.4.4.4
To see the cost to reach the ASBR from R1 we will use the show ipv6 ospf
border-routers command, notice we have two intra-area routes as denoted
by the letter I to reach the ASBR 4.4.4.4 with the same cost 4,one route is
via FE80::C801:19FF:FE40:8(the link-local address of R2) and another route
via FE80::C803:1AFF:FE74:6 (the link-local address of R3):
R1#show ipv6 ospf border-routers
OSPFv3 Router with ID (1.1.1.1) (Process ID 1)
Codes: i - Intra-area route, I - Inter-area route
I 4.4.4.4 [2] via FE80::C801:19FF:FE40:8, FastEthernet0/0, ASBR, Area 0, SPF 4
I 4.4.4.4 [2] via FE80::C803:1AFF:FE74:6, FastEthernet0/1, ASBR, Area 0, SPF 4
i 2.2.2.2 [1] via FE80::C801:19FF:FE40:8, FastEthernet0/0, ABR, Area 0, SPF 4
i 3.3.3.3 [1] via FE80::C803:1AFF:FE74:6, FastEthernet0/1, ABR, Area 0, SPF 4
another way to calculate the cost to reach the ASBR: is to see the LSAs
Type 1 advertised by both R2 and R3 and received by R1 which is the cost
to reach the ABRs from R1,in this case we can see that it is equal to 1, then
R1 adds its intra-area cost to reach the ABRs to the cost listed in the
corresponding Type 4 LSAs which is equal to 1 as shown by above with the
show ipv6 ospf database inter-area router command, so 1+1=2:
R1#show ipv6 ospf database router adv-router 2.2.2.2 | include Metric
Link Metric: 1
R1#show ipv6 ospf database router adv-router 3.3.3.3 | include Metric
Link Metric: 1
[up/up]
FE80::C802:5FF:FEC4:8
34::3
FastEthernet0/1
[up/up]
FE80::C802:5FF:FEC4:6
13::3
The traceroute shown that the best-path to reach the external prefix is via
R3 :
R1#traceroute 2001::4
Type escape sequence to abort.
Tracing the route to 2001::4
1 13::3 120 msec 120 msec 4 msec
2 34::4 184 msec 132 msec 184 msec
Age
23
Seq#
Prefix
0x80000004 2001::/64
Age
2.2.2.2
1343
4.4.4.4
23
Seq#
Link ID
0x80000006 3
0x80000006 3
Interface
Fa0/1
Fa0/1
Age
Seq#
1343
Link ID
Ref-lstype Ref-LSID
0x80000006 3072
0x2002
Age
249
Seq#
Prefix
0x80000001 2001::/64
below we can see that R1 receives the LSA Type 5 advertised by the ASBR
R4 :
R1#show ipv6 ospf database external
OSPFv3 Router with ID (1.1.1.1) (Process ID 1)
Type-5 AS External Link States
LS age: 1219
LS Type: AS External Link
Link State ID: 0
Advertising Router: 4.4.4.4
LS Seq Number: 80000003
Checksum: 0xF098
Length: 36
Prefix Address: 2001::
let's look the LSA Type 5 received by R1 for the external prefix:
R1#show ipv6 ospf database external
OSPFv3 Router with ID (1.1.1.1) (Process ID 1)
Type-5 AS External Link States
Routing Bit Set on this LSA
LS age: 129
LS Type: AS External Link
Link State ID: 0
Advertising Router: 2.2.2.2
LS Seq Number: 80000001
Checksum: 0xB2A6
Length: 52
Prefix Address: 2001::
Prefix Length: 64, Options: None
Metric Type: 2 (Larger than any link state path)
Metric: 20
Forward Address: 24::4
We can see that R1 receives two LSAs Type 5 from R2 and R3 ,notice the
Forward Addresses in both LSAs,from R2 the FA=24::4 and from R3 the FA
=34::4,to find the best route to reach the external prefix ,R1 looks the best
intra-area or inter-area route to reach the Forward Address, in this case the
inter-area routes:
R1#show ipv6 route ospf
OI 24::/64 [110/2]
via FE80::C801:19FF:FE40:8, FastEthernet0/0
OI 34::/64 [110/2]
Notice the cost to reach 24::/64 and 34::/64 is the same and equal to 2 thus
R1 installs the load balancing.
now if we increase the cost of R1 's fa0/0:
R1(config)#int fa0/0
R1(config-if)#ipv6 ospf cost 50
Now the best path to reach the external prefix is via R3,why?
R1#show ipv6 route 2001::/64
Routing entry for 2001::/64
Known via "ospf 1", distance 110, metric 20, type extern 2
Route count is 1/1, share count 0
Routing paths:
FE80::C803:1AFF:FE74:6, FastEthernet0/1
Last updated 00:04:06 ago
As explained jus above ,R1 looks the cost to reach the two FA and it find
that the cost to reach 34::4 is 2 less than the cost to reach the FA 24::4
which is 51,thus R1 installs the route via R3:
R1#show ipv6 route ospf
OI 24::/64 [110/51]
via FE80::C801:19FF:FE40:8, FastEthernet0/0
OI 34::/64 [110/2]
via FE80::C803:1AFF:FE74:6, FastEthernet0/1
OE2 2001::/64 [110/20]
via FE80::C803:1AFF:FE74:6, FastEthernet0/1
Now let's remove the nssa in area 2 and leaves area 3 as nssa and we
should see that the best route to reach the external prefix is via R2 :
as expected R1 installs the route via R2 to reach the external prefix even if
the cost on R1's fa0/0(connected to R2) is left increased:
R1#show ipv route 2001::/64
Routing entry for 2001::/64
Known via "ospf 1", distance 110, metric 20, type extern 2
Route count is 1/1, share count 0
Routing paths:
FE80::C801:19FF:FE40:8, FastEthernet0/0
Last updated 00:00:02 ago
R1#traceroute 2001::4
Type escape sequence to abort.
Tracing the route to 2001::4
1 12::2 168 msec 44 msec 16 msec
2 24::4 56 msec 52 msec 40 msec
After removing nssa in area 2 and leaving area 3 as nssa ,R3 receives one
LSA Type 7 from R4 and one LSA Type 5 from R4 for the same external
prefix as shown by the following command:
R3(config-rtr)#do show ipv ospf database | begin Type-7
Type-7 AS External Link States (Area 3)
ADV Router
Age
Seq#
Prefix
4.4.4.4
290
0x80000002 2001::/64
Age
Seq#
Link ID
Interface
3.3.3.3
928
0x80000007 2
Fa0/0
4.4.4.4
922
0x80000008 2
Fa0/0
Age
917
Seq#
Link ID
0x80000005 2048
Ref-lstype Ref-LSID
0x2002
Age
292
Seq#
Prefix
0x80000001 2001::/64
Even if R3 is the translator in nssa area 3 ,it does not generate the LSA
Type 5 as shown by the show ipv6 ospf database external self-originate
command:
R3(config-rtr)#do show ipv6 ospf database external self-originate
OSPFv3 Router with ID (3.3.3.3) (Process ID 1)
R2 prefers the LSA Type 5 advertised by R4 over the LSA Type 7 advertised
by R4:
Now let's remove the cost configured above on R2 and leave it in its
default:
R1(config)#int fa0/0
R1(config-if)#no ipv6 ospf cost 50
To ensure that R1 prefers the path via R2, we will suppress the FA in the
LSA Type 7:
R2(config-rtr)#area 2 nssa translate type7 suppress-fa
Now R1 installs the route via R2 and the traceroute shown that the packet
takes the path through R2:
R1#show ipv route 2001::/64
Routing entry for 2001::/64
Known via "ospf 1", distance 110, metric 20, type extern 2
Route count is 1/1, share count 0
Routing paths:
FE80::C801:19FF:FE40:8, FastEthernet0/0
Last updated 00:03:53 ago
R1#traceroute 2001::4
Type escape sequence to abort.
Tracing the route to 2001::4
1 12::2 88 msec 56 msec 28 msec
2 24::4 68 msec 108 msec 52 msec
Notice now the LSAs type 5 received from R2 and R3? R3 includes the FA in
its LSA 5 but not R2 ,so R1 to reach the external prefix it prefers the LSA
Type 5 without FA over the LSA Type 5 with FA:
R1#show ipv ospf database external | include Advertising Router|Forward Address
Advertising Router: 2.2.2.2
Advertising Router: 3.3.3.3
Forward Address: 34::4
Now we will add the following loopback interface and activate ospf:
interface loopback 4
R4(config-if)#ip address 40.40.40.4 255.255.255.255
R4(config)#router ospf 1
R4(config-router)#network 40.40.40.4 0.0.0.0 area 3
Let's dissect some shows command and also some behavior when making
the changes on R3:
-Case 1:no Loopback interfaces on R3
So R3 will choose the FA among the highest ip address among the physical
address running OSPF in each area nssa
R2 receives two LSA Type 7 with two FA ,which ara the R3's fa0/0 for area
23 and R3'fa0/1 for area 32,we will focus on the subnet 4.4.4.0 for brevity:
R2#show ip ospf data nssa-external 4.4.4.0 | include Advertising Router|Forward
Address|Area
Type-7 AS External Link States (Area 23)
Advertising Router: 3.3.3.3
Forward Address: 23.23.23.3
Type-7 AS External Link States (Area 32)
Advertising Router: 3.3.3.3
Forward Address: 32.32.32.3
-Case 2:Now we will configure two loopbacks on R3 ,Lo0 in area 23 and Lo1
in area 32:
R3:
interface Loopback0
ip address 30.30.3.3 255.255.255.0
ip ospf 1 area 23
!
interface Loopback1
ip address 30.30.30.30 255.255.255.0
ip ospf 1 area 32
Now R3 chooses the two Loopback as FA for each area,30.30.3.3 for area 23
and 30.30.30.30 for area 32:
R2#show ip ospf data nssa-external 4.4.4.0 | include Advertising Router|Forward
Address|Area
Type-7 AS External Link States (Area 23)
Advertising Router: 3.3.3.3
Forward Address: 30.30.3.3
Type-7 AS External Link States (Area 32)
Advertising Router: 3.3.3.3
Forward Address: 30.30.30.30
R2 chooses the FA 30.30.30.30 for its own LSA Type 5 and R1 receives the
same FA:
R2#show ip ospf data external 4.4.4.0 | include Advertising Router|Forward Address
Advertising Router: 2.2.2.2
Forward Address: 30.30.30.30
-Case 3:Let's invert the area between the Loopback interfaces ,Lo0 in area
Now we can see that the FA is now 30.30.3.3 which is configured in area 32:
R2#$f data external 4.4.4.0 | include Advertising Router|Forward Address
Advertising Router: 2.2.2.2
Forward Address: 30.30.3.3
So we can deduce that when the forwarding addresses are chosen among
the loopback interfaces ,the choice of the FA in the LSA Type 5,is based
over the highest physical ip address regardless which loopback is higher or
lower .In this case 32.32.32.3 wins over 23.23.23.3
R3(config-if)#int fa0/0
R3(config-if)#ip address 192.168.23.3 255.255.255.0
-Case 5:Let's invert the area between the Loopback interfaces ,Lo0 in area
23 and Lo1 in area 32:
On R3:
interface Loopback0
ip address 30.30.3.3 255.255.255.0
ip ospf 1 area 23
!
interface Loopback1
ip address 30.30.30.30 255.255.255.0
ip ospf 1 area 32
The assumption is confirmed ,we can see that the FA chosen for the LSA
Type 5 is now 30.30.3.3 which is configured in the area 23 and remember
that 192.168.23.3 in area 23 is higher than 32.32.32.3 in area 32:
R2#$pf database external 4.4.4.0 | include Advertising Router|Forward Address
Advertising Router: 2.2.2.2
R2 receives two LSA Type 7 with two FA chosen among the physical
interfaces,fa0/0's R3 (192.168.23.3) in area 23 and fa0/1's R3 (32.32.32.3)
in area 32:
R2#$a-external 4.4.4.0 | include Advertising Router|Forward Address|Area
Type-7 AS External Link States (Area 23)
Advertising Router: 3.3.3.3
Forward Address: 192.168.23.3
Type-7 AS External Link States (Area 32)
Advertising Router: 3.3.3.3
Forward Address: 32.32.32.3
Looks now the FA chosen by R2 for its own LSA Type 5 ,it is the ip address
192.168.23.3 because it is higher than 32.32.32.3,we confirm the case 1 at
the first of the post:
R2#$f database external 4.4.4.0 | include Advertising Router|Forward Address
Advertising Router: 2.2.2.2
Forward Address: 192.168.23.3
Conclusion:
In the case where an ABR receives two LSAs Type 7 with two Forward
Addresses from an ASBR for the same destination:
-When the FA is chosen among the physical interfaces addresses, the
highest FA wins at the ABR.
-When the FA is chosen among the loopback interfaces addresses ,there no
effect in the choice, the ABR chooses the highest physical address regarless
of the choice loopback addresses,higher or not.
CASE 1:
area 1 is configured as nssa, R2 receives the LSA Type 7 (for the external
prefix 30::/64) from the ASBR R3 with the FA =3::3 which is the Lo0 of R3 as
shown by the following show ipv ospf data nssa-ext command ,but the nexthop on R2 to reach the external prefix 30::/64 is the link-local address of R3
(FE80::C802:17FF:FECC:6) as shown by show ipv6 route 30::/64 command :
R2(config-rtr)#do show ipv ospf data nssa-ext
OSPFv3 Router with ID (2.2.2.2) (Process ID 1)
Type-7 AS External Link States (Area 1)
Routing Bit Set on this LSA
LS age: 114
LS Type: AS External Link
R2#ping 30::3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 30::3, timeout is 2 seconds:
!!!!!
CASE2:
If we disable the Loopback 0 of R3 and ensure that R3 chooses the FA from
the highest ip address among the physical interface addresses ,the LSA
Type 7 advertised by R3 has now the FA =2003::3/64 which is the ip address
of Fa0/1's R3 as shown by show ipv ospf data nssa-ext command and the
next-hop to reach the external prefix 30::/64 now is the 2003::3 which is the
FA set in the LSA Type 7 described above as shown by show ipv6 route
30::/64 command:
R2#ping 30::3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 30::3, timeout is 2 seconds:
!!!!!
CASE3:
Now what happen if we configure the interfaces of both R2 and R3 are in
different subnet:
R2(config)#int fa0/1
R2(config-if)#no ipv6 address 2003::2/64
R2(config-if)#ipv6 address 2000::2/64
The FA is now 3::3 as expected and the next-hop to reach 30::/64 is the linklocal address of R3 as shown by the show ipv6 route 30::/64 command on
R2
R2#show ipv6 ospf database nssa-external
OSPFv3 Router with ID (2.2.2.2) (Process ID 1)
Type-7 AS External Link States (Area 1)
Routing Bit Set on this LSA
LS age: 7
LS Type: AS External Link
Link State ID: 1
Advertising Router: 3.3.3.3
LS Seq Number: 80000005
Checksum: 0xA4D4
Length: 52
Prefix Address: 30::
Prefix Length: 64, Options: P
Metric Type: 2 (Larger than any link state path)
Metric: 20
Forward Address: 3::3
R2#ping 30::3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 30::3, timeout is 2 seconds:
!!!!!
CASE4:
what happen If we disable the Loopback 0 of R3 and ensure that R3
chooses the FA from the highest ip address among the physical interface
addresses in this case where the interfaces of the link R2--R3 are in
different subnet:
R3(config-if)#int lo0
R3(config-if)#shutdown
R2#ping 30::3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 30::3, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
R2#ping 2003::3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2003::3, timeout is 2 seconds:
!!!!!
The case 4 is the only case where the ping from R2 toward the external
prefix 30::/64 fails.
The adjacencies appear between the two routers R2 and R3 and they are
displayed in the show ip ospf nei but without dead time:
R2#show ip ospf neighbor
Neighbor ID
Pri State
3.3.3.3
0 FULL/ -
3.3.3.3
1 FULL/BDR
00:00:33
11.11.11.11
R2#
1 FULL/BDR
13.13.13.3
OSPF_VL0
13.13.13.3
00:00:36
Interface
12.12.12.1
FastEthernet0/1
FastEthernet0/0
R4#ping 11.1.1.1
Type escape sequence to abort.
Let's looks how the LSA Type 4 is generated when configuring virtual-link:
By definition the LSA Type 4 is generated by an ABR and it is used to tell
how to reach the ASBR ,in the LSA 4 ,the ABR list the router-id of the ASBR
in the LSID field and its router-id in the Advertising Router field.
let's dissect the topology now to see how ,where and for what the LSA 4 is
created:
the router-id are configured as follow:
R1 11.11.11.11
R2 2.2.2.2
R3 3.3.3.3
R4 4.4.4.4
R5 5.5.5.5
LS age: 1854
Options: (No TOS-capability, DC, Upward)
LS Type: Summary Links(AS Boundary Router)
Link State ID: 11.11.11.11 (AS Boundary Router address)
Advertising Router: 2.2.2.2
LS Seq Number: 80000001
Checksum: 0xA756
Length: 28
Network Mask: /0
TOS: 0 Metric: 10
LS age: 122
Options: (No TOS-capability, DC, Upward)
LS Type: Summary Links(AS Boundary Router)
Link State ID: 5.5.5.5 (AS Boundary Router address)
-R3 generates an LSA Type 4 to reach the ASBR R5 with LSID 5.5.5.5 and
Advertising Router 3.3.3.3 and inject it into area 3.
The show ip ospf database asbr-summary self-originate command displays
the LSA Type 4 generated by R3:
R3# show ip ospf database asbr-summary self-originate
OSPF Router with ID (3.3.3.3) (Process ID 1)
Summary ASB Link States (Area 2)
LS age: 55
Options: (No TOS-capability, DC, Upward)
LS Type: Summary Links(AS Boundary Router)
Link State ID: 5.5.5.5 (AS Boundary Router address)
Advertising Router: 3.3.3.3
LS Seq Number: 80000002
Checksum: 0x106
Length: 28
Network Mask: /0
TOS: 0 Metric: 20
-R4 generates an LSA Type 4 to reach the ASBR R1 with LSID 11.11.11.11
and Advertising Router 4.4.4.4 and inject it into area 1.
-R4 generates an LSA Type 4 to reach the ASBR R5 with LSID 5.5.5.5 and
Advertising Router 4.4.4.4 and inject it into area 0.
The show ip ospf database asbr-summary self-originate command displays
the LSA Type 4 generated by R4:
R4#show ip ospf database asbr-summary self-originate
LS age: 144
Options: (No TOS-capability, DC, Upward)
LS Type: Summary Links(AS Boundary Router)
Link State ID: 11.11.11.11 (AS Boundary Router address)
Advertising Router: 4.4.4.4
LS Seq Number: 80000002
Checksum: 0x32AE
Length: 28
Network Mask: /0
TOS: 0 Metric: 30
LS age: 145
Options: (No TOS-capability, DC)
LS Type: Router Links
Link State ID: 2.2.2.2
Advertising Router: 2.2.2.2
LS Seq Number: 80000006
Checksum: 0x358C
Length: 36
Number of Links: 1
TOS 0 Metrics: 10
LS age: 146
Options: (No TOS-capability, DC)
LS Type: Router Links
Link State ID: 2.2.2.2
Advertising Router: 2.2.2.2
LS Seq Number: 80000005
Checksum: 0xE6E3
Length: 36
Number of Links: 1
LS age: 236
Options: (No TOS-capability, DC)
LS Type: Router Links
Link State ID: 2.2.2.2
Advertising Router: 2.2.2.2
LS Seq Number: 80000005
Checksum: 0x6776
Length: 36
Area Border Router
Number of Links: 1
LS age: 236
Options: (No TOS-capability, DC)
LS Type: Router Links
Link State ID: 2.2.2.2
Advertising Router: 2.2.2.2
LS Seq Number: 80000008
Checksum: 0x407A
Length: 36
Area Border Router
Virtual Link Endpoint
Number of Links: 1
LS age: 244
Options: (No TOS-capability, DC)
LS Type: Router Links
Link State ID: 2.2.2.2
Advertising Router: 2.2.2.2
LS Seq Number: 80000006
Checksum: 0xE7E0
Length: 36
Area Border Router
Number of Links: 1
In this scenario we have three ABRs(R1,R2 and R3),R3 receives two LSA
Type 3 for the network 1:1:1:1::/64 ,one from R1 and another from R2 as
shown by the show ipv6 ospf database inter-area prefix 1:1:1:1::/64
command:
R3#show ipv6 ospf database inter-area prefix 1:1:1:1::/64
OSPFv3 Router with ID (3.3.3.3) (Process ID 1)
Inter Area Prefix Link States (Area 0)
Routing Bit Set on this LSA
LS age: 939
LS Type: Inter Area Prefix Links
Link State ID: 0
Advertising Router: 1.1.1.1
LS Seq Number: 80000001
Checksum: 0x9D50
Length: 36
Metric: 1
LS age: 893
LS Type: Inter Area Prefix Links
Link State ID: 2
Advertising Router: 2.2.2.2
LS Seq Number: 80000001
Checksum: 0xA736
Length: 36
Metric: 11
Prefix Address: 1:1:1:1::
Prefix Length: 64, Options: None
LS age: 935
LS Type: Inter Area Prefix Links
Link State ID: 2
Advertising Router: 3.3.3.3
LS Seq Number: 80000001
Checksum: 0xCED4
Length: 36
Metric: 65
Prefix Address: 1:1:1:1::
Prefix Length: 64, Options: None
Even if R3 receives the LSA Type 3(inter-area prefix in OSPFv3) for the
network 1:1:1:1::/64 from R2, it does not install this route in its routing
table because the loop prevention mechanism of inter-area ospf in other
word Split Horizon per Area which tells that an LSA Type 3 is not advertised
into nonbackbone area and then advertised back into the backbone area so
ABRs ignore LSA Type 3 created by other ABRs when learned from a
nonbackbone area,in this case because the link between R2 and R3 resides
in a non-backbone area ,The LSA Type 3 advertised by R2 is ignored by
R3#traceroute 1:1:1:1::1
Type escape sequence to abort.
Tracing the route to 1:1:1:1::1
1 1:1:1:1::1 12 msec 4 msec 0 msec
LS age: 1312
LS Type: Inter Area Prefix Links
Link State ID: 2
Advertising Router: 3.3.3.3
LS Seq Number: 80000001
Checksum: 0xCED4
Length: 36
Metric: 65
Prefix Address: 1:1:1:1::
Prefix Length: 64, Options: None
Let's look the routing table of R5,notice that the cost to reach the prefix
1:1:1:1::/64 is 31 as shown by the show ipv6 route 1:1:1:1::/64 command:
R5#show ipv6 route 1:1:1:1::/64
IPv6 Routing Table - 9 entries
Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP
U - Per-user Static route
I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary
O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2
ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
OI 1:1:1:1::/64 [110/31]
via FE80::C203:29FF:FE3C:0, FastEthernet0/0
on the other hand ,we see that the cost of R5 to reach 1:1:1:1 :: / 64 is 31, if
this cost is dehulled,we obtain : 31 = 10 +10 +10 +1 (cost of the link R5R3+cost of the link R3-R2+cost of the link R2-R1+cost of Lo0 's R1), but the
traceroute below indicates that the path is via R5-R3-R1 because R3 uses
the path via R1 directly to reach 1:1:1:1::/64, which does not correspond
the cost displayed on the routing table...
R5#traceroute 1:1:1:1::1
Type escape sequence to abort.
Tracing the route to 1:1:1:1::1
Let's return to the LSAs Type 3 received by R5; the LSA advertised by R2
(2.2.2.2) lists the cost of 11(cost of the inter-area route to reach the prefix
1:1:1:1::/64 from R2) ,the LSA advertised by R3 lists the cost of 65(cost of
the inter-area route to reach the prefix 1:1:1:1::/64 from R3) ,R5 adds the
costs to reach the two ABRs R2 and R3 to the costs listed in both LSAs Type
3 respectively in order to calculate the cumulative cost to reach 1:1:1:1::/64
to define the best path:
to see the costs to reach the two ABRs R2 and R3 ,we will use the show ipv6
ospf border-routers:
R5#show ipv6 ospf border-routers
OSPFv3 Process 1 internal Routing Table
Codes: i - Intra-area route, I - Inter-area route
i 2.2.2.2 [20] via FE80::C203:29FF:FE3C:0, FastEthernet0/0, ABR, Area 1, SPF 3
i 3.3.3.3 [10] via FE80::C203:29FF:FE3C:0, FastEthernet0/0, ABR, Area 1, SPF 3
From R5:
the cost to reach R2 is 20
the cost to reach R3 is 10
the cumulative cost to reach 1:1:1:1::/64 :
first path through R3--R1 ,the cost =65+10=75
second path through R3--R2--R1 ,the cost=11+20=31
the best path to reach the prefix 1:1:1:1::/64 is through R3--R2--R1 ,31 is
better than 75.
But because the loop prevention inter area ,the packet goes through the
path
R3--R1 ,we have a suboptimal route ,so this loop-prevention rule can result
in suboptimal routes.
To override this rule and avoid the suboptimal route , we create a virtual
tunnel between R2 and R3 :
R3(config-if)#ipv router ospf 1
R3(config-rtr)#area 1 virtual-link 2.2.2.2
Now R5 pick the lower-cost route(the optimal route) to reach the prefix
1:1:1:1::/64 through the path R2--R1 as show by the traceroute :
R5#traceroute 1:1:1:1::1
Type escape sequence to abort.
Tracing the route to 1:1:1:1::1
1 35:35:35:35::3 28 msec 20 msec 20 msec
2 23:23:23:23::2 44 msec 44 msec 40 msec
3 1:1:1:1::1 60 msec 60 msec 60 msec
Also R3 pick the lower-cost route(the optimal route) to reach the prefix
1:1:1:1::/64 through R2 as show by the traceroute :
R3#traceroute 1:1:1:1::1
Type escape sequence to abort.
Tracing the route to 1:1:1:1::1
1 23:23:23:23::2 32 msec 148 msec 72 msec
2 1:1:1:1::1 100 msec 104 msec 112 msec
We can see that R3 installs now the path through R2 in its routing table
with the cost of 21 not through R1 with the cost 65 as shown before
configuring the virtual-link :
R3#show ipv6 route | s 1:1:1:1::/64
OI 1:1:1:1::/64 [110/21]
via FE80::C202:29FF:FE3C:1, FastEthernet0/1
Notice that the link between R2 and R3 is configured in a nonbackbone area
1.If this link is configured in area 0, R3 pick the best route to reach
1:1:1:1::/64 R3R2R1, choosing the lower cost route.
now we force R1 to choose the path via R2 by increasing the cost in fa0/1 of
R3:
R3(config)# interface Fa0/1
R3(config-if)#ip ospf cost 100
R3(config)#router ospf 1
R3(config-router)#area 1 nssa translate type7 suppress-fa
Notice the traceroute shown that the packet goes through R2--R4:
R1#traceroute 4::4
Type escape sequence to abort.
Tracing the route to 4::4
1 12::2 48 msec 36 msec 36 msec
2 234::4 68 msec 64 msec 44 msec
Now we will see the behavior if the forwarding address is filtered,we will
use the area range command on the ABRs R2 and R3 with the key-word notadvertise:
R3(config-rtr)#area 1 range 234::/64 not-advertise
R3(config-rtr)#area 1 range 234::/64 not-advertise
The external prefix 4::/64 is not installed in the routing table of R1 because
R1 does not have a route to reach the Forwardinf Address 234::4 because
the prefix 234::/64 is filtered :
R1# show ipv6 route 4::/64
% Route not found
To ensure the reachability and in order to see the external prefix in the
routing table of R1, we tell to R3 to suppress the FA in the LSA as follow:
R3(config-rtr)#area 1 nssa translate type7 suppress-fa
the Forward Address does not appear and it is suppressed in the LSA Type 5
advertised by R3 as show by the show ipv6 ospf database external:
My remark is:with OSPFv2 ,the traffic must pass through R3 since the FA is
not set(if we do the lab using IPv4 and OSPFv2 we will see the FA set to
0.0.0.0 after configuring area 1 nssa translate type7 suppress-fa command
on R3 and the traffic goes through the R3 (R2--R3--R4), because 0.0.0.0
means use the advertising router R3 in order to reach the external subnet).
But With OSPFv3 after configuring area 1 nssa translate type7 suppress-fa
command on R3 to suppress the FA ,the traceroute shown that the packet
goes through R2-R3,not through R3:
Why?
R1#traceroute 4::4
Type escape sequence to abort.
Tracing the route to 4::4
1 12::2 56 msec 52 msec 36 msec
2 234::4 72 msec * 48 msec
Let's looks the routing table of R2, we can see that the route installed is
the O N2 advertised by R4 and the next-hop to reach the external prefix is
now 234::4 the ip address of R4(or the FA set in the LSA Type 7) so in nssa
R2 changes the next-hop for its external route by replacing the link-address
local(used by default as next-hop in OSPFv3) by the FA set in the LSA Type
7 as shown by the show ip route commands:
R2#show ipv6 route 4::/64
Routing entry for 4::/64
Known via "ospf 1", distance 110, metric 20, type NSSA extern 2
Route count is 1/1, share count 0
Routing paths:
234::4, FastEthernet0/0
Last updated 00:20:07 ago
So once the packet arrives at the router R2 the packets are sent directly to
R4.
O E2
-R4 prefer the path towards 172.16.10.0 and 172.16.11.0 via R4--R2--R6(the
serial link) because the cost(=10)to reach the ASBR2(R2) is less than the
cost(=30)to reach the ASBR1(R1):
R4#show ip ospf border-routers
i 1.1.1.1 [30] via 10.0.34.3, FastEthernet0/1, ASBR, Area 0, SPF 20
i 2.2.2.2 [10] via 10.0.24.2, FastEthernet0/0, ASBR, Area 0, SPF 20
With R7:
R7#show ip route | s 172.16.10.0|172.16.11.0
O E2
O E2
-R7 prefer the path towards 172.16.10.0 and 172.16.11.0 via R1-R5,because the cost(=10)to reach the ASBR1(R1) is less than the
cost(=30)to reach the ASBR2(R2):
R7#show ip ospf border-routers
i 1.1.1.1 [10] via 10.0.17.1, FastEthernet0/0, ASBR, Area 0, SPF 21
i 2.2.2.2 [30] via 10.0.37.3, FastEthernet0/1, ASBR, Area 0, SPF 21
R3#traceroute 172.16.10.6
Type escape sequence to abort.
Tracing the route to 172.16.10.6
1 10.0.34.4 60 msec 28 msec 24 msec
2 10.0.24.2 48 msec 44 msec 44 msec
3 192.168.2.6 60 msec * 44 msec
R3#traceroute 172.16.11.5
Type escape sequence to abort.
Tracing the route to 172.16.11.5
1 10.0.34.4 64 msec 60 msec 28 msec
2 10.0.24.2 44 msec 44 msec 40 msec
3 192.168.2.6 60 msec 44 msec 40 msec
4 172.16.11.5 92 msec * 56 msec
R3#traceroute 172.16.11.6
Type escape sequence to abort.
Tracing the route to 172.16.11.6
1 10.0.34.4 52 msec 36 msec 16 msec
2 10.0.24.2 60 msec 44 msec 40 msec
3 192.168.2.6 60 msec * 76 msec
O E2
-R3 prefers the path towards 172.16.10.0 and 172.16.11.0 via R4--R2-R6(the serial link which is the slower link comparing with fastethernet link)
even if the costs to reach both ASBR1 and ASBR2 are equal:
R3# show ip ospf border-routers
i 1.1.1.1 [20] via 10.0.37.7, FastEthernet0/0, ASBR, Area 0, SPF 22
i 2.2.2.2 [20] via 10.0.34.4, FastEthernet0/1, ASBR, Area 0, SPF 22
the reason why R3 prefers the path through R4--R2--R6 is that R3 prefers
the LSA Type 5 with FA=0.0.0.0 (advertised by R2) over the Type LSA 5 with
FA=192.168.1.5 advertised by R1 and the cost to reach the FA 0.0.0.0 or
the ASBR2 which generate the LSA Type 5 is 20 and the cost to reach The
FA 192.168.1.5 (advertised by ASBR1) is 30=10(cost link betw R3 and R7 +
10(cost link betw R7 and R1)+10(cost link betw R1 and R5),so 20 wins over
30 and R3 installs the path via R4--R2--R6:
to display these costs,let's use the show ip ospf border-routers command to
see the cost to reach the ASBR2 (the FA 0.0.0.0) which is 20:
Notice the line with the router-id 2.2.2.2(which is the ASBR2 ) which lists
the cost of 20:
now we will show how to see the cost to reach the FA 192.168.1.5
advertised by the ASBR1:
when R3 receives the LSAs Type 5 from R1 (ASBR1) it looks the best intraarea route or the best inter-area route to reach this FA:
in this case it an intra-area and the metric is 30 as calculated above:
R3#show ip route 192.168.1.0
Routing entry for 192.168.1.0/24
Known via "ospf 1", distance 110, metric 30, type intra area
Last update from 10.0.37.7 on FastEthernet0/0, 00:21:57 ago
Routing Descriptor Blocks:
* 10.0.37.7, from 1.1.1.1, 00:21:57 ago, via FastEthernet0/0
Route metric is 30, traffic share count is 1
And because the cost 20 is better than 30 ,R3 prefers the cost through R2.
The important key-point which causes the suboptimal path(serial link over
the fastethernet link)is that :the FA advertised by R2 is set to 0.0.0.0
because the point-to-point network type in the serial interface of R2,unlike
with R1 where we have broadcast network type in its fastethernet interface
fa0/0:
let's reverse the network type by configuring fa0/0 of R1 as point-to-point
and s0/0 of R2 as a broadcast:
on R1:
int fa0/0
ip ospf network point-to-point
On R2:
int s0/0
ip ospf network broadcast
In this case we reverse the FA so R2 advertises 192.168.2.6 as FA and R1
advertises 0.0.0.0 as the FA as show by the following output which displays
the LSAs Type 5 received by R3 from R1 and R2:
Notice the FA advertised by R1 is now 0.0.0.0 and the FA advertised by R2 is
192.168.2.6 (the ip address of R6):
R3#show ip ospf database external | include Advertising Router|Metric|Forward
Address
Advertising Router: 1.1.1.1
Metric Type: 2 (Larger than any link state path)
Metric: 20
Forward Address: 0.0.0.0
Advertising Router: 2.2.2.2
Metric Type: 2 (Larger than any link state path)
Metric: 20
Forward Address: 192.168.2.6
Advertising Router: 1.1.1.1
Metric Type: 2 (Larger than any link state path)
Metric: 20
Forward Address: 0.0.0.0
Advertising Router: 2.2.2.2
Metric Type: 2 (Larger than any link state path)
Metric: 20
Forward Address: 192.168.2.6
the cost to reach 0.0.0.0 (the ASBR) is less than the cost to reach the FA
192.168.2.6:
The cost to reach the FA 192.168.2.6,R3 looks the best intra-area route to
reach this FA which is 84(link R3-R4:10+link R4-R2:10+cost R2's
s0/0:64=84) as shown by the following output:
R3#show ip route 192.168.2.0
Routing entry for 192.168.2.0/24
Known via "ospf 1", distance 110, metric 84, type intra area
Last update from 10.0.34.4 on FastEthernet0/1, 00:44:29 ago
Routing Descriptor Blocks:
* 10.0.34.4, from 2.2.2.2, 00:44:29 ago, via FastEthernet0/1
Route metric is 84, traffic share count is 1
The traceroute confirms the result ,the packet toward 172.16.10.0 and
172.16.11.0 goes through R7--R1--R5,the faster link(fast-ethernet):
R3#traceroute 172.16.10.5
Type escape sequence to abort.
Tracing the route to 172.16.10.5
1 10.0.37.7 32 msec 24 msec 12 msec
2 10.0.17.1 28 msec 20 msec 20 msec
3 192.168.1.5 40 msec * 40 msec
R3#traceroute 172.16.10.6
Type escape sequence to abort.
Tracing the route to 172.16.10.6
1 10.0.37.7 44 msec 16 msec 8 msec
2 10.0.17.1 32 msec 28 msec 20 msec
3 192.168.1.5 40 msec 32 msec 28 msec
4 172.16.10.6 56 msec * 76 msec
R3#traceroute 172.16.11.5
Type escape sequence to abort.
Tracing the route to 172.16.11.5
1 10.0.37.7 32 msec 16 msec 8 msec
2 10.0.17.1 44 msec 28 msec 20 msec
3 192.168.1.5 40 msec * 52 msec
R3#traceroute 172.16.11.6
Type escape sequence to abort.
Tracing the route to 172.16.11.6
1 10.0.37.7 40 msec 12 msec 8 msec
2 10.0.17.1 40 msec 32 msec 20 msec
3 192.168.1.5 28 msec 32 msec 28 msec
4 172.16.11.6 52 msec * 64 msec
O E2
the FA to 0.0.0.0 is enough to tell to the others routers that to reach the
external subnets ,you need just reach the ASBR (FA 0.0.0.0), in a broadcast
type we can have more than 2 routers therefore we must specify what is
the next hop that will be used to reach the external network and FA.
Another solution to make sure that the packet goes through the faster link
(through R1) is to configure the static routes on R1 and R2 by specifying an
outgoing interfaces instead of the next-hop address,thus the ASBRs R1 and
R2 advertise their LSAs Type 5 with the FA equal to 0.0.0.0 for all external
subnets:
R2(config)#int s0/0
R2(config-if)#no ip ospf network broadcast
Also let's remove the static routes configured previously with the next-hop:
R1(config)#no ip route 172.16.10.0 255.255.255.0 192.168.1.5
R1(config)#no ip route 172.16.11.0 255.255.255.0 192.168.1.5
O E2
Why?
let's look the LSAs Type 5 advertised by R1 and R2 for the two external
routes 172.16.10.0 and 172.16.11.0:
Now as excpected the FA is 0.0.0.0 for all LSAs Type 5 advertised by R1 and
R2 even if OSPF is enabled on the ASBRs next hop interface AND
According to Cisco documentation,as show by the following output:
R3#show ip ospf database external | include Advertising Router|Metric|Forward
Address
Advertising Router: 1.1.1.1
Metric Type: 2 (Larger than any link state path)
Metric: 20
Forward Address: 0.0.0.0
Advertising Router: 2.2.2.2
Metric Type: 2 (Larger than any link state path)
Metric: 20
Forward Address: 0.0.0.0
Advertising Router: 1.1.1.1
Metric Type: 2 (Larger than any link state path)
Metric: 20
Forward Address: 0.0.0.0
Advertising Router: 2.2.2.2
Metric Type: 2 (Larger than any link state path)
Metric: 20
Forward Address: 0.0.0.0
Because the FA is 0.0.0.0 ,R3 looks the cost to reach the two ASBRs R1 and
R2 and find that the cost is the same which is 20 as shown by the following
output:
R3#show ip ospf border-routers
OSPF Process 1 internal Routing Table
Codes: i - Intra-area route, I - Inter-area route
i 1.1.1.1 [20] via 10.0.37.7, FastEthernet0/0, ASBR, Area 0, SPF 4
i 2.2.2.2 [20] via 10.0.34.4, FastEthernet0/1, ASBR, Area 0, SPF 4
to ensure that the packet goes through the faster link ,we just increase the
cost toward the R2 or decrease the cost toward R1:
R3(config)#int fa0/0
R3(config-if)#ip ospf cost 5
O E2
R2#ping 192.168.1.4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.4, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
Number of Links: 2
Remember that:
By definition when a router receives an external route with a FA set to non
zero in the LSA Type 5 ,it looks if there is an intra-area route or inter-area
route to reach the FA(so the route toward the FA must be an OSPF route )in
this case R2 prefers the connected route over the intra-area ,this is the
reason why R2 loses the external route,In this lab,R2 ,when it looks its
routing table ,it does not find an intra-area route 172.16.1.0 (even if it
receives an LSA Type 1 from R1 for the subnet 172.16.1.0) instead it find
the connected route 172.16.1.0 because the AD of a connected route is 0
and the AD of a route ospf is 110,so R2 will choose the lowest AD and R2
will never install the external route,keep in the mind that R2 learns two
routes toward 172.16.1.0 ,one connected route and an another intra-area
route ospf from R1,so The AD will make the difference,the lowest AD wins,
in this case R2 prefers the connected route over the intra-area route,and
because the FA must be reachable either via an intra-area route or interarea route only ,thus R2 will never install the external route.
My purpose is to ensure R2 prefers the intra-area route over the connected
route 172.16.1.0 (in other word it must have the reachability to the FA via
the intra-area route 172.16.1.0 advertised by R1) in order to see the
external route in the routing table of R2,by manipulating the length prefix:
Remember :A router evaluates routes in the following order:
*Prefix Length - The longest-matching route is preferred first. Prefix length
trumps all other route attributes.
*Administrative Distance - In the event there are multiple routes to a
destination with the same prefix length, the route learned by the protocol
with the lowest administrative distance is preferred.
* Metric - In the event there are multiple routes learned by the same
protocol with same prefix length, the route with the lowest metric is
preferred.
let's go:
I will configure a secondary ip address in fa0/0 of R1 with a length prefix
greater than 24(172.16.1.1/24 is configured on fa0/0 of R1):
R1(config-if)#int fa0/0
R1(config-if)#ip address 172.16.1.11 255.255.255.128 secondary
Notice now that R2 installs the intra-area route to reach 172.16.1.0
received from R1 because The longest-matching route /25 wins comparing
with the directly connected route with /24 :
R2(config)#do show ip route 172.16.1.0
Routing entry for 172.16.1.0/25
Known via "ospf 1", distance 110, metric 30, type intra area
Last update from 10.1.23.3 on FastEthernet0/1, 00:01:01 ago
Routing Descriptor Blocks:
* 10.1.23.3, from 1.1.1.1, 00:01:01 ago, via FastEthernet0/1
Route metric is 30, traffic share count is 1
R2#ping 192.168.1.4
Type escape sequence to abort.
R3#ping 192.168.1.4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.4, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 40/54/92 ms
Second Method:
The second solution is to configure the static route on R1 with an outgoing interface
instead of the ip address of R4(172.16.1.4):
R1(config)#no ip route 192.168.1.0 255.255.255.0 172.16.1.4
R1(config)#ip route 192.168.1.0 255.255.255.0 fa0/0
R3#ping 192.168.1.4
Type escape sequence to abort.
Another interesting solution: without configuring ospf network point-topoint in fa0/0 of R1 .Without manipulating the length prefix. And without
changing the next-hop of the static route by an outgoing interface, as
shown above.
Let's go:
The FA is 192.16.1.4 ,the prefix is advertised as an intra-area route carried
in the LSA Type 1(Router) ,remember that the LSA Type 1 lists the
interface's router subnet number with themask and its metric and it is
refered to these subnets as stub networks,for the subnet 172.16.1.0 we can
use the show ip ospf data data router self-originate on R1 which display the
LSA Type 1 created or originated by R1 that list the subnet 172.16.1.0 as a
stub network, the stub network is valid in the interface where no DR has
been elected,in th case where a DR is elected ,for each segment where the
DR is defined,the router lists the IP address of the DR and a notation that
the link attaches to a transit network instead of a stub network which
meand that an LSA Type 2 is created by the DR for this network:
R1(config-router)#do show ip ospf data router sel
OSPF Router with ID (1.1.1.1) (Process ID 1)
Router Link States (Area 0)
LS age: 1
Options: (No TOS-capability, DC)
LS Type: Router Links
Link State ID: 1.1.1.1
Advertising Router: 1.1.1.1
LS Seq Number: 80000004
Checksum: 0x68BA
Length: 48
AS Boundary Router
Number of Links: 2
R3 here receives this LSA Type 1 listing the subnet 172.16.1.0 as a stub
network:
R3(config)#do show ip ospf data router adv 1.1.1.1
OSPF Router with ID (3.3.3.3) (Process ID 1)
Router Link States (Area 0)
Routing Bit Set on this LSA
LS age: 48
Options: (No TOS-capability, DC)
LS Type: Router Links
Link State ID: 1.1.1.1
Advertising Router: 1.1.1.1
LS Seq Number: 80000004
Checksum: 0x68BA
Length: 48
AS Boundary Router
Number of Links: 2
R2 also receives this LSA Type 1 listing the subnet 172.16.1.0 as a stub
network:
R2(config)#do show ip ospf data router adv 1.1.1.1
OSPF Router with ID (2.2.2.2) (Process ID 1)
Router Link States (Area 0)
Routing Bit Set on this LSA in topology Base with MTID 0
LS age: 78
Options: (No TOS-capability, DC)
LS Type: Router Links
Link State ID: 1.1.1.1
Advertising Router: 1.1.1.1
LS Seq Number: 80000004
Checksum: 0x68BA
Length: 48
AS Boundary Router
Number of Links: 2
Now to ensure that R2 has an external route in its routing table, one
obvious solution is to set the FA int the LSA Type 5 to be 0.0.0.0 ,by
configuring ospf network point-to-point in fa0/0 of R1,i have configured the
prefix-suppression on R1 and when displaying the show LSA Type 5 in R2,
the FA is set to 0.0.0.0 and R2 installs successfully the external route in its
routing table:
R1(config)#router osp 1
R1(config-router)#prefix-suppression
Let's look the LSA Type 1 in R1 (and R2 ,R3,) notice that the prefix
172.16.1.0 the stub network diseappers ,the LSA lists only a transit
network where a DR has been elected,because the prefix is suppressend,R1
does not include the FA in its LSA Type 5 ,instead it set the FA to 0.0.0.0
because now the prefix is suppressed and cannot be reached via an intraarea route,so R3 does not have an intra-area route toward 172.16.1.0 but it
has an external route 192.168.1.0 and can reach it successfully because the
FA is now 0.0.0.0 meaning that to reach the external route it needs to reach
the ASBR,the case studied in this lab is the router R2 now it installs
successfully the external route for the same reason for R3 as shown by the
different shows displayed below:
If the FA is set to 0.0.0.0 which means that the router must know how to
reach the ASBR ,so the LSA Type 4 is needed to tell how to reach the
ASBR,but in this case there is no LSA Type 4 because there is no ABR to
generate the LSA 4 ,as shown by the following outputs on R2 and R3 which
displays the absence of the LSA 4(asbr-summary):
R2#show ip ospf database asbr-summary
OSPF Router with ID (3.3.3.3) (Process ID 1)
Lab 21: How an ABR sets the Forward Address in the LSA Type
7
34::4 is choosen over 24::4 for the LSA Type 7 because it is the highest ip
address:
R4#show ipv ospf data nssa-external | include Forward Address
Forward Address: 34::4
Even if the translator is R2 , the packet goes through R3 to reach 4::4 the
external subnet:
R1#traceroute 4::4
Type escape sequence to abort.
Tracing the route to 4::4
1 13::3 120 msec 36 msec 8 msec
2 34::4 204 msec 124 msec 88 msec
The reason:R4 installs a load balancing for the 0N2 default route
because ,R4 looks that the cost via R2 and R3 is the same to reach the two
FA via the inter-area routes as shown by the following output:
R4#show ipv route 23::2
Routing entry for 23::/64
Known via "ospf 1", distance 110, metric 2, type intra area
Route count is 2/2, share count 0
Routing paths:
FE80::C801:21FF:FE6C:8, FastEthernet0/0
Last updated 00:30:31 ago
FE80::C802:22FF:FEA8:6, FastEthernet0/1
Last updated 00:29:02 ago
Routing paths:
FE80::C801:21FF:FE6C:8, FastEthernet0/0
Last updated 00:07:49 ago
FE80::C802:22FF:FEA8:6, FastEthernet0/1
Last updated 00:01:44 ago
Thus R4 installs a load balancing for the 0N2 default route
Now what happen if we increase the cost of R3's fa1/0:
R3(config-rtr)#int fa1/0
R3(config-if)#ipv ospf cost 100
Notice now R4 installs one path only for the ON2 default route via R2(notice
the outgoing interface fa0/0):
R4#show ipv route ospf
ON2 ::/0 [110/1]
via FE80::C801:21FF:FE6C:8, FastEthernet0/0
OI 12::/64 [110/2]
via FE80::C801:21FF:FE6C:8, FastEthernet0/0
OI 13::/64 [110/2]
via FE80::C802:22FF:FEA8:6, FastEthernet0/1
O 23::/64 [110/2]
via FE80::C801:21FF:FE6C:8, FastEthernet0/0
We can confirm the result by looking the traceroute which shows that the
packet goes through R2 :
R4#traceroute 1::1
Type escape sequence to abort.
Tracing the route to 1::1
1 24::2 144 msec 72 msec 4 msec
2 12::1 252 msec 136 msec 72 msec
This is happened because after increasing the cost fa1/0 of R3, R4 finds
that the best cost or the best inter-area route to reach the two FA is via by
R2 where the cost is 2 through R2 ,less than the cost through R3 which is
101:
R4#show ipv route 23::2
Routing entry for 23::/64
Known via "ospf 1", distance 110, metric 2, type intra area
Route count is 1/1, share count 0
Routing paths:
FE80::C801:21FF:FE6C:8, FastEthernet0/0
Last updated 00:09:56 ago
Now we will see which FA is set for the LSA Type 7 ON2 default routeby the
ABRs R2 and R3 after disabling OSPF in the link R2--R3:
R3(config)#int fa1/0
R3(config-if)#no ipv ospf 1 area 1
R2(config)#int fa1/0
R2(config-if)#no ipv ospf 1 area 1
Let's look the FA set by both R2 and R3 for its own LSA Type 7 ON2 default
route:
Notice now the FA choosen by R2 and R3 are 24::2 (fa0/0 of R2) and 34::3
(fa0/1 of R3) respectively:
R2#show ipv ospf data nssa-external self-originate | include Prefix Address|Forward
Address
Prefix Address: ::
Forward Address: 24::2
R4 installs a load balancing ,Notice now the next-hop of the routes are the
Forward Addresses ,not the link-local addresses which is used byt default
as the next-hop in OSPFv3:
R4#show ipv route ::/0
Routing entry for ::/0
Known via "ospf 1", distance 110, metric 1, type NSSA extern 2
Route count is 2/2, share count 0
Routing paths:
34::3, FastEthernet0/1
Last updated 00:05:43 ago
24::2, FastEthernet0/0
Last updated 00:05:33 ago
Now if we want to prefer the path through R3 ,we will try to advertise the
LSA Type 7 for ON2 default route with a metric higher than the LSA Type 7
from R3 which is 1:
R2(config-rtr)#area 1 nssa default-information-originate metric 5
R4#show ipv ospf data nss | include Forward Address|Metric
Metric Type: 2 (Larger than any link state path)
Metric: 1
Forward Address: 34::3
Metric Type: 2 (Larger than any link state path)
Metric: 20
Forward Address: 34::4
Metric Type: 2 (Larger than any link state path)
Metric: 5
Forward Address: 24::2
Notice the Metric listed in the LSA Type 7 in R2 with the FA 24::2 is equal to
5 and the Metric listed in the LSA Type 7 in R3 with the FA 34::3 is equal to
1,thus R4 prefers the path through R3 as a better route because the lowest
metric.
R4#show ipv route ::/0
Routing entry for ::/0
Known via "ospf 1", distance 110, metric 1, type NSSA extern 2
Route count is 1/1, share count 0
Routing paths:
34::3, FastEthernet0/1
Last updated 00:05:22 ago
Only R1 has a static route ipv6 route 4::/64 124::4 and redistribute it into
ospf,R1 is running OSPFv3 only with R2 and R3.
R1 and R3 are configured in area 1 NSSA
R2 and R3 are configured in area 0
R2 receives an LSA Type 5 from R3 the ABR with the Forward Address set to
13::1 which is the ip address of R1's fa0/1:
R2#show ipv ospf data external | include Advertising Router|Forward Address
Thus R2 installs successfully the external route 4::/64 in its routing table:
R2#show ipv route 4::/64
Routing entry for 4::/64
Known via "ospf 1", distance 110, metric 20, type extern 2
Route count is 1/1, share count 0
Routing paths:
FE80::C802:21FF:FECC:8, FastEthernet0/1
Last updated 00:02:50 ago
R2#ping 4::4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 4::4, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 136/143/152 ms
Now what happen if I enables ospf in fa0/0 of R1:
R1(config-rtr)#int fa0/0
R1(config-if)#ipv6 ospf 1 area 1
R2 receives an LSA Type 5 from R3 the ABR with the Forward Address set
now to 124::4 which is the ip address of R4's fa0/0 and also the next-hop of
the static route:
It is always useful to remember what we said previously in the lab did with
OSPFv2:
By definition when a router receives an external route with a FA set to non
zero in the LSA Type 5 ,it looks if there is an intra-area route or inter-area
route to reach the FA(so the route toward the FA must be an OSPF route )in
this case R2 prefers the connected route over the inter-area ,this is the
reason why R2 loses the external route,In this lab,R2 ,when it looks its
routing table ,it does not find an inter-area route 124::/64 (even if it
receives an LSA Type 3 from R1 for the prefix 124::/64) instead it find and
prefers the connected route 172.16.1.0 because the AD of a connected
route is 0 and the AD of a route ospf is 110,so R2 will choose the lowest AD
and R2 will never install the external route,because the FA must be
reachable either via an intra-area route or inter-area route only ,thus R2
will never install the external route.
Let's turn the int fa0/0 as a point-to-point network type to remove the FA:
R1(config-if)#int fa0/0
R1(config-if)#ipv ospf network point-to-point
the result is not expected,it is interesting to notice that we have still the FA
set to a non-zero but in this case R1 remove the FA 124::4 and replace it
with its fa0/0'ip address even if fa0/0 is in point-to-point network as shown
by the following output:
R2#show ipv ospf data external | include Advertising Router|Forward Address
Advertising Router: 3.3.3.3
Forward Address: 124::1
So the problem still exist for the same reason as explained above with the
FA 124::4 ,because R2 does not have an inter-area route to reach the FA
124::1 ,it will never install the external route 4::/64:
R2#show ipv route 4::/64
% Route not found
Let's remove ospf network point-to-point and we will try the second
solution which is changing the next-hop of the static route to be the
outgoing interface where FE80::C803:21FF:FECC:8 is the link-local address
og R4 's fa0/0:
R1(config-if)#int fa0/0
R1(config-if)#no ipv6 ospf network point-to-point
R1(config-if)# no ipv6 route 4::/64 124::4
R1(config)#ipv route 4::/64 fa0/0 FE80::C803:21FF:FECC:8
The FA is still 124::1 so R2 still loses its external route 4::/64:
R2#show ipv ospf data external | include Advertising Router|Forward Address
Advertising Router: 3.3.3.3
Forward Address: 124::1
R2#
To solve this problem,we will try to ensure R2 prefers the inter-area route
over the connected route 124::/64 (in other word it must have the
reachability to the FA via the inter-area route 124::/64 advertised by R3) in
order to see the external route in the routing table of R2,by manipulating
the length prefix:
Let's go:
R1(config)#interface FastEthernet0/0
R1(config-if)#no ipv address 124::1/64
R1(config-if)#ipv address 124::1/86
R1(config-if)#ipv ospf 1 area 1
The FA is still 124::1 as expected:
R2#show ipv ospf data external | include Advertising Router|Forward Address
Advertising Router: 3.3.3.3
Forward Address: 124::1
Now R2 installs successfully the external route 4::/64 :
R2#show ipv route 4::
Routing entry for 4::/64
Known via "ospf 1", distance 110, metric 20, type extern 2
Route count is 1/1, share count 0
Routing paths:
FE80::C802:21FF:FECC:8, FastEthernet0/1
Last updated 00:03:26 ago
Now R2 prefers the inter-area route to reach 124::1 because The longestmatching route /86 wins comparing with the directly connected route with /
64 as shown by the show ipv route 124:: and the traceroute toward 124::1
which display that the packet goes through R3--R1,so R2 is using the interarea route to reach the FA 124::1:
R2#show ipv route 124::
Routing entry for 124::/86
Known via "ospf 1", distance 110, metric 3, type inter area
Route count is 1/1, share count 0
Routing paths:
FE80::C802:21FF:FECC:8, FastEthernet0/1
R2#traceroute 124::1
Type escape sequence to abort.
Tracing the route to 124::1
1 23::3 60 msec 36 msec 36 msec
2 13::1 68 msec 64 msec 60 msec
R2#ping 4::4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 4::4, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 80/97/116 ms
Another solution:Unlike with OSPFv2 where we have used the secondary ip
address to influence the route preference using longest-matching route,the
secondary commad is not necessary when adding a second ipv6 address,we
have simply to add another ip address on the desired interface, fa0/0 of R1:
Let's remove 124::1/86 and configure two ipv6 addresses, the origin ipv6
124::1/64 and another ipv6 address 123::1/64 ,the second ipv address must
be lower:
R1(config-if)#no ipv address 124::1/86
R1(config-if)#ipv address 124::1/64
R1(config-if)#ipv6 address 123::1/64
R2#ping 4::4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 4::4, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 84/96/116 ms
R2#
The reason is that now R2 has an inter-area to reach the FA 123::1 as
shown by the following output:
R2#show ipv route 123::1
Routing entry for 123::/64
Known via "ospf 1", distance 110, metric 3, type inter area
Route count is 1/1, share count 0
Routing paths:
FE80::C802:21FF:FECC:8, FastEthernet0/1
Last updated 00:06:21 ago
Lab 23: OSPFv3 LSAs : Types 2001 and 2002, Types 0008 and
2009 (Router and Network, Link and Intra-Area-Prefix):
The purpose of the LAB is to detail the LSA Type 1 ,Type 8 and Type 9 in
OSPFv3.
The Link R1--R2 is in broadcast ospf network and R2 is the DR.
The Link R2--R3 is in point-to-point ospf network .
R3 redistributes an external prefix into the OSPF Domain as follow:
R3(config)#route-map CONNECTED
R3(config-route-map)#match interface lo0
R3(config-route-map)#exi
R3(config)#ipv router ospf 1
R3(config-rtr)#redistribute connected route-map CONNECTED
OSPFv3 defines an Inter-Area Router LSA which is the equivalent of the LSA
Type 4 called ASBR-Summary in OSPFv2, it is originated by the ABR,to tell
to the other routers how to reach the ASBR.In this scenario, there is no ABR
,so the Inter-Area Router LSA is not created as shown by the show ipv6 ospf
database inter-area router command in different routers ,this command is
the equivalent of the show ip ospf data asbr-summary command in OSPFv2:
R1#show ipv6 ospf database inter-area router
OSPFv3 Router with ID (1.1.1.1) (Process ID 1)
R2#show ipv6 ospf database inter-area router
OSPFv3 Router with ID (1.1.1.1) (Process ID 1)
R3#show ipv6 ospf database inter-area router
OSPFv3 Router with ID (1.1.1.1) (Process ID 1)
here the LSA Type 1 (Router LSA) comes to indicate if the router is an ASBR
or an ABR or if it is an end-point of a virtual link by setting the E bit of the B
bit or the V bit respectively.
In this case R3 is the ASBR so it creates an LSA Type 1 and set the E bit to
permit to R2 and R1 to know that R3 is the ASBR,to display this LSA we will
use the show ipv ospf data router self-originate command:
R3#show ipv ospf data router self-originate
OSPFv3 Router with ID (3.3.3.3) (Process ID 1)
Router Link States (Area 0)
LS age: 15
Options: (V6-Bit, E-Bit, R-bit, DC-Bit)
LS Type: Router Links
Link State ID: 0
Advertising Router: 3.3.3.3
LS Seq Number: 80000005
Checksum: 0x2DA
Length: 40
AS Boundary Router
Number of Links: 1
R1#ping 3::3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 3::3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 76/98/132 ms
Untill now it's OK with the External prefix and ASBR.
Now let's looks another field of the LSA Type 1:
Notice that the prefixes are not carried in the LSA Type 1 in OSPFv3 unlike
with OSPFv2,so how the prefixes are propagated?,here the LSA Type 9
called Intra-Area prefix LSA and LSA Type 8 called Link LSA come,the LSA
Type 9 is used to advertise the prefixes that are associated with the router
itself and attached stub network (carried in the LSA Type 1 of OSPFv2) and
attached transit network (carried in the LSA Type 2 of OSPFv2) and the LSA
Type 8 is used to advertise the link-local address of the router's interface
to the routers attached to the link in order to use these link-local addresses
for the next-hop,also it informs the routers attached to the link the list of
prefixes associated with the link.
An important point to notice ,in OSPFv3 the LSA Type 1 carries a reference
to link,as shown by the show ipv6 ospf database router command on
R3,Notice the Local Interface ID and the Neighbor(DR) Interface ID which
means the local interface identifier and remote interface identifier
respectively:
R3#show ipv ospf database router adv-router 2.2.2.2
OSPFv3 Router with ID (3.3.3.3) (Process ID 1)
Router Link States (Area 0)
LS age: 131
Options: (V6-Bit, E-Bit, R-bit, DC-Bit)
LS Type: Router Links
Link State ID: 0
Advertising Router: 2.2.2.2
LS Seq Number: 80000009
Checksum: 0x2798
Length: 56
Number of Links: 2
Link Metric: 1
Local Interface ID: 2
Neighbor (DR) Interface ID: 2
Neighbor (DR) Router ID: 2.2.2.2
Type 8.
An important point to notice is the Link State ID listed in the LSAs Type 8 ,
let's looks above the LSA Type 1 on R3 and notice the advertising router
2.2.2.2 with the local interface identifier ( Local Interface ID ) of R2 and the
remote interface identifier (Neighbor (DR) Interface ID) of R3, which are 3
and 2 respectively,now let's look the LSAs Type 8 below displayed by the
show ipv ospf database link on R3 and notice the Link State ID for the LSA
Type 8 advertised by R2 which is 3 and the Link State ID which is 2
advertised by R3.
To summarize:
In the LSA Type 1 advertised by R2 to R3:
R2:The Local Interface ID=3
R3:Neighbor (DR) Interface ID=2
In the LSAs Type 8 on R3:
R2:Link State ID= 3
R3:Link State ID= 2
The Link State ID listed on the LSA Type 8 are the exact same values used
in the LSA Type 1 as a link references,these values permit to the router R3
to combine the LSA Type 1 and the LSA Type 8:
R3#show ipv ospf database link
OSPFv3 Router with ID (3.3.3.3) (Process ID 1)
Link (Type-8) Link States (Area 0)
LS age: 765
Options: (V6-Bit, E-Bit, R-bit, DC-Bit)
LS Type: Link-LSA (Interface: FastEthernet0/0)
Link State ID: 3 (Interface ID)
Advertising Router: 2.2.2.2
LS Seq Number: 80000004
Checksum: 0x30FA
Length: 56
Router Priority: 1
Link Local Address: FE80::C801:16FF:FE18:6
Number of Prefixes: 1
Prefix Address: 13::
LS age: 412
Options: (V6-Bit, E-Bit, R-bit, DC-Bit)
LS Type: Link-LSA (Interface: FastEthernet0/0)
Link State ID: 2 (Interface ID)
Advertising Router: 3.3.3.3
LS Seq Number: 80000004
Checksum: 0x993C
Length: 56
Router Priority: 1
Link Local Address: FE80::C802:11FF:FE6C:8
Number of Prefixes: 1
Prefix Address: 13::
Prefix Length: 64, Options: None
So the LSA Type 8 helps the router to know only the directly prefix with the
directly neighbor.
In the case where two routers are not directly connected but they are in the
same area, R1 and R3 in this case,the LSA Type 9 ( Intra-Area-Prefix ) comes
to solve the problem,the show ipv6 ospf database prefix command shown
that the prefix 12:: which belongs to the link R1--R2 is learned in the
database of R3:
Let's look the LSA Type 9 in R3,we have three LSAs Type 9,two LSAs 9 has
the same Referenced LSA Type: 2001 and one LSA 9 has Referenced LSA
Type: 2002,2001 refers to the LSA Type 1 and 2002 refers to the LSA Type 2.
So when two routers are not directly connected but belong to the same
area,the LSA Type 9 comes to include the prefix ,in this case the concerned
prefix is 12:: which is now known by R3 via the LSA Type 9 advertised by
2.2.2.2 (R2) :
R3#show ipv6 ospf database prefix
OSPFv3 Router with ID (3.3.3.3) (Process ID 1)
Intra Area Prefix Link States (Area 0)
Routing Bit Set on this LSA
LS age: 851
LS Type: Intra-Area-Prefix-LSA
Link State ID: 0
Advertising Router: 2.2.2.2
LS Seq Number: 80000001
Checksum: 0x9909
Length: 44
Referenced LSA Type: 2001
Referenced Link State ID: 0
Referenced Advertising Router: 2.2.2.2
Number of Prefixes: 1
Prefix Address: 13::
Prefix Length: 64, Options: None, Metric: 1
LS Type: Intra-Area-Prefix-LSA
Link State ID: 2048
Advertising Router: 2.2.2.2
LS Seq Number: 80000001
Checksum: 0x3564
Length: 44
Referenced LSA Type: 2002
Referenced Link State ID: 2
Referenced Advertising Router: 2.2.2.2
Number of Prefixes: 1
Prefix Address: 12::
Prefix Length: 64, Options: None, Metric: 0
The output above displays the LSA Type 9 originated by R2 that references
LSA Type 2002 (LSA Type 2) created and advertised by R2 with the
Referenced Link State ID: 2 (the same value with the Link State ID listed in
the LSA Type 2 of R2) and the prefix 12::/64 is associated with this LSA,this
value permit to the router R3 to combine the LSA Type 2 and Type 9 in order
to build its database.
So such as what we have seen with the LSA Type 1 that interacts with the
LSA Type 8 and the LSA Type 9 ,the LSA Type 2 interacts with the LSA Type
9 in order to permit the routers to learn the prefixes missed in the LSA Type
2.
We know that SPF calculations are caused by the LSA Type 1 and the LSA
Type 2 when a change occurs. So adding or removing the subnets in the
OSPF does not trigger SPF calculation like what we have learned about
OSPFv2,so the purpose of separating the prefix information from the LSA
Type 1 and Type 2 and adding two LSAs Type 8 and Type 9 to carry these
prefixes is to optimize the convergence of OSPFv3.
Supplement Lab
Adjacencies in OSPFv3
Even if R1 and R2 does not share the same subnet ,the adjacencies is up
and the connectivity is full
R1#show ipv6 ospf neighbor
OSPFv3 Router with ID (1.1.1.1) (Process ID 1)
Neighbor ID Pri State Dead Time Interface ID Interface
2.2.2.2 1 FULL/BDR 00:00:31 2 FastEthernet0/0
R4(config)#router eigrp 1
R4(config-router)#network 150.1.1.0 0.0.0.255
R4(config-router)#eigrp stub receive-only
We can see that the neighbor which is R4 shown in R1 with the show ip
eigrp neighbors detail command is configured as stub,with the keyword
receive-only R4 receives routes but does not send any routes to R1 as
shown by the last word No routes:
R1(config-router)#do show ip eigrp neighbors detail
IP-EIGRP neighbors for process 1
H Address
Interface
(sec)
0 150.1.1.4
Fa0/0
(ms)
Cnt Num
11 00:00:13 74 444 0 3
We can verify that R4 receives successfully one default route from R1:
R4(config-if)#do show ip route eigrp
D* 0.0.0.0/0 [90/307200] via 150.1.1.1, 00:11:12, FastEthernet0/0
D EX
D EX
-The link between R1 and R3 should only be used when the link between R1
and R2 fails. Configure EIGRP so that neither routers R1 nor R3 use this link
unless the link between R1 and R2 is down.
Configure an offset-list on R3:
The inbound and the outbound offset-list on R3 ensure that the metrics of
a routes received or sent via the link between R1 and R3 are increased by
adding the value 1000000000 so the metrics via the link R1--R2 is better:
R3(config)#router eigrp 2
R3(config-router)#offset-list 0 in 1000000000 serial 0/2
R3(config-router)#offset-list 0 out 1000000000 serial 0/2
R3(config-router)#exit
D EX
And on R1 the next-hop for all routes eigrp is 10.0.0.2 which is the ip
address of R2:
R1(config)#do show ip route eigrp
10.0.0.0/30 is subnetted, 3 subnets
D
Let's shutdown the link between R2 and R3 in order to fail the link R1 and
R2 and verify if the link between R3 and R1 is used
R3(config)#int s0/0
R3(config-if)#shu
R3(config-if)#shutdown
R3(config-if)#do sho
*Mar 1 01:29:03.323: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 2: Neighbor 10.0.0.9
(Serial0/0) is down: interface down
*Mar 1 01:29:06.219: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0,
changed state to down
D EX
External data:
Originating router is 150.1.1.1 (this system)
AS number of route is 200
External protocol is EIGRP, external metric is 2195456
Administrator tag is 0 (0x00000000)
150.1.1.4 (FastEthernet0/0), from 150.1.1.4, Send flag is 0x0
Composite metric is (2221056/2195456), Route is External
Vector metric:
Minimum bandwidth is 1544 Kbit
Total delay is 22000 microseconds
Reliability is 255/255
Load is 1/255
Minimum MTU is 1500
Hop count is 2
External data:
Originating router is 150.1.1.4
AS number of route is 200
External protocol is EIGRP, external metric is 2195456
Administrator tag is 0 (0x00000000)
IP-EIGRP (AS 200): Topology entry for 150.3.3.0/24
State is Passive, Query origin flag is 1, 1 Successor(s), FD is 2195456
Routing Descriptor Blocks:
10.0.0.6 (Serial0/1), from 10.0.0.6, Send flag is 0x0
Composite metric is (2195456/281600), Route is Internal
Vector metric:
Minimum bandwidth is 1544 Kbit
Total delay is 21000 microseconds
Reliability is 255/255
Load is 1/255
And the best route installed in the routing table is through R3 which is the
internal
route learned from EIGRP 200 with the next-hop 10.1.1.6:
R1#show ip route 150.3.3.0 255.255.255.0
Routing entry for 150.3.3.0/24
Known via "eigrp 200", distance 90, metric 2195456, type internal
Redistributing via eigrp 100, eigrp 200
Advertised by eigrp 100
Last update from 10.0.0.6 on Serial0/1, 00:04:08 ago
Routing Descriptor Blocks:
* 10.0.0.6, from 10.0.0.6, 00:04:08 ago, via Serial0/1
Route metric is 2195456, traffic share count is 1
Total delay is 21000 microseconds, minimum bandwidth is 1544 Kbit
Reliability 255/255, minimum MTU 1500 bytes
Loading 1/255, Hops 1
2.
3.
R3
If the path via R4 and via R2 is down, R1 should use the direct path to
To ensure that R1 prefers the path through R4 ,we will adjust the
Administrative Distance by increasing the AD of internal and external
routes learned from EIGRP 200 to be higher than the AD of external routes
learned from EIGRP 100:
R1(config)#router eigrp 200
R1(config-router)#distance eigrp 180 200
Now we can see that the next-hop is R4 and the route has an AD of 170 and
it's an external redistributed via eigrp 200:
R1(config-router)#do show ip route 150.3.3.0 255.255.255.0
Routing entry for 150.3.3.0/24
Known via "eigrp 100", distance 170, metric 2221056, type external
Redistributing via eigrp 100, eigrp 200
Advertised by eigrp 200
Last update from 150.1.1.4 on FastEthernet0/0, 00:00:05 ago
Routing Descriptor Blocks:
* 150.1.1.4, from 150.1.1.4, 00:00:05 ago, via FastEthernet0/0
Route metric is 2221056, traffic share count is 1
Total delay is 22000 microseconds, minimum bandwidth is 1544 Kbit
Reliability 255/255, minimum MTU 1500 bytes
Loading 1/255, Hops 2
If the path via R4 is down, R1 should prefer the path via R2 so if the path
via R4 fails , R1 goes through R2 instead of R3,thus we will increase the
metric for routes learned from R3, we can see at the begining in the do
show ip eigrp topology 150.3.3.0 255.255.255.0 command that:
-the metric to reach 150.3.3.0 through R3 is 2195456
-the metric to reach 150.3.3.0 through R2 is 2707456
The path via R3 is better:
to ensure R2 will become the preferred route if R4 fails we will increase the
metric for the routes learned from R3 by using offset-list:
Notice now:
-the metric to reach 150.3.3.0 through R3 is
1002195456(1000000000+2195456)
-the metric to reach 150.3.3.0 through R2 is 2707456
the path through R2 is better:
R1#show ip eigrp topology 150.3.3.0 255.255.255.0 | include metric|10.0.0.2|
10.0.0.6
Composite metric is (2221056/0), Route is External
Vector metric:
External protocol is EIGRP, external metric is 2221056
10.0.0.6 (Serial0/1), from 10.0.0.6, Send flag is 0x0
Composite metric is (1002195456/1000281600), Route is Internal
Vector metric:
10.0.0.2 (Serial0/0), from 10.0.0.2, Send flag is 0x0
Composite metric is (2707456/2195456), Route is Internal
Vector metric:
1.
2.
3.
If the paths via R4 R2 are down, R3 should use the direct path to R1
To ensure that the best path is through R4 and if R4 fails ,R3 prefers the
path through R2 ,we will just increase the metric of R1 to be higher than
the metric of R2 , we have already the route via R4 installed in the routing
table (load balancing with the path R1):
before making any changes notice the metric through R1 10.0.0.5 is
2195456
and the metric through R2 10.0.0.9 is 2707456
R1 is better:
R3#show ip eigrp 200 topology 150.1.1.0 255.255.255.0 | include
10.0.0.9|10.0.0.14
10.0.0.5 (Serial0/0), from 10.0.0.5, Send flag is 0x0
Composite metric is (2195456/281600), Route is External
Vector metric:
External protocol is EIGRP, external metric is 0
10.0.0.14 (Serial0/2), from 10.0.0.14, Send flag is 0x0
Composite metric is (2195456/281600), Route is External
Vector metric:
External protocol is EIGRP, external metric is 0
10.0.0.9 (Serial0/1), from 10.0.0.9, Send flag is 0x0
Composite metric is (2707456/2195456), Route is External
Vector metric:
metric|10.0.0.5|
metric|10.0.0.5|
D EX
D EX
Ok the result is not expected because we have only two path to perform
unequal load balancing via R4 and via R1,the challenge tells us to install all
the three path, why this behavior ? first by definition ,when configuring
variance command ,any FS routes whose calculated metric is less than or
equal to the product of variance times FD are added to the IP routing
table ,Routes that are neither successor nor feasible successor can never
be added to the IProuting table, regardless of the variance setting.
In this case before configuring the variance command on R3, the only
feasible successor is R1 because the Reported Distance of R1 is 886144
less than the Feasible Distance of R4 which is 2195456,the path via R2 is
not included because the Reported Distance of R2 is 2195456 and it is
equal to the Feasible Distance of R4 which is 2195456 so the feasibility
condition is not respected,R2 is not a FS:
To ensure that R2 meets the the feasibility condition in order to install this
path for unequal load balancing we will try to configure an offset-list on
R4 :
with an offset-list configured with a value of 4 ,R4 will add it to the FD and
RD and advertises out to its neighbor R3 ,(2195456/281600) becomes
(2195460/281604)
in other word after configuring the offset-list , R4 calculates the new
Feasible Distance FD and the Reported Distance RD as follow:
the new FD =2195456+4=2195460
Notice now R2 now meets the feasibility condition, the Reported Distance
of R2 2195456 is less than the FD of R4 2195460:
R3#show ip eigrp 200 topology 150.1.1.0 255.255.255.0 | include
10.0.0.9|10.0.0.14
metric|10.0.0.5|
D EX
Good result ,R3 installs the three paths (via R4 ,via R2 and via R1) to reach
150.1.1.0 with unequal load balancing.Notice the traffic share count
keyword in the show ip route 150.1.1.1 255.255.255.0 command for all
three paths , it is equal to a non-zero :
240 packets routed to R4
195 packets routed to R2
188 packets routed to R1
After configuring unequal load balancing ,the challenge now is :we should
install ONLY a single path - the path via R4 - this path will be used to
forward packets destined to 150.1.1.0. The rest of two paths should not be
used when the path through R4 is up. The path with the route with the best
metric which is through R2 should then be used when the path via R4 fails:
R3(config)#router eigrp 200
R3(config-router)#traffic-share min across-interfaces
*Mar 1 02:07:28.367: %FIB-4-UNEQUAL: Range of unequal path weightings too large
for prefix 150.1.1.0/24. Some available paths may not be used.
D EX
Notice now the traffic share count is equal to 0 for R2(10.0.0.9) and
R1(10.0.0.5):
R3#show ip route 150.1.1.1 255.255.255.0
Routing entry for 150.1.1.0/24
Known via "eigrp 200", distance 170, metric 2195460, type external
Redistributing via eigrp 200
Last update from 10.0.0.9 on Serial0/1, 00:01:03 ago
Routing Descriptor Blocks:
* 10.0.0.14, from 10.0.0.14, 00:01:03 ago, via Serial0/2
Route metric is 2195460, traffic share count is 1
Total delay is 21000 microseconds, minimum bandwidth is 1544 Kbit
Reliability 255/255, minimum MTU 1500 bytes
Loading 1/255, Hops 1
10.0.0.9, from 10.0.0.9, 00:01:03 ago, via Serial0/1
By default, EIGRP will not advertise routes out the same interface via which
they were learned due to split horizon:
to override this caveat we must disable split horizon on R1 the hub:
R1(config)#interface serial 0/1
R1(config-if)#no ip split-horizon eigrp 1
R1 will set the NEXT HOP field in outgoing routing updates only if the IP
next hop in its EIGRP topology table belongs to the IP subnet of the
outgoing interface.
Notice the next-hop to reach 150.4.4.0 is now R4:
R2(config)#do show ip route eigrp
150.1.0.0/24 is subnetted, 1 subnets
D
But notice R2 and R4 are unable to ping between the LANs because there is
no direct Frame Relay PVC between the two spoke routers:
R2(config)#do ping 150.4.4.4 source 150.2.2.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 150.4.4.4, timeout is 2 seconds:
Packet sent with a source address of 150.2.2.2
.....
Success rate is 0 percent (0/5)
R2(config)#
To allow the ping we must create manually a pvc between R2 and R4:
R2(config)#interface serial 0/1
R2(config-if)#frame-relay map ip 10.0.0.4 201 broadcast
We have two routers both are running EIGRP protocols,the subnet used for
the link between R1 and R2 is 10.1.1.0/30
R1's fa0/0 10.1.1.1/32
R2's fa0/0 10.1.1.2/32
R2 is configured already and we have no access, we can only manage the
router R1
Below the configuration of R1:
interface FastEthernet0/0
ip address 10.1.1.1 255.255.255.252
duplex auto
speed auto
!
router eigrp 1
network 10.1.1.0 0.0.0.3
no auto-summary
0100 5E00000A
..^...
....
....
Notice :E000000A is the equivalent in decimal of 224.0.0.10
E0=224, 00=0, 00=0, A=10
Looks now at Hexa number 00000014 and notice the last two numbers in
hexa which are 14 and convert this back to decimal ,we find 00001 00100 in
binary which is equal to 20 in decimal(16+4=20).
Interface
(sec)
0 10.1.1.2
Fa0/0
(ms)
Cnt Num
11 00:00:41 72 432 0 4
proto=88
07DCADA0:
0100 5E00000A
..^...
...
Looks now at the whole hexa character 00000101 and the two first numbers
of the hexa character 0100000F,two" digits in hexa represents one K value
let's convert each two digits to decimal:
00 -> 0 -> K1
00 -> 0 -> K2
01 -> 1 -> K3
01 -> 1 -> K4
01 -> 1 -> K5
Now we have adjacencies between R1 and R2 because now both routers use
the same K-Values:
R1(config-router)#do show ip eigrp nei
IP-EIGRP neighbors for process 20
H Address
Interface
(sec)
0 10.1.1.2
Fa0/0
Cnt Num
13 00:00:38 58 348 0 7
Lab 27: EIGRP redisstribution between two AS and the nexthop field
Configure and advertise the following subnets via EIGRP with the
requirements below:
1. R2: Loopback192 - 192.1.1.1/32: Redistribution Metric 100000 1000 255
1 1500
2. R2: Loopback193 - 193.1.1.1/32: Redistribution Metric 10000 500 255 1
1500
R2(config)#route-map LOOPBACK permit 10
R2(config-route-map)#match interface loopback 192
R2(config-route-map)#set metric 100000 1000 255 1 1500
R2(config)#route-map LOOPBACK permit 20
R2(config-route-map)#match interface loopback 193
R2(config-route-map)#set metric 10000 500 255 1 1500
R2(config)#router eigrp 2048
R2(config-router)#redistribute connected route-map LOOPBACK
1.
2.
R4(config-if)#exit
R4(config)#router eigrp 1024
R4(config-router)#redistribute connected
D EX
We can deduce that the next-hop for each subnet in each router is always
R1 (150.1.1.1), because EIGRP set the next-hop field to 0.0.0.0 so R1 when
redistributing between the TWO eigrp as it leaves the next-hop field to
0.0.0.0 which tell to the other routers: use the router sendig the update as
the next-hop,remember the FA in OSPF when it is set to 0.0.0.0 by an ASBR
meaning use the ASBR as the next-hop.
To override the this extra-hop and route the packet more efiiciently, we
must change the next-hop field by configuring the ip next-hop-self
command on R1:
R1(config)#interface fastethernet 0/0
R1(config-if)#no ip next-hop-self eigrp 1024
R1(config-if)#no ip next-hop-self eigrp 2048
D EX
Now we will configure on R4 so that the router installs only routes with a
metric located between 500 000 and 600 000.
The routing table of R4 show the prefix 193.1.1.1/32 with the metric 435200
and the prefix 192.1.1.1/32 with the metric 563200.
to do this requirement so that only routes with a metric between 500,000
and 600,000 are installed on R4 we configure a route-map and we specify
the metric range with the match metric command,we will use the command
match metric 550 000 +- 50000 under the route-map which tells the router
to match the routes with a metric that is 50000 less than 550 000 (500 000)
or 50000 more than 550 000 (600 000) :
R4(config)#route-map EIGRP-FILTER permit 10
R4(config-route-map)#match metric 550000 +- 50000
R4(config)#route-map EIGRP-FILTER deny 20
R4(config)#router eigrp 1024
R4(config-router)#distribute-list route-map EIGRP-FILTER in
Now notice the subnet 193.1.1.1/32 is filtered and not installed in the
routing table of R4 because this metric (435200) is outside the permitted
range of 500,000 to 600,000:
R4(config-router)#do show ip route eigrp
192.1.1.0/32 is subnetted, 1 subnets
D EX
I tried to see the next-hop field in eigrp which is by default 0.0.0.0 with
wireshark without success but there is another way to see it but not
directly
R1#show ip route eigrp
D EX 192.168.1.0/24 [170/2560025856] via 10.1.1.2, 00:00:40, FastEthernet0/0
the show ip eigrp topology 192.168.1.0 shown that the eigrp packet is
received from R2 (10.1.1.2) and the section: 10.1.1.2 (FastEthernet0/0)
means the next-hop to reach 192.168.1.0 ,it is the same ,the sender of the
update is considered the next-hop ,since it the same we can deduce that R2
set the next-hop field in its update to 0.0.0.0 the section in the show ip
eigrp topology:
R1#show ip eigrp topology 192.168.1.0
IP-EIGRP (AS 1): Topology entry for 192.168.1.0/24
State is Passive, Query origin flag is 1, 1 Successor(s), FD is 2560025856
Routing Descriptor Blocks:
10.1.1.2 (FastEthernet0/0), from 10.1.1.2, Send flag is 0x0
Composite metric is (2560025856/2560000256), Route is External
Vector metric:
Minimum bandwidth is 1 Kbit
Total delay is 1010 microseconds
Reliability is 1/255
Load is 1/255
Minimum MTU is 1
Hop count is 1
External data:
Originating router is 192.168.2.1
AS number of route is 0
External protocol is RIP, external metric is 1
Administrator tag is 0 (0x00000000)
below we can see that the packet eigrp for the routing update is received
from 10.1.1.2 and the next-hop is 10.1.1.3 thus we can deduce that the
next-hop field is set to 10.1.1.3:
R1#show ip eigrp topology 192.168.1.0
IP-EIGRP (AS 1): Topology entry for 192.168.1.0/24
State is Passive, Query origin flag is 1, 1 Successor(s), FD is 2560025856
Routing Descriptor Blocks:
10.1.1.3 (FastEthernet0/0), from 10.1.1.2, Send flag is 0x0
Composite metric is (2560025856/2560000256), Route is External
Vector metric:
Minimum bandwidth is 1 Kbit
Total delay is 1010 microseconds
Reliability is 1/255
Load is 1/255
Minimum MTU is 1
Hop count is 1
External data:
Originating router is 192.168.2.1
AS number of route is 0
External protocol is RIP, external metric is 1
Administrator tag is 0 (0x00000000)
The lab posted previously (next-hop field EIGRP over IPv4) shows how the
next-hop field EIGRP influences the path selection in ethernet segment over
IPv4 ,i am curious to see if the behavior is the same with IPV6,thus i did
some labs to understand in depth ,let's go:
R2 redistributes between RIPng and EIGRP,the show ipv6 route eigrp
command shown that the next-hop to reach 3:3:3:3::/64 is the link-local
address of R2 ,the show ipv int br confirms the result ,so we have the same
behavior with eigrp over IPv4:
R1#show ipv6 route EIGRP
EX 3:3:3:3::/64 [170/2560025856]
via FE80::C00A:DFF:FE54:0, FastEthernet0/0
[up/up]
FE80::C00A:DFF:FE54:0
R1#traceroute 3:3:3:3::3
Type escape sequence to abort.
Tracing the route to 3:3:3:3::3
1 10::2 96 msec 168 msec 124 msec
2 3:3:3:3::3 260 msec 292 msec 188 msec
Here we can see that the next-hop and the sender of the update EIGRP are
the same link-local address shown earlier meaning that the next-hop field is
set zero ,notice 0.0.0.0 is for IPv4 so for IPv6 the next-hop field is set to
(::):
[up/up]
FE80::C00B:8FF:FEAC:0
10::3
FastEthernet0/1
Loopback0
[administratively down/down]
[up/up]
FE80::C00B:8FF:FEAC:0
3:3:3:3::3
R3(config-if)#
Let's look the following output ,like with eigrp over IPv4 ,here we have two
Link-local address ,one for the next-hop which is R3
FE80::C00B:8FF:FEAC:0,and another represents the router which send the
update R2 FE80::C00A:DFF:FE54:0:
R1#show ipv6 eigrp topology 3:3:3:3::/64
IPv6-EIGRP (AS 1): Topology entry for 3:3:3:3::/64
State is Passive, Query origin flag is 1, 1 Successor(s), FD is 2560025856
Routing Descriptor Blocks:
FE80::C00B:8FF:FEAC:0 (FastEthernet0/0), from FE80::C00A:DFF:FE54:0, Send flag is
0x0
Composite metric is (2560025856/2560000256), Route is External
Vector metric:
Minimum bandwidth is 1 Kbit
Total delay is 1010 microseconds
Reliability is 1/255
Load is 1/255
Minimum MTU is 1
Hop count is 1
External data:
Originating router is 2.2.2.2
AS number of route is 0
External protocol is RIP, external metric is 2
Administrator tag is 0 (0x00000000)
so OSPFv2 uses the Forward Address field set in the Type-5 LSA external in
order to forward the packet efficiently thus avoiding the extra hop
let's confirm the behavior:
R1#traceroute 192.168.1.3
Type escape sequence to abort.
Tracing the route to 192.168.1.3
1 10.1.1.3 100 msec * 52 msec
we can see that the packet from R1 and toward 192.168.1.3 is sent directly
to R3 without passing via R2.
[up/up]
FE80::C20A:13FF:FE94:0
10:10:10:10::5
FastEthernet0/1
[administratively down/down]
Requirements:
-Configure EIGRP AS 4567 on R4, R5, R6 and R7 and advertise
10.100.1.0/29 and loopback 0 subnets:
R4:
router eigrp 4567
network 4.4.4.4 0.0.0.0
network 10.100.1.0 0.0.0.7
R5:
router eigrp 4567
network 5.5.5.5 0.0.0.0
network 10.100.1.0 0.0.0.7
R6:
router eigrp 4567
network 6.6.6.6 0.0.0.0
network 10.100.1.0 0.0.0.7
R7:
router eigrp 4567
network 7.7.7.7 0.0.0.0
network 10.100.1.0 0.0.0.7
-Configure iBGP in AS 4567, use loopback 0 interface for peering and use
peer group configuration and Configure eBGP between AS 4567 and AS 2
and AS 3,Configure eBGP between AS 2 and AS 1,Configure eBGP between
AS 3 and AS 1,Advertise 1.0.0.0/8 and 2.0.0.0/8 subnets in BGP:
R4:
router bgp 4567
network 10.100.1.0 mask 255.255.255.248
neighbor INTERNAL peer-group
neighbor INTERNAL remote-as 4567
neighbor INTERNAL update-source Loopback0
neighbor INTERNAL next-hop-self
neighbor 5.5.5.5 peer-group INTERNAL
neighbor 6.6.6.6 peer-group INTERNAL
neighbor 7.7.7.7 peer-group INTERNAL
neighbor 24.0.0.2 remote-as 2
R5:
router bgp 4567
network 10.100.1.0 mask 255.255.255.248
neighbor INTERNAL peer-group
R6:
router bgp 4567
neighbor INTERNAL peer-group
neighbor INTERNAL remote-as 4567
neighbor INTERNAL update-source Loopback0
neighbor 4.4.4.4 peer-group INTERNAL
neighbor 5.5.5.5 peer-group INTERNAL
neighbor 7.7.7.7 peer-group INTERNAL
R7:
router bgp 4567
neighbor INTERNAL peer-group
neighbor INTERNAL remote-as 4567
neighbor INTERNAL update-source Loopback0
neighbor 4.4.4.4 peer-group INTERNAL
neighbor 5.5.5.5 peer-group INTERNAL
neighbor 6.6.6.6 peer-group INTERNAL
R1:
router bgp 1
network 1.0.0.0
network 2.0.0.0
neighbor 12.0.0.2 remote-as 2
neighbor 13.0.0.3 remote-as 3
R2:
router bgp 2
neighbor 12.0.0.1 remote-as 1
neighbor 24.0.0.4 remote-as 4567
R3:
router bgp 3
neighbor 13.0.0.1 remote-as 1
neighbor 35.0.0.5 remote-as 4567
Let's verify the peer-group and see the current members,notice the line
where the router-id of R5 ,R6 and R7 are displayed which are the members
of the peer-group:
R4#sh ip bgp peer-group INTERNAL
BGP peer-group is INTERNAL, remote AS 4567
BGP version 4
Default minimum time between advertisement runs is 0 seconds
Neighbor
12.0.0.2
0 00:01:33
13.0.0.3
0 00:00:34
R1(config-router)#
Neighbor
5.5.5.5
4 4567
11
11
0 00:06:58
6.6.6.6
4 4567
10
12
0 00:07:05
7.7.7.7
4 4567
10
12
0 00:06:27
24.0.0.2
0 00:01:55
Neighbor
4.4.4.4
4 4567
12
10
0 00:06:47
5.5.5.5
4 4567
12
10
0 00:07:08
6.6.6.6
4 4567
0 00:06:56
-Ensure AS 4567 will use the link between R3-R5 towards network
2.0.0.0/8. Use LOCAL_PREF only.
Before configuring the Local-Pref ,let's use a traceroute on R6 and R7
toward 2.0.0.1:
We can see that the packet goes through R4--R2:
R6#traceroute 2.0.0.1
Type escape sequence to abort.
Tracing the route to 2.0.0.1
1 10.100.1.4 72 msec 24 msec 24 msec
2 24.0.0.2 60 msec 28 msec 80 msec
3 12.0.0.1 96 msec * 96 msec
R6#
Network
* i1.0.0.0
*>i
* i2.0.0.0
*>i
Next Hop
5.5.5.5
4.4.4.4
0
0
5.5.5.5
4.4.4.4
100
0
100
100
100
031i
021i
031i
021i
r i10.100.1.0/29
r>i
5.5.5.5
4.4.4.4
0
0
100
100
0i
0i
Network
* i1.0.0.0
*>i
* i2.0.0.0
*>i
Next Hop
5.5.5.5
4.4.4.4
0
0
5.5.5.5
4.4.4.4
r i10.100.1.0/29
r>i
100
0
5.5.5.5
4.4.4.4
100
021i
100
100
0
031i
031i
021i
100
100
0i
0i
To ensure that the traffic goes through R5--R3 we will tell to R5 to advertise
into BGP AS 4567 the prefix 2.0.0.0/24 with a better(higher) localpreference than R4 as follow by default the Local-Pref is equal to 100:
router bgp 4567
neighbor 35.0.0.3 route-map RM_LOC_PREF in
!
ip prefix-list NET-2 seq 5 permit 2.0.0.0/8
!
route-map RM_LOC_PREF permit 10
match ip address prefix-list NET-2
set local-preference 200
!
route-map RM_LOC_PREF permit 20
Network
* i1.0.0.0
*>i
Next Hop
5.5.5.5
4.4.4.4
*>i2.0.0.0
0
0
5.5.5.5
r i10.100.1.0/29
r>i
5.5.5.5
4.4.4.4
031i
200
0
021i
031i
100
100
0i
0i
Network
* i1.0.0.0
*>i
Next Hop
5.5.5.5
4.4.4.4
*>i2.0.0.0
0
0
5.5.5.5
r i10.100.1.0/29
r>i
100
0
5.5.5.5
4.4.4.4
100
021i
200
0
031i
100
031i
100
0i
0i
The traceroute shown that the packet goes through R5--R3 to reach
2.0.0.0/24:
R6#traceroute 2.0.0.1
Type escape sequence to abort.
Tracing the route to 2.0.0.1
1 10.100.1.5 76 msec 108 msec 20 msec
2 35.0.0.3 100 msec 120 msec 32 msec
3 13.0.0.1 148 msec * 176 msec
R6#
-Ensure AS 4567 will use the link between R2-R4 towards network
1.0.0.0/8. Use LOCAL_PREF only.
we will do the same method on R4:
we will tell to R4 to advertise into BGP AS 4567 the prefix 1.0.0.0/24 with a
better(higher) local-preference than R4 as follow,by default the Local-Pref
is equal to 100:
router bgp 4567
neighbor 24.0.0.2 route-map RM_LOC_PREF in
no auto-summary
!
ip prefix-list NET-1 seq 5 permit 1.0.0.0/8
!
route-map RM_LOC_PREF permit 10
match ip address prefix-list NET-1
Network
Next Hop
*>i1.0.0.0
4.4.4.4
200
021i
*>i2.0.0.0
5.5.5.5
200
031i
r>i10.100.1.0/29
ri
4.4.4.4
5.5.5.5
100
100
0i
0i
Network
Next Hop
*>i1.0.0.0
4.4.4.4
200
021i
*>i2.0.0.0
5.5.5.5
200
031i
r>i10.100.1.0/29
ri
4.4.4.4
5.5.5.5
100
100
0i
0i
Notice:you must enter the clear ip bgp * command to reset the bgp
neighbors relationship when configuring the Local-Preference to take
effect.
Lab 32: BGP infuencing the path using MED and Prepend
We will Use the Loopback 0 addresses for peering. and static routes only
instead of IGP as shown in the topology.
The attached LAN subnets addresses in each router should be advertised
via BGP and appear with an ORIGIN code of INCOMPLETE in the BGP RIBs
We will redistribute the LAN subnet into BGP ,same sequence of commands
must be entered in each router:
R1(config)#route-map CONNECTED permit 10
R1(config-route-map)#match interface fastethernet 0/0
R1(config-route-map)#exit
R1(config)#route-map CONNECTED deny 20
R1(config-route-map)#exit
R1(config)#router bgp 1
R1(config-router)#redistribute connected route-map CONNECTED
R1(config-router)#exit
we can verify with the show ip bgp command and notice the question mark
at the end of each line which means that the origin is incomplete
R1(config-router)#do show ip bgp
BGP table version is 4, local router ID is 1.1.1.1
Network
Next Hop
* 150.1.1.0/24
*>
4.4.4.4
0.0.0.0
*> 150.2.2.0/24
* 150.3.3.0/24
*>
2.2.2.2
04?
32768 ?
02?
4.4.4.4
043?
2.2.2.2
023?
Network
Next Hop
* 150.1.1.0/24
*>
3.3.3.3
1.1.1.1
034?
0
01?
*> 150.2.2.0/24
0.0.0.0
*> 150.3.3.0/24
3.3.3.3
32768 ?
03?
Network
Next Hop
*> 150.1.1.0/24
*
4.4.4.4
2.2.2.2
* 150.2.2.0/24
*>
021?
4.4.4.4
2.2.2.2
*> 150.3.3.0/24
04?
0412?
0
0.0.0.0
02?
0
32768 ?
Network
Next Hop
*> 150.1.1.0/24
*
*>
0
0
3.3.3.3
01?
012?
1.1.1.1
3.3.3.3
32768 ?
032?
1.1.1.1
* 150.3.3.0/24
*>
0.0.0.0
1.1.1.1
* 150.2.2.0/24
0123?
0
03?
we Configure BGP, so that R4 prefers the path via R3 to reach any subnet
In the output of the show ip bgp command on R4 we can see that the
preferred route to reach 150.3.3.0 is via R3, however the preferred route
to reach 150.2.2.0 is via R1(the lowest router-id) ,also, to ensure that the
subnet 150.1.1.0 will be reached via R3 , we will configure BGP on R1 to
advertise all prefixes with a longer AS-PATH to influence the path selection
as follow:
R1(config)#route-map PREP permit 10
R1(config-route-map)#set as-path prepend 1 1 1 1
R1(config-route-map)#exit
R1(config)#router bgp 1
Notice now the preferred path to reach both prefixes 150.3.3.0 and
150.2.2.0 is via R3 with the next-hop 3.3.3.3 because the shortest AS-PATH
length:
R4(config)#do show ip bgp
BGP table version is 7, local router ID is 4.4.4.4
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network
Next Hop
* 150.1.1.0/24
*>
1.1.1.1
0.0.0.0
* 150.2.2.0/24
*>
32768 ?
1.1.1.1
0111112?
3.3.3.3
*> 150.3.3.0/24
011111?
3.3.3.3
032?
0
03?
Network
* 150.1.1.0/24
Next Hop
2.2.2.2
*>
4.4.4.4
04?
*> 150.2.2.0/24
2.2.2.2
*> 150.3.3.0/24
0.0.0.0
02?
32768 ?
Network
Next Hop
*> 150.1.1.0/24
*
4.4.4.4
2.2.2.2
4
2
04?
021?
*> 150.2.2.0/24
2.2.2.2
*> 150.3.3.0/24
0.0.0.0
02?
32768 ?
R3(config)#
We can see for the prefix 150.1.1.0 that the path with the longer AS-PATH
length is preferred because the lowest MED even if the AS-PATH takes
precedence over the MED in the order of the path selection in BGP:
R3(config)#do show ip bgp 150.1.1.0 255.255.255.0
BGP routing table entry for 150.1.1.0/24, version 2
Paths: (2 available, best #2, table Default-IP-Routing-Table)
Flag: 0x820
Advertised to update-groups:
1
4
4.4.4.4 from 4.4.4.4 (4.4.4.4)
Another way to verify all BGP RIBs with do show ip bgp, R3 prefers all
routes from R2 because the lowest MED:
R3(config-router)#do show ip bgp
BGP table version is 4, local router ID is 3.3.3.3
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network
Next Hop
* 150.1.1.0/24
*>
*>
4.4.4.4
2.2.2.2
* 150.2.2.0/24
4.4.4.4
2.2.2.2
*> 150.3.3.0/24
0.0.0.0
04?
021?
4
2
04111112?
02?
R3(config-router)#
32768 ?
To ensure that that R2 and R3 prefer the path via R1 to reach the
150.1.1.0/24 prefix:
we will increase the weight for the prefix 150.1.1.0/24 learned from R1 on
both R2 and R3 as follow:
R2(config)#router bgp 65502
R2(config-router)#neighbor 10.0.0.1 route-map weight-R1 in
R2(config-router)#ip prefix-list NET-R1 seq 5 permit 150.1.1.0/24
R2(config)#route-map weight-R1 permit 10
R2(config-route-map)# match ip address prefix-list NET-R1
R2(config-route-map)# set weight 1000
R2(config-route-map)#route-map weight-R1 permit 20
Flag: 0x820
Advertised to update-groups:
1
(65503) 254
10.0.0.10 from 10.0.0.10 (3.3.3.3)
Origin IGP, metric 0, localpref 100, valid, confed-external
254
10.0.0.1 from 10.0.0.1 (1.1.1.1)
Origin IGP, metric 0, localpref 100, weight 1000, valid, external, best
let's look the path from R1 to reach 150.3.3.0/24 ,there are three valid
routes but the path through R3(10.0.0.6) is the best, we can influence the
path selection by manipulating the ORIGIN, IGP is preferred over EGP and
EGP is preferred than incomplete,notice in the following output the origin
of the tree path is IGP:
the challenge is :we want that R1 prefers the path through R2(10.0.0.2)
R3 will set the origin of 150.3.3.0 as incomplete and R4 advertises the
prefix 150.3.3.0 as EGP ,R1 when it receive three routes toward 150.3.3.0
,from R2 R3 and R4, R2 advertises this routes with the origin IGP which is
preferred over incomplete and EGP:
R3(config)#ip prefix-list NET-R3 seq 5 permit 150.3.3.0/24
R3(config)#route-map ORIGIN permit 10
R3(config-route-map)# match ip address prefix-list NET-R3
R3(config-route-map)# set origin incomplete
R3(config-route-map)#
R3(config-route-map)#route-map ORIGIN permit 20
R3(config-route-map)#router bgp 65503
R3(config-router)#neighbor 10.0.0.5 route-map ORIGIN out
we can confirm the result by the following output which shown that the
preferred route is via R2(10.0.0.2) ,notice the origin is displayed for the
prefix 150.3.3.0/24,R2 as IGP ,R4 as EGP and R3 as incomplete:
R1#show ip bgp 150.3.3.0 255.255.255.0
BGP routing table entry for 150.3.3.0/24, version 23
Paths: (3 available, best #2, table Default-IP-Routing-Table)
Flag: 0x820
Advertised to update-groups:
1
5
150.1.1.4 from 150.1.1.4 (4.4.4.4)
Origin EGP, localpref 100, valid, external
5
10.0.0.2 from 10.0.0.2 (2.2.2.2)
Origin IGP, localpref 100, valid, external, best
5
10.0.0.6 from 10.0.0.6 (3.3.3.3)
Origin incomplete, metric 0, localpref 100, valid, external
Requirements:
1. Use the addressing scheme shown in the diagram.
2. Configure the ITA network to be in EIGRP AS 65001.
R1:
router eigrp 65001
network 10.0.0.0
network 192.168.14.0
no auto-summary
R2:
router eigrp 65001
network 10.0.0.0
no auto-summary
R3:
router eigrp 65001
network 10.0.0.0
network 192.168.34.0
no auto-summary
5. Configure the ITA network to be in BGP AS 65001, and the TDP network
to be in BGP AS 65002.
R1:
router bgp 65001
R2:
router bgp 65001
R3:
router bgp 65001
R5
router bgp 65002
7. Configure the interfaces on the border routers between the two EIGRP
autonomous systems, so they do not send EIGRP packets.
R5:
router eigrp 65002
passive-interface FastEthernet0/0
passive-interface Serial0/0
R3:
router eigrp 65001
passive-interface Serial0/2
8. All routers will be participating in BGP. Configure all routers for a full
mesh of IBGP peers in each system.
R1:
router bgp 65001
no synchronization
neighbor 10.1.103.3 remote-as 65001
neighbor 10.2.2.2 remote-as 65001
neighbor 10.2.2.2 update-source Loopback1
neighbor 192.168.14.2 remote-as 65002
no auto-summary
R2:
router bgp 65001
no synchronization
neighbor 10.1.1.1 remote-as 65001
neighbor 10.1.1.1 update-source Loopback2
neighbor 10.1.203.3 remote-as 65001
no auto-summary
R3:
router bgp 65001
no synchronization
neighbor 10.1.103.1 remote-as 65001
R5
router bgp 65002
no synchronization
neighbor 192.168.14.1 remote-as 65001
neighbor 192.168.34.1 remote-as 65001
no auto-summary
R2:
router bgp 65001
no synchronization
network 10.2.2.0 mask 255.255.255.0
R3:
router bgp 65001
no synchronization
network 10.3.3.0 mask 255.255.255.0
R5:
router bgp 65002
no synchronization
network 172.16.0.0 mask 255.255.252.0
network 172.16.4.0 mask 255.255.252.0
network 172.16.8.0 mask 255.255.252.0
network 172.16.12.0 mask 255.255.252.0
11. On R2, create a static summary route for the rest of its loopback
interfaces and advertise this static route in BGP.
R2:
router bgp 65001
network 10.20.0.0 mask 255.255.252.0
!
ip route 10.20.0.0 255.255.252.0 Null0
12. R5 should send a summary route to ITA representing all the R5 loopback
interfaces.
R5:
router bgp 65002
aggregate-address 172.16.0.0 255.255.240.0 summary-only
Notice in the show ip bgp command on R4 the letter "S" for the four
loopback interfaces of R5,the reason is :when adding the summary-only
keyword in the aggregate-address command ,the summary-only keyword
tells to suppress the advertisement of the subset routes (the four loopback
interfaces) ,those routes are noted by the code "S" instead R5 advertises
the summary 172.16.0.0/20 which is noted by the code * meaning that this
route is valid and finally R2 in ITA networks receives only one route,the
summary 172.16.0.0/20 as shown by the followng output on R2:
R2#show ip bgp
BGP table version is 9, local router ID is 10.20.3.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
13. R5 should prefer the path to ITA networks via the Ethernet link between
R1 and R5. Accomplish this by modifying the MED advertised to TDP.
R1:
router bgp 65001
neighbor 192.168.14.2 route-map MED out
!
route-map MED permit 10
set metric 10
R3:
router bgp 65001
neighbor 192.168.34.2 route-map MED out
!
route-map MED permit 10
set metric 20
14. Routers in the ITA AS should prefer the path to TDP networks via the
Ethernet link between R1 and R5. Accomplish this by modifying the local
preference of routes being advertised in from TDP.
R1:
router bgp 65001
neighbor 192.168.14.2 route-map LOC-PREF in
!
route-map LOC-PREF permit 10
set local-preference 200
R3:
router bgp 65001
neighbor 192.168.34.2 route-map LOC-PREF in
!
route-map LOC-PREF permit 10
set local-preference 100
R2(config-router)#
D EX
R3(config-if)#
R3(config-if)#do show ip route ospf
10.0.0.0/24 is subnetted, 3 subnets
O E2
R2(config-route-map)#router eigrp 1
R2(config-router)#redistribute connected metric 1 1 1 1 1 route-map CONNECTED
R2(config-router)#router ospf 1
R2(config-router)#redistribute connected subnets route-map CONNECTED
D EX
R4(config)#
We will do the same thing on R3 but instead of using the matching interface
to include the serial connected route ,we will use the matching of an
access-list to
include the serial connected route on R3 to be redisributed into OSPF and
EIGRP(S0/0 into RIP and s0/1 into OSPF):
R3(config-if)#ip access-list standard Lo0
R3(config-std-nacl)# permit 3.3.3.0 0.0.0.255
R3(config-std-nacl)#!
R3(config-std-nacl)#ip access-list standard S0/1
R3(config-std-nacl)# permit 10.1.34.0 0.0.0.255
R3(config-std-nacl)#!
R3(config-std-nacl)#ip access-list standard S0/0
R3(config-std-nacl)# permit 10.1.23.0 0.0.0.255
R3(config-std-nacl)#!
R3(config-std-nacl)#route-map CONNECTED-OSPF permit 10
R3(config-route-map)# match ip address Lo0
R3(config-route-map)#!
R3(config-route-map)#route-map CONNECTED-OSPF permit 20
R3(config-route-map)# match ip address S0/1
R3(config-route-map)#!
R3(config-route-map)#route-map CONNECTED-RIP permit 10
R3(config-route-map)# match ip address Lo0
R3(config-route-map)#!
R3(config-route-map)#route-map CONNECTED-RIP permit 20
R3(config-route-map)# match ip address S0/0
R3(config-route-map)#!
R3(config-route-map)#router ospf 1
R3(config-router)# redistribute connected subnets route-map CONNECTED-OSPF
R3(config-router)#!
R3(config-router)#router rip
R3(config-router)# redistribute connected metric 5 route-map CONNECTED-RIP
R3(config-router)#
D EX
R1(config)#
D EX
R1(config)#
Now what happen if R1 received the two routes with the same AD?
R1(config)#router ospf 1
R1(config-router)#distance ospf inter-area 100 intra-area 100
R1(config-router)#router eigrp 1
R1(config-router)#distance eigrp 100 170
The preferred route is still the route learned from EIGRP even if the AD are
equal:
R1#show ip route 172.16.1.0
Routing entry for 172.16.1.0/24
Known via "eigrp 1", distance 100, metric 409600, type internal
Redistributing via eigrp 1
Last update from 192.168.1.2 on FastEthernet0/0, 00:00:14 ago
Routing Descriptor Blocks:
* 192.168.1.2, from 192.168.1.2, 00:00:14 ago, via FastEthernet0/0
Route metric is 409600, traffic share count is 1
Total delay is 6000 microseconds, minimum bandwidth is 10000 Kbit
Reliability 255/255, minimum MTU 1500 bytes
Loading 1/255, Hops 1
After disabling fa0/0 ,R1 loses its eigrp route and the ospf route with AD
100 is installed in the routing table:
R1#show ip route 172.16.1.0
Routing entry for 172.16.1.0/24
Known via "ospf 1", distance 100, metric 11, type intra area
Last update from 10.1.1.2 on FastEthernet0/1, 00:00:09 ago
Routing Descriptor Blocks:
* 10.1.1.2, from 2.2.2.2, 00:00:09 ago, via FastEthernet0/1
Route metric is 11, traffic share count is 1
R1(config)#router rip
R1(config-router)#version 2
R1(config-router)#network 192.168.1.0
R1(config-router)# no auto-summary
R2(config)#router rip
R2(config-router)#version 2
R2(config-router)#network 172.16.1.0
R2(config-router)# network 192.168.1.0
R2(config-router)# no auto-summary
let's configure the AD of the rip routes to be equal with OSPF 100:
R2(config-router)#distance 100
R2(config-router)#distance 100
The preferred route is the route learned from OSPF even if the AD is equal:
R1#show ip route 172.16.1.0
Routing entry for 172.16.1.0/24
Known via "ospf 1", distance 100, metric 11, type intra area
Last update from 10.1.1.2 on FastEthernet0/1, 00:03:20 ago
Routing Descriptor Blocks:
* 10.1.1.2, from 2.2.2.2, 00:03:20 ago, via FastEthernet0/1
Route metric is 11, traffic share count is 1
after disabling Fa0/1 on R1,R1 loses its ospf route and installs the rip route
with the same AD 100:
R1(config-if)#do show ip route 172.16.1.0
Routing entry for 172.16.1.0/24
Known via "rip", distance 100, metric 1
Redistributing via rip
Last update from 192.168.1.2 on FastEthernet0/0, 00:00:03 ago
Routing Descriptor Blocks:
* 192.168.1.2, from 192.168.1.2, 00:00:03 ago, via FastEthernet0/0
Route metric is 1, traffic share count is 1
R2(config-router)#router eigrp 1
R2(config-router)# network 172.16.1.0 0.0.0.255
R2(config-router)# network 192.168.1.0
R2(config-router)# no auto-summary
The preferred route is the route learned from EIGRP even if the AD are
equal:
R1(config-router)#do show ip route 172.16.1.0
Routing entry for 172.16.1.0/24
Known via "eigrp 1", distance 100, metric 409600, type internal
Redistributing via eigrp 1
Last update from 192.168.1.2 on FastEthernet0/0, 00:02:35 ago
Routing Descriptor Blocks:
* 192.168.1.2, from 192.168.1.2, 00:02:35 ago, via FastEthernet0/0
Route metric is 409600, traffic share count is 1
Total delay is 6000 microseconds, minimum bandwidth is 10000 Kbit
Reliability 255/255, minimum MTU 1500 bytes
Loading 1/255, Hops 1
So Two routing protocols with the same AD ,the protocol with the origin
lower default AD will be used.
Suboptimal routes :
R1#show ip route | include 5.5.5.0
O E2
R1:
router eigrp 1
redistribute ospf 1 metric 1 1 1 1 1
!
router ospf 1
log-adjacency-changes
redistribute eigrp 1 subnets route-map EIGRPtoOSPF
distribute-list route-map STOP-TAG-33 in
!
route-map STOP-TAG-33 deny 10
match tag 33
!
route-map STOP-TAG-33 permit 20
!
route-map EIGRPtoOSPF permit 10
set tag 11
R3:
router eigrp 1
redistribute ospf 1 metric 1 1 1 1 1
!
router ospf 1
log-adjacency-changes
redistribute eigrp 1 subnets route-map EIGRP-to-OSPF
distribute-list route-map STOP-TAG-11 in
!
route-map STOP-TAG-11 deny 10
match tag 11
!
route-map STOP-TAG-11 permit 20
!
route-map EIGRP-to-OSPF permit 10
set tag 33
R6:
router eigrp 1
redistribute rip metric 1 1 1 1 1
distance eigrp 90 100
R2 and R3 do the redistribution between eigrp and OSPF ,R4 does the
redistribution between rip and ospf.notice that i configured the AD in R4
under rip with 105 , with this way ,i can prevent R4 to install the route to
172.16.1.0 learned via ospf because 120 is greater than 110 so i changes
the AD of rip in R4 to ensure that R4 will always prefer the route rip to
reach 172.16.1.0,I am doing it in order to avoid a suprising result:
R2#show ip route 172.16.1.0
Routing entry for 172.16.1.0/24
Known via "ospf 1", distance 110, metric 20, type extern 2, forward metric 64
Redistributing via eigrp 100
Advertised by eigrp 100 metric 1544 2000 255 1 1500
Last update from 192.168.3.4 on Serial0/1, 00:00:25 ago
Routing Descriptor Blocks:
* 192.168.3.4, from 192.168.4.4, 00:00:25 ago, via Serial0/1
Route metric is 20, traffic share count is 1
R1#traceroute 172.16.1.1
1 192.168.1.2 24 msec 8 msec 0 msec
2 192.168.3.4 24 msec 20 msec 20 msec
3 10.1.1.5 40 msec * 48 msec
R1#
The purpose is to force the packet coming from R1 to take the path R2--R3-R4 over the fast ethernet link
now R2 installs the external route eigrp with the tag 999(the output below
shown at the end the tag 999) learned from R3(192.168.2.3) even if the AD
of this route 170 is greater than 110 the AD of external ospf:
R2(config)#do show ip route 172.16.1.0
Routing entry for 172.16.1.0/24
Known via "eigrp 100", distance 170, metric 307200
Tag 999, type external
Redistributing via eigrp 100, ospf 1
Advertised by ospf 1 subnets
Last update from 192.168.2.3 on FastEthernet0/0, 00:01:17 ago
Routing Descriptor Blocks:
* 192.168.2.3, from 192.168.2.3, 00:01:17 ago, via FastEthernet0/0
Route metric is 307200, traffic share count is 1
The traceroute now shows that the packet from R1 toward 172.16.1.1 takes
the path R2--R3--R4 over the fastethernet link:
R1#traceroute 172.16.1.1
Type escape sequence to abort.
Tracing the route to 172.16.1.1
1 192.168.1.2 16 msec 12 msec 0 msec
2 192.168.2.3 28 msec 20 msec 20 msec
3 192.168.4.4 48 msec 40 msec 40 msec
4 10.1.1.5 72 msec * 76 msec
4-Routes beginning with 14.3 should be redistributed, with route tag 99.No
other routes should be redistributed.
ip access-list standard ACL-14-3
permit 14.3.0.0 0.0.255.255
router eigrp 1
redistribute ospf 1 route-map ospf-into-eigrp metric 1 1 1 1 1
!
router ospf 1
redistribute eigrp 1 subnets route-map eigrp-into-ospf
O E1
O E2
O IA
C
R4 installs only two routes external eigrp for 15.6.11.0 which matches the
route-map ospf-into-eigrp permit 20 ,this route-map as shown earlier
matches the E1 for this subnet sourced from R6 with tag 6, the second
route is for the subnet 10.1.2.0 which matches the route-map ospf-intoeigrp permit 10 ,this route-map matches the routes which have the nexthop 10.1.1.5 (R5), the other subnets 15.0.0.0 are denied by the deny clause
at the last of the route map:
R4(config-router)#do show ip route 15.0.0.0
Routing entry for 15.0.0.0/24, 2 known subnets
Redistributing via eigrp 1
D EX
D EX
The two subnets 14.2.22.4/30 and 14.2.22.8/30 are not installed because
the deny clause at the end of the route-map ospf-into-eigrp ,also the routes
beginning with 14.1 are filtered and does not appear int the routing table
of R5 so only the routes beginning with 14.2 and 14.3 are installed as
shown below:
R5(config-if)#do show ip route 14.0.0.0
Routing entry for 14.0.0.0/8, 6 known subnets
Variably subnetted with 2 masks
O E2
O E2
O E2
O E2
O E2
O E2
The issue here is the rule for the internal BGP :Do not advertise iBGPlearned routes to iBGP peers.In this case R2 will not advertise the subnet
of R1 to R3 and the subnet of R3 to R1 because they are received from iBGP
peers.
On R1 the subnet s'R1 150.3.3.0 is missing:
R1(config-router)#do show ip bgp
BGP table version is 3, local router ID is 1.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network
Next Hop
*> 150.1.1.0/24
0.0.0.0
*>i150.2.2.0/24
10.0.0.2
32768 ?
100
0?
Network
Next Hop
*>i150.2.2.0/24
10.0.0.9
*> 150.3.3.0/24
0.0.0.0
100
0?
32768 ?
Network
Next Hop
*> 150.1.1.0/24
0.0.0.0
*>i150.2.2.0/24
10.0.0.2
*>i150.3.3.0/24
10.0.0.10
32768 ?
100
100
0?
0?
Network
Next Hop
*>i150.1.1.0/24
10.0.0.1
100
0?
*>i150.2.2.0/24
10.0.0.9
100
0?
*> 150.3.3.0/24
0.0.0.0
32768 ?
On R1 above , the subnet 150.3.3.0 appears in the BGP RIBs and on R3 the
subnet 150.1.1.0 appears in the BGP RIBs, notice the question mark set to
the origin for both prefixes the origin set to incomplete because they are
redistributed as a connected route.
We can see below that R4 does not receive any route from BGP Domain and
R1 does not receive any route from OSPF Domain:
R4(config-router)#do show ip route
Gateway of last resort is not set
10.0.0.0/30 is subnetted, 1 subnets
C
Network
Next Hop
*> 150.1.1.0/24
0.0.0.0
*>i150.2.2.0/24
10.0.0.2
32768 ?
100
0?
*>i150.3.3.0/24
10.0.0.10
100
0?
We have four issues here when redistributing between BGP and OSPF:
-the First issue:when BGP routes are redistributed into an IGP, only EBGP
routes are redistributed .So we need bgp redistribute-internal command
under router BGP on R3 to allow the redistribution of the subnets learned
from the IBGP peers(R1 and R2), in this case, the subnet concerned are
150.1.1.0 and 150.2.2.0.
-The second issue:when OSPF routes are redistributed into BGP, only
internal routes are redistributed.So we need redistribute ospf 3 match
external 1 external 2 command under router BGP on R3, the subnet
concerned is 150.4.4.0 which is advertised by R4 to R3 as an external, if we
advertised this subnet as internal from R4 to R3 , there is no need to add
match external 1 external 2 ,by default only internal routes are
redistributed,so the subnet 150.4.4.0 is redistributed into BGP
automatically.
-The third issue:an iBGP peer does not change the NEXT_HOP for an
external route when advertising it to another iBGP peer.So we need enter
neighbor 10.0.0.9 next-hop-self command under router BGP on R3.Without
this command the ping 150.1.1.1 source 150.4.4.4 and the ping 150.2.2.2
source 150.4.4.4 fail.Because R1 and R2 receives the route toward
150.4.4.0 with the next-hop 10.0.0.14 which is the subnet of R4 ,there is no
reachability ,so we need change the next-hop-self when R3 advertised this
route to its IBGP peer.
-The fourth issue:the 150.3.3.0/24 subnet is advertised by BGP , it is
redistributed into BGP using route-map CONNECTED on R3 (looks at the
first of the comment. So it will not be redistributed into OSPF when BGP is
redistributed into OSPF.so route map must be used to redistribute this
subnet into OSPF on R3 with redistribute connected subnets route-map
CONNECTED command under router OSPF ,notice the route-map called
CONNECTED is the same as the route-map configured earlier for BGP.
Following these rules i configured the folowing sequence commands:
R3(config)#router bgp 254
R3(config-router)#redistribute ospf 3 match external 1 external 2
R3(config-router)#bgp redistribute-internal
R3(config-router)#neighbor 10.0.0.9 next-hop-self
R3(config)#router ospf 3
R3(config-router)#redistribute connected subnets route-map CONNECTED
R3(config-router)#redistribute bgp 254 subnets
R4(config)#router eigrp 1
R4(config-router)#redistribute ospf 1 metric 1 1 1 1 1
R4(config-router)#router ospf 1
R4(config-router)#redistribute eigrp 1 subnets
R3(config)#router ospf 1
R3(config-router)#area 23 virtual-link 172.10.21.1
R3(config)#router ospf 1
R3(config-router)#area 31 range 172.10.31.0 255.255.255.0
R4(config)#interface Serial0/0
Final configuration:
R1:
interface Loopback0
ip address 172.10.11.1 255.255.255.240
!
interface Loopback10
ip address 172.10.10.1 255.255.255.0
!
interface Serial0/0
bandwidth 64
ip address 172.10.12.1 255.255.255.0
clock rate 2000000
!
router ospf 1
log-adjacency-changes
network 172.10.10.0 0.0.0.255 area 10
network 172.10.11.0 0.0.0.255 area 0
network 172.10.12.0 0.0.0.255 area 0
R2:
interface Loopback0
ip address 172.10.21.1 255.255.255.0
!
interface Loopback20
ip address 172.10.20.1 255.255.255.240
!
interface Loopback21
R3:
interface Loopback0
ip address 172.10.0.1 255.255.255.0
!
interface Loopback31
ip address 172.10.31.1 255.255.255.240
!
interface Loopback32
ip address 172.10.31.17 255.255.255.240
!
interface Loopback33
ip address 172.10.31.33 255.255.255.240
!
interface Serial0/0
bandwidth 64
ip address 172.10.34.3 255.255.255.0
clock rate 2000000
!
interface Serial0/1
bandwidth 64
ip address 172.10.23.3 255.255.255.0
clock rate 2000000
!
router eigrp 1
redistribute ospf 1 metric 1 1 1 1 1
network 172.10.34.0 0.0.0.255
no auto-summary
!
router ospf 1
log-adjacency-changes
area 23 virtual-link 172.10.21.1
area 31 range 172.10.31.0 255.255.255.0
redistribute eigrp 1 subnets
R4:
interface Loopback0
ip address 172.10.41.1 255.255.255.240
!
interface Loopback1
ip address 172.10.41.17 255.255.255.240
!
interface Loopback2
ip address 172.10.41.33 255.255.255.240
!
interface Loopback40
ip address 172.10.40.1 255.255.255.0
!
interface Serial0/0
bandwidth 64
ip address 172.10.34.4 255.255.255.0
ip summary-address eigrp 1 172.10.41.0 255.255.255.0 5
clock rate 2000000
!
router eigrp 1
redistribute ospf 1 metric 1 1 1 1 1
network 172.10.34.0 0.0.0.255
network 172.10.41.0 0.0.0.63
no auto-summary
!
router ospf 1
log-adjacency-changes
redistribute eigrp 1 subnets
network 172.10.40.0 0.0.0.255 area 40
Requirements:
1. Summarize the loopback interfaces on R2 with the best summary route
to the other EIGRP routers:
R2(config)#interface FastEthernet0/0
R2(config-if)#ip summary-address eigrp 1 192.168.1.96 255.255.255.224 5
R2(config)#interface Serial0/0
R2(config-if)#ip summary-address eigrp 1 192.168.1.96 255.255.255.224 5
3.R4, needs to communicate with the EIGRP domain via OSPF area 0.
4. Redistribute OSPF into EIGRP:
R3(config)#router eigrp 1
R3(config-router)#redistribute ospf 1 metric 10000 100 255 1 1500
Final configuration:
hostname R2
!
interface Loopback101
ip address 192.168.1.101 255.255.255.252
!
interface Loopback105
ip address 192.168.1.105 255.255.255.252
!
interface Loopback109
ip address 192.168.1.109 255.255.255.252
!
interface Loopback113
ip address 192.168.1.113 255.255.255.252
!
interface FastEthernet0/0
ip address 192.168.1.161 255.255.255.224
ip summary-address eigrp 1 192.168.1.96 255.255.255.224 5
duplex auto
speed auto
!
interface Serial0/0
ip address 192.168.1.130 255.255.255.252
ip summary-address eigrp 1 192.168.1.96 255.255.255.224 5
clock rate 2000000
no shutdown
!
!
router eigrp 1
network 192.168.1.100 0.0.0.3
network 192.168.1.104 0.0.0.3
network 192.168.1.108 0.0.0.3
network 192.168.1.112 0.0.0.3
network 192.168.1.128 0.0.0.3
network 192.168.1.160 0.0.0.3
network 192.168.1.160 0.0.0.31
auto-summary
hostname R1
!
interface Loopback1
ip address 192.168.1.1 255.255.255.252
!
!
interface Serial0/0
ip address 192.168.1.129 255.255.255.252
clock rate 2000000
no shutdown
!
interface Serial0/1
ip address 192.168.1.133 255.255.255.252
clock rate 2000000
no shutdown
!
router eigrp 1
network 192.168.1.0 0.0.0.3
network 192.168.1.128 0.0.0.3
network 192.168.1.132 0.0.0.3
hostname R3
!
interface Loopback5
ip address 192.168.1.5 255.255.255.252
!
interface Loopback192
ip address 192.168.100.1 255.255.255.0
!
interface FastEthernet0/0
ip address 192.168.1.162 255.255.255.252
duplex auto
speed auto
no shutdown
!
interface Serial0/0
ip address 192.168.1.134 255.255.255.252
clock rate 2000000
no shutdown
!
interface Serial0/1
ip address 10.1.1.3 255.255.255.248
clock rate 2000000
no shutdown
!
!
router eigrp 1
redistribute ospf 1 metric 10000 100 255 1 1500
network 192.168.1.4 0.0.0.3
network 192.168.1.132 0.0.0.3
network 192.168.1.160 0.0.0.31
network 192.168.100.0
auto-summary
!
router ospf 1
log-adjacency-changes
network 10.1.1.0 0.0.0.7 area 0
default-information originate always
!
ip default-network 192.168.100.0
!
end
hostname R4
!
!
interface Loopback4
ip address 10.4.4.4 255.255.255.0
!
interface Serial0/0
ip address 10.1.1.4 255.255.255.248
clock rate 2000000
no shutdown
!
router ospf 1
log-adjacency-changes
network 10.1.1.0 0.0.0.7 area 0
network 10.4.4.0 0.0.0.255 area 0
R3
router ospf 1
redistribute bgp 64513 subnets
!
router bgp 64513
redistribute ospf 1 match internal external
Network
Next Hop
192.168.2.1
1
0
0 64513 ?
0 64513 ?
*> 192.168.1.0
192.168.2.1
0 64513 ?
r> 192.168.2.0
192.168.2.1
0 64513 i
R2
router bgp 64513
table-map TAG-BGP
redistribute ospf 1 match internal external
!
route-map TAG-BGP permit 10
set automatic-tag
R3
router bgp 64513
redistribute ospf 1 match internal external route-map TAG-BGP
!
route-map TAG-BGP permit 10
set origin igp
set as-path tag
Network
Next Hop
192.168.2.1
1
0
0 64513 64512 i
0 64513 i
*> 192.168.1.0
192.168.2.1
0 64513 i
r> 192.168.2.0
192.168.2.1
0 64513 i
Now we can see that the bgp table includes the AS 64512 in the AS path to
reach 130.130.1.0/24 and the origin i which means originated from IGP.
D EX
D EX
If we want filter the connected routes advertised to R3 we can use routemap using the source-protocol under the route-map then include this routemap in the the distribute-list command under router eigrp ,all in R3 as
follow:
R3(config)#route-map filter deny 10
R3(config-route-map)#match source-protocol ?
bgp
connected Connected
eigrp
isis
mobile
ospf
rip
static
we can see below with the show ip route command on R3 that 2.2.2.2 and
10.1.12.0 diseappers in the routing table:
R3(config-router)#do show ip route
We can match also the statics routes or routes originated grom different
IGP as shown by the symbol ? which display different options of the source
protocol.
R3:
router eigrp 100
redistribute connected metric 1 1 1 1 1500 route-map R3_connected
!
ip prefix-list R3_fa0/0 seq 5 permit 116.1.3.0/24
!
route-map R3_connected permit 10
match ip address prefix-list R3_fa0/0
.....
Success rate is 0 percent (0/5)
R1#traceroute 116.1.2.2
Type escape sequence to abort.
Tracing the route to 116.1.2.2
Here the suboptimal route causes a routing loop as shown above with
traceroute
the solution is to increase the AD of the external OSPF routes as follow:
R1#ping 116.1.2.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 116.1.2.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/16/76 ms
R9#ping 116.1.2.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 116.1.2.2, timeout is 2 seconds:
!!!!!
R9#traceroute 116.1.2.2
Type escape sequence to abort.
Tracing the route to 116.1.2.2
1 200.11.99.8 32 msec 84 msec 20 msec
2 116.1.78.7 92 msec 12 msec 144 msec
3 116.1.67.6 104 msec 128 msec 124 msec
4 116.1.156.5 156 msec 176 msec 168 msec
5 116.1.145.1 188 msec 268 msec 216 msec
6 116.1.123.2 176 msec * 172 msec
no loop
[up/up]
FE80::5EFE:303:303
2001:DB8:235::5EFE:303:303
[up/up]
FE80::5EFE:202:202
2001:DB8:235::5EFE:202:202
[up/up]
FE80::5EFE:505:505
2001:DB8:235::5EFE:505:505
Case 1 :
With the default network type point-to-point in tunnel interfaces ,there is
no adjacencies between R2 R5 and R3:
R2
interface Tunnel0
ipv6 ospf 1 area 0
R3
interface Tunnel0
ipv6 ospf 1 area 0
R5
interface Tunnel0
ipv6 ospf 1 area 0
Pri State
1 FULL/ -
Interface
Serial0/0
Pri State
1 FULL/ -
Interface
Serial0/1
Pri State
Interface
1.1.1.1
1 FULL/ -
00:00:35
Serial0/0
Conclusion :IGP does not work over ISATAP Tunnel when running OSPFv3
with point-to-point network type
Case 2:
let's configure ipv6 ospf network non-broadcast in the tunnel interfaces ,in
non-broadcast we must use neighbor command to establish the adjacencies
:
R3
interface Tunnel0
ipv6 ospf network non-broadcast
ipv6 ospf neighbor FE80::5EFE:505:505
ipv6 ospf neighbor FE80::5EFE:202:202
R2
interface Tunnel0
ipv6 ospf network non-broadcast
ipv6 ospf neighbor FE80::5EFE:505:505
ipv6 ospf neighbor FE80::5EFE:303:303
R5:
interface Tunnel0
ipv6 ospf network non-broadcast
ipv6 ospf neighbor FE80::5EFE:202:202
ipv6 ospf neighbor FE80::5EFE:303:303
Pri State
Interface
3.3.3.3
1 FULL/DR
00:01:57
5.5.5.5
1 FULL/DROTHER
1.1.1.1
1 FULL/ -
17
00:01:55
00:00:39
Tunnel0
16
Tunnel0
Serial0/0
Pri State
2.2.2.2
1 FULL/BDR
00:01:54
5.5.5.5
1 FULL/DROTHER
4.4.4.4
1 FULL/ -
16
00:01:35
00:00:39
Interface
Tunnel0
16
Tunnel0
Serial0/1
R3(config-rtr)#
Pri State
3.3.3.3
1 FULL/DR
2.2.2.2
1 FULL/BDR
6.6.6.6
1 FULL/ -
17
00:01:51
00:00:36
16
6
Interface
Tunnel0
Tunnel0
Serial0/0
the ping between the sites works successfully,i will show only the ping from
R1 toward the loopback interfaces of R4 and R6 for brevity :
R1#ping 2001:DB8::6 source 2001:DB8:1::1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001:DB8::6, timeout is 2 seconds:
Packet sent with a source address of 2001:DB8:1::1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/21/52 ms
R1#
O 2001:DB8:56::/64 [110/11239]
via FE80::C202:2BFF:FEB4:0, Serial0/0
O 2001:DB8:235::5EFE:202:202/128 [110/64]
via FE80::C202:2BFF:FEB4:0, Serial0/0
O 2001:DB8:235::5EFE:303:303/128 [110/11175]
via FE80::C202:2BFF:FEB4:0, Serial0/0
O 2001:DB8:235::5EFE:505:505/128 [110/11175]
via FE80::C202:2BFF:FEB4:0, Serial0/0
O 2001:DB8:12::/64 [110/11239]
via FE80::C204:1DFF:FE4C:0, Serial0/0
O 2001:DB8:34::/64 [110/11239]
via FE80::C204:1DFF:FE4C:0, Serial0/0
O 2001:DB8:235::/64 [110/11175]
via FE80::C204:1DFF:FE4C:0, Serial0/0
IGP works over ISATAP Tunnel when running OSPFv3 with non-broadcast
network Type
Case3:
let's configure ipv6 ospf network point-to-multipoint non-broadcast in the
tunnel interfaces:
R3
interface Tunnel0
ipv6 ospf network point-to-multipoint non-broadcast
ipv6 ospf neighbor FE80::5EFE:505:505
ipv6 ospf neighbor FE80::5EFE:202:202
ipv6 ospf 1 area 0
R2
interface Tunnel0
ipv6 ospf network point-to-multipoint non-broadcast
ipv6 ospf neighbor FE80::5EFE:505:505
ipv6 ospf neighbor FE80::5EFE:303:303
R5:
interface Tunnel0
ipv6 ospf network point-to-multipoint non-broadcast
ipv6 ospf neighbor FE80::5EFE:202:202
Pri State
Interface
5.5.5.5
1 FULL/ -
00:01:59
16
Tunnel0
3.3.3.3
1 FULL/ -
00:01:57
17
Tunnel0
1.1.1.1
1 FULL/ -
00:00:34
Serial0/0
Pri State
Interface
5.5.5.5
1 FULL/ -
00:01:54
16
Tunnel0
2.2.2.2
1 FULL/ -
00:01:46
16
Tunnel0
4.4.4.4
1 FULL/ -
00:00:31
Serial0/1
Pri State
Interface
2.2.2.2
1 FULL/ -
00:01:34
16
Tunnel0
3.3.3.3
1 FULL/ -
00:01:56
17
Tunnel0
6.6.6.6
1 FULL/ -
00:00:36
Serial0/0
the ping between the sites works successfully,i will show only the ping from
R1 toward the loopback interfaces of R4 and R6 for brevity :
R1#ping 2001:DB8::6 source 2001:DB8:1::1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001:DB8::6, timeout is 2 seconds:
Packet sent with a source address of 2001:DB8:1::1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/21/52 ms
R1#
IGP works over ISATAP Tunnel when running OSPFv3 with point-tomultipoint non-broadcast network Type.
Case4:
Now we will see what happen with EIGRP,let's go:
R2
interface Tunnel0
no ipv6 ospf 1 area 0
ipv6 eigrp 1
R3
interface Tunnel0
no ipv6 ospf 1 area 0
ipv6 eigrp 1
R5
interface Tunnel0
no ipv6 ospf 1 area 0
ipv6 eigrp 1
Now we can see that the adjacencies is established as shown by the show
ipv eigr nei command on R2 R3 and R5:
R2(config-rtr)#do show ipv eigr nei
IPv6-EIGRP neighbors for process 1
H Address
Interface
(sec)
1 Link-local address:
Cnt Num
Tu0
11 00:02:23 50 5000 0 3
Tu0
FE80::5EFE:303:303
0 Link-local address:
FE80::5EFE:505:505
Interface
(sec)
1 Link-local address:
Cnt Num
Tu0
13 00:03:20 62 5000 0 5
Tu0
10 00:03:30 99 5000 0 5
FE80::5EFE:505:505
0 Link-local address:
FE80::5EFE:202:202
Interface
(sec)
1 Link-local address:
Cnt Num
Tu0
Tu0
12 00:03:55 61 5000 0 3
FE80::5EFE:303:303
0 Link-local address:
FE80::5EFE:202:202
Looks now the routing table on R1 R4 and R6(the routers located in the
sites A B and C respectively):
Now the ping between the sites A B and C are successfull,for brevity we
launch the ping from R1 and R6 :
R1(config)#do ping 2001:DB8::6 source 2001:DB8:1::1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001:DB8::6, timeout is 2 seconds:
Packet sent with a source address of 2001:DB8:1::1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 0/27/76 ms
Finally :
-With OSPF in non-broadcast network type and point-to-multipoint nonbroadcast ,IGP OSPF works over isatap tunnels.
-With EIGRP ,by adding neighbor statement , IGP EIGRP works over isatap
tunnels.
This lab has the same purpuse that the lab OSPFv3 and EIGRP over ISATAP
Tunnel By definition:the Dynamic Multipoint IPv6 Tunnels like Automatic
6to4 Tunnels and Isatap Tunnels do not support IPv6 IGPs, requiring the use
of either static routes or multiprotocol BGP.
let 's verify with ospf and eigrp over isatap Tunnel between R1 and R3 and
we will try to ensure the connectivity over the ISATAP Tunnel between the
two ipv6 prefixes of both R1 and R3(the loopback interfaces of both R1 and
R3) :
R1:
interface loopback0
ipv6 address FEC0::1:1/112
ipv6 ospf 1 area 0
R3:
interface loopback0
ipv6 address FEC0::3:1/112
ipv6 ospf 1 area 0
1st case:
R1(config-if)?#interface tunnel 0
R1(config-if)?#ipv6 ospf network non-broadcast
R1(config-if)#ipv6 ospf neighbor FE80::5EFE:AC10:1703
R3(config-if)#interface tunnel 0
R3(config-if)#ipv6 ospf network non-broadcast
R3(config-if)#ipv6 ospf neighbor FE80::5EFE:AC10:C01
R1(config-if)#interface tunnel 0
R1(config-if)#ipv6 ospf network point-to-multipoint non-broadcast
R3(config-if)#interface tunnel 0
R3(config-if)#ipv6 ospf network point-to-multipoint non-broadcast
in both cases the pings are successfully between the ipv6 addresses of the
loopback interfaces .
now what happen with eigrp over isatap?
interface Tunnel0
ipv6 eigrp 1
!
ipv6 router eigrp 1
no shut
R3
interface Loopback0
ipv6 eigrp 1
!
interface Tunnel0
ipv6 eigrp 1
!
ipv6 router eigrp 1
no shut
now we will configure the adjacencies eigrp statically with the neighbor
command followed by the link-local address on both R1 and R3:
R1(config-rtr)?#neighbor FE80::5EFE:AC10:1703 Tunnel 0
R3(config-rtr)#neighbor FE80::5EFE:AC10:C01 Tunnel 0
the pings are successfully between the ipv6 addresses of the loopback
interfaces .
-With OSPF in non-broadcast network type and point-to-multipoint nonbroadcast ,IGP OSPF works over isatap tunnels
-With EIGRP ,by adding neighbor statement , IGP EIGRP works over isatap
tunnels
Requirements:
1. Configure all interfaces in the topology diagram with the IPv4 or IPv6
addresses shown.
2. Use EUI-64 addresses on the link between R3 and R4.
3. Configure EIGRP AS 1 on R1, R2, and R3 to route all IPv4 networks.
4. Disable EIGRP automatic summarization.
5. Configure a manual IPv6 tunnel between R1 and R3.
6. Include all IPv6 networks in OSPF area 0 on R1, R3, and R4.
7. Manually configure a router ID of 172.16.4.1 on R4 (this address does not
need to be reachable).
Configuration R1
interface Tunnel0
no ip address
ipv6 address FEC0::13:1/112
ipv6 ospf 1 area 0
tunnel source Serial0/0
tunnel destination 172.16.23.3
tunnel mode ipv6ip
!
interface Loopback0
no ip address
ipv6 address FEC0::1:1/112
ipv6 ospf 1 area 0
!
interface Serial0/0/0
ip address 172.16.12.1 255.255.255.0
clock rate 2000000
!
router eigrp 1
network 172.16.12.0 0.0.0.255
no auto-summary
!
ipv6 router ospf 1
log-adjacency-changes
Configuration R3
interface tunnel 1
ipv6 address FEC0::13:3/112
ipv6 ospf 1 area 0
tunnel source 172.16.23.3
tunnel destination 172.16.12.1
tunnel mode ipv6ip
!
interface Loopback0
no ip address
ipv6 address FEC0::3:1/112
ipv6 ospf 1 area 0
!
interface Serial0/0
no ip address
ipv6 enable
ipv6 address FEC0:34::/64 eui-64
ipv6 ospf 1 area 0
clock rate 2000000
!
interface Serial0/1
ip address 172.16.23.3 255.255.255.0
clock rate 2000000
!
!
router eigrp 1
network 172.16.23.0 0.0.0.255
no auto-summary
!
ipv6 router ospf 1
log-adjacency-changes
Configuration R2:
interface Serial0/0
ip address 172.16.12.2 255.255.255.0
clock rate 2000000
!
interface Serial0/1
ip address 172.16.23.2 255.255.255.0
clock rate 2000000
!
router eigrp 1
Configuration R4
interface Loopback0
no ip address
ipv6 address FEC0::4:1/112
ipv6 ospf 1 area 0
interface Serial0/0
no ip address
ipv6 address FEC0:34::/64 eui-64
ipv6 ospf 1 area 0
clock rate 2000000
!
ipv6 router ospf 1
router-id 172.16.4.1
log-adjacency-changes
R4#traceroute 35.35.35.35
1 14.14.14.1 60 msec 44 msec 28 msec
2 13.13.13.2 92 msec * 88 msec
R5#traceroute 34.34.34.34
1 15.15.15.1 60 msec 48 msec 32 msec
2 13.13.13.2 92 msec * 100 msec
R5#traceroute 35.35.35.35
1 15.15.15.1 60 msec 48 msec 32 msec
2 13.13.13.2 68 msec * 76 msec
we can see that the packet goes through the path R1--R3 in both routers R4
and R5.
Now will configure Policy-Based Routing:
-first case PBR-R5 we will tell the router R1 to route the packet through the
path R1--R2--R3 if the source ip is 15.15.15.0 and the destination is
35.35.35.35
-second case PBR-R4 we will tell R1 to route the packet normally if the the
source ip is 14.14.14.0 and the destination is 34.34.34.34(which is through
the path R1--R3,but if the normal routing fails ,use the path R1--R2--R3):
access-list 101 permit ip 14.14.14.0 0.0.0.3 host 34.34.34.34
access-list 102 permit ip 15.15.15.0 0.0.0.3 host 35.35.35.35
!
route-map PBR-R5 permit 20
match ip address 102
set ip next-hop 12.12.12.2
!
route-map PBR-R4 permit 10
match ip address 101
set ip default next-hop 12.12.12.2
!
interface FastEthernet1/0
ip policy route-map PBR-R5
!
interface FastEthernet1/1
ip policy route-map PBR-R4
R4#traceroute 34.34.34.34
1 14.14.14.1 28 msec 32 msec 28 msec
2 13.13.13.2 84 msec * 52 msec
The following traceroute shown that the packet with the source ip
14.14.14.0 toward the destination 35.35.35.35 is going through the normal
routing R1--R3,but here the reason is not the default parameters in the
route-map PBR-R4 ,the reason is :because the implicit deny clause at the
end of the route map PBR-R4 ,the PBR lets the packet go through the
normal IP routing .
R4#traceroute 35.35.35.35
1 14.14.14.1 32 msec 44 msec 32 msec
2 13.13.13.2 60 msec * 60 msec
The following traceroute shown that the packet with the source ip
15.15.15.0 toward 34.34.34.34 is going through the normal routing R1--R3
because the implicit deny clause at the end of the route map PBR-R5 ,the
PBR lets the packet go through the normal IP:
R5#traceroute 34.34.34.34
1 15.15.15.1 32 msec 32 msec 32 msec
2 13.13.13.2 60 msec * 80 msec
Configuration:
hostname R1
no ip domain lookup
ip domain name lab.local
ip auth-proxy max-nodata-conns 3
ip admission max-nodata-conns 3
ip sla monitor 11
type echo protocol ipIcmpEcho 209.165.201.30
frequency 10
ip sla monitor schedule 11 life forever start-time now
ip sla monitor 22
type echo protocol ipIcmpEcho 209.165.202.158
frequency 10
ip sla monitor schedule 22 life forever start-time now
!
track 1 rtr 11 reachability
delay down 10 up 1
!
track 2 rtr 22 reachability
delay down 10 up 1
!
interface Loopback0
description R1 LAN
ip address 192.168.1.1 255.255.255.0
!
interface Serial0/0
description R1 --> ISP1
bandwidth 128
ip address 209.165.201.2 255.255.255.252
no shutdown
!
interface Serial0/1
description R1 --> ISP2
bandwidth 128
ip address 209.165.202.130 255.255.255.252
no shutdown
!
ip forward-protocol nd
ip route 0.0.0.0 0.0.0.0 209.165.201.1 2 track 1
ip route 0.0.0.0 0.0.0.0 209.165.202.129 3 track 2
ip route 0.0.0.0 0.0.0.0 209.165.201.1 5
hostname ISP1
!
interface Loopback0
description Simulated Internet Web Server
ip address 209.165.200.254 255.255.255.255
!
interface Loopback1
description ISP1 DNS Server
ip address 209.165.201.30 255.255.255.255
!
interface Serial0/0
description ISP1 --> R1
bandwidth 128
ip address 209.165.201.1 255.255.255.252
no shutdown
!
interface Serial0/1
description ISP1 --> ISP2
bandwidth 128
ip address 209.165.200.225 255.255.255.252
no shutdown
!
router eigrp 1
network 209.165.200.224 0.0.0.3
network 209.165.201.0 0.0.0.31
no auto-summary
!
ip forward-protocol nd
ip route 192.168.1.0 255.255.255.0 209.165.201.2
hostname ISP2
!
interface Loopback0
description Simulated Internet Web Server
ip address 209.165.200.254 255.255.255.255
!
interface Loopback1
description ISP2 DNS Server
ip address 209.165.202.158 255.255.255.255
!
interface Serial0/0
description ISP2 --> R1
bandwidth 128
ip address 209.165.202.129 255.255.255.252
no shutdown
!
interface Serial0/1
description ISP2 --> ISP1
bandwidth 128
ip address 209.165.200.226 255.255.255.252
no shutdown
!
router eigrp 1
network 209.165.200.224 0.0.0.3
network 209.165.202.128 0.0.0.31
no auto-summary
!
ip forward-protocol nd
ip route 192.168.1.0 255.255.255.0 209.165.202.130