0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

model driven programmability advancement OSPF configuration using NETCONF 1

Last updated at Posted at 2024-11-24

NETCONFを使ってOSPFを行う

Screenshot_2024-11-25_07-22-50.png

ルーターのL3IPは事前に設定済み
R3とR4はすでに設定済みでOSPFが稼働済み
PythonプログラムでCSR1とCSR2を設定する
ncclientライブラリを使う
デバイス名.xmlファイルを使う
プログラム実行時にCSR1とCSR2はすべてのルーターとOSPFを形成

ルーター設定

IOS-XE1
hostname IOS-XE1
ip domain-name abc.com
crypto key generate rsa module 1024
ip ssh version 2
username admin privilege 15 password cisco
netconf ssh
netconf-yang
line vty 0 4
login local
transport input all
int gi1
ip address 10.255.1.101 255.255.255.0
description Connect to MGMT
no shut
int gi2
ip address 12.0.0.1 255.255.255.0
description Connect to IOS-XE2
no shut
int gi3
ip address 13.0.0.1 255.255.255.0
description Connect to IOS3
no shut
int gi4
ip address 14.0.0.1 255.255.255.0
description Connect to IOS4
no shut
IOS-XE2
hostname IOS-XE2
ip domain-name abc.com
crypto key generate rsa module 1024
ip ssh version 2
username admin privilege 15 password cisco
netconf ssh
netconf-yang
line vty 0 4
login local
transport input all
int gi1
ip address 10.255.1.102 255.255.255.0
description Connect to MGMT
no shut
int gi2
ip address 12.0.0.2 255.255.255.0
description Connect to IOS-XE1
no shut
int gi3
ip address 23.0.0.2 255.255.255.0
description Connect to IOS3
no shut
int gi4
ip address 24.0.0.2 255.255.255.0
description Connect to IOS4
no shut
IOS3
hostname IOS3
int gi0/1
ip address 13.0.0.3 255.255.255.0
description connected to IOS-XE1
no shut
int gi0/2
ip address 23.0.0.3 255.255.255.0
description connected to IOS-XE2
no shut
router ospf 1
router-id 3.3.3.3
interface range gi0/1-2
ip ospf 1 area 0
ip ospf network point-to-point
IOS4
hostname IOS4
int gi0/1
ip address 14.0.0.4 255.255.255.0
description connected to IOS-XE1
no shut
int gi0/2
ip address 24.0.0.4 255.255.255.0
description connected to IOS-XE2
no shut
router ospf 1
router-id 4.4.4.4
interface range gi0/1-2
ip ospf 1 area 0
ip ospf network point-to-point
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?