-1
インターフェイスのIPアドレスを抽出し、そのアドレスの第3オクテットをBGP AS番号の一部として使用しています。私は第三オクテット= その後、BGP AS = 111文字を挿入するCisco IOS EEM Script
ここでは私の現在と未完成のアプレットである場合には、3番目のオクテットは、例えばであれば番号の前に0を挿入する必要があります。
event manager applet replace
event none
action 1.0 cli command "conf t"
action 1.1 cli command "do show ip int brief vlan 1"
action 1.2 regexp " [0-9.]+ " $_cli_result ip match
action 2.0 regexp {([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)} $_cli_result match ip
action 2.1 regexp {([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)} $ip match first second third forth
action 2.2 set vl1 $first.$second.$third.$forth
action 2.3 cli command "router bpg 111$third"