New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add large BGP communities support #13

Merged
merged 1 commit into from Nov 27, 2016

Conversation

Projects
None yet
2 participants
@pierky
Contributor

pierky commented Nov 7, 2016

Add support for Large BGP Communities attributes: https://tools.ietf.org/html/draft-ietf-idr-large-community and also http://largebgpcommunities.net/

$ ./examples/print_all.py samples/quagga_bgp_large_communities
...
BGP Message
    Marker: -- ignored --
    Length: 75
    Type: 2(UPDATE)
    Withdrawn Routes Length: 0
    Total Path Attribute Length: 47
    Path Attribute Flags/Type/Length: 0x40/1/1
        ORIGIN: 0(IGP)
    Path Attribute Flags/Type/Length: 0x40/2/6
        AS_PATH
            Path Segment Type: 2(AS_SEQUENCE)
            Path Segment Length: 1
            Path Segment Value: 65536
    Path Attribute Flags/Type/Length: 0x40/3/4
        NEXT_HOP: 192.0.2.2
    Path Attribute Flags/Type/Length: 0xc0/32/24
        LARGE_COMMUNITY: 65535:1:1 4294967295:4294967295:4294967295
    NLRI: 203.0.113.16/32
...
$ ./examples/mrt2exabgp.py -G samples/quagga_bgp_large_communities
announce attributes origin IGP as-path [65536 ] large-community [65535:1:1 4294967295:4294967295:4294967295] next-hop 192.0.2.2 nlri 203.0.113.16/32
announce attributes origin IGP as-path [65536 ] large-community [65536:1:1 65536:1:2] next-hop 192.0.2.2 nlri 203.0.113.12/32
announce attributes origin IGP as-path [65536 ] large-community [65536:1:1] next-hop 192.0.2.2 nlri 203.0.113.11/32
announce attributes origin IGP as-path [65536 ] large-community [65536:0:1 65536:1:0] next-hop 192.0.2.2 nlri 203.0.113.15/32
announce attributes origin IGP as-path [65536 ] large-community [65536:1:1 65536:1:2 65536:1:3] next-hop 192.0.2.2 nlri 203.0.113.13/32
add large BGP communities support
BGP Path Attribute 32 draft-ietf-idr-large-community

@t2mune t2mune merged commit cf05346 into t2mune:master Nov 27, 2016

@t2mune

This comment has been minimized.

Show comment
Hide comment
@t2mune

t2mune Nov 27, 2016

Owner

Thank you for letting us know about this attribute❗️
I confirmed that it works well by using your code😄

% python mrtparse/examples/print_all.py mrt-20161637 | less
...
---------------------------------------------------------------
MRT Header
    Timestamp: 1480264679(2016-11-27 16:37:59)
    Type: 16(BGP4MP)
    Subtype: 4(BGP4MP_MESSAGE_AS4)
    Length: 107
BGP4MP_MESSAGE_AS4
    Peer AS Number: 65000
    Local AS Number: 65000
    Interface Index: 0
    Address Family: 1(IPv4)
    Peer IP Address: 192.168.0.33
    Local IP Address: 192.168.0.13
BGP Message
    Marker: -- ignored --
    Length: 87
    Type: 2(UPDATE)
    Withdrawn Routes Length: 0
    Total Path Attribute Length: 60
    Path Attribute Flags/Type/Length: 0x40/1/1
        ORIGIN: 0(IGP)
    Path Attribute Flags/Type/Length: 0x40/2/0
        AS_PATH
    Path Attribute Flags/Type/Length: 0x40/3/4
        NEXT_HOP: 192.168.0.33
    Path Attribute Flags/Type/Length: 0x40/5/4
        LOCAL_PREF: 100
    Path Attribute Flags/Type/Length: 0xc0/32/36
        LARGE_COMMUNITY: 65000:4294967295:1 65000:4294967295:2 65000:4294967295:3
    NLRI: 10.0.1.0/24
---------------------------------------------------------------
...
Owner

t2mune commented Nov 27, 2016

Thank you for letting us know about this attribute❗️
I confirmed that it works well by using your code😄

% python mrtparse/examples/print_all.py mrt-20161637 | less
...
---------------------------------------------------------------
MRT Header
    Timestamp: 1480264679(2016-11-27 16:37:59)
    Type: 16(BGP4MP)
    Subtype: 4(BGP4MP_MESSAGE_AS4)
    Length: 107
BGP4MP_MESSAGE_AS4
    Peer AS Number: 65000
    Local AS Number: 65000
    Interface Index: 0
    Address Family: 1(IPv4)
    Peer IP Address: 192.168.0.33
    Local IP Address: 192.168.0.13
BGP Message
    Marker: -- ignored --
    Length: 87
    Type: 2(UPDATE)
    Withdrawn Routes Length: 0
    Total Path Attribute Length: 60
    Path Attribute Flags/Type/Length: 0x40/1/1
        ORIGIN: 0(IGP)
    Path Attribute Flags/Type/Length: 0x40/2/0
        AS_PATH
    Path Attribute Flags/Type/Length: 0x40/3/4
        NEXT_HOP: 192.168.0.33
    Path Attribute Flags/Type/Length: 0x40/5/4
        LOCAL_PREF: 100
    Path Attribute Flags/Type/Length: 0xc0/32/36
        LARGE_COMMUNITY: 65000:4294967295:1 65000:4294967295:2 65000:4294967295:3
    NLRI: 10.0.1.0/24
---------------------------------------------------------------
...

@pierky pierky deleted the pierky:large_bgp_communities branch Nov 27, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment