Qemuホストの設定
GNS3の公式ドキュメントを元にしてQemuホストにMicrocore linuxを使用してみたいと思います。
1.最初に「Microcore linux」をダウンロードします。任意の場所に保存します。→linux-microcore-2.10.img
2.GNSのQemuホスト設定を下記の通り行います。
「編集」→「設定」→「Qemu」→「Qemuホスト」
【設定内容】
「識別子名:」→任意のホスト名を設定
「バイナリイメージ:」→最初にダウンロードしたイメージファイルを指定してください
「メモリ:」→ホストに使用するメモリ設定
「NIC:」→ネットワークカードの設定
「Qemuオプション:」→Qemuの起動オプションを指定します。
上記設定を行い保存ボタンで保存し設定を終了します。
【設定例】
下記の構成を作成します。
R1は下記のように設定して下さい。(この例ではCisco7200を使用しています)
R1#sh run
Building configuration...
Current configuration : 907 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R1
!
boot-start-marker
boot-end-marker
!
enable password cisco
!
aaa new-model
!
!
aaa authentication login SSH-LOGIN local
!
aaa session-id common
!
!
ip cef
ip domain name cisco.com
!
!
username cisco password 0 cisco
archive
log config
hidekeys
!
!
interface Loopback0
ip address 192.168.0.1 255.255.255.0
!
interface FastEthernet0/0
ip address 10.10.10.1 255.255.255.0
duplex half
speed auto
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
!
no ip http server
no ip http secure-server
!
!
control-plane
!
!
gatekeeper
shutdown
!
!
line con 0
stopbits 1
line aux 0
stopbits 1
line vty 0 4
password cisco
login authentication SSH-LOGIN
transport input telnet ssh
!
!
end
R1#
「crypto key generate rsa」でRSAキーを設定します。
Qemuは下記のコマンドでIPアドレスを設定します。
sudo su
ifconfig eth0 10.10.10.2 netmask 255.255.255.0 up
ifconfig eth0
先にある192.168.0.1に疎通させるためデフォルゲートウェイを設定します。
「route add default gw 10.10.10.1」
設定は終了です。
ためしにtelnetをしてみます。
次はsshでログインします。