15
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

GNS3 Server on ESXi(その1)

Posted at

Fortigate・Paloalto・VyOSなどESXiの仮想OSとしてたちあげ検証する方法を今まではご紹介してきました。ただ、この方法だと複雑な構成を作ろうとした場合に毎回vSwitch/ポートグループ設定など、やることも増えますし、検証終わった後のゴミも増えますし、、、、なによりメンドクサイのでいい加減楽をしたいです!

ということで、今回はGNS3をUbunts21.04上のサービスとして立ち上げクライアント端末からつながるところまでの記事になります。利用するUbuntsはESXi上の仮想OSとして事前にインストールしています。

構成イメージ
    image.png 

1. 前提

  • OS: Linux gns3 5.13.0-28-generic
  • GNS3: 2.2.9
  • CPU: 8vCPU
  • MEM: 10GB

2. GNS3インストール作業

いつもの通り事前準備で最新化し、GNS3のリポジトリを登録します。

sudo su - 
apt-get vim
apt-get update
apt-get upgrade
add-apt-repository ppa:gns3/ppa

では、インストールしましょう

apt-get install gns3-server gns3-gui

実行するといくつか質問されますので、下記の通り実行します。 

Should non-superusers be able to run GNS3? [yes/no] no

Should non-superusers be able to capture packets? [yes/no] yes


  1. networkd-dispatcher.service  4. ssh.service               7. systemd-networkd.service   10. systemd-udevd.service        13. none of the above
  2. packagekit.service           5. systemd-journald.service  8. systemd-resolved.service   11. unattended-upgrades.service
  3. polkit.service               6. systemd-logind.service    9. systemd-timesyncd.service  12. user@1000.service

(Enter the items or ranges you want to select, separated by spaces.)

Which services should be restarted?  # Enterキーを押します。

ディレクトリおよびファイルを作成します。

mkdir -p /root/.config/GNS3/2.2
vim /root/.config/GNS3/2.2/gns3_server.conf
[Qemu]
enable_kvm = False
require_kvm = False
:wq

最後は起動スクリプトを作成しましょう。

vim /etc/systemd/system/gns3.service
[Unit]
Description=GNS3-Server
After=networko.target

[Service]
User=root
Group=root
Type=simple
ExecStart=/usr/share/gns3/gns3-server/bin/gns3server

[Install]
WantedBy=multi-user.target
:wq

3. GNS3起動

いざ起動!!

systemctl enable gns3
systemctl start gns3

dpkg -l | grep gns3
ii  gns3-gui                              2.2.29~impish1                        amd64        GNS3 GUI
ii  gns3-server                           2.2.29~impish1                        amd64        GNS3 server

※起動していることがわかります。

4. クライアント端末へGNS3をインストール

下記サイトからGNS3をダウンロードしておきましょう。

ダウンロードしたexeファイルをダブルクリックしてインストーラーを起動します。
image.png

「I Agree」をクリックします。
image.png

「Next」をクリックします。
image.png

「Next」をクリックします。
image.png  

インストール場所を指定したい場合は「Browse」から適切な場所を、デフォルトでもよければそのまま「Next」をクリックします。
image.png

インストールが始まります。途中NpcapとWireSharkのインストールが始まりますが、すべてデフォルトの値で「Next」をクリックして進めてください。
image.png

インストールが完了しました。「Next」をクリックします。
image.png

Toolsetを利用するかどうするか聞かれます。私は「No」を選択しました。
image.png

「Finish」をクリックして、クライアント側のGNS3を立ち上げましょう。
image.png

5. GNS3Serverへの接続

クライアント側のGNS3が起動したら、EditからPreferencesをクリックします。
image.png

画面左の「Server」を選択し、「Main server」タブの「Enable local server」のチェックを外します。
image.png

画面が遷移しますので、Hostの項目にGNS3ServerのIPアドレスを入力して、「Auth」チェックを外し「OK」ボタンをクリックします。
image.png

画面右下の「Servers Summary」が画面のようになっていれば正常です。
image.png

6. その他

次回は、GNS3にFortigateVMやVyOSをアプライアンスとして登録する方法をご紹介します。

15
4
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
15
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?