bgp4r 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/COPYING +674 -0
- data/LICENSE.txt +53 -0
- data/README.rdoc +259 -0
- data/bgp/aggregator.rb +104 -0
- data/bgp/as_path.rb +223 -0
- data/bgp/atomic_aggregate.rb +42 -0
- data/bgp/attribute.rb +181 -0
- data/bgp/attributes.rb +34 -0
- data/bgp/cluster_list.rb +117 -0
- data/bgp/common.rb +204 -0
- data/bgp/communities.rb +139 -0
- data/bgp/extended_communities.rb +107 -0
- data/bgp/extended_community.rb +254 -0
- data/bgp/iana.rb +269 -0
- data/bgp/io.rb +116 -0
- data/bgp/label.rb +94 -0
- data/bgp/local_pref.rb +75 -0
- data/bgp/message.rb +894 -0
- data/bgp/mp_reach.rb +208 -0
- data/bgp/multi_exit_disc.rb +76 -0
- data/bgp/neighbor.rb +291 -0
- data/bgp/next_hop.rb +63 -0
- data/bgp/nlri.rb +303 -0
- data/bgp/orf.rb +88 -0
- data/bgp/origin.rb +88 -0
- data/bgp/originator_id.rb +73 -0
- data/bgp/path_attribute.rb +210 -0
- data/bgp/prefix_orf.rb +263 -0
- data/bgp/rd.rb +107 -0
- data/examples/bgp +65 -0
- data/examples/routegen +85 -0
- data/examples/routegen.yml +50 -0
- data/test/aggregator_test.rb +66 -0
- data/test/as_path_test.rb +149 -0
- data/test/atomic_aggregate_test.rb +35 -0
- data/test/attribute_test.rb +57 -0
- data/test/cluster_list_test.rb +39 -0
- data/test/common_test.rb +68 -0
- data/test/communities_test.rb +75 -0
- data/test/extended_communities_test.rb +111 -0
- data/test/extended_community_test.rb +93 -0
- data/test/label_test.rb +50 -0
- data/test/local_pref_test.rb +43 -0
- data/test/message_test.rb +294 -0
- data/test/mp_reach_test.rb +143 -0
- data/test/multi_exit_disc_test.rb +46 -0
- data/test/neighbor_test.rb +50 -0
- data/test/next_hop_test.rb +37 -0
- data/test/nlri_test.rb +189 -0
- data/test/origin_test.rb +57 -0
- data/test/originator_id_test.rb +38 -0
- data/test/path_attribute_test.rb +127 -0
- data/test/prefix_orf_test.rb +97 -0
- data/test/rd_test.rb +44 -0
- metadata +133 -0
@@ -0,0 +1,107 @@
|
|
1
|
+
#--
|
2
|
+
# Copyright 2008, 2009 Jean-Michel Esnault.
|
3
|
+
# All rights reserved.
|
4
|
+
# See LICENSE.txt for permissions.
|
5
|
+
#
|
6
|
+
#
|
7
|
+
# This file is part of BGP4R.
|
8
|
+
#
|
9
|
+
# BGP4R is free software: you can redistribute it and/or modify
|
10
|
+
# it under the terms of the GNU General Public License as published by
|
11
|
+
# the Free Software Foundation, either version 3 of the License, or
|
12
|
+
# (at your option) any later version.
|
13
|
+
#
|
14
|
+
# BGP4R is distributed in the hope that it will be useful,
|
15
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
16
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
17
|
+
# GNU General Public License for more details.
|
18
|
+
#
|
19
|
+
# You should have received a copy of the GNU General Public License
|
20
|
+
# along with BGP4R. If not, see <http://www.gnu.org/licenses/>.
|
21
|
+
#++
|
22
|
+
|
23
|
+
|
24
|
+
require 'bgp/attribute'
|
25
|
+
require 'bgp/extended_community'
|
26
|
+
|
27
|
+
module BGP
|
28
|
+
|
29
|
+
class Extended_communities < Attr
|
30
|
+
|
31
|
+
attr_reader :communities
|
32
|
+
|
33
|
+
def initialize(*args)
|
34
|
+
@flags, @type = OPTIONAL_TRANSITIVE, EXTENDED_COMMUNITY
|
35
|
+
|
36
|
+
if args[0].is_a?(String) and args[0].is_packed?
|
37
|
+
parse(args[0])
|
38
|
+
elsif args[0].is_a?(self.class)
|
39
|
+
parse(args[0].encode, *args[1..-1])
|
40
|
+
else
|
41
|
+
add(*args)
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
def add(*args)
|
46
|
+
@communities ||=[]
|
47
|
+
args.flatten.each do |arg|
|
48
|
+
if arg.is_a?(String) and arg.split(' ').size>1
|
49
|
+
arg.split.each { |v| @communities << Extended_community.factory(v) }
|
50
|
+
elsif arg.is_a?(String) and arg.split(',').size>1
|
51
|
+
arg.split(',').each { |v| @communities << Extended_community.factory(v) }
|
52
|
+
elsif arg.is_a?(Extended_community)
|
53
|
+
@communities << arg
|
54
|
+
else
|
55
|
+
@communities << Extended_community.factory(arg)
|
56
|
+
end
|
57
|
+
end
|
58
|
+
self
|
59
|
+
end
|
60
|
+
alias << add
|
61
|
+
|
62
|
+
def extended_communities
|
63
|
+
len = @communities.size*8
|
64
|
+
s=[]
|
65
|
+
s << ''
|
66
|
+
s << " Carried Extended communities"
|
67
|
+
s << " " + @communities.collect { |c| c.to_s }.join("\n ")
|
68
|
+
s.join("\n")
|
69
|
+
end
|
70
|
+
|
71
|
+
def to_s(method=:default)
|
72
|
+
super(extended_communities, method)
|
73
|
+
end
|
74
|
+
|
75
|
+
def to_arr
|
76
|
+
@communities.collect { |c| c.to_i }
|
77
|
+
end
|
78
|
+
|
79
|
+
def encode
|
80
|
+
super(@communities.collect { |comm| comm.encode }.join)
|
81
|
+
end
|
82
|
+
|
83
|
+
def parse(s)
|
84
|
+
@flags, @type, len, value=super(s)
|
85
|
+
while value.size>0
|
86
|
+
self << Extended_community.factory(value.slice!(0,8).is_packed)
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
90
|
+
def sort
|
91
|
+
Extended_communities.new(*to_arr.sort)
|
92
|
+
end
|
93
|
+
|
94
|
+
def sort!
|
95
|
+
@communities = @communities.sort_by { |c| c.to_i }
|
96
|
+
self
|
97
|
+
end
|
98
|
+
|
99
|
+
def <=>(other)
|
100
|
+
sort.to_shex <=> other.sort.to_shex
|
101
|
+
end
|
102
|
+
|
103
|
+
end
|
104
|
+
|
105
|
+
end
|
106
|
+
|
107
|
+
load "../test/#{ File.basename($0.gsub(/.rb/,'_test.rb'))}" if __FILE__ == $0
|
@@ -0,0 +1,254 @@
|
|
1
|
+
#--
|
2
|
+
# Copyright 2008, 2009 Jean-Michel Esnault.
|
3
|
+
# All rights reserved.
|
4
|
+
# See LICENSE.txt for permissions.
|
5
|
+
#
|
6
|
+
#
|
7
|
+
# This file is part of BGP4R.
|
8
|
+
#
|
9
|
+
# BGP4R is free software: you can redistribute it and/or modify
|
10
|
+
# it under the terms of the GNU General Public License as published by
|
11
|
+
# the Free Software Foundation, either version 3 of the License, or
|
12
|
+
# (at your option) any later version.
|
13
|
+
#
|
14
|
+
# BGP4R is distributed in the hope that it will be useful,
|
15
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
16
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
17
|
+
# GNU General Public License for more details.
|
18
|
+
#
|
19
|
+
# You should have received a copy of the GNU General Public License
|
20
|
+
# along with BGP4R. If not, see <http://www.gnu.org/licenses/>.
|
21
|
+
#++
|
22
|
+
|
23
|
+
|
24
|
+
require 'bgp/common'
|
25
|
+
require 'bgp/attribute'
|
26
|
+
|
27
|
+
module BGP
|
28
|
+
|
29
|
+
module ATTR::XTENDED_COMMUNITY
|
30
|
+
|
31
|
+
ROUTE_TARGET = 2
|
32
|
+
ROUTE_ORIGIN = 3
|
33
|
+
OSPF_DOMAIN_ID = 5
|
34
|
+
OSPF_ROUTER_ID = 7
|
35
|
+
BGP_DATA_COLLECT = 8
|
36
|
+
|
37
|
+
IANA_AUTHORITY_BIT = 0x8
|
38
|
+
NON_TRANSITIVE = 0x4
|
39
|
+
|
40
|
+
TWO_OCTET_AS = 0
|
41
|
+
IPV4_ADDR = 1
|
42
|
+
OPAQUE = 3
|
43
|
+
|
44
|
+
def _encoded_value_
|
45
|
+
case @type & 3
|
46
|
+
when TWO_OCTET_AS
|
47
|
+
[@global, @local].pack('nN')
|
48
|
+
when IPV4_ADDR
|
49
|
+
[@global, @local].pack('Nn')
|
50
|
+
when OPAQUE
|
51
|
+
[@global].pack('H12')
|
52
|
+
else
|
53
|
+
raise RuntimeError, "bogus type: #{@type}"
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
def encode
|
58
|
+
[@type, @subtype, _encoded_value_].pack('CCa6')
|
59
|
+
end
|
60
|
+
|
61
|
+
def parse(s)
|
62
|
+
@type, @subtype = s.slice!(0,2).unpack('CC')
|
63
|
+
case @type & 3
|
64
|
+
when TWO_OCTET_AS ; @global, @local = s.unpack('nN')
|
65
|
+
when IPV4_ADDR
|
66
|
+
@global, @local = s.unpack('Nn')
|
67
|
+
when OPAQUE
|
68
|
+
@global = s.unpack('H12')
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
def is_opaque?
|
73
|
+
@type & OPAQUE > 0
|
74
|
+
end
|
75
|
+
|
76
|
+
def is_ipv4_addr?
|
77
|
+
@type & IPV4_ADDR > 0
|
78
|
+
end
|
79
|
+
|
80
|
+
def is_two_octet_asn?
|
81
|
+
@type & 3 == TWO_OCTET_AS
|
82
|
+
end
|
83
|
+
|
84
|
+
def two_octet
|
85
|
+
@type &= ~3
|
86
|
+
end
|
87
|
+
|
88
|
+
def ipv4_addr
|
89
|
+
@type &= ~3
|
90
|
+
@type |= 1
|
91
|
+
end
|
92
|
+
|
93
|
+
def opaque
|
94
|
+
@type |= 3
|
95
|
+
end
|
96
|
+
|
97
|
+
def non_transitive
|
98
|
+
@type |= 0x40
|
99
|
+
end
|
100
|
+
|
101
|
+
def transitive
|
102
|
+
@type &= ~0x40
|
103
|
+
end
|
104
|
+
|
105
|
+
def is_transitive?
|
106
|
+
@type & 0x40 == 0
|
107
|
+
end
|
108
|
+
|
109
|
+
def non_transitive?
|
110
|
+
not is_transitive?
|
111
|
+
end
|
112
|
+
|
113
|
+
def to_i
|
114
|
+
encode.unpack('H*')[0].to_i(16)
|
115
|
+
end
|
116
|
+
|
117
|
+
def <=>(other)
|
118
|
+
to_i <=> other.to_i
|
119
|
+
end
|
120
|
+
|
121
|
+
def name
|
122
|
+
self.class.to_s.split('::').last.gsub('_',' ')
|
123
|
+
end
|
124
|
+
|
125
|
+
end
|
126
|
+
|
127
|
+
|
128
|
+
class Extended_community
|
129
|
+
include ATTR::XTENDED_COMMUNITY
|
130
|
+
include Comparable
|
131
|
+
|
132
|
+
def self.factory(_s)
|
133
|
+
if _s.is_a?(Bignum) or _s.is_a?(Fixnum)
|
134
|
+
s = [format("%16.16x",_s)].pack('H*')
|
135
|
+
else
|
136
|
+
s = _s
|
137
|
+
end
|
138
|
+
type, subtype, value = s.unpack('CCa6')
|
139
|
+
case subtype
|
140
|
+
when ROUTE_TARGET ; Route_target.new(s)
|
141
|
+
when ROUTE_ORIGIN ; Route_origin.new(s)
|
142
|
+
when OSPF_DOMAIN_ID ; Ospf_domain_id.new(s)
|
143
|
+
when OSPF_ROUTER_ID ; Ospf_router_id.new(s)
|
144
|
+
when BGP_DATA_COLLECT ; Bgp_data_collect.new(s)
|
145
|
+
else
|
146
|
+
puts "too bad type #{type}, subtype #{subtype} : #{s.unpack('H*')}"
|
147
|
+
Extended_community.new(s)
|
148
|
+
end
|
149
|
+
end
|
150
|
+
|
151
|
+
def initialize(*args)
|
152
|
+
@type=TWO_OCTET_AS
|
153
|
+
if args.size==1 and args[0].is_a?(String) and args[0].is_packed?
|
154
|
+
parse(args[0])
|
155
|
+
elsif args.size==3
|
156
|
+
@type, @subtype, value = args
|
157
|
+
raise ArgumentError, "invalid argument #{args.inspect}" unless instance_of?(Opaque)
|
158
|
+
@type |= OPAQUE
|
159
|
+
@global, @local=value, nil
|
160
|
+
elsif args.size==4
|
161
|
+
raise ArgumentError, "This is a base class and should not be instanciated" if instance_of?(Extended_community)
|
162
|
+
@type, @subtype, @global, @local = args
|
163
|
+
if @global.is_a?(String) and @local.is_a?(Fixnum)
|
164
|
+
@type |= IPV4_ADDR
|
165
|
+
@global = IPAddr.new(@global).to_i
|
166
|
+
end
|
167
|
+
elsif args.size==1 and args[0].is_a?(Bignum)
|
168
|
+
parse([s].pack('H*'))
|
169
|
+
elsif args.empty?
|
170
|
+
@type, @subtype, @global, @local = 0,0,0,0
|
171
|
+
else
|
172
|
+
raise ArgumentError, "invalid arg #{args.inspect}"
|
173
|
+
end
|
174
|
+
end
|
175
|
+
|
176
|
+
def to_s
|
177
|
+
case @type & 3
|
178
|
+
when TWO_OCTET_AS
|
179
|
+
"#{name}: #{@global}:#{@local}"
|
180
|
+
when IPV4_ADDR
|
181
|
+
"#{name}: #{IPAddr.create(@global)}:#{@local}"
|
182
|
+
when OPAQUE
|
183
|
+
"#{name}: #{@global}"
|
184
|
+
else
|
185
|
+
raise RuntimeError, "bogus type: #{@type}"
|
186
|
+
end
|
187
|
+
end
|
188
|
+
|
189
|
+
end
|
190
|
+
|
191
|
+
class Route_target < Extended_community
|
192
|
+
def initialize(*args)
|
193
|
+
if args[0].is_a?(String) and args[0].is_packed?
|
194
|
+
super(*args)
|
195
|
+
else
|
196
|
+
super(0, ROUTE_TARGET, *args)
|
197
|
+
end
|
198
|
+
end
|
199
|
+
end
|
200
|
+
|
201
|
+
class Route_origin < Extended_community
|
202
|
+
def initialize(*args)
|
203
|
+
if args[0].is_a?(String) and args[0].is_packed?
|
204
|
+
super(*args)
|
205
|
+
else
|
206
|
+
super(0,ROUTE_ORIGIN,*args)
|
207
|
+
end
|
208
|
+
end
|
209
|
+
end
|
210
|
+
|
211
|
+
class Ospf_domain_id < Extended_community
|
212
|
+
def initialize(*args)
|
213
|
+
if args[0].is_a?(String) and args[0].is_packed?
|
214
|
+
super(*args)
|
215
|
+
else
|
216
|
+
args += [0]
|
217
|
+
super(1,OSPF_DOMAIN_ID,*args)
|
218
|
+
end
|
219
|
+
end
|
220
|
+
end
|
221
|
+
|
222
|
+
class Ospf_router_id < Extended_community
|
223
|
+
def initialize(*args)
|
224
|
+
if args[0].is_a?(String) and args[0].is_packed?
|
225
|
+
super(*args)
|
226
|
+
else
|
227
|
+
args += [0]
|
228
|
+
super(1,OSPF_ROUTER_ID,*args)
|
229
|
+
end
|
230
|
+
end
|
231
|
+
end
|
232
|
+
|
233
|
+
class Bgp_data_collect < Extended_community
|
234
|
+
def initialize(*args)
|
235
|
+
if args[0].is_a?(String) and args[0].is_packed?
|
236
|
+
super(*args)
|
237
|
+
else
|
238
|
+
super(0,BGP_DATA_COLLECT,*args)
|
239
|
+
end
|
240
|
+
end
|
241
|
+
end
|
242
|
+
|
243
|
+
class Opaque < Extended_community
|
244
|
+
def initialize(*args)
|
245
|
+
if args[0].is_a?(String) and args[0].is_packed?
|
246
|
+
super(*args)
|
247
|
+
else
|
248
|
+
raise ArgumentError, "not an opaque extended community" if [2,3,5,7,8].include?(args[0])
|
249
|
+
super(0,*args)
|
250
|
+
end
|
251
|
+
end
|
252
|
+
end
|
253
|
+
|
254
|
+
end
|
data/bgp/iana.rb
ADDED
@@ -0,0 +1,269 @@
|
|
1
|
+
#--
|
2
|
+
# Copyright 2008, 2009 Jean-Michel Esnault.
|
3
|
+
# All rights reserved.
|
4
|
+
# See LICENSE.txt for permissions.
|
5
|
+
#
|
6
|
+
#
|
7
|
+
# This file is part of BGP4R.
|
8
|
+
#
|
9
|
+
# BGP4R is free software: you can redistribute it and/or modify
|
10
|
+
# it under the terms of the GNU General Public License as published by
|
11
|
+
# the Free Software Foundation, either version 3 of the License, or
|
12
|
+
# (at your option) any later version.
|
13
|
+
#
|
14
|
+
# BGP4R is distributed in the hope that it will be useful,
|
15
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
16
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
17
|
+
# GNU General Public License for more details.
|
18
|
+
#
|
19
|
+
# You should have received a copy of the GNU General Public License
|
20
|
+
# along with BGP4R. If not, see <http://www.gnu.org/licenses/>.
|
21
|
+
#++
|
22
|
+
|
23
|
+
|
24
|
+
module IANA
|
25
|
+
def self.afi(afi)
|
26
|
+
case afi
|
27
|
+
when AFI::IP ; 'IPv4'
|
28
|
+
when AFI::IP6 ; 'IPv6'
|
29
|
+
else
|
30
|
+
''
|
31
|
+
end
|
32
|
+
end
|
33
|
+
def self.safi(safi)
|
34
|
+
case safi
|
35
|
+
when SAFI::UNICAST_NLRI ; 'Unicast'
|
36
|
+
when SAFI::MULTICAST_NLRI ; 'Multicast'
|
37
|
+
when SAFI::LABEL_NLRI ; 'Labeled NLRI'
|
38
|
+
when SAFI::MCAST_VPN ; 'Multicast VPN'
|
39
|
+
when SAFI::MPLS_VPN_UNICAST ; 'Labeled VPN Unicast'
|
40
|
+
when SAFI::MPLS_VPN_Multicast ; 'Labeled VPN Multicast'
|
41
|
+
else
|
42
|
+
''
|
43
|
+
end
|
44
|
+
end
|
45
|
+
module AFI
|
46
|
+
IP = 1
|
47
|
+
IP6 = 2
|
48
|
+
NSAP = 3
|
49
|
+
HDLC = 4
|
50
|
+
BBN = 5
|
51
|
+
IEEE_802 = 6
|
52
|
+
E163 = 7
|
53
|
+
E164 = 8
|
54
|
+
F69 = 9
|
55
|
+
X121 = 10
|
56
|
+
IPX = 11
|
57
|
+
Appletalk = 12
|
58
|
+
Decnet_IV = 13
|
59
|
+
Banyan_Vines = 14
|
60
|
+
E164_NSAP = 15
|
61
|
+
DNS = 16
|
62
|
+
Distinguished_Name = 17
|
63
|
+
AS_Number = 18
|
64
|
+
XTPv4 = 19
|
65
|
+
XTPv6 = 20
|
66
|
+
XTP = 21
|
67
|
+
FCWWPN = 22
|
68
|
+
FCWWNN = 23
|
69
|
+
GWID = 24
|
70
|
+
L2VPN = 25
|
71
|
+
end
|
72
|
+
module SAFI
|
73
|
+
UNICAST_NLRI = 1
|
74
|
+
MULTICAST_NLRI = 2
|
75
|
+
LABEL_NLRI = 4
|
76
|
+
MCAST_VPN = 5
|
77
|
+
MULTI_SEGMENT_PW_NLRI = 6
|
78
|
+
ENCASPSULATION_SAFI = 7
|
79
|
+
TUNNEL = 64
|
80
|
+
VPLS = 65
|
81
|
+
BGP_MDT = 66
|
82
|
+
BGP4over6 = 67
|
83
|
+
BGP6over4 = 68
|
84
|
+
L1_VPN_AUTO_DISCOVERY = 69
|
85
|
+
MPLS_VPN_UNICAST = 128
|
86
|
+
MPLS_VPN_Multicast = 129
|
87
|
+
ROUTE_TARGET_CONSTRAINTS = 132
|
88
|
+
FLOW_SPEC_RULES_1 = 133
|
89
|
+
FLOW_SPEC_RULES_2 = 134
|
90
|
+
VPN_AUTO_DISCOVERY = 140
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
94
|
+
__END__
|
95
|
+
|
96
|
+
http://www.iana.org/assignments/address-family-numbers/
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
Registry:
|
101
|
+
Number Description Reference
|
102
|
+
---------- ---------------------------------------------------------------- -----------------
|
103
|
+
0 Reserved
|
104
|
+
1 IP (IP version 4)
|
105
|
+
2 IP6 (IP version 6)
|
106
|
+
3 NSAP
|
107
|
+
4 HDLC (8-bit multidrop)
|
108
|
+
5 BBN 1822
|
109
|
+
6 802 (includes all 802 media plus Ethernet "canonical format")
|
110
|
+
7 E.163
|
111
|
+
8 E.164 (SMDS, Frame Relay, ATM)
|
112
|
+
9 F.69 (Telex)
|
113
|
+
10 X.121 (X.25, Frame Relay)
|
114
|
+
11 IPX
|
115
|
+
12 Appletalk
|
116
|
+
13 Decnet IV
|
117
|
+
14 Banyan Vines
|
118
|
+
15 E.164 with NSAP format subaddress [UNI-3.1][Malis]
|
119
|
+
16 DNS (Domain Name System)
|
120
|
+
17 Distinguished Name [Lynn]
|
121
|
+
18 AS Number [Lynn]
|
122
|
+
19 XTP over IP version 4 [Saul]
|
123
|
+
20 XTP over IP version 6 [Saul]
|
124
|
+
21 XTP native mode XTP [Saul]
|
125
|
+
22 Fibre Channel World-Wide Port Name [Bakke]
|
126
|
+
23 Fibre Channel World-Wide Node Name [Bakke]
|
127
|
+
24 GWID [Hegde]
|
128
|
+
25 AFI for L2VPN information [RFC4761]
|
129
|
+
26-16383 Unassigned
|
130
|
+
16384 EIGRP Common Service Family [Savage]
|
131
|
+
16385 EIGRP IPv4 Service Family [Savage]
|
132
|
+
16386 EIGRP IPv6 Service Family [Savage]
|
133
|
+
16387-32767 Unassigned
|
134
|
+
32768-65534 Unassigned
|
135
|
+
65535 Reserved
|
136
|
+
|
137
|
+
|
138
|
+
http://www.iana.org/assignments/safi-namespace
|
139
|
+
|
140
|
+
|
141
|
+
Registries included below
|
142
|
+
- SAFI Values
|
143
|
+
|
144
|
+
|
145
|
+
Registry Name: SAFI Values
|
146
|
+
Reference: [RFC4760]
|
147
|
+
Range Registration Procedures Note
|
148
|
+
--------- --------------------------------------------------- --------------------
|
149
|
+
1-63 Standards Action or Early Allocation policy
|
150
|
+
64-127 First Come First Served
|
151
|
+
128-240 Some recognized assignments below, others Reserved
|
152
|
+
241-254 Reserved for Private Use Not to be assigned
|
153
|
+
|
154
|
+
Registry:
|
155
|
+
Value Description Reference
|
156
|
+
------- ---------------------------------------------- ---------
|
157
|
+
0 Reserved [RFC4760]
|
158
|
+
|
159
|
+
1 Network Layer Reachability Information used [RFC4760]
|
160
|
+
for unicast forwarding
|
161
|
+
|
162
|
+
2 Network Layer Reachability Information used [RFC4760]
|
163
|
+
for multicast forwarding
|
164
|
+
|
165
|
+
3 Reserved [RFC4760]
|
166
|
+
|
167
|
+
4 Network Layer Reachability Information (NLRI) [RFC3107]
|
168
|
+
with MPLS Labels
|
169
|
+
|
170
|
+
5 MCAST-VPN [draft-ietf-l3vpn-2547bis-mcast-bgp]
|
171
|
+
(TEMPORARY - Expires 2009-06-19)
|
172
|
+
|
173
|
+
6 Network Layer Reachability Information used [draft-ietf-pwe3-dynamic-ms-pw]
|
174
|
+
for Dynamic Placement of Multi-Segment
|
175
|
+
Pseudowires
|
176
|
+
(TEMPORARY - Expires 2009-08-23)
|
177
|
+
|
178
|
+
7 Encapsulation SAFI [RFC-ietf-softwire-encaps-safi-05.txt]
|
179
|
+
|
180
|
+
8-63 Unassigned
|
181
|
+
|
182
|
+
64 Tunnel SAFI [Nalawade]
|
183
|
+
|
184
|
+
65 Virtual Private LAN Service (VPLS) [RFC4761]
|
185
|
+
|
186
|
+
66 BGP MDT SAFI [Nalawade]
|
187
|
+
|
188
|
+
67 BGP 4over6 SAFI [Cui]
|
189
|
+
|
190
|
+
68 BGP 6over4 SAFI [Cui]
|
191
|
+
|
192
|
+
69 Layer-1 VPN auto-discovery information [RFC-ietf-l1vpn-bgp-auto-discovery-05.txt]
|
193
|
+
|
194
|
+
70-127 Unassigned
|
195
|
+
|
196
|
+
128 MPLS-labeled VPN address [RFC4364]
|
197
|
+
|
198
|
+
129 Multicast for BGP/MPLS IP Virtual Private [RFC2547]
|
199
|
+
Networks (VPNs)
|
200
|
+
|
201
|
+
130-131 Reserved [RFC4760]
|
202
|
+
|
203
|
+
132 Route Target constrains [RFC4684]
|
204
|
+
|
205
|
+
133 Dissemination of flow specification rules [draft-marques-idr-flow-spec]
|
206
|
+
|
207
|
+
134 Dissemination of flow specification rules [draft-marques-idr-flow-spec]
|
208
|
+
|
209
|
+
135-139 Reserved [RFC4760]
|
210
|
+
|
211
|
+
140 VPN auto-discovery [draft-ietf-l3vpn-bgpvpn-auto]
|
212
|
+
|
213
|
+
141-240 Reserved [RFC4760]
|
214
|
+
|
215
|
+
241-254 Private Use [RFC4760]
|
216
|
+
|
217
|
+
255 Reserved [RFC4760]
|
218
|
+
|
219
|
+
|
220
|
+
References
|
221
|
+
----------
|
222
|
+
[RFC2547] E. Rosen and Y. Rekhter, "BGP/MPLS VPNs", RFC 2547, March 1999.
|
223
|
+
|
224
|
+
[RFC3107] Y. Rekhter and E. Rosen, "Carrying Label Information in
|
225
|
+
BGP-4", RFC 3107, May 2001.
|
226
|
+
|
227
|
+
[RFC4364] E. Rosen and Y. Rekhter, "BGP/MPLS IP VPNs", RFC 4364, February 2006.
|
228
|
+
|
229
|
+
[RFC4684] P. Marques, R. Bonica, L. Fang, L. Martini, R. Raszuk, K. Patel
|
230
|
+
and J. Guichard, "Constrained VPN Route Distribution", RFC 4684,
|
231
|
+
November 2006.
|
232
|
+
|
233
|
+
[RFC4760] T. Bates, R. Chandra, D. Katz and Y. Rekhter, "Multiprotocol
|
234
|
+
Extensions for BGP-4", RFC 4760, January 2007.
|
235
|
+
|
236
|
+
[RFC4761] K. Kompella and Y. Rekhter, "Virtual Private LAN Service
|
237
|
+
(VPLS) Using BGP for Auto-discovery and Signaling", RFC 4761,
|
238
|
+
January 2007.
|
239
|
+
|
240
|
+
[RFC-ietf-l1vpn-bgp-auto-discovery-05.txt]
|
241
|
+
H. Brahim, D. Fedyk, Y. Rekhter, "BGP-based Auto-Discovery for
|
242
|
+
Layer-1 VPNs", RFC XXXX, Month Year.
|
243
|
+
|
244
|
+
[draft-ietf-l3vpn-bgpvpn-auto] Work in progress
|
245
|
+
|
246
|
+
[draft-ietf-pwe3-dynamic-ms-pw] Work in progress
|
247
|
+
|
248
|
+
[draft-marques-idr-flow-spec] Work in progress
|
249
|
+
|
250
|
+
[draft-ietf-l3vpn-2547bis-mcast-bgp] Work in progress
|
251
|
+
|
252
|
+
[RFC-ietf-softwire-encaps-safi-05.txt]
|
253
|
+
P. Mohapatra, E. Rosen, "BGP Encapsulation SAFI and BGP Tunnel
|
254
|
+
Encapsulation Attribute", RFC XXXX, Month Year.
|
255
|
+
|
256
|
+
People
|
257
|
+
------
|
258
|
+
[Bates] Tony Bates, <tbates&cisco.com>, July 2000.
|
259
|
+
|
260
|
+
[Cui] Yong Cui, <cuiyong&tsinghua.edu.cn>, 15 August 2006, 20 September 2006.
|
261
|
+
|
262
|
+
[Nalawade] Gargi Nalawade, <gargi&cisco.com>, January 2004.
|
263
|
+
(draft-nalawade-kapoor-tunnel-safi-01.txt)
|
264
|
+
(draft-nalawade-idr-mdt-safi-00.txt), February 2004.
|
265
|
+
|
266
|
+
(created 2000-07)
|
267
|
+
|
268
|
+
[]
|
269
|
+
|