Here's a step-by-step guide to configure BGP on a Cisco Nexus 3548 switch:
- First, enable the BGP feature:
switch# configure terminal
switch(config)# feature bgp
- Configure BGP with an AS number:
switch(config)# router bgp <autonomous-system-number>
- Configure Router ID (optional but recommended):
switch(config-router)# router-id <A.B.C.D>
- Configure BGP neighbors:
switch(config-router)# neighbor <peer-ip-address>
switch(config-router-neighbor)# remote-as <neighbor-AS-number>
switch(config-router-neighbor)# description <description>
switch(config-router-neighbor)# update-source <interface>
- Configure address families (IPv4 unicast is most common):
switch(config-router)# address-family ipv4 unicast
switch(config-router-af)# network <network-address> mask <subnet-mask>
- Basic neighbor activation:
switch(config-router)# neighbor <peer-ip-address>
switch(config-router-neighbor)# address-family ipv4 unicast
Example of a complete basic configuration:
feature bgp
router bgp 65000
router-id 10.1.1.1
neighbor 192.168.1.2
remote-as 65001
description BGP_PEER_1
update-source loopback0
address-family ipv4 unicast
address-family ipv4 unicast
network 10.0.0.0/24
Additional useful commands:
- Verify BGP configuration:
show running-config bgp
show bgp all summary
show bgp ipv4 unicast neighbors
show bgp ipv4 unicast
- Optional BGP configurations:
# Configure timers
switch(config-router-neighbor)# timers <keepalive-interval> <holdtime>
# Enable password authentication
switch(config-router-neighbor)# password <password>
# Configure maximum prefixes
switch(config-router-neighbor)# maximum-prefix <number>
# Configure route redistribution
switch(config-router-af)# redistribute direct route-map <route-map-name>
switch(config-router-af)# redistribute static route-map <route-map-name>
Remember to:
- Ensure IP connectivity between BGP peers
- Configure appropriate routing policies using route-maps if needed
- Consider implementing security measures like peer authentication
- Make sure AS numbers are correctly configured
- Verify BGP neighbor relationships are established
To troubleshoot:
show bgp ipv4 unicast neighbors | include State
show bgp ipv4 unicast summary
show ip bgp neighbors
debug ip bgp
These commands will help you monitor and verify your BGP configuration.