PC端末も準備したいな。。
QEMUでできるようだけど KVM 使ってるので、これでできないかなー。
雲をもう1つ作成して(C2) これを virbr1 に接続。
root@hat1:~# LANG=C ifconfig virbr1 | grep "inet addr"
inet addr:192.168.123.1 Bcast:192.168.123.255 Mask:255.255.255.0
で、KVM上のVMも virbr1 に接続したらアクセスできないかなー。
192.168.123.0/24 192.168.11.0/24 ( internet へ )
C2_virbr1 ------------------ f 0/0 Router e 1/0 ------------- C1_eth0
f0/0 に 192.168.123.100 をアサイン
[ VM ( KVM ) ]
net1 ( virbr1 ) の NIC を持つ VM を起動
192.168.123.0/24 192.168.11.0/24 ( internet へ )
VM --- C2_virbr1 ------------------ f 0/0 Router e 1/0 ------------- C1_eth0
[root@hat1-vm ~]# ifconfig eth0 | grep "inet addr"
inet addr:192.168.123.232 Bcast:192.168.123.255 Mask:255.255.255.0
VM hat1-vm から Router 192.168.123.100 へ ping ( OK )
[root@hat1-vm ~]# ping 192.168.123.100
PING 192.168.123.100 (192.168.123.100) 56(84) bytes of data.
64 bytes from 192.168.123.100: icmp_seq=1 ttl=255 time=2.10 ms
64 bytes from 192.168.123.100: icmp_seq=2 ttl=255 time=1.10 ms
--- 192.168.123.100 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1000ms
rtt min/avg/max/mdev = 1.103/1.605/2.107/0.502 ms
[root@hat1-vm ~]# arp -an
? (192.168.123.100) at C8:00:09:0F:00:00 [ether] on eth0
? (192.168.123.1) at 7A:9D:69:E2:DC:59 [ether] on eth0
Router から hat1-vm にも ping が通った。
VM hat1-vm から cisco router に telnet も可能。
[root@hat1-vm ~]# telnet 192.168.123.100
Trying 192.168.123.100...
Connected to 192.168.123.100 (192.168.123.100).
Escape character is '^]'.
User Access Verification
Password:
Router>ena
Router>enable
Password:
Router#sho
Router#show run
Building configuration...
Current configuration:
!
version 12.0
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname Router
!
enable password hello
!
!
!
!
!
memory-size iomem 15
ip subnet-zero
!
!
!
process-max-time 200
!
interface FastEthernet0/0
ip address 192.168.123.100 255.255.255.0
no ip directed-broadcast
!
interface FastEthernet0/1
no ip address
no ip directed-broadcast
shutdown
!
interface Ethernet1/0
ip address 192.168.11.200 255.255.255.0
no ip directed-broadcast
!
interface Ethernet1/1
no ip address
no ip directed-broadcast
shutdown
!
interface Ethernet1/2
no ip address
no ip directed-broadcast
shutdown
!
interface Ethernet1/3
no ip address
no ip directed-broadcast
shutdown
!
ip classless
no ip http server
!
!
line con 0
transport input none
line aux 0
line vty 0
password hello
login
line vty 1 4
login
!
end
Router#
Router#
QEMUでできるようだけど KVM 使ってるので、これでできないかなー。
雲をもう1つ作成して(C2) これを virbr1 に接続。
root@hat1:~# LANG=C ifconfig virbr1 | grep "inet addr"
inet addr:192.168.123.1 Bcast:192.168.123.255 Mask:255.255.255.0
で、KVM上のVMも virbr1 に接続したらアクセスできないかなー。
192.168.123.0/24 192.168.11.0/24 ( internet へ )
C2_virbr1 ------------------ f 0/0 Router e 1/0 ------------- C1_eth0
f0/0 に 192.168.123.100 をアサイン
[ VM ( KVM ) ]
net1 ( virbr1 ) の NIC を持つ VM を起動
192.168.123.0/24 192.168.11.0/24 ( internet へ )
VM --- C2_virbr1 ------------------ f 0/0 Router e 1/0 ------------- C1_eth0
[root@hat1-vm ~]# ifconfig eth0 | grep "inet addr"
inet addr:192.168.123.232 Bcast:192.168.123.255 Mask:255.255.255.0
VM hat1-vm から Router 192.168.123.100 へ ping ( OK )
[root@hat1-vm ~]# ping 192.168.123.100
PING 192.168.123.100 (192.168.123.100) 56(84) bytes of data.
64 bytes from 192.168.123.100: icmp_seq=1 ttl=255 time=2.10 ms
64 bytes from 192.168.123.100: icmp_seq=2 ttl=255 time=1.10 ms
--- 192.168.123.100 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1000ms
rtt min/avg/max/mdev = 1.103/1.605/2.107/0.502 ms
[root@hat1-vm ~]# arp -an
? (192.168.123.100) at C8:00:09:0F:00:00 [ether] on eth0
? (192.168.123.1) at 7A:9D:69:E2:DC:59 [ether] on eth0
Router から hat1-vm にも ping が通った。
VM hat1-vm から cisco router に telnet も可能。
[root@hat1-vm ~]# telnet 192.168.123.100
Trying 192.168.123.100...
Connected to 192.168.123.100 (192.168.123.100).
Escape character is '^]'.
User Access Verification
Password:
Router>ena
Router>enable
Password:
Router#sho
Router#show run
Building configuration...
Current configuration:
!
version 12.0
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname Router
!
enable password hello
!
!
!
!
!
memory-size iomem 15
ip subnet-zero
!
!
!
process-max-time 200
!
interface FastEthernet0/0
ip address 192.168.123.100 255.255.255.0
no ip directed-broadcast
!
interface FastEthernet0/1
no ip address
no ip directed-broadcast
shutdown
!
interface Ethernet1/0
ip address 192.168.11.200 255.255.255.0
no ip directed-broadcast
!
interface Ethernet1/1
no ip address
no ip directed-broadcast
shutdown
!
interface Ethernet1/2
no ip address
no ip directed-broadcast
shutdown
!
interface Ethernet1/3
no ip address
no ip directed-broadcast
shutdown
!
ip classless
no ip http server
!
!
line con 0
transport input none
line aux 0
line vty 0
password hello
login
line vty 1 4
login
!
end
Router#
Router#
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.