官术网_书友最值得收藏!

Lab Software Installation and Device Preparation

Here are the Ubuntu packages that we will install, you may already have some of the packages such as Python development, pip, and Git:

$ sudo apt-get install -y python3-dev libxml2-dev libxslt1-dev libffi-dev libssl-dev zlib1g-dev python3-pip git python3-requests
If you are using Python 2, use the following packages instead: sudo apt-get install -y python-dev libxml2-dev libxslt1-dev libffi-dev libssl-dev zlib1g-dev python-pip git python-requests

The ncclient (https://github.com/ncclient/ncclient) library is a Python library for NETCONF clients, so we will install this from the GitHub repository to install the latest version:

$ git clone https://github.com/ncclient/ncclient
$ cd ncclient/
$ sudo python3 setup.py install
$ sudo python setup.py install

NX-API on Nexus devices is off by default, so we will need to turn it on. We can either use the user that is already created or create a new user for the NETCONF procedures:

feature nxapi
username cisco password 5 $1$Nk7ZkwH0$fyiRmMMfIheqE3BqvcL0C1 role network-opera
tor
username cisco role network-admin
username cisco passphrase lifetime 99999 warntime 14 gracetime 3

For our lab, we will turn on both HTTP and the sandbox configuration, as they should be turned off in production:

nx-osv-2(config)# nxapi http port 80
nx-osv-2(config)# nxapi sandbox

We are now ready to look at our first NX-API example.

主站蜘蛛池模板: 常山县| 临武县| 黄平县| 苏州市| 嘉义县| 峨眉山市| 芮城县| 无棣县| 若尔盖县| 陆良县| 翼城县| 青州市| 玛多县| 钟祥市| 忻城县| 百色市| 游戏| 阜城县| 满城县| 永春县| 永安市| 吉木萨尔县| 隆尧县| 尉犁县| 镇远县| 随州市| 通化市| 抚顺市| 合阳县| 济南市| 沽源县| 石屏县| 抚远县| 即墨市| 巫山县| 莱芜市| 郑州市| 龙州县| 额济纳旗| 张家口市| 台中市|