ita advertises routes for each of its connected neighbors, isp1 and isp2... these routes are added to the respective route tables, which could cause either to route traffic through ita... the lab wants to advertise only routes that belong to ita (ita stands for international travel agency, btw, not my idea), namely the 192.168 loopbacks...
isp1#sh ip route bgp
Gateway of last resort is not set
172.16.0.0/24 is subnetted, 1 subnets
B 172.16.1.0 [20/0] via 10.0.0.2, 22:17:15
B 192.168.0.0/24 [20/0] via 10.0.0.2, 22:17:45
B 192.168.1.0/24 [20/0] via 10.0.0.2, 22:17:45
isp1#
isp2#sh ip route bgp
Gateway of last resort is not set
10.0.0.0/24 is subnetted, 1 subnets
B 10.1.1.0 [20/0] via 172.16.0.2, 22:03:41
B 192.168.0.0/24 [20/0] via 172.16.0.2, 22:18:13
B 192.168.1.0/24 [20/0] via 172.16.0.2, 22:18:13
we'll make an acl and distribute...
access-list 1 permit 192.168.0.0 0.0.1.255
permitting only the loopbacks...
router bgp 100
neighbor 10.0.0.1 distribute-list 1 out
neighbor 172.16.0.1 distribute-list 1 out
distribute only the address in acl 1 out to each neighbor... perfect...
then clear the table...
this is disruptive, breaking the tcp connections...
ita#
*Aug 20 17:46:28: %BGP-5-ADJCHANGE: neighbor 10.0.0.1 Down User reset
*Aug 20 17:46:28: %BGP_SESSION-5-ADJCHANGE: neighbor 10.0.0.1 IPv4 Unicast topology base removed from session User reset
*Aug 20 17:46:28: %BGP-5-ADJCHANGE: neighbor 172.16.0.1 Down User reset
*Aug 20 17:46:28: %BGP_SESSION-5-ADJCHANGE: neighbor 172.16.0.1 IPv4 Unicast topology base removed from session User reset
*Aug 20 17:46:29: %BGP-5-ADJCHANGE: neighbor 10.0.0.1 Up
*Aug 20 17:46:29: %BGP-5-ADJCHANGE: neighbor 172.16.0.1 Up
ita#
but, you get this...
isp1#sh ip route bgp
Gateway of last resort is not set
B 192.168.0.0/24 [20/0] via 10.0.0.2, 00:29:53
B 192.168.1.0/24 [20/0] via 10.0.0.2, 00:29:53
isp2#sh ip route bgpGateway of last resort is not set
B 192.168.0.0/24 [20/0] via 10.0.0.2, 00:29:53
B 192.168.1.0/24 [20/0] via 10.0.0.2, 00:29:53
Gateway of last resort is not set
B 192.168.0.0/24 [20/0] via 172.16.0.2, 00:30:34
B 192.168.1.0/24 [20/0] via 172.16.0.2, 00:30:34
much cleaner...
you want to make isp1 your primary provider, designating isp2 as the backup... this can be accomplished by using a floating static route...
ita#sh ip route | excl L | incl Loop
Gateway of last resort is not set
10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks
C 10.0.0.0/24 is directly connected, Serial1/1
B 10.1.1.0/24 [20/0] via 10.0.0.1, 00:47:49
172.16.0.0/16 is variably subnetted, 3 subnets, 3 masks
C 172.16.0.0/30 is directly connected, Serial1/2
B 172.16.1.0/24 [20/0] via 172.16.0.1, 00:47:49
192.168.0.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.0.0/24 is directly connected, Loopback0
192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.1.0/24 is directly connected, Loopback1
from the output we see that there is no gateway of last resort and the metrics are equal... this solution is icky...
ip route 0.0.0.0 0.0.0.0 10.0.0.1 210
ip route 0.0.0.0 0.0.0.0 172.16.0.1 220
preferring the default of isp1... (i just threw up in my mouth)
ita#sh ip route | excl L | incl Loop
Gateway of last resort is 10.0.0.1 to network 0.0.0.0
S* 0.0.0.0/0 [210/0] via 10.0.0.1
10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks
C 10.0.0.0/24 is directly connected, Serial1/1
B 10.1.1.0/24 [20/0] via 10.0.0.1, 00:51:59
172.16.0.0/16 is variably subnetted, 3 subnets, 3 masks
C 172.16.0.0/30 is directly connected, Serial1/2
B 172.16.1.0/24 [20/0] via 172.16.0.1, 00:51:59
192.168.0.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.0.0/24 is directly connected, Loopback0
192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.1.0/24 is directly connected, Loopback1
or use default-originate... get rid of the floaters...
isp1(config)#router bgp 200
isp1(config-router)#neighb 10.0.0.2 default-originate
ita#sh ip route | excl L | incl Loop
Gateway of last resort is 10.0.0.1 to network 0.0.0.0
B* 0.0.0.0/0 [20/0] via 10.0.0.1, 00:00:12
10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks
C 10.0.0.0/24 is directly connected, Serial1/1
B 10.1.1.0/24 [20/0] via 10.0.0.1, 01:03:32
172.16.0.0/16 is variably subnetted, 3 subnets, 3 masks
C 172.16.0.0/30 is directly connected, Serial1/2
B 172.16.1.0/24 [20/0] via 172.16.0.1, 01:03:32
192.168.0.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.0.0/24 is directly connected, Loopback0
192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.1.0/24 is directly connected, Loopback1
it can be done with default-network also but that is yet more artificial than the floating static... default-originate is the elegant solution...
No comments:
Post a Comment