Skip to content

Controlling ExaBGP : API for received messages

Jonas Gröger edited this page Jun 3, 2016 · 11 revisions

What do the messages look like

This is the current format of ExaBGP message, this documentation SHOULD be valid for exabgp >= 3.0.17.
Please update this page if you find that the latest version format differ.

Some changes were done in ExaBGP 3.4.0 :

  • some extra fields are available (marked as such)
  • the time field change from an integer to a float ( ie: there is data after a dot )

The UPDATE message presented here are incomplete, another document will fully define them.

Notice that the UPDATE sample messages presented here are for TWO versions of ExaBGP, therefore format differ from one to another.

TCP connection established [neighbor-changes]

neighbor 192.168.0.1 connected

{ 
	"exabgp": "2.0", 
	"time": 1388408060, 
	"neighbor": { 
		"ip": "10.0.0.1", 
		"state": "connected" 
	} 
}

TCP connection closed [neighbor-changes]

neighbor 192.168.0.1 down

{ 
	"exabgp": "2.0", 
	"time": 1388408073, 
	"neighbor": { 
		"ip": "10.0.0.3", 
		"state": "down", 
		"reason": "" 
	} 
}

Peer connection not established [neighbor-changes]

TEXT MISSING

{ 
	"exabgp": "3.4.0", 
	"time": 1446681498, 
	"host" : "localhost", 
	"pid" : "1212", 
	"ppid" : "1211", 
	"counter": 1, 
	"type": "state", 
	"neighbor": { 
		"ip": "127.0.0.1", 
		"state": "down", 
		"reason": "connection to peer failed"
	}
}

BGP negotiation successful (openconfirm state) [neighbor-changes]

neighbor 192.168.0.1 up

{ 
	"exabgp": "2.0", 
	"time": 1388408061, 
	"neighbor": { 
		"ip": "10.0.0.2", 
		"state": "up" 
	} 
}

Start / End of UPDATE

neighbor 192.168.0.1 update start
neighbor 192.168.0.1 update end

JSON (not applicable)

Update (announcement) [receive-routes]

neighbor 192.168.0.1 update start
neighbor 192.168.0.1 announced route 1.1.0.0/16 next-hop 192.168.0.1 origin igp as-path [ 1 2 ]
neighbor 192.168.0.1 announced route 1.2.0.0/16 next-hop 192.168.0.1 origin igp as-path [ 1 2 ]
neighbor 192.168.0.1 update end

{ 
	"exabgp": "2.0", 
	"time": 1388408257, 
	"neighbor": { 
		"ip": "10.0.0.3", 
		"update": { 
			"attribute": { 
				"origin": "igp", 
				"as-path": [ [ 65003 ], [ ] ], 
				"atomic-aggregate": false 
			}, 
			"announce": { 
				"ipv4 unicast": { 
					"10.0.0.0/8": { 
						"next-hop": "1.2.3.4" 
					} 
				} 
			} 
		} 
	} 
}


{ 
   "exabgp": "3.3.0",
   "time": 1388767944,
   "neighbor": { 
      "ip": "127.0.0.1",
      "update": { 
         "attribute": { 
            "origin": "igp", 
            "as-path": [ 1, 2, 3, 4 ], 
            "med": 100, 
            "atomic-aggregate": false
         }, 
         "announce": { 
            "1.1.1.1" : { 
               "10.0.0.0/8": {  }, 
               "11.0.0.0/8": {  }, 
               "12.0.0.0/8": {  } 
            }
         }
      }
   }
}

{ 
	"exabgp": "3.3.0", 
	"time": 1389168507, 
	"neighbor": { 
		"ip": "10.0.0.2", 
		"update": { 
			"attribute": { 
				"origin": "igp", 
				"as-path": [ 65002 ], 
				"atomic-aggregate": false, 
				"extended-community": [ [ 128, 6, 0, 0, 0, 0, 0, 0 ] ] 
			}, 
			"announce": { 
				"null" : { 
					"flow-0": { 
						"string": "flow destination 1.2.3.4/32 source 10.0.0.1/32" 
					} 
				} 
			} 
		} 
	} 
}

Update (withdrawal) [receive-routes]

TEXT MISSING


{
   "exabgp": "2.0",
   "time": 1363100816,
   "neighbor": {
      "ip": "192.168.0.1",
      "update" : {
         "withdraw": {
            "ipv4 unicast": [ "110.0.0.0/24", "110.0.1.0/24" ]
         }
      }
   }
}

{ 
	"exabgp": "3.3.0", 
	"time": 1389168525, 
	"neighbor": { 
		"ip": "10.0.0.2", 
		"update": { 
			"withdraw": { 
				"ipv4 unicast": { 
					"192.0.2.1/32": {  } 
				} 
			} 
		} 
	} 
}

{ 
	"exabgp": "3.3.0", 
	"time": 1389168535, 
	"neighbor": { 
		"ip": "10.0.0.2", 
		"update": { 
			"withdraw": { 
				"ipv4 flow": { 
					"flow-1": { 
						"string": "flow destination 1.2.3.4/32 source 10.0.0.1/32" 
					} 
				} 
			} 
		} 
	} 
}

EOR

version 3.3.30
neighbor 10.0.1.2 announced eor 1/2

version before 3.3.30
neighbor 10.0.1.2 announced route eor 1/2

{
   "exabgp": "3.3.0",
   "time": 1388767226,
   "neighbor": { 
      "ip": "127.0.0.1",
      "update": {
         "announce": { 
            "null" : { 
               "eor": { 
                  "afi" : "ipv4",
                  "safi" : "multicast"
              }
            }
         }
      } 
   } 
}

Sent Packets [send-packets]

TEXT MISSING

{ 
	"exabgp": "2.0", 
	"time": 1388407936, 
	"neighbor": { 
		"ip": "10.0.0.4", 
		"update": { 
			"body": "0603506565722044652D636F6E66696775726564", 
			"header": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF002703", 
			"sent": 3  
		} 
	} 
}

{ 
	"exabgp": "3.3.0", 
	"time": 1388407936, 
	"neighbor": { 
		"ip": "10.0.0.4", 
		"message": { 
			"body": "0603506565722044652D636F6E66696775726564", 
			"header": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF002703", 
			"sent": 3  
		} 
	} 
}

Received Packets [receive-packets]

TEXT MISSING


{ 
	"exabgp": "2.0", 
	"time": 1388407641, 
	"neighbor": { 
		"ip": "10.0.0.3", 
		"update": { 
			"body": "000000144001010040020602010000FDEB4003040A000003180A03EF", 
			"received": 2, 
			"header": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF002F02"  
		} 
	} 
}

{ 
	"exabgp": "3.3.0", 
	"time": 1388407641, 
	"neighbor": { 
		"ip": "10.0.0.3", 
		"message": { 
			"body": "000000144001010040020602010000FDEB4003040A000003180A03EF", 
			"received": 2, 
			"header": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF002F02"  
		} 
	} 
}

Closing [sent by default]

shutdown

{ 
	"exabgp": "3.3.0", 
	"time": 1388408343, 
	"notification": "shutdown" 
}
Clone this wiki locally