Configure basic BGP on Cisco router

From Notes_Wiki
Revision as of 05:58, 19 April 2022 by Saurabh (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Home > Switch configuration notes > Configure basic BGP on Cisco router

As such BGP is quite vast and complex topic. However, we can get simple BGP configuration done on a Cisco router such as Cisco CSR V1000 virtual router for sending and receiving routes via BGP. To do that use following steps:

  1. Login into router via console / ssh. Go to enable mode and enter enable password ('enable'), if required. Go to configure terminal
    config t
  2. Decide AS number to be used for BGP. We can use AS in range 64512 to 65534 for private purposes. Hence we can start from 65000 and use a few AS numbers as per requirement.
  3. Configure BGP with chosen AS number:
    router bgp 65000
    where 65000 is the AS number to be used in current BGP configuration
  4. Give a router-ID (We can use unique largest IPv4 interface IP of router to avoid conflicts with other routers)
    bgp router-id 10.1.6.1
    where 10.1.6.1 is unique router-id for this router
  5. Configure address family with route-redistribution and networks
    address-family ipv4 unicast
    network 0.0.0.0 mask 0.0.0.0
    redistribute static
    redistribute connected
    exit
    Here we are configuring ipv4 unicast based BGP router. This router will advertize default-route 0.0.0.0/0 to its peer because of 'network 0.0.0.0' line. This router will also advertize all static and connected routes to its neighbors
  6. Define neighbor routers along with their AS numbers for BGP communication
    neighbor 10.1.5.2 remote-as 65000
    neighbor 10.1.5.3 remote-as 65000
    neighbor 10.1.6.2 remote-as 65000
    neighbor 10.1.6.3 remote-as 65000
    where 10.1.5.2, 10.1.5.3, etc. are BGP routers in same AS 65000 where we want BGP connection to be established for routing table exchange.
  7. We can check status of BGP via various show commands:
    show bgp all
    show bgp ipv4 unicast summary
    show bgp ipv4 unicast neighbors
    show bgp ipv4 unicast nexthops
    show bgp ipv4 received-paths


Refer:


Home > Switch configuration notes > Configure basic BGP on Cisco router