From 257d2144deb580ac3e18ef7646a2d95f29bfec6a Mon Sep 17 00:00:00 2001 From: ptux Date: Tue, 18 Oct 2022 21:24:57 +0900 Subject: [PATCH 1/3] blabla --- ja/Days/day26.md | 68 ++++++++++++++++++++++++------------------------ 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/ja/Days/day26.md b/ja/Days/day26.md index f4fc217..3d64905 100644 --- a/ja/Days/day26.md +++ b/ja/Days/day26.md @@ -1,47 +1,47 @@ --- -title: '#90DaysOfDevOps - Building our Lab - Day 26' +title: '#90DaysOfDevOps - ラボの構築 - 26日目' published: false -description: 90DaysOfDevOps - Building our Lab +description: 90DaysOfDevOps - ラボの構築 tags: "devops, 90daysofdevops, learning" cover_image: null canonical_url: null id: 1048762 --- -## Building our Lab +## ラボの構築 -We are going to continue our setup of our emulated network using EVE-NG and then hopefully get some devices deployed and start thinking about how we can automate the configuration of these devices. On [Day 25](day25.md) we covered the installation of EVE-NG onto our machine using VMware Workstation. +EVE-NGを使用してエミュレートしたネットワークのセットアップを継続し、いくつかのデバイスをデプロイして、これらのデバイスの設定を自動化する方法について考え始めたいと考えています。[Day 25](day25.md) では、VMware Workstation を使用してマシンに EVE-NG をインストールする方法について説明しました。 -### Installing EVE-NG Client +### EVE-NG クライアントのインストール -There is also a client pack that allows us to choose which application is used when we SSH to the devices. It will also set up Wireshark for packet captures between links. You can grab the client pack for your OS (Windows, macOS, Linux). +デバイスにSSHするときにどのアプリケーションを使うかを選択できるクライアントパックもあります。また、リンク間のパケットキャプチャのためにWiresharkをセットアップします。お使いのOS(Windows、macOS、Linux)に対応したクライアントパックを入手することができます。 [EVE-NG Client Download](https://www.eve-ng.net/index.php/download/) ![](Images/Day26_Networking1.png) -Quick Tip: If you are using Linux as your client then there is this [client pack](https://github.com/SmartFinn/eve-ng-integration). +クイックヒント: クライアントとしてLinuxを使用している場合、この[クライアントパック](https://github.com/SmartFinn/eve-ng-integration)があります。 -The install is a straightforward next,next and I would suggest leaving the defaults. +インストールは簡単で、デフォルトのままにしておくことをお勧めします。 -### Obtaining network images +### ネットワークイメージの取得 -This step has been a challenge, I have followed some videos that I will link at the end that links to some resources and downloads for our router and switch images whilst telling us how and where to upload them. +このステップは挑戦でした、私はいくつかのリソースへのリンクとルータとスイッチの画像をダウンロードしながら、それらをアップロードする方法と場所を教えてくれる最後にリンクするいくつかのビデオに従いました。 -It is important to note that I using everything for education purposes. I would suggest downloading official images from network vendors. +これは、私は教育目的のためにすべてを使用していることに注意することが重要です。私は、ネットワークベンダから公式の画像をダウンロードすることをお勧めします。 [Blog & Links to YouTube videos](https://loopedback.com/2019/11/15/setting-up-eve-ng-for-ccna-ccnp-ccie-level-studies-includes-multiple-vendor-node-support-an-absolutely-amazing-study-tool-to-check-out-asap/) [How To Add Cisco VIRL vIOS image to Eve-ng](https://networkhunt.com/how-to-add-cisco-virl-vios-image-to-eve-ng/) -Overall the steps here are a little complicated and could be much easier but the above blogs and videos walk through the process of adding the images to your EVE-NG box. +全体的にこのステップは少し複雑で、もっと簡単にできるかもしれませんが、上記のブログとビデオはEVE-NGボックスにイメージを追加するプロセスを説明しています。 -I used FileZilla to transfer the qcow2 to the VM over SFTP. +私はFileZillaを使用して、SFTP経由でqcow2をVMに転送しました。 -For our lab, we need Cisco vIOS L2 (switches) and Cisco vIOS (router) +このラボでは、Cisco vIOS L2(スイッチ)とCisco vIOS(ルーター)が必要です。 -### Create a Lab +### ラボの作成 -Inside the EVE-NG web interface, we are going to create our new network topology. We will have four switches and one router that will act as our gateway to outside networks. +EVE-NGのWebインターフェイス内で、新しいネットワークトポロジーを作成します。4台のスイッチと、外部ネットワークへのゲートウェイとして機能する1台のルータを用意する予定です。 | Node | IP Address | | ----------- | ----------- | @@ -51,50 +51,50 @@ Inside the EVE-NG web interface, we are going to create our new network topology | Switch3 | 10.10.88.113| | Switch4 | 10.10.88.114| -#### Adding our Nodes to EVE-NG +#### EVE-NGにノードを追加する -When you first log in to EVE-NG you will see a screen like below, we want to start by creating our first lab. +EVE-NGに初めてログインすると、以下のような画面が表示されますので、まずは最初のラボを作成してみたいと思います。 ![](Images/Day26_Networking2.png) -Give your lab a name and the other fields are optional. +研究室の名前を入力します。その他の項目は任意です。 ![](Images/Day26_Networking3.png) -You will be then greeted with a blank canvas to start creating your network. Right-click on your canvas and choose add node. +すると、ネットワークの作成を開始するための空白のキャンバスが表示されます。キャンバス上で右クリックし、ノードの追加を選択します。 -From here you will have a long list of node options, If you have followed along above you will have the two in blue shown below and the others are going to be grey and unselectable. +ここで、ノードのオプションの長いリストが表示されます。上記で説明した通りなら、下図の青い2つのノードがあり、他のノードはグレーで選択できないようになっています。 ![](Images/Day26_Networking4.png) -We want to add the following to our lab: +ラボに以下を追加したい: -- 1 x Cisco vIOS Router +- 1 x Cisco vIOS Router - 4 x Cisco vIOS Switch -Run through the simple wizard to add them to your lab and it should look something like this. +簡単なウィザードを実行し、ラボに追加すると次のようになります。 ![](Images/Day26_Networking5.png) -#### Connecting our nodes +#### ノードの接続 -We now need to add our connectivity between our routers and switches. We can do this quite easily by hovering over the device and seeing the connection icon as per below and then connecting that to the device we wish to connect to. +次に、ルータとスイッチの間の接続を追加する必要があります。デバイスの上にカーソルを置くと、以下のような接続アイコンが表示されるので、それを接続したいデバイスに接続すれば、簡単に接続することができます。 ![](Images/Day26_Networking6.png) -When you have finished connecting your environment you may also want to add some way to define physical boundaries or locations using boxes or circles which can also be found in the right-click menu. You can also add text which is useful when we want to define our naming or IP addresses in our labs. +環境の接続が完了したら、右クリックメニューにあるボックスや円を使用して、物理的な境界や位置を定義する方法を追加することもできます。また、テキストを追加することも可能で、ラボのネーミングやIPアドレスを定義するのに便利です。 -I went ahead and made my lab look like the below. +私は、以下のようなラボを作りました。 ![](Images/Day26_Networking7.png) -You will also notice that the lab above is all powered off, we can start our lab by selecting everything and right-clicking and selecting start selected. +また、上のラボはすべて電源が切れていることに気づきます。すべてを選択して右クリックし、選択した状態で起動することで、ラボを開始することができます。 ![](Images/Day26_Networking8.png) -Once we have our lab up and running you will be able to console into each device and you will notice at this stage they are pretty dumb with no configuration. We can add some configuration to each node by copying or creating your own in each terminal. +このラボを立ち上げると、各デバイスにコンソールできるようになります。この段階では、何も設定されておらず、かなり間抜けな状態であることに気づくでしょう。各端末の設定をコピーするか、自分で作成することで、各ノードに設定を追加することができます。 -I will leave my configuration in the Networking folder of the repository for reference. +私は参考のため、リポジトリの Networking フォルダに設定を残しておきます。 | Node | Configuration | | ----------- | ----------- | @@ -104,7 +104,7 @@ I will leave my configuration in the Networking folder of the repository for ref | Switch3 | [SW3](Networking/SW3) | | Switch4 | [SW4](Networking/SW4) | -## Resources +## リソース - [Free Course: Introduction to EVE-NG](https://www.youtube.com/watch?v=g6B0f_E0NMg) - [EVE-NG - Creating your first lab](https://www.youtube.com/watch?v=9dPWARirtK8) @@ -113,8 +113,8 @@ I will leave my configuration in the Networking folder of the repository for ref - [Practical Networking](http://www.practicalnetworking.net/) - [Python Network Automation](https://www.youtube.com/watch?v=xKPzLplPECU&list=WL&index=126) -Most of the examples I am using here as I am not a Network Engineer have come from this extensive book which is not free but I am using some of the scenarios to help understand Network Automation. +私はネットワークエンジニアではないので、ここで使用している例のほとんどは、無料ではありませんが、Network Automationを理解するのに役立つシナリオのいくつかをこの本から引用しています。 - [Hands-On Enterprise Automation with Python (Book)](https://www.packtpub.com/product/hands-on-enterprise-automation-with-python/9781788998512) -See you on [Day 27](day27.md) +[27日目](day27.md)でお会いしましょう。 From 89fada67051de98f8f69aea6eddd861ebba16f17 Mon Sep 17 00:00:00 2001 From: ptux Date: Tue, 18 Oct 2022 21:46:11 +0900 Subject: [PATCH 2/3] Revert "blabla" This reverts commit 257d2144deb580ac3e18ef7646a2d95f29bfec6a. --- ja/Days/day26.md | 68 ++++++++++++++++++++++++------------------------ 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/ja/Days/day26.md b/ja/Days/day26.md index 3d64905..f4fc217 100644 --- a/ja/Days/day26.md +++ b/ja/Days/day26.md @@ -1,47 +1,47 @@ --- -title: '#90DaysOfDevOps - ラボの構築 - 26日目' +title: '#90DaysOfDevOps - Building our Lab - Day 26' published: false -description: 90DaysOfDevOps - ラボの構築 +description: 90DaysOfDevOps - Building our Lab tags: "devops, 90daysofdevops, learning" cover_image: null canonical_url: null id: 1048762 --- -## ラボの構築 +## Building our Lab -EVE-NGを使用してエミュレートしたネットワークのセットアップを継続し、いくつかのデバイスをデプロイして、これらのデバイスの設定を自動化する方法について考え始めたいと考えています。[Day 25](day25.md) では、VMware Workstation を使用してマシンに EVE-NG をインストールする方法について説明しました。 +We are going to continue our setup of our emulated network using EVE-NG and then hopefully get some devices deployed and start thinking about how we can automate the configuration of these devices. On [Day 25](day25.md) we covered the installation of EVE-NG onto our machine using VMware Workstation. -### EVE-NG クライアントのインストール +### Installing EVE-NG Client -デバイスにSSHするときにどのアプリケーションを使うかを選択できるクライアントパックもあります。また、リンク間のパケットキャプチャのためにWiresharkをセットアップします。お使いのOS(Windows、macOS、Linux)に対応したクライアントパックを入手することができます。 +There is also a client pack that allows us to choose which application is used when we SSH to the devices. It will also set up Wireshark for packet captures between links. You can grab the client pack for your OS (Windows, macOS, Linux). [EVE-NG Client Download](https://www.eve-ng.net/index.php/download/) ![](Images/Day26_Networking1.png) -クイックヒント: クライアントとしてLinuxを使用している場合、この[クライアントパック](https://github.com/SmartFinn/eve-ng-integration)があります。 +Quick Tip: If you are using Linux as your client then there is this [client pack](https://github.com/SmartFinn/eve-ng-integration). -インストールは簡単で、デフォルトのままにしておくことをお勧めします。 +The install is a straightforward next,next and I would suggest leaving the defaults. -### ネットワークイメージの取得 +### Obtaining network images -このステップは挑戦でした、私はいくつかのリソースへのリンクとルータとスイッチの画像をダウンロードしながら、それらをアップロードする方法と場所を教えてくれる最後にリンクするいくつかのビデオに従いました。 +This step has been a challenge, I have followed some videos that I will link at the end that links to some resources and downloads for our router and switch images whilst telling us how and where to upload them. -これは、私は教育目的のためにすべてを使用していることに注意することが重要です。私は、ネットワークベンダから公式の画像をダウンロードすることをお勧めします。 +It is important to note that I using everything for education purposes. I would suggest downloading official images from network vendors. [Blog & Links to YouTube videos](https://loopedback.com/2019/11/15/setting-up-eve-ng-for-ccna-ccnp-ccie-level-studies-includes-multiple-vendor-node-support-an-absolutely-amazing-study-tool-to-check-out-asap/) [How To Add Cisco VIRL vIOS image to Eve-ng](https://networkhunt.com/how-to-add-cisco-virl-vios-image-to-eve-ng/) -全体的にこのステップは少し複雑で、もっと簡単にできるかもしれませんが、上記のブログとビデオはEVE-NGボックスにイメージを追加するプロセスを説明しています。 +Overall the steps here are a little complicated and could be much easier but the above blogs and videos walk through the process of adding the images to your EVE-NG box. -私はFileZillaを使用して、SFTP経由でqcow2をVMに転送しました。 +I used FileZilla to transfer the qcow2 to the VM over SFTP. -このラボでは、Cisco vIOS L2(スイッチ)とCisco vIOS(ルーター)が必要です。 +For our lab, we need Cisco vIOS L2 (switches) and Cisco vIOS (router) -### ラボの作成 +### Create a Lab -EVE-NGのWebインターフェイス内で、新しいネットワークトポロジーを作成します。4台のスイッチと、外部ネットワークへのゲートウェイとして機能する1台のルータを用意する予定です。 +Inside the EVE-NG web interface, we are going to create our new network topology. We will have four switches and one router that will act as our gateway to outside networks. | Node | IP Address | | ----------- | ----------- | @@ -51,50 +51,50 @@ EVE-NGのWebインターフェイス内で、新しいネットワークトポ | Switch3 | 10.10.88.113| | Switch4 | 10.10.88.114| -#### EVE-NGにノードを追加する +#### Adding our Nodes to EVE-NG -EVE-NGに初めてログインすると、以下のような画面が表示されますので、まずは最初のラボを作成してみたいと思います。 +When you first log in to EVE-NG you will see a screen like below, we want to start by creating our first lab. ![](Images/Day26_Networking2.png) -研究室の名前を入力します。その他の項目は任意です。 +Give your lab a name and the other fields are optional. ![](Images/Day26_Networking3.png) -すると、ネットワークの作成を開始するための空白のキャンバスが表示されます。キャンバス上で右クリックし、ノードの追加を選択します。 +You will be then greeted with a blank canvas to start creating your network. Right-click on your canvas and choose add node. -ここで、ノードのオプションの長いリストが表示されます。上記で説明した通りなら、下図の青い2つのノードがあり、他のノードはグレーで選択できないようになっています。 +From here you will have a long list of node options, If you have followed along above you will have the two in blue shown below and the others are going to be grey and unselectable. ![](Images/Day26_Networking4.png) -ラボに以下を追加したい: +We want to add the following to our lab: -- 1 x Cisco vIOS Router +- 1 x Cisco vIOS Router - 4 x Cisco vIOS Switch -簡単なウィザードを実行し、ラボに追加すると次のようになります。 +Run through the simple wizard to add them to your lab and it should look something like this. ![](Images/Day26_Networking5.png) -#### ノードの接続 +#### Connecting our nodes -次に、ルータとスイッチの間の接続を追加する必要があります。デバイスの上にカーソルを置くと、以下のような接続アイコンが表示されるので、それを接続したいデバイスに接続すれば、簡単に接続することができます。 +We now need to add our connectivity between our routers and switches. We can do this quite easily by hovering over the device and seeing the connection icon as per below and then connecting that to the device we wish to connect to. ![](Images/Day26_Networking6.png) -環境の接続が完了したら、右クリックメニューにあるボックスや円を使用して、物理的な境界や位置を定義する方法を追加することもできます。また、テキストを追加することも可能で、ラボのネーミングやIPアドレスを定義するのに便利です。 +When you have finished connecting your environment you may also want to add some way to define physical boundaries or locations using boxes or circles which can also be found in the right-click menu. You can also add text which is useful when we want to define our naming or IP addresses in our labs. -私は、以下のようなラボを作りました。 +I went ahead and made my lab look like the below. ![](Images/Day26_Networking7.png) -また、上のラボはすべて電源が切れていることに気づきます。すべてを選択して右クリックし、選択した状態で起動することで、ラボを開始することができます。 +You will also notice that the lab above is all powered off, we can start our lab by selecting everything and right-clicking and selecting start selected. ![](Images/Day26_Networking8.png) -このラボを立ち上げると、各デバイスにコンソールできるようになります。この段階では、何も設定されておらず、かなり間抜けな状態であることに気づくでしょう。各端末の設定をコピーするか、自分で作成することで、各ノードに設定を追加することができます。 +Once we have our lab up and running you will be able to console into each device and you will notice at this stage they are pretty dumb with no configuration. We can add some configuration to each node by copying or creating your own in each terminal. -私は参考のため、リポジトリの Networking フォルダに設定を残しておきます。 +I will leave my configuration in the Networking folder of the repository for reference. | Node | Configuration | | ----------- | ----------- | @@ -104,7 +104,7 @@ EVE-NGに初めてログインすると、以下のような画面が表示さ | Switch3 | [SW3](Networking/SW3) | | Switch4 | [SW4](Networking/SW4) | -## リソース +## Resources - [Free Course: Introduction to EVE-NG](https://www.youtube.com/watch?v=g6B0f_E0NMg) - [EVE-NG - Creating your first lab](https://www.youtube.com/watch?v=9dPWARirtK8) @@ -113,8 +113,8 @@ EVE-NGに初めてログインすると、以下のような画面が表示さ - [Practical Networking](http://www.practicalnetworking.net/) - [Python Network Automation](https://www.youtube.com/watch?v=xKPzLplPECU&list=WL&index=126) -私はネットワークエンジニアではないので、ここで使用している例のほとんどは、無料ではありませんが、Network Automationを理解するのに役立つシナリオのいくつかをこの本から引用しています。 +Most of the examples I am using here as I am not a Network Engineer have come from this extensive book which is not free but I am using some of the scenarios to help understand Network Automation. - [Hands-On Enterprise Automation with Python (Book)](https://www.packtpub.com/product/hands-on-enterprise-automation-with-python/9781788998512) -[27日目](day27.md)でお会いしましょう。 +See you on [Day 27](day27.md) From 3f18b62bde6fc5b098ef81377f29fc20660ee795 Mon Sep 17 00:00:00 2001 From: ptux Date: Tue, 18 Oct 2022 21:49:17 +0900 Subject: [PATCH 3/3] add ja day27 --- ja/Days/day27.md | 86 ++++++++++++++++++++++++------------------------ 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/ja/Days/day27.md b/ja/Days/day27.md index d2d3bce..9e251d6 100644 --- a/ja/Days/day27.md +++ b/ja/Days/day27.md @@ -1,31 +1,31 @@ --- -title: '#90DaysOfDevOps - Getting Hands-On with Python & Network - Day 27' +title: '#90DaysOfDevOps - Pythonとネットワークのハンズオン - 27日目' published: false -description: 90DaysOfDevOps - Getting Hands-On with Python & Network +description: 90DaysOfDevOps - Pythonとネットワークのハンズオン tags: "devops, 90daysofdevops, learning" cover_image: null canonical_url: null id: 1048735 --- -## Getting Hands-On with Python & Network +## Pythonとネットワークのハンズオン -In this final section of Networking fundamentals, we are going to cover some automation tasks and tools with our lab environment created on [Day 26](day26.md) +ネットワークの基礎の最後のセクションでは、[Day 26](day26.md) で作成したラボ環境を使って、いくつかの自動化タスクとツールをカバーするつもりです。 -We will be using an SSH tunnel to connect to our devices from our client vs telnet. The SSH tunnel created between client and device is encrypted. We also covered SSH in the Linux section on [Day 18](day18.md) +クライアントからデバイスに接続するために、SSHトンネルを使用する予定です。クライアントとデバイスの間に作成された SSH トンネルは暗号化されています。SSHについては、[Day18](day18.md)のLinuxセクションでも取り上げました。 -## Access our virtual emulated environment +## 仮想エミュレート環境にアクセスする -For us to interact with our switches we either need a workstation inside the EVE-NG network and you can deploy a Linux box there with Python installed to perform your automation ([Resource for setting up Linux inside EVE-NG](https://www.youtube.com/watch?v=3Qstk3zngrY)) or you can do something like me and define a cloud for access from your workstation. +EVE-NGネットワーク内にワークステーションが必要で、そこにPythonをインストールしたLinuxボックスを配置して自動化を行うか([Resource for setting up Linux inside EVE-NG](https://www.youtube.com/watch?v=3Qstk3zngrY)) 、私のようにワークステーションからアクセスするクラウドを定義することができます。 ![](Images/Day27_Networking3.png) -To do this, we have right-clicked on our canvas and we have selected network and then selected "Management(Cloud0)" this will bridge out to our home network. +これを行うには、キャンバスを右クリックして、ネットワークを選択し、「Management(Cloud0)」を選択して、ホームネットワークに橋渡しします。 ![](Images/Day27_Networking4.png) -However, we do not have anything inside this network so we need to add connections from the new network to each of our devices. (My networking knowledge needs more attention and I feel that you could just do this next step to the top router and then have connectivity to the rest of the network through this one cable?) +しかし、このネットワーク内には何もないので、新しいネットワークから各機器への接続を追加する必要があります。(私のネットワークの知識はもっと注意が必要で、この次のステップを一番上のルーターに行い、この1本のケーブルを通して残りのネットワークに接続することができるような気がします?) -I have then logged on to each of our devices and I have run through the following commands for the interfaces applicable for where the cloud comes in. +その後、各機器にログインし、クラウドが入る部分に該当するインターフェースに対して、以下のコマンドを実行しました。 ``` enable @@ -38,7 +38,7 @@ exit sh ip int br ``` -The final step gives us the DHCP address from our home network. My device network list is as follows: +最後のステップでは、ホームネットワークからDHCPアドレスを取得します。私のデバイスのネットワークリストは以下の通りです。 | Node | IP Address | Home Network IP | | ----------- | ----------- | ----------- | @@ -48,81 +48,81 @@ The final step gives us the DHCP address from our home network. My device networ | Switch3 | 10.10.88.113| 192.168.169.125 | | Switch4 | 10.10.88.114| 192.168.169.197 | -### SSH to a network device +### ネットワーク機器に SSH 接続する -With the above in place, we can now connect to our devices on our home network using our workstation. I am using Putty but also have access to other terminals such as git bash that give me the ability to SSH to our devices. +以上で、ワークステーションを使用してホームネットワーク上のデバイスに接続できるようになりました。私は Putty を使っていますが、git bash のような他のターミナルも使えるので、デバイスに SSH 接続することができます。 -Below you can see we have an SSH connection to our router device. (R1) +以下は、ルーターに SSH 接続しているところです。(R1) ![](Images/Day27_Networking5.png) -### Using Python to gather information from our devices +### Python を使ってデバイスから情報を収集する -The first example of how we can leverage Python is to gather information from all of our devices and in particular, I want to be able to connect to each one and run a simple command to provide me with interface configuration and settings. I have stored this script here [netmiko_con_multi.py](Networking/netmiko_con_multi.py) +Python をどのように活用するかの最初の例は、すべてのデバイスから情報を収集することです。特に、それぞれのデバイスに接続して、インターフェースの構成と設定を提供する簡単なコマンドを実行できるようにしたいのです。このスクリプトは [netmiko_con_multi.py] (Networking/netmiko_con_multi.py) に保存されています。 -Now when I run this I can see each port configuration over all of my devices. +このスクリプトを実行すると、全てのデバイスの各ポートのコンフィギュレーションを見ることができます。 ![](Images/Day27_Networking6.png) -This could be handy if you have a lot of different devices, create this one script so that you can centrally control and understand quickly all of the configurations in one place. +このスクリプトを作成すれば、すべての設定を一元的に管理し、すばやく理解することができますので、さまざまなデバイスをたくさんお持ちの場合に便利です。 -### Using Python to configure our devices +### Python を使ってデバイスを設定する -The above is useful but what about using Python to configure our devices, in our scenario we have a trunked port between `SW1` and `SW2` again imagine if this was to be done across many of the same switches we want to automate that and not have to manually connect to each switch to make the configuration change. +このシナリオでは、`SW1`と`SW2`の間にトランクされたポートがありますが、これが多くの同じスイッチ間で行われるとしたら、設定を変更するために各スイッチに手動で接続する必要がなく、自動化したいと思います。 -We can use [netmiko_sendchange.py](Networking/netmiko_sendchange.py) to achieve this. This will connect over SSH and perform that change on our `SW1` which will also change to `SW2`. +これを実現するために [netmiko_sendchange.py] (Networking/netmiko_sendchange.py) を使用することができます。これは SSH で接続し、`SW1` の変更を実行し、`SW2` にも変更を加えます。 ![](Images/Day27_Networking7.png) -Now for those that look at the code, you will see the message appears and tells us `sending configuration to device` but there is no confirmation that this has happened to we could add additional code to our script to perform that check and validation on our switch or we could modify our script before to show us this. [netmiko_con_multi_vlan.py](Networking/netmiko_con_multi_vlan.py) +今、コードを見ると、メッセージが表示され、`sending configuration to device` と表示されますが、これが起こったという確認はありません。このスクリプトに追加のコードを追加して、スイッチのチェックと検証を行うか、あるいは、このスクリプトを前に修正して、これを表示させます。[netmiko_con_multi_vlan.py](Networking/netmiko_con_multi_vlan.py) ![](Images/Day27_Networking8.png) -### backing up your device configurations +### デバイス設定のバックアップ -Another use case would be to capture our network configurations and make sure we have those backed up, but again we don't want to be connecting to every device we have on our network so we can also automate this using [backup.py](Networking/backup.py). You will also need to populate the [backup.txt](Networking/backup.txt) with the IP addresses you want to backup. +もう一つの使用例として、ネットワーク設定を取得し、バックアップしていることを確認します。backup.txt](Networking/backup.txt) にバックアップしたいIPアドレスを入力する必要があります。 -Run your script and you should see something like the below. +スクリプトを実行すると、以下のように表示されるはずです。 ![](Images/Day27_Networking9.png) -That could be me just writing a simple print script in python so I should show you the backup files as well. +それは私がpythonで簡単なprintスクリプトを書いているだけかもしれないので、バックアップファイルも見せるべきですね。 ![](Images/Day27_Networking10.png) -### Paramiko +### Paramiko -A widely used Python module for SSH. You can find out more at the official GitHub link [here](https://github.com/paramiko/paramiko) +広く使われているSSH用のPythonモジュールです。GitHubの公式リンク[こちら](https://github.com/paramiko/paramiko)で詳細を見ることができます。 -We can install this module using the `pip install paramiko` command. +このモジュールは `pip install paramiko` コマンドでインストールすることができます。 ![](Images/Day27_Networking1.png) -We can verify the installation by entering the Python shell and importing the paramiko module. +Pythonのシェルに入り、paramikoモジュールをインポートすることで、インストールを確認することができます。 ![](Images/Day27_Networking2.png) -### Netmiko +### Netmiko -The netmiko module targets network devices specifically whereas paramiko is a broader tool for handling SSH connections overall. +netmiko モジュールはネットワークデバイスに特化しており、paramiko は SSH 接続全般を扱うより広範なツールです。 -Netmiko which we have used above alongside paramiko can be installed using `pip install netmiko` +上記で paramiko と共に使用した Netmiko は `pip install netmiko` でインストールすることができます。 -Netmiko supports many network vendors and devices, you can find a list of supported devices on the [GitHub Page](https://github.com/ktbyers/netmiko#supports) +Netmikoは多くのネットワークベンダやデバイスをサポートしています。サポートされているデバイスの一覧は[GitHub Page](https://github.com/ktbyers/netmiko#supports)で見ることができます。 -### Other modules +### その他のモジュール -It is also worth mentioning a few other modules that we have not had the chance to look at but they give a lot more functionality when it comes to network automation. +まだ見ていないモジュールもありますが、ネットワークの自動化に関して、より多くの機能を提供します。 -`netaddr` is used for working with and manipulating IP addresses, again the installation is simple with `pip install netaddr` +netaddr` は IP アドレスを操作するために使用され、インストールは `pip install netaddr` で簡単にできます。 -you might find yourself wanting to store a lot of your switch configuration in an excel spreadsheet, the `xlrd` will allow your scripts to read the excel workbook and convert rows and columns into a matrix. `pip install xlrd` to get the module installed. +xlrd` を使うと、スクリプトがエクセルのワークブックを読み込んで、行と列をマトリックスに変換することができます。モジュールをインストールするには `pip install xlrd` を実行してください。 -Some more use cases where network automation can be used that I have not had the chance to look into can be found [here](https://github.com/ktbyers/pynet/tree/master/presentations/dfwcug/examples) +ネットワークオートメーションの使用例として、まだ調べていないものがありますが、[ここ](https://github.com/ktbyers/pynet/tree/master/presentations/dfwcug/examples)で見ることができます。 -I think this wraps up our Networking section of the #90DaysOfDevOps, Networking is one area that I have not touched for a while really and there is so much more to cover but I am hoping between my notes and the resources shared throughout it is helpful for some. +ネットワークは、私がしばらく触れていない分野の一つで、まだまだカバーすべきことがたくさんありますが、私のメモと共有されたリソースが誰かの役に立つことを願っています。 -## Resources +## リソース - [Free Course: Introduction to EVE-NG](https://www.youtube.com/watch?v=g6B0f_E0NMg) - [EVE-NG - Creating your first lab](https://www.youtube.com/watch?v=9dPWARirtK8) @@ -131,8 +131,8 @@ I think this wraps up our Networking section of the #90DaysOfDevOps, Networking - [Practical Networking](http://www.practicalnetworking.net/) - [Python Network Automation](https://www.youtube.com/watch?v=xKPzLplPECU&list=WL&index=126) -Most of the examples I am using here as I am not a Network Engineer have come from this extensive book which is not free but I am using some of the scenarios to help understand Network Automation. +私はネットワークエンジニアではないので、ここで使用している例のほとんどは、無料ではありませんが、ネットワークオートメーションの理解に役立つシナリオのいくつかを使用しているこの広範な書籍から来ました。 - [Hands-On Enterprise Automation with Python (Book)](https://www.packtpub.com/product/hands-on-enterprise-automation-with-python/9781788998512) -See you on [Day 28](day28.md) where will start looking into cloud computing and get a good grasp and foundational knowledge of the topic and what is available. +[28日目](day28.md)では、クラウドコンピューティングについて調べ始め、この話題と何が利用可能かについて、よく理解し基礎知識を得るために、お会いしましょう。