Skip to content

BGP-4

netverdict models BGP as a deterministic control-plane protocol for labs, change analysis, and policy reasoning. It is not a router image, but it does track the behaviours that usually matter in training and review scenarios: sessions, route advertisement, best-path selection, AS_PATH, LOCAL_PREF, MED, communities, route-maps, route reflection, confederations, and VPNv4.

AreaLevelWhat this means
IPv4 unicast BGPSupportedeBGP / iBGP sessions, network statements, UPDATE propagation, Loc-RIB, Adj-RIB-style views.
Best-path selectionSupportedDeterministic subset of RFC 4271 path selection.
PolicySupportedPrefix-lists, AS-path ACLs, community-lists, route-maps, inbound and outbound application.
Path attributesSupportedAS_PATH, NEXT_HOP, ORIGIN, LOCAL_PREF, MED, communities.
CommunitiesSupportedStandard communities, exact community-list matching, expanded community-list regex matching.
Route reflectionSupportedroute-reflector-client for iBGP reflection labs.
Peer-groupsSupportedCisco-style and VyOS-style template inheritance.
ConfederationsSupportedRFC 5065-style AS confederation identifier, peers, and AS_PATH handling.
Graceful restartPartialIOS bgp graceful-restart and neighbor ... ha-mode graceful-restart keep a peer’s routes for the restart time. No capability negotiation. EOS and Junos GR lines are not read.
Maximum-prefixSupportedPrefix-limit teardown with notification-style behaviour.
MP-BGP VPNv4SupportedVPNv4 AF for L3VPN scenarios with RD / RT / VRF import-export behaviour. PE configs on IOS, IOS-XR, NX-OS, EOS and Junos.
PE-CE peeringsSupportedA neighbour configured in a VRF peers in that VRF’s own BGP table, keyed by (VRF, neighbour): two VRFs on one PE may each have a CE at the same address.
TimersPartialKeepalive / hold / connect retry are deterministic simulation timers. Update damping knobs are modelled where listed below.
Packet fidelitySupportedOne TCP/179 session per peering with OPEN, UPDATE, KEEPALIVE and NOTIFICATION, on the wire in a capture (Packet Lens), decoded by Wireshark. VPNv4 routes do not appear in a capture.
Address familiesSupportedIPv4 and IPv6 unicast, VPNv4/VPNv6, L2VPN EVPN, IPv4/IPv6 FlowSpec, carried only where both ends activate them.
RPKISupportedRoutes are valid, invalid or notfound; invalid routes can be dropped from best path.
Route flap dampingSupportedPenalty, decay, suppress and reuse.
Add-pathSupportedadvertise additional-paths.
StandardCoverageNotes
RFC 4271, BGP-4Behaviour modelOPEN / UPDATE-style session behaviour, route exchange, AS_PATH loop prevention, and best-path selection subset.
RFC 4271 section 5.1.2SupportedAS_PATH is tracked and used for loop prevention and path length comparison.
RFC 4271 section 5.1.3SupportedNEXT_HOP is tracked and used for recursive reachability decisions.
RFC 4271 section 5.1.4SupportedMED is modelled and compared between routes from the same neighbouring AS.
RFC 4271 section 5.1.5SupportedLOCAL_PREF defaults to 100 and can be changed by route-map or default local-preference.
RFC 4271 section 9.1.2.2Behaviour modelBest-path order is deterministic and documented below.
RFC 2385, TCP MD5Supportedneighbor ... password: a key on one end only, or two different keys, keep the session down. Salted encrypted keys count as present but are not compared.
RFC 1997, CommunitiesSupportedStandard communities are attached, matched, and propagated in policy scenarios.
RFC 4364, BGP/MPLS IP VPNsBehaviour modelVPNv4 routes, route distinguishers, route-target import/export, and VRF route projection are modelled.
RFC 4456, Route ReflectionSupportedRoute-reflector clients can receive reflected iBGP routes.
RFC 4724, Graceful RestartPartialStale routes are kept for the restart time, then purged if the peer does not re-advertise them. The neighbour row stays, closed, with its reset reason and flap count. It is one-sided: there is no capability negotiation.
RFC 4760, Multiprotocol BGPSupportedIPv6 unicast, VPN, EVPN and FlowSpec families.
RFC 6811, Origin ValidationSupportedRPKI states from ROAs.
RFC 2439, Route Flap DampingSupportedPenalty with a maximum suppress time.
RFC 7911, Add-PathSupportedMore than one path per prefix to a peer.
RFC 5065, ConfederationsSupportedConfederation identifier, peer sub-AS list, and confed AS_PATH treatment are modelled.
RFC 4486, BGP Cease SubcodesSupportedMaximum-prefix sends Cease subcode 1 and closes both ends; a bgp router-id or route-reflector-client change sends subcode 6 (Other Configuration Change). The optional AFI/SAFI/limit data is not sent.

netverdict compares BGP candidates in this order:

StepRule
1EVPN only: the higher MAC mobility sequence number wins.
2Locally originated routes win over received routes.
3With RPKI best-path validation on: valid beats notfound beats invalid.
4Higher weight wins. A route-map weight beats the peering’s neighbor weight.
5Higher LOCAL_PREF wins.
6Shorter AS_PATH wins. Confederation segments do not count toward length.
7Lower ORIGIN wins: igp, then egp, then incomplete.
8Lower MED wins when both routes came from the same neighbouring AS.
9eBGP-learned routes beat iBGP-learned routes.
10Lower IGP cost to NEXT_HOP wins.
11Lower next-hop address wins as the final tie-break.

There is no route-age step. Paths equal on every step are installed together when multipath allows it.

This is intentionally deterministic. Replaying the same topology with the same commands should produce the same best path.

FeatureStatusNotes
router bgp <asn>SupportedOne BGP process per device.
bgp router-id <ip>SupportedExplicit router ID; otherwise derived by runtime. Changing the ID in use resets every session, as on IOS.
IPv4 unicast AFSupportedDefault working AF for classic BGP labs.
address-family ipv4SupportedIncludes VRF sub-mode for per-VRF neighbours.
redistribute static|connected|ospf N in a VRFSupportedUnder address-family ipv4 vrf X (XR: router bgp / vrf X): the VRF’s routes are exported as VPNv4. A VRF’s connected subnets are exported only with redistribute connected (NX-OS redistribute direct route-map M). redistribute eigrp in a VRF is not read.
address-family vpnv4SupportedUsed by L3VPN / MP-BGP scenarios.
network <prefix> mask <mask>SupportedLocally originates IPv4 unicast or AF-specific routes.
eBGP neighboursSupportedRemote-AS mismatch prevents establishment. A peer off the connected subnets needs ebgp-multihop or disable-connected-check.
iBGP neighboursSupportedSame-AS neighbours participate in iBGP behaviour. A peering between loopbacks comes up only while each end has a route to the other’s address.
neighbor ... activateSupportedTop-level and AF-level activation.
neighbor ... update-sourceSupportedSource-interface setting for loopback-style sessions.
neighbor ... next-hop-selfSupportedRewrites NEXT_HOP for outbound advertisements.
neighbor ... route-reflector-clientSupportedEnables route reflection for iBGP client scenarios.
neighbor ... peer-groupSupportedPeer-group templates and binding.
neighbor ... descriptionSupportedStored and emitted for operator-visible config fidelity.
neighbor ... shutdownSupportedForces the session down.
neighbor ... ebgp-multihop [N]SupportedLets an eBGP peer off the connected subnets form, with TTL N (255 when bare). Both ends need it, and the shortest live path must fit the TTL (bgp.ebgp-not-connected, bgp.ebgp-ttl-exceeded). Captured eBGP frames carry the TTL. GTSM (RFC 5082): neighbor X ttl-security hops N (IOS, NX-OS) and EOS ttl maximum-hops N send TTL 255 and accept a session only at TTL ≥ 256 − N; IOS refuses it together with ebgp-multihop
neighbor ... disable-connected-checkSupportedLifts the connected check; the TTL stays 1, so a loopback one routed hop away is reachable.
neighbor ... passwordSupportedTCP-MD5. A key on one end only leaves the session Idle with bgp.md5-missing; different keys give bgp.md5-mismatch. Type 7 keys are decoded.
neighbor ... fall-over bfdSupportedOpens a BFD session when both ends ask. BFD down tears down only a peering that asked; BFD for OSPF or IS-IS on the same link does not. Single-hop only (see BFD).
neighbor ... ha-mode graceful-restart [disable]SupportedTurns graceful restart on or off for one peer.
neighbor ... maximum-prefixSupportedTears down the session when accepted prefixes exceed the configured limit: the NOTIFICATION reaches the peer, the row stays Idle (PfxCt) with “Peer over prefix limit”, and only clear ip bgp brings it back. The NOTIFICATION carries AFI, SAFI and the limit (RFC 4486 §4); show ip bgp neighbors counts NOTIFICATIONs sent and received.
neighbor ... soft-reconfiguration inboundNo effectPre-policy routes are always kept, so the line changes nothing.
neighbor ... advertisement-intervalNot modelledThe line is not read. UPDATEs are sent incrementally: only what changed.
neighbor ... as-origination-intervalNot modelledThe line is not read.
neighbor ... send-communitySupportedOn IOS, communities reach the peer only with this line.
neighbor ... weightSupportedRouter-local preference, compared before LOCAL_PREF.
neighbor ... allowas-inSupportedAccepts routes carrying the local AS.
neighbor ... remove-private-asSupportedStrips private ASNs toward eBGP peers.
neighbor ... default-originateSupportedSends a default route to the peer.
neighbor ... advertise additional-pathsSupportedAdd-path.
maximum-paths / bgp bestpath as-path multipath-relaxSupportedBGP multipath, including across different neighbouring ASes.
bgp dampeningSupportedRoute flap damping.
bgp rpki server …SupportedTurns on origin validation.
Prefix-list policySupportedneighbor ... prefix-list NAME in / out.
Route-map policySupportedneighbor ... route-map NAME in / out.
Route-map continue [N]SupportedIOS, EOS and NX-OS. A matching permit applies its sets and evaluation goes on at clause N, or the next clause. On a deny clause: No effect.
IOS-XR route-policySupportedNested if, and / or / not, apply with parameters, route-policy NAME(arg) in. See Route Policy.
AS-path access-listSupportedCisco AS-path regular expressions in an ordered permit/deny list, first match, implicit deny. An invalid regex is reported. See Route Policy.
neighbor ... filter-list N in / outSupportedin checks the received path. out checks the path before the router prepends its own AS, so permit ^$ sends only the router’s own routes.
Standard community-listSupportedExact community matching.
Expanded community-listSupportedPatterns are read as ranges of asn:value, including _<asn>:.
set local-preferenceSupportedRoute-map action.
set as-path prependSupportedRoute-map action. set as-path prepend last-as N is read too.
set metricSupportedMED route-map action. +N and -N are relative and stop at 0.
match metric, match local-preference, match originSupportedIOS, EOS and NX-OS. match metric N +- D is a MED window. match local-preference takes one value.
set communitySupportedSupports replacement, additive, and none. Several values on one line are all kept. set comm-list NAME delete strips a list’s communities.
set ip next-hopSupportedInbound and outbound. Outbound it reaches eBGP peers too and holds over next-hop-self. peer-address is supported. See Route Policy.
set originSupportedigp, egp [AS], incomplete. The AS is dropped.
set weightSupportedIn an inbound route-map: a weight per route. It overrides neighbor ... weight, as on IOS.
bgp default local-preferenceSupportedDefault LOCAL_PREF for local originated routes.
bgp graceful-restart [restart-time N]SupportedGraceful restart on every peering. Routes are kept for the restart time (120 s by default). stalepath-time is read and not kept. Written back.
bgp confederation identifierSupportedPublic confederation AS.
bgp confederation peersSupportedMember sub-AS list.
aggregate-addressSupportedAdvertises the summary with ATOMIC_AGGREGATE and AGGREGATOR; summary-only suppresses the components.
Unnumbered BGPSupportedneighbor <interface> interface remote-as external: the peer is whatever is on the other end of the link.
Add-pathSupportedMore than one path per prefix can be advertised to a peer.
Route flap dampingSupportedPenalty, half-life decay, suppress and reuse limits, maximum suppress time.
RPKI / origin validationSupportedValid / invalid / notfound per route; invalid routes can be withheld from best path.
CommandIOS-styleJunos-styleVyOS-styleNotes
router bgp 65001Supportedn/an/aCisco-family process mode.
bgp router-id 1.1.1.1SupportedSupportedSupportedMaps to canonical router ID.
neighbor 10.0.0.2 remote-as 65002SupportedSupportedSupportedCore numbered neighbour form.
neighbor 10.0.0.2 update-source Loopback0SupportedSupportedSupportedSource-interface intent.
neighbor 10.0.0.2 next-hop-selfSupportedSupportedSupportedAlso available in AF form on some vendors.
neighbor 10.0.0.2 route-reflector-clientSupportedSupportedSupportedUsed for iBGP reflection scenarios.
neighbor 10.0.0.2 description TEXTSupportedSupportedSupportedStored / emitted as metadata.
neighbor 10.0.0.2 shutdownSupportedSupportedSupportedAdministrative down.
set protocols bgp group G type internaln/aSupportedn/aJunos iBGP group: local-address A sources the sessions, cluster C makes the members reflector clients (the cluster ID itself has no effect).
neighbor 10.0.0.2 ebgp-multihop 4SupportedSupportedNot modelledJunos: multihop [ttl N] (64 when bare). Needed for an eBGP peer off the connected subnets.
neighbor 10.0.0.2 password SECRETSupportedSupportedNot modelledTCP-MD5 key. Junos: authentication-key. EOS and NX-OS password are read too.
neighbor 10.0.0.2 fall-over bfdSupportedSupportedNot modelledJunos: bfd-liveness-detection. EOS and NX-OS bfd are read too.
neighbor 10.0.0.2 maximum-prefix 100SupportedNot yetPartialPrefix-limit session teardown.
neighbor 10.0.0.2 route-map RM inSupportedPartialSupportedPolicy maps to canonical route-map references.
neighbor 10.0.0.2 prefix-list PL outSupportedPartialSupportedPrefix-list policy.
neighbor PEERS peer-groupSupportedn/aSupportedTemplate / inheritance model.
neighbor 10.0.0.2 peer-group PEERSSupportedn/aSupportedBinding to template.
address-family ipv4Supportedn/aSupportedCisco / VyOS syntax differs but maps to IPv4 unicast AF.
address-family ipv4 vrf BLUESupportedSupportedPartialPer-VRF IPv4 BGP: PE-CE peerings. Junos: routing-instances X protocols bgp.
address-family vpnv4SupportedSupportedPartialMP-BGP VPNv4. Junos: family inet-vpn unicast. EOS: address-family vpn-ipv4.
network 192.0.2.0 mask 255.255.255.0SupportedSupportedSupportedLocally originated route.
bgp default local-preference 200SupportedSupportedPartialDefault local-pref for local originated routes.
bgp graceful-restartSupportedNot modelledNot modelledRestart window per peering; neighbor X ha-mode graceful-restart per peer.
bgp confederation identifier 65000SupportedPartialSupportedRFC 5065 model.
bgp confederation peers 65001 65002SupportedPartialSupportedMember sub-AS list.
aggregate-address 10.0.0.0 255.0.0.0SupportedNot yetNot yetSummary route; add summary-only to suppress components.
show ip bgpSupportedSupportedSupportedIOS layout: full legend, every path (*>, *, *m, *>i, r, s, d), Next Hop, Metric, LocPrf, Weight, Path; classful networks without their length. NX-OS and EOS print their own layouts; Junos show route protocol bgp. show ip bgp PREFIX shows each path’s detail.
show ip bgp summarySupportedSupportedSupportedRouter ID, table version, real message counts (sent = what the peer received), Up/Down from the clock, State/PfxRcd (Idle, Active, Idle (Admin), Idle (PfxCt)). NX-OS, EOS, VyOS (FRR), EdgeOS (ZebOS layout, approximated), IOS-XR (show bgp [ipv4|ipv6|vpnv4 unicast] summary) and Junos show bgp summary (every table: inet.0, inet6.0, bgp.l3vpn.0, NAME.inet.0) print their own layouts. Each address family keeps its own table version. Memory lines are left out.
Junos show bgp neighbor [A]n/aSupportedn/aJunos layout: peer and local address with ports, type, state, last state/event/error, hold times, peer and local ID, NLRI, per-table prefix counts, last traffic, message totals.
show ip bgp neighborsSupportedVendor-shaped viewVendor-shaped viewIOS layout: router ID, up time, hold/keepalive, capabilities, message statistics, per-family prefixes, connections established/dropped, Last reset … due to ….
show ip bgp neighbors <ip> received-routesSupportedPartialPartialWhat the peer sent, before inbound policy; routes shows what was accepted.
show ip bgp neighbors <ip> advertised-routesSupportedPartialPartialPost-policy RIB-Out view.
show ip bgp peer-groupSupportedn/aPartialShows peer-group templates and bindings.
show ip bgp confederationSupportedn/aPartialShows confederation state.
show bgp vpnv4 unicast all|vrf X [summary]SupportedVendor-shaped viewn/aVPNv4 table under each VRF’s RD. Also IOS show ip bgp vpnv4, XR show bgp vrf X, NX-OS show bgp vpnv4 unicast, EOS show bgp vpn-ipv4, Junos show route table bgp.l3vpn.0.
show ip community-list [NAME]Supportedn/an/aStandard and expanded community lists with their entries.

BGP timers are simulated in the event queue. The engine does not sleep for real keepalive or hold timers; it schedules deterministic events so tests, labs, and shared URLs replay consistently.

Policy is applied in the same direction users expect: inbound policy affects what enters the local BGP table, and outbound policy affects what the peer sees. received-routes and advertised-routes are useful because they let you inspect both sides of that boundary.

Route-map matching is deliberately concrete. Prefix-lists match prefixes. AS-path ACLs are Cisco AS-path regular expressions, evaluated as a whole list. Standard community-lists match exact community values. Expanded community-lists are read as ranges of asn:value, such as 65000:* or _65000:.

Graceful restart keeps stale paths during the restart window and purges them if the returning peer no longer has them. IOS bgp graceful-restart turns it on for every peering, neighbor X ha-mode graceful-restart for one. It is one-sided: the peer’s capability is not negotiated.

A session forms only if its transport would. TCP-MD5 keys must match at both ends. An eBGP peer off the connected subnets needs ebgp-multihop or disable-connected-check at both ends, and the shortest live path must fit the TTL. iBGP has neither rule, but a peering off the connected subnets (such as loopback to loopback) needs a route each way, as TCP does.

VPNv4 is designed around practical L3VPN reachability: VRF route distinguishers make otherwise-overlapping prefixes unique, route targets control import/export, and MP-BGP carries the VPN route between PEs. A PE-CE peering passes the same transport checks as a global one (MD5, the eBGP connected check), looked up in its VRF. See MPLS L3VPN.

Basic eBGP
configure terminal
router bgp 65001
bgp router-id 1.1.1.1
neighbor 10.0.12.2 remote-as 65002
address-family ipv4
network 192.168.1.0 mask 255.255.255.0
neighbor 10.0.12.2 activate
end
show ip bgp summary
show ip bgp

Vendor styles

IOS-style
router bgp 65001
bgp router-id 1.1.1.1
neighbor 10.0.12.2 remote-as 65002
address-family ipv4
network 192.0.2.0 mask 255.255.255.0
neighbor 10.0.12.2 activate
neighbor 10.0.12.2 route-map CUSTOMER-IN in
Junos-style
set routing-options router-id 1.1.1.1
set routing-options autonomous-system 65001
set protocols bgp group EBGP type external
set protocols bgp group EBGP peer-as 65002
set protocols bgp group EBGP neighbor 10.0.12.2 import CUSTOMER-IN
set policy-options policy-statement CUSTOMER-IN then local-preference 200
VyOS-style
set protocols bgp system-as 65001
set protocols bgp parameters router-id 1.1.1.1
set protocols bgp neighbor 10.0.12.2 remote-as 65002
set protocols bgp address-family ipv4-unicast network 192.0.2.0/24
set protocols bgp neighbor 10.0.12.2 address-family ipv4-unicast route-map import CUSTOMER-IN
Set LOCAL_PREF inbound
configure terminal
route-map PREFER-R2 permit 10
set local-preference 200
router bgp 65001
neighbor 10.0.12.2 route-map PREFER-R2 in
end
show ip bgp
Prepend AS_PATH outbound
configure terminal
route-map PREPEND-OUT permit 10
set as-path prepend 65001 65001 65001
router bgp 65001
neighbor 10.0.12.2 route-map PREPEND-OUT out
end
show ip bgp neighbors 10.0.12.2 advertised-routes
Tag and match a community
configure terminal
ip community-list standard CUSTOMER-A permit 65001:100
route-map TAG-OUT permit 10
set community 65001:100 additive
route-map ACCEPT-CUSTOMER-A permit 10
match community CUSTOMER-A
router bgp 65001
neighbor 10.0.12.2 route-map TAG-OUT out
end
Configure a route reflector client
configure terminal
router bgp 65000
neighbor 10.0.1.2 remote-as 65000
neighbor 10.0.1.2 route-reflector-client
neighbor 10.0.2.2 remote-as 65000
neighbor 10.0.2.2 route-reflector-client
end
show ip bgp summary
Enable graceful restart
configure terminal
router bgp 65000
bgp graceful-restart
bgp graceful-restart restart-time 240
bgp graceful-restart stalepath-time 600
end
show ip bgp summary
LabCoversLink
BGP local preferenceInbound policy and best-path preferenceOpen lab
BGP AS-path prependOutbound route-map policy and AS_PATH lengthOpen lab
BGP community tag and filterStandard communities and community-list policyOpen lab
BGP MEDMED as same-neighbour-AS tiebreakOpen lab
BGP expanded community-listRegex matching against printed community valuesOpen lab

netverdict does not aim to reproduce every vendor BGP daemon edge case.

The current model does not read advertisement-interval, and does not carry large communities or BGP-LS. In a route-map, match local-preference with a list of values and set ip next-hop with several addresses are not read. Graceful restart has no capability negotiation, and EOS and Junos GR lines are not read. Salted encrypted MD5 keys are not compared. fall-over bfd is single-hop only. VPNv4/VPNv6 routes and sessions over IPv6 transport are modelled but do not appear in a capture.

Use this page as a support contract for the simulator’s BGP behaviour: precise where it says supported, explicit where it is partial, and quiet about things that are not modelled yet.