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 restartSupportedRFC 4724-style stale-route window is modelled.
Maximum-prefixSupportedPrefix-limit teardown with notification-style behaviour.
MP-BGP VPNv4SupportedVPNv4 AF for L3VPN scenarios with RD / RT / VRF import-export behaviour.
TimersPartialKeepalive / hold / connect retry are deterministic simulation timers. Update damping knobs are modelled where listed below.
Packet fidelityPartialBGP packets are represented for traces / PCAP inspection, but the simulator is not a byte-for-byte vendor TCP stack.
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 MD5Behaviour modelneighbor ... password must match on both sides for a session to establish. Real TCP MD5 bytes are not computed.
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 RestartSupportedRestart-time and stale-path timers are modelled.
RFC 5065, ConfederationsSupportedConfederation identifier, peer sub-AS list, and confed AS_PATH treatment are modelled.
RFC 4486, BGP Cease SubcodesBehaviour modelMaximum-prefix teardown uses the maximum-prefix cease behaviour at the model level.

netverdict compares BGP candidates in this order:

StepRule
1Higher LOCAL_PREF wins.
2Locally originated routes win over received routes.
3Shorter AS_PATH wins. Confederation segments do not count toward length.
4Lower ORIGIN wins: igp, then egp, then incomplete.
5Lower MED wins when both routes came from the same neighbouring AS.
6eBGP-learned routes beat iBGP-learned routes.
7Lower IGP cost to NEXT_HOP wins when the engine has a resolver.
8Older route wins.
9Lower advertising router / neighbour address wins as stable final tie-break.

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.
IPv4 unicast AFSupportedDefault working AF for classic BGP labs.
address-family ipv4SupportedIncludes VRF sub-mode for per-VRF neighbours.
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.
iBGP neighboursSupportedSame-AS neighbours participate in iBGP behaviour.
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-multihopSupportedStores and applies multihop eBGP reachability intent.
neighbor ... passwordBehaviour modelMatching password required on both sides; no real TCP-MD5 segment hashing.
neighbor ... fall-over bfdSupportedBFD-down forces BGP idle.
neighbor ... maximum-prefixSupportedTears down the session when accepted prefixes exceed the configured limit.
neighbor ... soft-reconfiguration inboundSupportedStores inbound pre-policy routes for received-route inspection.
neighbor ... advertisement-intervalSupportedCoalesces UPDATE bursts to the peer.
neighbor ... as-origination-intervalSupportedCoalesces locally-originated UPDATEs.
neighbor ... send-communityAcceptedCommunities are sent when present; the command is accepted for config fidelity.
Prefix-list policySupportedneighbor ... prefix-list NAME in / out.
Route-map policySupportedneighbor ... route-map NAME in / out.
AS-path access-listSupportedRegex-like AS_PATH matching in route-maps.
Standard community-listSupportedExact community matching.
Expanded community-listSupportedJavaScript-regex match against printed <asn>:<n> form.
set local-preferenceSupportedRoute-map action.
set as-path prependSupportedRoute-map action.
set metricSupportedMED route-map action.
set communitySupportedSupports replacement, additive, and none.
set ip next-hopSupportedRoute-map action.
set originSupportedRoute-map action.
bgp default local-preferenceSupportedDefault LOCAL_PREF for local originated routes.
bgp graceful-restartSupportedRestart and stale-path timers are modelled.
bgp confederation identifierSupportedPublic confederation AS.
bgp confederation peersSupportedMember sub-AS list.
aggregate-addressStoredAccepted and emitted. Current FIB programming does not yet originate the aggregate route.
Unnumbered BGPConfig modelStored for FRR / VyOS-style import, but IPv4 runtime sessions need numbered peers today.
Add-pathNot modelledOnly the selected best path is installed / advertised for normal IPv4 unicast.
Route flap dampingNot modelledAdvertisement interval is supported; full damping penalty logic is not.
RPKI / origin validationNot modelledPlanned as a later policy/compliance feature.
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.
neighbor 10.0.0.2 ebgp-multihop 4SupportedSupportedSupportedMultihop eBGP intent.
neighbor 10.0.0.2 password SECRETSupportedPartialSupportedBehaviour model for TCP-MD5-style password match.
neighbor 10.0.0.2 fall-over bfdSupportedNot yetPartialBFD integration exists in canonical model.
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 BLUESupportedPartialPartialPer-VRF IPv4 BGP for L3VPN edge cases.
address-family vpnv4SupportedPartialPartialMP-BGP VPNv4 scenarios.
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-restartSupportedSupportedSupportedRestart / stale-path timers where syntax is implemented.
bgp confederation identifier 65000SupportedPartialSupportedRFC 5065 model.
bgp confederation peers 65001 65002SupportedPartialSupportedMember sub-AS list.
aggregate-address 10.0.0.0 255.0.0.0StoredNot yetNot yetAccepted / emitted; aggregate route origination not yet active.
show ip bgpSupportedVendor-shaped viewVendor-shaped viewLoc-RIB / best-path table.
show ip bgp summarySupportedVendor-shaped viewVendor-shaped viewNeighbour session state.
show ip bgp neighborsSupportedVendor-shaped viewVendor-shaped viewNeighbour details.
show ip bgp neighbors <ip> received-routesSupportedPartialPartialRequires inbound storage / modelled RIB-In.
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.

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 match the printed AS_PATH representation, standard community-lists match exact community values, and expanded community-lists use JavaScript regular expressions against the printed asn:value form. Cisco’s special _ AS-path/community regex boundary syntax is not emulated.

Graceful restart keeps stale paths available during the configured restart window. That makes it useful for protocol-behaviour labs, but it is still a model, not a reproduction of every vendor’s restart helper edge case.

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.

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 implement add-path, full route flap damping, RPKI/origin validation, every vendor-specific default, or every AFI/SAFI a production router can carry. Aggregate-address is accepted and emitted, but aggregate route origination is not yet active in the FIB programmer.

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.