cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1029
Views
0
Helpful
1
Replies

advertise only 192.168.7.1/32 & 192.168.8.1/32 in bgp, igp (running eigrp) has 192.168.7.0/24 & 192.168.8.0/24 subnet

gavin han
Level 1
Level 1

I want advertise only 192.168.7.1/32 & 192.168.8.1/32 in eBGP from R3 to R1 and R4 to R2. R3 and R4 has 192.168.7.0/24 & 192.168.8.0/24 in its routing table learned through eigrp. how to do it?

path through R4 should be preferred so I have configured "distance bgp 200 200 200" on R3.

below is the config and output of routing table fo R3, R4.

R3::::

router eigrp 100
redistribute bgp 65003 metric 10000 100000 255 1 1
network 3.3.3.3 0.0.0.0
network 10.10.4.1 0.0.0.0
no auto-summary

router bgp 65003
no synchronization
bgp log-neighbor-changes
network 172.17.7.7 mask 255.255.255.255
network 172.18.8.8 mask 255.255.255.255
network 192.168.7.1 mask 255.255.255.255
network 192.168.8.1 mask 255.255.255.255
neighbor 10.10.1.1 remote-as 65200
neighbor 10.10.1.1 version 4
neighbor 10.10.1.1 next-hop-self
neighbor 10.10.1.1 soft-reconfiguration inbound
neighbor 10.10.1.1 prefix-list ALLOWED-OUT out
neighbor 10.10.1.1 route-map AS-PREPEND in
distance bgp 200 200 200
no auto-summary

route-map AS-PREPEND permit 10
 set as-path prepend 65101 65101

ip prefix-list ALLOWED-OUT seq 5 permit 172.17.7.7/32
ip prefix-list ALLOWED-OUT seq 10 permit 172.18.8.8/32
ip prefix-list ALLOWED-OUT seq 15 permit 192.168.7.1/32
ip prefix-list ALLOWED-OUT seq 20 permit 192.168.8.1/32

R3#sh ip bgp sum
BGP router identifier 3.3.3.3, local AS number 65003
BGP table version is 11, main routing table version 11
4 network entries using 468 bytes of memory
6 path entries using 312 bytes of memory
5/3 BGP path/bestpath attribute entries using 620 bytes of memory
2 BGP AS-PATH entries using 48 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 1448 total bytes of memory
2 received paths for inbound soft reconfiguration
BGP activity 4/0 prefixes, 6/0 paths, scan interval 60 secs

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
10.10.1.1 4 65200 24 25 11 0 0 00:20:06 2
R3#sh ip bgp
BGP table version is 11, 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 Metric LocPrf Weight Path
*> 172.17.7.7/32 10.10.4.2 435200 32768 i
*> 172.18.8.8/32 0.0.0.0 0 32768 i
*> 201.1.1.0/31 10.10.1.1 0 0 65101 65101 65200 ?
*> 201.1.2.0/31 10.10.1.1 0 0 65101 65101 65200 ?
R3#

R3#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

3.0.0.0/32 is subnetted, 1 subnets
C 3.3.3.3 is directly connected, Loopback0
D 192.168.8.0/24 [90/335360] via 10.10.4.2, 00:17:44, Ethernet2/1
4.0.0.0/32 is subnetted, 1 subnets
D 4.4.4.4 [90/460800] via 10.10.4.2, 00:17:44, Ethernet2/1
201.1.1.0/31 is subnetted, 1 subnets
B 201.1.1.0 [200/0] via 10.10.1.1, 00:12:14
172.17.0.0/32 is subnetted, 1 subnets
D 172.17.7.7 [90/435200] via 10.10.4.2, 00:17:44, Ethernet2/1
172.18.0.0/32 is subnetted, 1 subnets
S 172.18.8.8 is directly connected, Null0
201.1.2.0/31 is subnetted, 1 subnets
B 201.1.2.0 [200/0] via 10.10.1.1, 00:12:14
10.0.0.0/30 is subnetted, 6 subnets
C 10.10.1.0 is directly connected, Ethernet2/0
C 10.10.4.0 is directly connected, Ethernet2/1
D 10.10.5.0 [90/332800] via 10.10.4.2, 00:17:46, Ethernet2/1
D 10.10.6.0 [90/307200] via 10.10.4.2, 00:17:46, Ethernet2/1
D 10.10.7.0 [90/307200] via 10.10.4.2, 00:17:46, Ethernet2/1
D 10.10.8.0 [90/332800] via 10.10.4.2, 00:17:46, Ethernet2/1
D 192.168.7.0/24 [90/309760] via 10.10.4.2, 00:17:46, Ethernet2/1
R3#

R4:::::

router eigrp 100
redistribute bgp 65004 metric 10000 1 255 1 1
network 4.4.4.4 0.0.0.0
network 10.10.5.1 0.0.0.0
no auto-summary

router bgp 65004
no synchronization
bgp log-neighbor-changes
network 172.17.7.7 mask 255.255.255.255
network 172.18.8.8 mask 255.255.255.255
network 192.168.7.1 mask 255.255.255.255
network 192.168.8.1 mask 255.255.255.255
neighbor 10.10.2.1 remote-as 65200
neighbor 10.10.2.1 version 4
neighbor 10.10.2.1 next-hop-self
neighbor 10.10.2.1 soft-reconfiguration inbound
neighbor 10.10.2.1 prefix-list ALLOWED-OUT out
no auto-summary

ip prefix-list ALLOWED-OUT seq 5 permit 172.17.7.7/32
ip prefix-list ALLOWED-OUT seq 10 permit 172.18.8.8/32
ip prefix-list ALLOWED-OUT seq 15 permit 192.168.7.1/32
ip prefix-list ALLOWED-OUT seq 20 permit 192.168.8.1/32

R4#sh ip bgp sum
BGP router identifier 4.4.4.4, local AS number 65004
BGP table version is 7, main routing table version 7
2 network entries using 234 bytes of memory
2 path entries using 104 bytes of memory
3/2 BGP path/bestpath attribute entries using 372 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 710 total bytes of memory
BGP activity 4/2 prefixes, 4/2 paths, scan interval 60 secs

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
10.10.2.1 4 65200 8 9 0 0 0 00:14:15 Idle
R4#sh 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 Metric LocPrf Weight Path
*> 172.17.7.7/32 10.10.5.2 460800 32768 i
*> 172.18.8.8/32 10.10.5.2 435200 32768 i
R4#

R4#sh ip rou
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

3.0.0.0/32 is subnetted, 1 subnets
D 3.3.3.3 [90/460800] via 10.10.5.2, 00:19:02, Ethernet2/1
D 192.168.8.0/24 [90/309760] via 10.10.5.2, 00:19:02, Ethernet2/1
4.0.0.0/32 is subnetted, 1 subnets
C 4.4.4.4 is directly connected, Loopback0
201.1.1.0/31 is subnetted, 1 subnets
D EX 201.1.1.0 [170/25932800] via 10.10.5.2, 00:13:55, Ethernet2/1
172.17.0.0/32 is subnetted, 1 subnets
D 172.17.7.7 [90/460800] via 10.10.5.2, 00:19:02, Ethernet2/1
172.18.0.0/32 is subnetted, 1 subnets
D 172.18.8.8 [90/435200] via 10.10.5.2, 00:19:02, Ethernet2/1
201.1.2.0/31 is subnetted, 1 subnets
D EX 201.1.2.0 [170/25932800] via 10.10.5.2, 00:13:55, Ethernet2/1
10.0.0.0/30 is subnetted, 5 subnets
D 10.10.4.0 [90/332800] via 10.10.5.2, 00:19:02, Ethernet2/1
C 10.10.5.0 is directly connected, Ethernet2/1
D 10.10.6.0 [90/307200] via 10.10.5.2, 00:19:02, Ethernet2/1
D 10.10.7.0 [90/332800] via 10.10.5.2, 00:19:02, Ethernet2/1
D 10.10.8.0 [90/307200] via 10.10.5.2, 00:19:02, Ethernet2/1
192.168.7.0/24 is subnetted, 1 subnets
D 192.168.7.0 [90/335360] via 10.10.5.2, 00:19:02, Ethernet2/1
R4#

1 Reply 1

willwetherman
Spotlight
Spotlight

Hi,


BGP will not advertise something that doesn't exist in your routing table. The BGP network command must match a prefix in your routing table before it can be advertised.


One way to achieve what you want is to add static routes for 192.168.7.1/32 and 192.168.8.1/24 on R3 and R4 with a next-hop IP address of R5 and R6 and then advertise the static route into BGP. For example on R3:

ip route 192.168.7.1 255.255.255.255 10.10.4.2

ip route 192.168.8.1 255.255.255.255 10.10.4.2
!
router bgp 65003
 network 192.168.7.1 mask 255.255.255.255

 network 192.168.8.1 mask 255.255.255.255

Review Cisco Networking for a $25 gift card