Skip to content

Commit

Permalink
Merge a3a4f56 into ec4e309
Browse files Browse the repository at this point in the history
  • Loading branch information
mirceaulinic committed Apr 7, 2020
2 parents ec4e309 + a3a4f56 commit 2134c13
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 0 deletions.
16 changes: 16 additions & 0 deletions napalm_logs/config/junos/BGP_INCORRECT_AS_NUMBER.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
messages:
- error: BGP_INCORRECT_AS_NUMBER
tag: bgp_pp_recv
values:
peer: ([\w\d:\.]+)
asn: (\d+)
number: (\d+)
port: (\d+)
interface: (.+)
line: '{number}: NOTIFICATION sent to {peer}+{port} (proto): code 2 (Open Message Error) subcode 2 (bad peer AS number), Reason: no group for {peer}+{port} (proto) from AS {asn} found (peer as mismatch) in master({interface}), dropping him'
model: openconfig-bgp
mapping:
variables:
bgp//neighbors//neighbor//{peer}//state//peer_as: asn
static:
bgp//neighbors//neighbor//{peer}//state//session_state: OPENSENT
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<172>2020-03-31T08:41:59+00:00 some-switch rpd[4936]: bgp_pp_recv:4609: NOTIFICATION sent to 10.37.96.6+44759 (proto): code 2 (Open Message Error) subcode 2 (bad peer AS number), Reason: no group for 10.37.96.6+44759 (proto) from AS 4292019902 found (peer as mismatch) in master(ae1.0), dropping him
37 changes: 37 additions & 0 deletions tests/config/junos/BGP_INCORRECT_AS_NUMBER/default/yang.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"ip": "127.0.0.1",
"yang_message": {
"bgp": {
"neighbors": {
"neighbor": {
"10.37.96.6": {
"state": {
"session_state": "OPENSENT",
"peer_as": "10.37.96.6"
}
}
}
}
}
},
"facility": 21,
"timestamp": 1585644119,
"severity": 4,
"message_details": {
"hostPrefix": null,
"pri": "172",
"processId": "4936",
"facility": 21,
"severity": 4,
"message": "4609: NOTIFICATION sent to 10.37.96.6+44759 (proto): code 2 (Open Message Error) subcode 2 (bad peer AS number), Reason: no group for 10.37.96.6+44759 (proto) from AS 4292019902 found (peer as mismatch) in master(ae1.0), dropping him",
"date": "2020-03-31",
"tag": "bgp_pp_recv",
"host": "some-switch",
"processName": "rpd",
"time": "08:41:59+00:00"
},
"os": "junos",
"yang_model": "openconfig-bgp",
"host": "some-switch",
"error": "BGP_INCORRECT_AS_NUMBER"
}

0 comments on commit 2134c13

Please sign in to comment.