APIC-EM にデバイスを登録する
Cisco の APIC-EM (Application Policy Infrastructure Controller Enterprise Module) にデバイスを登録する手順をメモしておきます。APIC-EM は日々進歩している (言い過ぎ?) ので、バージョンによって画面や操作が異なる可能性があります。
検証環境
構成は以下の通りです。APIC-EM はルータ以外にもスイッチやアクセスポイントを検出出来ますが、今回はルータだけにしました。ルータ間は OSPF を設定してあります。

環境は以下を利用しています。
Hostname |
OS |
DC1-OTV |
IOS-XE 03.17.00 |
DC2-OTV |
IOS-XE 03.17.00 |
Core |
15.6(2)T |
DC1-Host |
15.6(2)T |
DC2-Host |
15.6(2)T |
APIC-EM へのデバイス登録手順
ブラウザから「https:// APIC-EM のアドレス
」にアクセスすると APIC-EM のログイン画面が表示されます。ログイン情報を入力し、先に進みます。

ログイン情報が正しければ "Success" と表示され、次の画面に遷移します。

デバイスを登録するには、まず右上のギア (歯車) アイコンの Settings メニューをクリックします。

左側のメニューから CLI Credentials を選択し、ルータへ SSH または TELNET でアクセスする為のログイン情報を入力します。
項目 |
説明 |
Username |
ルータへのログイン用ユーザ名を指定します |
Password |
パスワードを指定します |
Confirm Password |
確認用にパスワードを再入力します |
Enable Password |
特権モードに昇格する為のパスワードを指定します |
Confirm Enable Password |
確認用に特権モードのパスワードを再入力します |

次は左側のメニューから SNMPv2c を選択し、ルータへ SNMP Poll する為の設定を入力します。APIC-EM にデバイスを登録するだけであれば、とりあえず Read Community だけ設定してあれば問題ありません。
項目 |
説明 |
Name/Description |
設定名を指定します。動作には影響しません |
Read Community |
SNMP アクセスする際のコミュニティ名を指定します |
Confirm Read Community |
確認用に SNMP コミュニティ名を再入力します |

SNMP Poll の設定が完了したら、左側のアイコンから Discovery (円のようなアイコン) をクリックします。

デバイスを検出する為の情報を設定します。
項目 |
説明 |
Discovery Name |
一意の設定名を指定します。動作には影響ありません |
IP Range |
検出対象のアドレスを指定します。単一のアドレスだけでなく、範囲で指定することも可能です |
SNMP |
設定済みの SNMP Poll 設定を指定します |
CLI Credentials |
設定済みの CLI アクセス情報を指定します |
Advanced |
ルータへのアクセスに利用するプロトコルを選択します。SSH と TELNET の両方を選択しても良いですし、片方だけでも OK です |

機器の検出が開始されます。

しばらくすると検出が完了すると結果が表示されます。

もし、検出が上手くいかない場合は以下の点を確認します。
- 対象機器で CDP が有効化されているか?
- 設定した CLI アクセス情報/プロトコルで間違い無く、ログイン出来るか?
- 設定した SNMP コミュニティ名で間違い無く、Poll 出来るか?
検出が成功したら、左側から Topology アイコンをクリックします。すると、検出されたトポロジーが表示されるはずです。

