NETCONF协议netopeer软件安装与环境搭建

本文详细介绍如何在Ubuntu 14.04.5系统上安装并配置NETCONF协议的开源实现Netopeer。包括环境准备、依赖包安装、Netopeer编译及启动验证等内容。

NETCONF协议netopeer软件安装与环境搭建

目录

简介

最近工作涉及一些NETCONF协议调研与验证,NETCONF的自动化配置系统采用Client/Server架构,而netopeer即实现了netconf的C/S框架的开源项目,谨以此文总结记录一下netopeer环境搭建和简单使用过程。

Netopeer是基于开源项目libnetconf库完成的,已实现client和server端的代码。主要涉及的组件为netopeer-cli和netopeer-server;其中netopeer-cli为一个CLI程序,允许通过该程序连接到netconf server,和操纵它的配置数据;netopeer-server为一个netconf服务器端的守护进程,允许与netconf client建立连接,接收配置数据等操作。除了这两个重要的模块,netopeer项目还包含了libnetconf transAPI模块举例,位于项目源码transAPI/路径下,例如cfgsystem模块,实现的是一个ietf-system数据模型。

本文主要介绍使用ubuntu-14.04.5-server 64位系统作为基础环境。

相关网站参考

准备工作

1) ubuntu官网下载ubuntu系统安装ISO – ubuntu-14.04.5-server-amd64.iso
2) 安装ubuntu14.04.5 server系统
3) 安装必要的依赖包

# apt-get install libtool python-argparse libtool-bin python-sphinx libffi-dev libxml2-dev libxslt1-dev libcurl4-openssl-dev xsltproc python-setuptools cmake zlib1g-dev libssl-dev python-libxml2 libaugeas-dev openssh-server libreadline-dev

手动编译安装部份依赖包

  1. pyang

    # git clone https://github.com/mbj4668/pyang.git
    # cd pyang
    # python setup.py install

  2. libssh (>=0.6.4)
    下载libssh源码包(https://git.libssh.org/projects/libssh.git)

    # cd libssh
    # mkdir build
    # cd build
    # cmake ..
    # make
    # make install

  3. libnetconf

    # git clone https://github.com/CESNET/libnetconf.git
    # cd libnetconf
    # ./configure
    # make
    # make install

手动编译netopeer

  1. 下载netopeer源码

    # git clone https://github.com/CESNET/netopeer.git

  2. 编译安装netopeer-server

    # cd netopeer/server
    # ./configure
    # make
    # make install

  3. 编译安装netopeer-cli

    # cd netopeer/cli
    # ./configure
    # make
    # make install

启动与验证

启动netopeer server

# netopeer-server -d
默认监听端口x.x.x.x:830,连接的用户名密码为系统用户

验证netopeer-cli与netopeer-server连接

运行netopeer-cli,连接netopeer server
# netopeer-cli
netconf> connect localhost
netconf> get-config startup

其它操作

a) 配置netopeer server模块
# netopeer-configurator

b) 检查默认启动的模块
# netopeer-manager list

评论 13
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值