TOC PREV NEXT INDEX

GNU Zebra User's Guide


Packet Binary Dump Format

Zebra can dump routing protocol packets into files with binary format (also see "Dump BGP Packet and Table Commands").

The MRT header format is used for backwards compatibility with the MRT dump logs. The binary format should also be defined to support IPv4 addresses as socket addresses and / or routing entries.

This is the common header format, the same as that of MRT.

0
1
2
3
0
1
2
3
4
5
6
7
8
9
0
1
2
3
4
5
6
7
8
9
0
1
2
3
4
5
6
7
8
9
0
1
Time
type 
subtype

If type is PROTOCOL_BGP4MP, subtype is BGP4MP_STATE_CHANGE, and Address Family == IP (version 4)

0
1
2
3
0
1
2
3
4
5
6
7
8
9
0
1
2
3
4
5
6
7
8
9
0
1
2
3
4
5
6
7
8
9
0
1
Source AS number
Destination AS number
Interface Index
Address Family
Source IP address
Destination IP address
Old State
New State

Where State is the value defined in RFC1771.

If type is PROTOCOL_BGP4MP, subtype is BGP4MP_MESSAGE, and Address Family == IP (version 4).

0
1
2
3
0
1
2
3
4
5
6
7
8
9
0
1
2
3
4
5
6
7
8
9
0
1
2
3
4
5
6
7
8
9
0
1
Source AS number
Destination AS number
Interface Index
Address Family
Source IP address
Destination IP address
BGP Message Packet

Where BGP Message Packet is the whole contents of the BGP4 message including header portion.

If type is PROTOCOL_BGP4MP, subtype is BGP4MP_ENTRY, and Address Family == IP (version 4).

0

1

2

3

0

1

2

3

4

5

6

7

8

9

0

1

2

3

4

5

6

7

8

9

0

1

2

3

4

5

6

7

8

9

0

1

Time Last Change

Address Family

SAFI

Next Hop-Len

Next Hop Address

Prefix Length

Address Prefix (variable)

Attribute Length

BGP Attribute (variable length)

Where BGP Message Packet is the whole contents of the BGP4 message, including header portion.

If type is PROTOCOL_BGP4MP, subtype is BGP4MP_MESSAGE, and Address Family == IP version 6

BGP4 Attribute must not contain MP_UNREACH_NLRI

0
1
2
3
0
1
2
3
4
5
6
7
8
9
0
1
2
3
4
5
6
7
8
9
0
1
2
3
4
5
6
7
8
9
0
1
View #
Status
Time Last Change
Address Family
SAFI
Next Hop-Len
Next Hop Address
Next Hop Address (cont'd)
Next Hop Address (cont'd)
Next Hop Address (cont'd)
Prefix Length
Address Prefix (variable)
Address Prefix (con'td)
Attribute Length
BGP Attribute (variable length)

.

If BGP Attribute has MP_REACH_NLRI field, it must have zero length NLRI, for example, MP_REACH_NLRI has only Address Family, SAFI and next-hop values.

If type is PROTOCOL_BGP4MP and subtype is BGP4MP_SNAPSHOT,

0
1
2
3
0
1
2
3
4
5
6
7
8
9
0
1
2
3
4
5
6
7
8
9
0
1
2
3
4
5
6
7
8
9
0
1
View #
File name (variable)

The file specified in File Name contains all routing entries, which are in the format of subtype == BGP4MP_ENTRY.

Constants:

/* type value */
#define MSG_PROTOCOL_BGP4MP 16
/* subtype value */
#define BGP4MP_STATE_CHANGE 0
#define BGP4MP_MESSAGE 1
#define BGP4MP_ENTRY 2
#define BGP4MP_SNAPSHOT 3

If type is PROTOCOL_BGP4MP, subtype is BGP4MP_STATE_CHANGE, and Address Family == IP version 6

0
1
2
3
0
1
2
3
4
5
6
7
8
9
0
1
2
3
4
5
6
7
8
9
0
1
2
3
4
5
6
7
8
9
0
1
Source AS number
Destination AS number
Interface Index
Address Family
Source IP address
Source IP address (Cont'd)
Source IP address (Cont'd)
Source IP address (Cont'd)
Destination IP address
Destination IP address (Cont'd)
Destination IP address (Cont'd)
Destination IP address (Cont'd)
Old State
New State

If type is PROTOCOL_BGP4MP, subtype is BGP4MP_MESSAGE, and Address Family == IP version 6

0
1
2
3
0
1
2
3
4
5
6
7
8
9
0
1
2
3
4
5
6
7
8
9
0
1
2
3
4
5
6
7
8
9
0
1
Source AS number
Destination AS number
Interface Index
Address Family
Source IP address
Source IP address (Cont'd)
Source IP address (Cont'd)
Source IP address (Cont'd)
Destination IP address
Destination IP address (Cont'd)
Destination IP address (Cont'd)
Destination IP address (Cont'd)
BGP Message Packet





LynuxWorks, Inc.
855 Branham Lane East
San Jose, CA 95138
http://www.lynuxworks.com
1.800.255.5969
TOC PREV NEXT INDEX