06-25-2007 04:11 AM - edited 03-05-2019 04:56 PM
if I have the below config for BGP is the whole 10.1.0.0/16 prefix advertised to bgp enighbours or 10.1.2.0/24 and 10.1.3.0/24 advertised but not 10.1.4.0/24 if its next hop outgoing interface is down i.e. the static route is currently not valid.
Regards
Kev
router bgp 100
bgp router-id 10.1.1.1
bgp log-neighbor-changes
neighbor 10.5.1.1 remote-as 2
!
address-family ipv4
no auto-summary
no synchronization
network 10.1.0.0 mask 255.255.0.0
exit address fam
!
ip route 10.1.2.0 255.255.255.0 10.1.5.1
ip route 10.1.3.0 255.255.255.0 10.1.5.1
ip route 10.1.4.0 255.255.255.0 10.1.5.2
Solved! Go to Solution.
06-25-2007 04:22 AM
Hi,
The network command in BGP needs an exact route in the routing table, thus in your example no route will be advertised.
For example:
network 10.1.0.0 mask 255.255.0.0
needs:
ip route 10.1.0.0 255.255.0.0 10.1.5.1
To advertise /24s, you'll need exact network commands and ip routes.
HTH,
Mohammed Mahmoud.
06-25-2007 04:22 AM
Hi,
The network command in BGP needs an exact route in the routing table, thus in your example no route will be advertised.
For example:
network 10.1.0.0 mask 255.255.0.0
needs:
ip route 10.1.0.0 255.255.0.0 10.1.5.1
To advertise /24s, you'll need exact network commands and ip routes.
HTH,
Mohammed Mahmoud.
06-25-2007 04:31 AM
thankyou for the fast reply I understand why it works here now we have a route to null0 for 10.1.0.0 then static routes for each subnet.
Regards
Kev
06-25-2007 04:40 AM
Hi,
You are absolutely correct, having a route for the /16 to null will advertise the /16 as it is /16 no /24 would be advertised, but when packets using the /16 arrives they'll use the more specific static routes to the next hop.
HTH,
Mohammed Mahmoud.
06-25-2007 04:33 AM
Friend,
The configuration will not advertise any prefix. BGP requires that exact prefix entries be in the routing table.
In your case, the network statement is advertising 10.1.0.0/16 for which you do not have an exact route in the routing table.
Similarly for advertising 10.1.2.0/24 and 10.1.3.0/24 you should have a corresponding network statement in the BGP configuration or a redistribute static under the BGP
address-family ipv4
no auto-summary
no synchronization
network 10.1.0.0 mask 255.255.0.0
network 10.2.0.0 mask 255.255.0.0
network 10.3.0.0 mask 255.255.0.0
ip route 10.1.0.0 255.255.0.0 10.1.5.1
or
address-family ipv4
no auto-summary
no synchronization
redistribute static
You can check the same using sh ip bgp command
HTH, rate if it does
Narayan
06-25-2007 04:35 AM
Mohammed,
Never saw your reply :-)
Narayan
06-25-2007 04:47 AM
Hi Narayan,
Never mind my friend, this always happens :)
BR,
Mohammed Mahmoud.
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: