Lesson Contents
This packet capture contains a BGP UPDATE with the AIGP (Accumulated IGP Metric) attribute. The route is 22.22.22.22/32, sent over iBGP from 192.168.23.2 to 192.168.23.3, and it carries an IGP metric of 100 as a BGP attribute. BGP normally knows nothing about IGP metrics, so the next router can now compare paths by their total IGP cost.
In the packet, AIGP is a small TLV inside path attribute 26. The AIGP lesson explains where it fits in the BGP path selection and how to configure it. More captures are in the Packet Capture Library.
Want to open this capture in Wireshark yourself? The pcap file is free with a NetworkLessons account. Your free account also unlocks all our free lessons and every capture in the Packet Capture Library.
Create a free account to download the pcap
Already have an account? Log in and the download button appears here.
Capture overview
| File | bgp-update-aigp-attribute.pcapng |
| Packets | 1 |
| Protocol | BGP-4, AIGP attribute (RFC 7311) |
| Transport | TCP 179, iBGP from 192.168.23.2 to 192.168.23.3 |
| Devices | Cisco IOS routers |
| Wireshark filter | bgp.update.path_attribute.aigp or bgp |
Packet walkthrough
The UPDATE (packet 1)
Border Gateway Protocol - UPDATE Message
Length: 70
Type: UPDATE Message (2)
Withdrawn Routes Length: 0
Total Path Attribute Length: 42
Path attributes
Path Attribute - ORIGIN: IGP
Flags: 0x40, Transitive, Well-known, Complete
Type Code: ORIGIN (1)
Length: 1
Origin: IGP (0)
Path Attribute - AS_PATH: empty
Flags: 0x40, Transitive, Well-known, Complete
Type Code: AS_PATH (2)
Length: 0
Path Attribute - NEXT_HOP: 192.168.23.2
Flags: 0x40, Transitive, Well-known, Complete
Type Code: NEXT_HOP (3)
Length: 4
Next hop: 192.168.23.2
Path Attribute - MULTI_EXIT_DISC: 0
Flags: 0x80, Optional, Non-transitive, Complete
Type Code: MULTI_EXIT_DISC (4)
Length: 4
Multiple exit discriminator: 0
Path Attribute - LOCAL_PREF: 100
Flags: 0x40, Transitive, Well-known, Complete
Type Code: LOCAL_PREF (5)
Length: 4
Local preference: 100
Path Attribute - AIGP: 100
Flags: 0x80, Optional, Non-transitive, Complete
Type Code: AIGP (26)
Length: 11
AIGP Attribute: 100
AIGP attribute type: Type AIGP TLV (1)
AIGP TLV length: 11
AIGP Accumulated IGP Metric: 100
Network Layer Reachability Information (NLRI)
22.22.22.22/32
NLRI prefix length: 32
NLRI prefix: 22.22.22.22
Let’s look at the important fields:
- Path attribute type 26, AIGP: an optional non-transitive attribute (flags 0x80). A router that doesn’t support AIGP must not pass it on, so AIGP stays inside the network that uses it.
- AIGP TLV, type 1, length 11: the attribute holds TLVs. Type 1 is the only one defined: 1 byte of type, 2 bytes of length and an 8-byte metric. The 64-bit value leaves room for metrics summed over many IGP domains.
- Accumulated IGP Metric 100: the IGP cost so far. When a router passes the route on and changes the next hop, it adds its own IGP cost to reach the previous next hop.
- LOCAL_PREF 100, empty AS_PATH: an iBGP route. AIGP is compared after LOCAL_PREF and before AS_PATH length in the path selection, so it only decides between paths that tie on LOCAL_PREF.
- The second, empty UPDATE in the same TCP segment is the End-of-RIB marker.