R5.1.0 - 4-Octet ASN :: config node does not pass 4 Octet ASN to the control and peering with MX fails.

Bug #1794031 reported by Ritam Gangopadhyay
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
Trunk
Fix Committed
High
Nikhil Bansal

Bug Description

I saw that from config, the ASN coming to the control-node still seems to be 64512 only.

2018-09-21 12:03:20.966 BgpConfigNeighborUpdateTrace: Neighbor default-domain:default-project:ip-fabric:__default__:blr-mx2 AdminDown 0 Passive 0 Local Identifier 192.168.100.11 Local AS 64512 Peer Address 192.168.100.100 Peer AS 75000 Address Families families= [ [ e-vpn, erm-vpn, inet-vpn, inet6-vpn, route-target, ] ] Keys NIL keys= [ [ ] ] controller/src/bgp/bgp_config_ifmap.cc 1288

I tried to modify the ASN in the GlobalSystemConfig to 75000, but see that API doesn't take any value between 1-65534. Is there some knob that we can modify to allow 4-byte ASN number:

>>> g1=vh.global_system_config_read(id='c66ae004-b1f0-4a13-b117-85644c7994d9')
>>> g1.get_autonomous_system()
64512
>>> g1.set_autonomous_system(75000)
>>> vh.global_system_config_update(g1)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/site-packages/vnc_api/vnc_api.py", line 51, in wrapper
    return func(self, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/vnc_api/vnc_api.py", line 719, in _object_update
    OP_PUT, uri, data=json_body)
  File "/usr/lib/python2.7/site-packages/vnc_api/vnc_api.py", line 1019, in _request_server
    retry_after_authn=retry_after_authn, retry_count=retry_count)
  File "/usr/lib/python2.7/site-packages/vnc_api/vnc_api.py", line 1095, in _request
    raise BadRequest(status, content)
vnc_api.exceptions.BadRequest: Bad property in http_put: Error validating property autonomous_system: value must be between 1 and 65534

Thanks & Regards,
Ganesha HV.
"To be conscious that you're ignorant, is a great step to success" - Dr.Kalam
________________________________________
From: Ritam Gangopadhyay
Sent: Friday, September 21, 2018 1:04:15 PM
To: Nikhil Bansal
Cc: Ganesha H V; Sudheendra Rao
Subject: Peering fails when ASN is set to 75000.

Hi Nikhil,

       I have configured internal bgp on the MX with ASN as 75000 and on the controller I added the bgp router with same configs. I see peering is failing with this. Am I going wrong with the configuration somewhere.

[edit]
root@blr-mx2# run show bgp group testbed_nodei17_i19_c28_g37_c10_i20_c33
Group Type: Internal AS: 75000 Local AS: 75000
  Name: testbed_nodei17_i19_c28_g37_c10_i20_c33 Index: 13 Flags: <Export Eval>
  Options: <LocalAS>
  Holdtime: 0 Local AS: 75000 Local System AS: 75000
  Total peers: 1 Established: 0
  192.168.100.11
  Trace options: detail packets
  Trace file: /var/log/bgp_4byte_asn.log size 65535 files 10

[edit]
root@blr-mx2#