コンフィグ
参考用に検証に使ったコンフィグを引用しておきます。APIC-EM からのアクセスを受け付ける為に SSH と SNMP Poll の設定をしています。下記の設定に加え、crypto key generate rsa modulus [MODULUS] で SSH 用の鍵ペアを生成してあります。
IOSv1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48 | hostname IOSv1
!
aaa new-model
!
service timestamps debug datetime msec localtime
service timestamps log datetime msec localtime
!
clock timezone JST +9
!
no ip domain-lookup
ip domain name example.local
!
username USER privilege 15 password 0 PASS
!
interface GigabitEthernet0/0
ip address 10.100.4.1 255.255.0.0
no shutdown
!
interface GigabitEthernet0/1
ip address 10.0.12.1 255.255.255.0
ip ospf network point-to-point
ip ospf 65000 area 0.0.0.0
no shutdown
!
router ospf 65000
default-information originate always metric-type 1
!
snmp-server community PUBLIC RO
!
no banner exec ^C
no banner incoming ^C
no banner login ^C
!
line con 0
exec-timeout 300 0
privilege level 15
logging synchronous
length 0
!
line vty 0 4
exec-timeout 300 0
privilege level 15
logging synchronous
no login
length 0
transport input telnet ssh
!
end
|
IOSv2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49 | hostname IOSv2
!
aaa new-model
!
service timestamps debug datetime msec localtime
service timestamps log datetime msec localtime
!
clock timezone JST +9
!
no ip domain-lookup
ip domain name example.local
!
username USER privilege 15 password 0 PASS
!
interface GigabitEthernet0/1
ip address 10.0.12.2 255.255.255.0
ip ospf network point-to-point
ip ospf 65000 area 0.0.0.0
no shutdown
!
interface GigabitEthernet0/2
ip address 10.0.23.2 255.255.255.0
ip ospf network point-to-point
ip ospf 65000 area 0.0.0.0
no shutdown
!
router ospf 65000
!
snmp-server community PUBLIC RO
!
no banner exec ^C
no banner incoming ^C
no banner login ^C
!
line con 0
exec-timeout 300 0
privilege level 15
logging synchronous
length 0
!
line vty 0 4
exec-timeout 300 0
privilege level 15
logging synchronous
no login
length 0
transport input telnet ssh
!
end
|
IOSv3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50 | hostname IOSv3
!
aaa new-model
!
service timestamps debug datetime msec localtime
service timestamps log datetime msec localtime
!
clock timezone JST +9
!
no ip domain-lookup
ip domain name example.local
!
username USER privilege 15 password 0 PASS
!
interface GigabitEthernet0/1
ip address 10.0.23.3 255.255.255.0
ip ospf network point-to-point
ip ospf 65000 area 0.0.0.0
no shutdown
!
interface GigabitEthernet0/2
ip address 10.0.34.3 255.255.255.0
ip ospf network point-to-point
ip ospf 65000 area 0.0.0.0
no shutdown
!
router ospf 65000
router-id 10.0.0.3
!
snmp-server community PUBLIC RO
!
no banner exec ^C
no banner incoming ^C
no banner login ^C
!
line con 0
exec-timeout 300 0
privilege level 15
logging synchronous
length 0
!
line vty 0 4
exec-timeout 300 0
privilege level 15
logging synchronous
no login
length 0
transport input telnet ssh
!
end
|
IOSv4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50 | hostname IOSv4
!
aaa new-model
!
service timestamps debug datetime msec localtime
service timestamps log datetime msec localtime
!
clock timezone JST +9
!
no ip domain-lookup
ip domain name example.local
!
username USER privilege 15 password 0 PASS
!
interface GigabitEthernet0/1
ip address 10.0.34.4 255.255.255.0
ip ospf network point-to-point
ip ospf 65000 area 0.0.0.0
no shutdown
!
interface GigabitEthernet0/2
ip address 10.0.45.4 255.255.255.0
ip ospf network point-to-point
ip ospf 65000 area 0.0.0.0
no shutdown
!
router ospf 65000
router-id 10.0.0.4
!
snmp-server community PUBLIC RO
!
no banner exec ^C
no banner incoming ^C
no banner login ^C
!
line con 0
exec-timeout 300 0
privilege level 15
logging synchronous
length 0
!
line vty 0 4
exec-timeout 300 0
privilege level 15
logging synchronous
no login
length 0
transport input telnet ssh
!
end
|
IOSv5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46 | hostname IOSv5
!
aaa new-model
!
service timestamps debug datetime msec localtime
service timestamps log datetime msec localtime
!
clock timezone JST +9
!
no ip domain-lookup
ip domain name example.local
!
username USER privilege 15 password 0 PASS
!
interface GigabitEthernet0/1
ip address 10.0.45.5 255.255.255.0
ip ospf network point-to-point
ip ospf 65000 area 0.0.0.0
no shutdown
!
router ospf 65000
router-id 10.0.0.5
!
ip route 0.0.0.0 0.0.0.0 10.100.254.254
!
snmp-server community PUBLIC RO
!
no banner exec ^C
no banner incoming ^C
no banner login ^C
!
line con 0
exec-timeout 300 0
privilege level 15
logging synchronous
length 0
!
line vty 0 4
exec-timeout 300 0
privilege level 15
logging synchronous
no login
length 0
transport input telnet ssh
!
end
|