Q1> How to advertise networks into BGP?
R5#
First way: Network Command
advertise network 50.1.1.0/24 network into BGP
:conf t
router bgp 6500
network 50.1.1.0 mask 255.255.255.0
Second way: Redistribution
advertise network 200.1.1.0/24 - 200.1.4.0/24
:conf t
access-list 50 permit 200.1.1.0
access-list 50 permit 200.1.2.0
access-list 50 permit 200.1.3.0
access-list 50 permit 200.1.4.0
route-map FILTER
match ip address 50
router bgp 6500
redistribute connected route-map FILTER
Q2> BGP auto-summary (From 12.x, no auto-summary is by default)
conf t
router bgp 5500
no auto-summary
Q3> iBGP Synchronization:
The meaning is do not use or advertise a route learned via iBGP until the same route has been learned from the internal routing protocol.
First, turn off bgp synchonization (ios version 12.2(8) below). From the ios 12.2(8T), it is turned off, by default.
R1> conf t
router bgp 5500
no synchronization
R4> conf t
router bgp 5500
no synchronization
(If iBGP is working on all the routers, you can turn on synchronization.)
Q4> BGP next-hop processing:
- For eBGP peers: Change next-hop address on advertised routes.
- For iBGP peers: Do not change next-hop address on advertised routes.
####### check next hop address on R1. R1 doesn't know the route 5.5.5.5
Solution:
R4>
conf t
router BGP 5500
neighbor 1.1.1.1 next-hop-self ###### This command means that advertise me to 1.1.1.1 instead of 5.5.5.5.
=======================================================================
Configuration
R1>
interface Loopback0ip address 1.1.1.1 255.255.255.255
ip ospf network point-to-point
!
interface Serial0/2
ip address 10.1.12.1 255.255.255.0
clock rate 2000000
!
interface Serial0/3
ip address 10.1.13.1 255.255.255.0
clock rate 2000000
!
router ospf 1
router-id 1.1.1.1
log-adjacency-changes
network 1.1.1.1 0.0.0.0 area 0
network 10.1.12.1 0.0.0.0 area 0
network 10.1.13.1 0.0.0.0 area 0
!
router bgp 5500
no synchronization
bgp log-neighbor-changes
neighbor 4.4.4.4 remote-as 5500
neighbor 4.4.4.4 update-source Loopback0 ###### Loopback solution in iBGP and eBGP
no auto-summary
R4>
interface Loopback0ip address 4.4.4.4 255.255.255.255
ip ospf network point-to-point
!
interface Serial0/2
ip address 10.1.24.4 255.255.255.0
clock rate 2000000
!
interface Serial0/3
ip address 10.1.34.4 255.255.255.0
clock rate 2000000
!
interface Serial0/5
ip address 10.1.45.4 255.255.255.0
clock rate 2000000
!
router ospf 1
router-id 4.4.4.4
log-adjacency-changes
passive-interface default
no passive-interface Serial0/2
no passive-interface Serial0/3
network 4.4.4.4 0.0.0.0 area 0
network 10.1.24.4 0.0.0.0 area 0
network 10.1.34.4 0.0.0.0 area 0
!
router bgp 5500
no synchronization
bgp log-neighbor-changes
neighbor 1.1.1.1 remote-as 5500
neighbor 1.1.1.1 update-source Loopback0###### Loopback solution in iBGP and eBGP
neighbor 1.1.1.1 next-hop-self ############### next-hop processing
neighbor 5.5.5.5 remote-as 6500
neighbor 5.5.5.5 ebgp-multihop 2 ############# Loopback solution in eBGP
neighbor 5.5.5.5 update-source Loopback0###### Loopback solution in iBGP and eBGP
no auto-summary
!
ip forward-protocol nd
ip route 5.5.5.5 255.255.255.255 10.1.45.5
R5>
interface Loopback0ip address 5.5.5.5 255.255.255.255
!
interface Loopback1
ip address 200.1.1.1 255.255.255.0
!
interface Loopback2
ip address 200.1.2.1 255.255.255.0
!
interface Loopback3
ip address 200.1.3.1 255.255.255.0
!
interface Loopback4
ip address 200.1.4.1 255.255.255.0
!
interface Loopback5
ip address 200.1.5.1 255.255.255.0
!
interface Loopback6
ip address 200.1.6.1 255.255.255.0
!
interface Loopback11
ip address 50.1.1.1 255.255.255.0
!
interface Serial0/4
ip address 10.1.45.5 255.255.255.0
clock rate 2000000
!
router bgp 6500
no synchronization
bgp log-neighbor-changes
network 50.1.1.0 mask 255.255.255.0 ########## network command
redistribute connected route-map FILTER ############Redistribution
neighbor 4.4.4.4 remote-as 5500
neighbor 4.4.4.4 ebgp-multihop 2 ###### Loopback solution in eBGP
neighbor 4.4.4.4 update-source Loopback0 ###### Loopback solution in iBGP and eBGP
no auto-summary
!
ip forward-protocol nd
ip route 4.4.4.4 255.255.255.255 10.1.45.4
!
!
no ip http server
no ip http secure-server
!
access-list 50 permit 200.1.1.0
access-list 50 permit 200.1.3.0
access-list 50 permit 200.1.2.0
access-list 50 permit 200.1.4.0
!
!
!
route-map FILTER permit 10
match ip address 50
No comments:
Post a Comment