Search This Blog

BGP Instruction

BGP supports two kinds of neighbors: internal and external.  Internal neighbors are in the same autonomous system, while external neighbors are in a different autonomous system.  Normally, external neighbors are adjacent to each other and share a subnet, while internal neighbors may be anywhere in the same autonomous system.  

Well-known mandatory.

  •  As-path: The short ASN number becomes the best path       
  •  Next-hop: Once EBGP receives a router from another EBGP, then advertises to IBGP, the next hop will not change. To fix this issue, there are 2 possible solutions, advertise the wan link or configure the next-hop seft toward the IBGP router.
  •  Origin: I mean IBGP,  E means EBGP,?

Well-known discretionary.

  • Weight: cisco is mandatory only us for the local router with only one exit path because once we use weight, The BG router will not advertise to all IBGP routers; also, the BG router will not request the IBGP router to exit on the path that was applied weight.
  •  Local preference: The BGP Local Preference attribute is used to manipulate the best outbound path and applied on inbound external routes. Unlike the  Weight attribute, Local Preference is passed on to iBGP peers. If multiple paths exist, Local Preference BGP informs iBGP routers how to exit the AS ie, and which path to prefer for outgoing traffic. Local Preference is a 32-bit number and can range from 0 to 4294967295.

       
[Key Features and Benefits]


  •  BGP uses aggregation as a way of disseminating network-layer reachability information (NLRI) across routers  
  •  BGP uses path attributes to implement routing policies.   
  •  BGP is based on TCP and uses port 179  
  •  BGP can influence the originating traffic  
  •  BGP version 4 provides a new set of mechanisms for supporting classless inter-domain routing  
  •  BGP is built on experience gained with EGP and EGP usage in the NSFNET Backbone.   
  •  Running BGP over a reliable transport protocol eliminates the need to implement explicit update fragmentation, retransmission, acknowledgment, and sequencing.
R3#conf t 
R3(config)#router bgp 400 
R3(config-router)#neighbor 192.1.34.4 remote-as 400 
R3(config-router)#network 172.1.3.0 mask 255.255.255.0
R3(config-router)#end
R4#conf t 
R4(config)#router bgp 400 
R4(config-router)#neighbor 192.1.34.3 remote-as 400 
R4(config-router)#network 172.1.4.0 mask 255.255.255.0 
R4(config-router)#end
*Mar  1 01:48:04.027: %BGP-5-ADJCHANGE: neighbor 192.1.34.3 Up 
The neighbor command specifies where the neighboring BGP router is located. The network command is used to specify the networks to be advertised by the Border Gateway Router (BGP) and multiprotocol BGP (MP-BGP) routing process.


Disable synchronization for BGP on R3 and R4.

R3#conf t 
R3(config-router)#router bgp 400 
R3(config-router)#no synchronization
R3(config-router)#end
R4#conf t 
R4(config-router)#router bgp 400 
R4(config-router)#no synchronization
R4(config-router)#end
Usually, a BGP speaker does not advertise a route to an external neighbor unless that route is local or exists in the IGP.  The no synchronization command allows the Cisco IOS software to advertise a network route without waiting for the IGP.  This feature allows routers and access servers within an autonomous system to have the route before BGP makes it available to the other autonomous systems.

*Note: Synchronization is disabled by default in Cisco IOS Software Release 12.2(8)T and later.



R4#show ip bgp summary 
BGP router identifier 172.1.4.4, local AS number 400 BGP table
BGP table version is 3, main routing table version 3
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 2/0 prefixes, 2/0 paths, scan interval 60 secs
Neighbor   V   AS  MsgRcvd MsgSent blVer InQ  OutQ   Up/Down 
192.1.34.3 4  400   16      16        3   0   0      00:11:46 
*Note:  The 192.1.3 3 IP address has been configured to be a BGP peer with R4


R3#show Ip route
                    Gateway of last resort is not set
                172.1.0.0/24 is subnetted, 2 subnets
B             172.1.4.0 [200/0] via 192.1.34.4, 00:19:1
C             172.1.3.0 is directly connected, Loopback1
C             192.1.34.0/24 is directly connected, Serial0/0.34
R3#show Ip BGP neighbors
BGP neighbor is 192.1.34.4,  remote AS 400, internal link
BGP version 4, remote router ID 172.1.4.4
BGP version 4, remote router ID 172.1.4.4 BGP state = Established, up for 00:33:46
BGP state = Established, up for 00:33:46 Last read 00:00:45, last write 00:00:45, 
hold time is 180,  keepalive  interval is 60 seconds
A vast amount of information can be found through this command; the show Ip BGP neighbors command displays information about the TCP and BGP connections to its particular neighbors

interface FastEthernet 0/1
 ip address 192.168.10.254 255.255.255.0
!
interface FastEthernet 0/0
 ip address 192.168.20.1 255.255.255.0
!
router ospf 1
 network 192.168.20.0 0.0.0.255 area 0
 network 192.168.10.0 0.0.0.255 area 0
 passive-interface default
 no passive-interface FastEthernet 0/0
!
end
interface FastEthernet 0/1
 ip address 192.168.10.254 255.255.255.0
!
interface FastEthernet 0/0
 ip address 192.168.20.1 255.255.255.0
!
router ospf 1
 network 192.168.20.0 0.0.0.255 area 0
 network 192.168.10.0 0.0.0.255 area 0
 passive-interface default
 no passive-interface FastEthernet 0/0
!
end
R3#show ip bgp
BGP table version is 3, local router ID is 172.1.3.3
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
Network       Next Hop    Metric  Loc    Prf     Weight      Path
172.1.3.0/24  0.0.0.0        0                    32768        i
172.1.4.0/24  192.1.34.4     0           100       0           i 
R3#show ip bgp
BGP table version is 3, local router ID is 172.1.3.3
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
Network       Next Hop  Metric  Loc    Prf  Weight      Path
172.1.3.0/24  0.0.0.0        0      32768                i
172.1.4.0/24  192.1.34.4     0        100       0        i  



No comments: