Lab MPLS过滤标签转发
Frame-mode下的标签过滤
(1)本地不发(上游设备本地不发)
下面主要针对R5对1.1.1.1/32分配的标签做过滤,因为该标签没有任何作用
R5(config)#mpls ldp advertise-labels for 5 to 4
R5(config)#no mpls ldp advertise-labels (要利用该命令来触发上面一条命令,其中这两条指令一定要成对出现)——如果单独配置 no mpls ldp advertise-labels 则所有通告都将会给过滤掉,即本地设备不发任何通告给邻居
R5(config)#access-list 5 deny 1.1.1.1
R5(config)#access-list 5 permit any
R5(config)#access-list 4 permit 4.4.4.4
r4#show mpls ld bindings
lib entry: 1.1.1.1/32, rev 12
local binding: label: 4002
remote binding: lsr: 3.3.3.3:0, label: 3001
lib entry: 2.2.2.2/32, rev 10
local binding: label: 4001
remote binding: lsr: 3.3.3.3:0, label: 3000
remote binding: lsr: 5.5.5.5:0, label: 19
lib entry: 3.3.3.3/32, rev 8
local binding: label: 4000
remote binding: lsr: 3.3.3.3:0, label: imp-null
remote binding: lsr: 5.5.5.5:0, label: 18
--More--
(2)本地不收(下游设备本地不收)
R4(config)#mpls ldp neighbor 5.5.5.5 labels accept 5
R4(config)#access-list 5 permit 2.2.2.2
R4(config)#access-list 5 permit any