Cisco IOS
BGP/EIGRP Commands
Interactive BGP and EIGRP config generators with show commands and troubleshooting
BGP vs EIGRP — When to Use Which
Border Gateway Protocol (BGP) is a path-vector routing protocol used primarily between autonomous systems (Internet, ISP, WAN edge) and for large-scale policy-based routing.
Enhanced Interior Gateway Routing Protocol (EIGRP) is an advanced distance-vector protocol used inside an organization for fast convergence and simple operation.
Key Characteristics
| Feature | BGP | EIGRP |
|---|---|---|
| Type | Path-vector (policy based) | Advanced distance-vector (hybrid) |
| Typical Use | Internet, WAN edge, multi-homing, DC fabrics | Campus / enterprise interior routing |
| Metric | Path attributes (AS-path, local-pref, MED, communities) | Composite metric: bandwidth, delay, reliability, load, MTU |
| Transport | TCP port 179 | IP protocol 88 (no TCP/UDP port) |
| Neighbor Discovery | Manual neighbor configuration | Multicast hello (224.0.0.10) and manual neighbors on NBMA |
| Scalability | Very high, millions of prefixes with policies | High inside an AS, not Internet-scale |
Use BGP where you need policy and Internet reachability; use EIGRP inside the enterprise where fast convergence and simpler configs matter.
BGP Essentials
- Forms explicit neighbor relationships over TCP 179.
- Exchanges full routing tables, then incremental updates.
- Best-path selection uses local-pref, AS-path length, origin, MED, eBGP vs iBGP, IGP metric, router ID.
- iBGP requires full-mesh, route reflectors, or confederations for scale.
- Commonly used to advertise default routes and specific prefixes to customers/peers.
EIGRP Essentials
- Uses Diffusing Update Algorithm (DUAL) for loop-free fast convergence.
- Supports unequal-cost load balancing with the variance command.
- Uses hello/hold timers and feasible successors for backups.
- Can summarize routes at any interface to keep the topology small.
- Supports IPv4 and IPv6 with classic and named mode configurations.
Design Tips
BGP at Edge
Terminate ISP links and control outbound/inbound traffic with local-pref, MED,
communities.
EIGRP in Core
Use EIGRP for internal routing, summarizing at distribution to keep core tables small.
Redistribution
Carefully plan BGP<->EIGRP redistribution to avoid loops; tag and filter routes.
Warning: Mixing many protocols and uncontrolled redistribution can create loops
and suboptimal paths. Keep the design simple.
BGP Config Generator
conf t
!
router bgp 65001
bgp router-id 1.1.1.1
bgp log-neighbor-changes
!
! Neighbor configuration
neighbor 203.0.113.1 remote-as 64500
neighbor 203.0.113.1 description ISP-UPLINK
neighbor 203.0.113.1 soft-reconfiguration inbound
!
! Advertised networks
network 198.51.100.0 mask 255.255.255.0
network 10.10.0.0 mask 255.255.0.0
!
end
copy running-config startup-config Notes:
- Type: eBGP — Local AS 65001, Remote AS 64500
EIGRP Config Generator
conf t
!
router eigrp 100
network 10.0.0.0 0.0.255.255
network 192.168.1.0 0.0.0.255
passive-interface default
no passive-interface GigabitEthernet0/0
passive-interface Loopback0
passive-interface GigabitEthernet0/1
no auto-summary
!
! Apply hello/hold timers on active interface
interface GigabitEthernet0/0
ip hello-interval eigrp 100 5
ip hold-time eigrp 100 15
!
end
copy running-config startup-config Notes:
- Mode: Classic — AS 100
- passive-interface default enabled — only GigabitEthernet0/0 sends hellos by default
BGP Show & Troubleshooting Commands
| Command | Purpose |
|---|---|
| show ip bgp summary | Peer status, state, prefixes received. |
| show ip bgp | Global BGP table — all prefixes. |
| show ip bgp <prefix> | Best-path selection, attributes for a prefix. |
| show ip bgp neighbors | Detailed neighbor information and timers. |
| show ip bgp neighbors <ip> advertised-routes | Routes sent to a neighbor. |
| show ip bgp neighbors <ip> received-routes | Routes received (requires soft-reconfig). |
| show ip bgp regexp _65001_ | Filter BGP table by AS-path regex. |
| clear ip bgp * soft | Soft-reset all BGP peers (no session drop). |
| clear ip bgp <ip> soft in | Re-apply inbound policy without reset. |
| debug ip bgp | Debug BGP events — use with caution in production. |
Tip: Always use soft resets (
soft in / soft out) instead of hard resets in production to avoid dropping established sessions.
EIGRP Show & Troubleshooting Commands
| Command | Purpose |
|---|---|
| show ip eigrp neighbors | Neighbor table and hold timers. |
| show ip eigrp topology | Successors and feasible successors for routes. |
| show ip eigrp topology all-links | All routes including those not in table. |
| show ip eigrp interfaces | Interfaces participating in EIGRP. |
| show ip route eigrp | Routes learned via EIGRP. |
| show ip eigrp traffic | Hello, update, query, reply packet counts. |
| debug eigrp packets | Debug hello/update/query/reply — use sparingly. |
| debug eigrp fsm | Debug DUAL finite state machine transitions. |
Run debugs during maintenance windows and always disable them when finished with
undebug all.