Logs from MX:-
Sep 21 07:13:45.566882 BGP RECV 192.168.100.11+179 -> 192.168.100.100+60674
Sep 21 07:13:45.566941 BGP RECV message type 1 (Open) length 71
Sep 21 07:13:45.566969 BGP RECV version 4 as 64512 holdtime 90 id 192.168.100.11 parmlen 42
Sep 21 07:13:45.566986 BGP RECV MP capability AFI=1, SAFI=128
Sep 21 07:13:45.567002 BGP RECV MP capability AFI=2, SAFI=128
Sep 21 07:13:45.567017 BGP RECV MP capability AFI=1, SAFI=132
Sep 21 07:13:45.567033 BGP RECV MP capability AFI=25, SAFI=70
Sep 21 07:13:45.567048 BGP RECV MP capability AFI=1, SAFI=243
Sep 21 07:13:45.567067 BGP RECV 4 Byte AS-Path capability (65), as_num 64512
Sep 21 07:13:45.567085 BGP RECV Restart capability, code=64, time=0, flags=
Sep 21 07:13:45.567289 bgp_parse_open_options: peer 192.168.100.11 (Internal AS 75000): unsupported AF 1 SAFI 243
Sep 21 07:13:45.567360 bgp_process_open:4073: NOTIFICATION sent to 192.168.100.11 (Internal AS 75000): code 2 (Open Message Error) subcode 2 (bad peer AS number), Reason: peer 192.168.100.11 (Internal AS 75000) claims 64512, 75000 configured
Sep 21 07:13:45.567385 BGP_75000.192.168.100.11+179: send proc: sending 21 bytes
Sep 21 07:13:45.567409
Sep 21 07:13:45.567409 BGP SEND 192.168.100.100+60674 -> 192.168.100.11+179
Sep 21 07:13:45.567435 BGP SEND message type 3 (Notification) length 21
Sep 21 07:13:45.567452 BGP SEND Notification code 2 (Open Message Error) subcode 2 (bad peer AS number)
Sep 21 07:13:45.567567 BGP_75000.192.168.100.11+179: send proc: writev 21/21 bytes, rc 1
Sep 21 07:13:45.567609 bgp_send_deactivate:2554: 192.168.100.11 (Internal AS 75000) ,flags=0x0: removed from active list
Sep 21 07:14:00.971174

This is the configuration on the router:-

[edit]
root@blr-mx2# show routing-options autonomous-system
75000;

[edit]
root@blr-mx2# show protocols bgp group testbed_nodei17_i19_c28_g37_c10_i20_c33
type internal;
traceoptions {
    file bgp_4byte_asn.log size 65535 world-readable;
    flag packets detail;
}
local-address 192.168.100.100;
keep all;
family inet-vpn {
    unicast;
}
family route-target;
local-as 75000;
neighbor 192.168.100.11 {
    peer-as 75000;
}

The bgp-router config on the control node:-
[root@nodec28 ~]# curl -X GET -H "X-Auth-Token: dd0e878b97514fbca914ca034072f917" -H "Content-Type: application/json; charset=UTF-8" http://10.204.217.13:8082/bgp-router/d84af715-31b2-4798-9ab7-670f0fbc72ad | python -m json.tool
  % Total % Received % Xferd Average Speed Time Time Time Current
                                 Dload Upload Total Spent Left Speed
100 1674 100 1674 0 0 17830 0 --:--:-- --:--:-- --:--:-- 18000
{
    "bgp-router": {
        "bgp_router_parameters": {
            "address": "192.168.100.100",
            "autonomous_system": 75000,
            "identifier": "192.168.100.100",
            "local_autonomous_system": 75000
        },
        "bgp_router_refs": [
            {
                "attr": {
                    "session": [
                        {
                            "attributes": [
                                {
                                    "address_families": {
                                        "family": []
                                    },
                                    "admin_down": false,
                                    "as_override": false,
                                    "auth_data": null,
                                    "bgp_router": null,
                                    "family_attributes": [],
                                    "hold_time": 0,
                                    "local_autonomous_system": 0,
                                    "loop_count": 0,
                                    "passive": false,
                                    "private_as_action": null,
                                    "route_origin_override": null
                                }
                            ],
                            "uuid": null
                        }
                    ]
                },
                "href": "http://10.204.217.13:8082/bgp-router/904a443a-47fb-4e45-a59a-699d9134dee2",
                "to": [
                    "default-domain",
                    "default-project",
                    "ip-fabric",
                    "__default__",
                    "nodec28"
                ],
                "uuid": "904a443a-47fb-4e45-a59a-699d9134dee2"
            }
        ],
        "display_name": "blr-mx2",
        "fq_name": [
            "default-domain",
            "default-project",
            "ip-fabric",
            "__default__",
            "blr-mx2"
        ],
        "href": "http://10.204.217.13:8082/bgp-router/d84af715-31b2-4798-9ab7-670f0fbc72ad",
        "id_perms": {
            "created": "2018-09-21T06:29:06.656271",
            "creator": null,
            "description": null,
            "enable": true,
            "last_modified": "2018-09-21T06:49:24.644000",
            "permissions": {
                "group": "heat_stack_owner",
                "group_access": 7,
                "other_access": 7,
                "owner": "admin",
                "owner_access": 7
            },
            "user_visible": true,
            "uuid": {
                "uuid_lslong": 11148492716965130925,
                "uuid_mslong": 15585541130869163928
            }
        },
        "name": "blr-mx2",
        "parent_href": "http://10.204.217.13:8082/routing-instance/284d6cfa-18b8-4dff-9e82-de3b78bab659",
        "parent_type": "routing-instance",
        "parent_uuid": "284d6cfa-18b8-4dff-9e82-de3b78bab659",
        "perms2": {
            "global_access": 0,
            "owner": "cloud-admin",
            "owner_access": 7,
            "share": []
        },
        "uuid": "d84af715-31b2-4798-9ab7-670f0fbc72ad"
    }
}
[root@nodec28 ~]#

Regards,
Ritam.

Tags: bgp config
Revision history for this message
Ritam Gangopadhyay (ritam) wrote :
Download full text (4.2 KiB)

I was able to change the Local ASN on the bgp_router using the following snippet:

>>> b1=vh.bgp_router_read(id='d84af715-31b2-4798-9ab7-670f0fbc72ad')
>>> ref_obj_list = [ref['to'] for ref in b1.get_bgp_router_refs()]
>>> ref_data_list = [ref['attr'] for ref in b1.get_bgp_router_refs()]
>>> ref_data_list
[session = [uuid = None, attributes = [bgp_router = None, admin_down = False, passive = False, as_override = False, hold_time = 0, loop_count = 0, local_autonomous_system = 0, address_families = family = [], auth_data = None, family_attributes = [], private_as_action = None, route_origin_override = None]]]
>>> ref_obj_list
[[u'default-domain', u'default-project', u'ip-fabric', u'__default__', u'nodec28']]
>>> ref_data_list[0].session[0].attributes[0]
>>> ref_data_list[0].session[0].attributes[0].set_local_autonomous_system(75000)
>>> ref_data_list
[session = [uuid = None, attributes = [bgp_router = None, admin_down = False, passive = False, as_override = False, hold_time = 0, loop_count = 0, local_autonomous_system = 75000, address_families = family = [], auth_data = None, family_attributes = [], private_as_action = None, route_origin_override = None]]]
>>> b1.set_bgp_router_list(ref_obj_list, ref_data_list)
>>> vh.bgp_router_update(b1)
u'{"bgp-router": {"href": "http://10.204.217.13:8082/bgp-router/d84af715-31b2-4798-9ab7-670f0fbc72ad", "uuid": "d84af715-31b2-4798-9ab7-670f0fbc72ad"}}'
>>> vh.bgp_router_update(b1)
u'{"bgp-router": {"href": "http://10.204.217.13:8082/bgp-router/d84af715-31b2-4798-9ab7-670f0fbc72ad", "uuid": "d84af715-31b2-4798-9ab7-670f0fbc72ad"}}'
>>>

Now the BGP session is Established.

[edit]
root@blr-mx2# run show bgp neighbor 192.168.100.11 | grep Established
  Type: Internal State: Established Flags: <Sync>

[edit]
root@blr-mx2# run show bgp neighbor 192.168.100.11 | grep byte
  Peer supports 4 byte AS extension (peer-as 75000)
  Trace file: /var/log/bgp_4byte_asn.log size 65535 files 10

[edit]
root@blr-mx2# run show bgp summary
Groups: 11 Peers: 16 Down peers: 14
Table Tot Paths Act Paths Suppressed History Damp State Pending
bgp.rtarget.0
                      16 16 0 0 0 0
bgp.l3vpn.0
                       0 0 0 0 0 0
inet6.0
                       0 0 0 0 0 0
bgp.l3vpn-inet6.0
                       0 0 0 0 0 0
bgp.evpn.0
                       0 0 0 0 0 0
inet.0
                       0 0 0 0 0 0
Peer AS InPkt OutPkt OutQ Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped...
10.10.11.16 64512 0 0 0 509 4d 5:10:42 Active
10.10.11.17 64512 0 0 0 559 4d 5:10:04 Active
10.10.11.18 64512 0 0 0 497 4d 5:09:38 Active
10.204.216.232 64520 19 19 0 16 7:16 Establ
  bgp.rtarget.0: 13/13/13/0
  bgp.l3vpn.0: 0/0/0/0
10.204.217.4 64512...

Read more...

Revision history for this message
Nikhil Bansal (nikhilb-u) wrote :

It is fixed as part of this checkin:
https://review.opencontrail.org/#/c/46400/

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.