network [network] mask [mask]
Advertises a specific network prefix into the BGP routing table for distribution to peers.
network <network-address> mask <subnet-mask>When to Use This Command
- Advertising a public IP block assigned by an ISP to BGP peers.
- Originating a summary route into BGP for load balancing or redundancy.
- Publishing enterprise subnets to the internet via eBGP.
- Injecting networks into BGP to be redistributed to other peers.
Command Examples
Advertise a /24 network to an ISP via eBGP
R1(config)# ip route 198.51.100.0 255.255.255.0 Null0
R1(config)# router bgp 65001
R1(config-router)# network 198.51.100.0 mask 255.255.255.0R1(config-router)#
A static route to Null0 ensures the exact prefix exists in the routing table. BGP then originates and advertises 198.51.100.0/24 to all configured peers.
Verify the network appears in the BGP table
R1# show ip bgp 198.51.100.0BGP routing table entry for 198.51.100.0/24, version 2
Paths: (1 available, best #1, table default)
Local
0.0.0.0 from 0.0.0.0 (10.0.0.1)
Origin IGP, metric 0, localpref 100, weight 32768, valid, sourced, local, bestThe '>' symbol (best) and 'Local' origin show this router originated the prefix. 'weight 32768' is the default for locally originated routes.
Understanding the Output
No direct output from the network command. Use 'show ip bgp' or 'show ip bgp [prefix]' to verify the network appears with a '>' (best) indicator. If the network is missing from the routing table (no static route, no connected, no IGP), BGP will NOT advertise it — this is a very common exam scenario.
CCNA Exam Tips
CCNA exam tip: BGP 'network' is NOT like OSPF/EIGRP 'network' — it does NOT enable BGP on interfaces. It advertises an exact prefix.
CCNA exam tip: The network must exist in the IP routing table EXACTLY as specified (exact match of network and mask). A /23 route won't satisfy a 'network x.x.x.x mask 255.255.255.0' statement.
CCNA exam tip: A common technique is 'ip route [prefix] [mask] Null0' to create a black-hole route so BGP can originate the summary.
CCNA exam tip: BGP will suppress the advertisement if the prefix disappears from the routing table.
Common Mistakes
Mistake 1: Omitting the 'mask' keyword — without it, BGP assumes a classful mask which may not match the intended prefix.
Mistake 2: Specifying a network that doesn't exist in the routing table — BGP silently ignores it.
Mistake 3: Confusing this with IGP network statements — BGP 'network' only advertises; it doesn't activate BGP on interfaces.
Related Commands
neighbor [ip] remote-as [asn]
Defines a BGP neighbor (peer) by specifying its IP address and AS number. If the remote AS matches the local AS, this creates an iBGP session; if different, it creates an eBGP session.
router bgp [asn]
Enters BGP router configuration mode and creates a BGP process with the specified autonomous system (AS) number. This is the first command required to configure BGP on a Cisco router.
show ip bgp
Displays the BGP routing table, showing learned BGP routes and their attributes, used for troubleshooting BGP path selection and verifying route advertisement.
Practice for the CCNA 200-301
Test your knowledge with hundreds of CCNA practice questions covering all exam domains.
Practice CCNA Questions