Home

Setting up Virtual Machines for Network Programming

image

Contents

1. A Name VM_1_Debian_8 x_en a guar Linked Base for VM_Base_Debian_8 x_en and VM_4_Debian_8 x_en Operating System Debian 32 bit Groups NetEd Debian Clones System NetEd Debian Clones T VM_1_Debian_8 x_en ce Powered Off Base Memory 64MB Boot Order Floppy Optical Hard Disk Acceleration VT x AMD V Nested Paging KVM Paravirtualization VM_2_Debian_8 x_en Powered off Display VM_3_Debian_8 x_en Powered off Video Memory 12M8 Remote Desktop Server Disabled VM_4_Debian_8 x_en Video Capture Disabled Powered off Storage Controller IDE IDE Secondary Master Optical Drive Empty Controller SATA SATA Port 0 QR Audio Haet Drivers Windawie DiractGnend ie Details Snapshots VM_i_ Debian_8 x_en VM_Base_Debian_8 x_en disk1 vdi Normal 2 00 GB v 3 Figure 3 VirtualBox shows 4 linked clones created Note that we group the virtual machines into two groups You group the virtual machines if you wish to 4 Exploring and Testing Virtual Machines Now we explore the 4 virtual machines 1 Displaying and verifying hostname Revision 134 7b0b97d898ad SETTING UP VIRTUAL MACHINES Start all 4 cloned virtual machines Log in the 4 virtual machines The username and password are debian less quotation marks Verify that the hostnames displayed in the command prompt are dVM1 dVM2 dVM3 and dVM4 on each of the 4 virtual machines respectively In a
2. Load save or delete a stored session i Behaviour Behaviour 3 Translation Saved Sessions Translation Intemet protocol version Selection Selection Anto OIPv4 OIPvg Coari Logical name of remote host B Connection 2 bead Connection z ee Data Data Logical name of remote host e g for SSH key lookup Proxy Proxy Telnet Telnet Rlogin Rlogin SSH 6 SSH Sail Close window on exit Sal O Aways O Never Only on clean exit ot e ra boa i Croa a Create a new session in PuTTY b Keep connection alive in PuTTY Figure 4 Using PuTTY c To select text to copy in PuTTY simply highlight the text To paste right click the mouse 5 Non Window Hosts To make the discussion concrete we use Microsoft Windows system as an example host computer system The above steps with minor revision work with non Windows operating systems such as Linux and Apple s Mac OS X as well We use the 7 zip archive manager to create the compress archive of the Linux virtual machine image Builds of the 7 zip archive manager are available on Linux and Mac OS X See p7zip and pzX A little inconvenience to some is that p7zip and 7zX are command line tools and do not provide a graphical user interface Below is a guide for Linux hosts To install p7zip on a Linux using apt get issue sudo apt get y install p7zip full To extract the virtual machine from the compressed archive issue a command similar to the below 7z
3. Oracle Welcome to virtualbox org https www virtualbox org retrieved on September 28 2015 Revision 134 7b0b97d898ad 13 SETTING UP VIRTUAL MACHINES 19 Igor Pavlov 7 zip http 7 zip org retrieved on September 28 2015 20 Simon Tatham 4 13 The Connection panel In 23 http the earth 1i sgtatham putty 0 65 htmldoc Chapter4 html config connection retrieved on September 28 2015 21 Simon Tatham Chapter 2 Getting started with PuTTY In 23 http the earth 1i sgtatham putty 0 65 htmldoc Chapter2 html gs retrieved on September 28 2015 22 Simon Tatham Putty A free telnet ssh client http www chiark greenend org uk sgtatham putty retrieved on September 28 2015 23 Simon Tatham PuTTY User Manual http the earth 1i sgtatham putty 0 65 htmldoc retrieved on September 28 2015 Revision 134 7b0b97d898ad 14
4. configured to response to ICMP ECHO_REQUESTs 3 Listing network devices and displaying network configuration We now introduce the ip command a utility of the iproute2 suite on Linux systems 11 15 16 We first list all network devices and then display network configuration using the ip command on a virtual machine The following is an example on VM2 to show network devices via command ip link show debian dVM3 ip link show 1 lo lt LOOPBACK UP LOWER_UP gt mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default link loopback 00 00 00 00 00 00 brd 00 00 00 00 00 00 eth0 lt BROADCAST MULTICAST UP LOWER UP gt mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000 link ether 08 00 27 04 de ce brd ff ff ff ff ff ff ethl lt BROADCAST MULTICAST UP LOWER UP gt mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000 link ether 08 00 27 c6 5c 40 brd ff ff ff ffff eth2 lt BROADCAST MULTICAST gt mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000 link ether 08 00 27 12 d4 8d brd ff EPs tiett aft eff eth3 lt BROADCAST MULTICAST gt mtu 1500 qdisc noop ate DOWN mode DEFAULT group default qlen 1000 link ether 08 00 27 1la 78 fd brd ff ff ff ff ff debian dVM3 which shows that the virtual machine has 4 Ethernet adaptors i e eth0 eth1 eth2 and eth3 and a loopback device lo Taking ethO as an example w
5. Machine New machine name Clone type Please choose a name for the new virtual machine The new Please choose the type of done you wish to create machine will be a done of the machine VM_Base_Debian_8 x_en If you choose Full clone an exact copy induding all virtual hard disk files of the original virtual machine will be created If you choose Linked clone a new machine will be created i ener meena but the virtual hard disk files will be tied to the virtual hard disk files of original machine and you will not be able to move the new virtual machine to a different computer without moving the original as well If you create a Linked clone then a new snapshot will be created in the original virtual machine as part of the cloning process Full done Linked done cette hem cre a Name the clone and reinitialize MAC addresses b Create linked clone Figure 2 Making linked clone Enter the username and password to log in the virtual machine Both the username and password are debian less quotation marks We can now see that the hostname of the virtual machine VM2 is VM1 that we may confuse with the virtual machine VM1 from which we created this clone For Ubuntu Linux to change the hostname we need to edit two configuration files etc hosts and etc hostname Ubuntu Linux has many editors We can use either vi or nano to edit files If you have no experience with
6. E User interface FE User interface a En ae a a Virtual Network Adaptor 1 b Virtual Network Adaptor 2 VM Base _Debian_8 x_en Settings x VM Base Debian _8 x_en Settings X General Network General Network System Adapter 1 Adapter2 Adapter3 Adapter 4 iE System Adapter1 Adapter2 Adapter3 Adapter 4 E disptay EZ Enable Network Adapter E Display 7 Enable Network Adapter Some Attached to Internal Network v stonge Attached to Internal Network Name dvment y Name dvMen1 x audio gt audio i Advanced Advanced og Network Adapter Type Intel PRO 1000 MT Desktop 82540EM G Network Adapter Type Intel PRO 1000 MT Desktop 82540EM Serial Ports Promiscuous Mode Deny Serial Ports Promiscuous Mode Deny X By earann 7 Py Pca ET 7 8 a MAC Address 080027188691 8 8 use MAC Address 080027088387 Z Cable Connected A EZ Cable Connected Shared Folders E Shared Folders Port Forwarding Port Forwarding E User interface FE User interface oc cea tep a cme tep c Virtual Network Adaptor 3 d Virtual Network Adaptor 4 Figure 1 Configuration of network adaptors in the Linux virtual machine is visible to selected virtual machines but not to applications running on the host or to the outside world 5 This adaptor will be used for our networkprogramming and experiments Note that we name the Ethernet that this adapter is on as dVMen1 An ada
7. Setting up Virtual Machines for Network Programming and Experiment Hui Chen Computer Science Virginia State University Virginia 23806 E mail huichen AT ieee org Written on September 14 2015 Lastly revised on October 13 2015 Revision 134 7b0b97d898ad The purpose of this manual is to guide readers to create an environment for network program ming and experiments using Virtual machines 1 Assumption and Requirement We prepare this manual and test the steps in this manual using a Microsoft Windows 10 computer that has an Intel R Core TM i5 2520M CPU 8 GB of RAM and 20 GB free disk space In this document we refer this computer as the host computer as we run virtual machines using a virtualization software installed in the computer Be aware that if your computer has 4GB or less RAM or a much older CPU you may find it is too slow to run the virtual machine guests In addition the steps presented below should work on other versions of Microsoft Windows operating sytem Section 5 is a brief discussion on non windows hosts If you use a host computer of different operating system such as Apple s Mac OS X or Linux you may refer to the section We chooses Oracle VirtualBox as the virtualization software because it is freely available as Open Source Software under the terms of the GNU General Public License GPL version 2 18 runs on Windows Linux Macintosh and Solaris hosts supports a large number of guest oper ating sys
8. chines we can use a Secure Shell client to connect to a virtual machine via the IP address of the Host only Adaptor which saves the effort of setting up port forwarding for multiple virtual machines e We enabled Network Adapter 3 and configured it in the Internal Network mode as shown in Figure l c This mode is for creating a different kind of software based network which Revision 134 7b0b97d898ad 2 SETTING UP VIRTUAL MACHINES VM Base _Debian_8 x en Settings x VM Base Debian 8 x en Settings 7 x General Network Generat Network System Adapteri Adapter2 Adapter3 Adapter 4 A System Adapter1 Adapter2 Adapter3 Adapter 4 E display Z Enable Network Adapter E Display Enable Network Adapter o Storage Attached to NAT Y B Storage Attached to Host only Adapter v Name Name VirtualBox Host Only Ethernet Adapter X P Audio DP Audio V Advanced V Advanced Ca Network Adapter Type Intel PRO 1000 MT Desktop 82540EM X Ca Network Adapter Type Intel PRO 1000 MT Desktop 82540EM D Serial Ports d E GD serial Ports Promiscuous Mode Deny X EEEE 8 i MAC Address 080027174061 EZ 8 R MAC Address 080027 1149 a Z Cable Connected er EZ cable Connected Shared Folders E Shared Folders Port Forwarding Port Forwarding
9. ddition issue hostname command to show hostname from the command line Below is an example on dVM3 debian dVM3 hostname dVM3 debian dVMB 2 Testing connectivity to the outside world First we verify that we have connectivity to the outside world on the host Recall that on each virtual machine one Ethernet adaptor is configured in the Network Address Translation NAT mode which means all network traffic from the virtual machine to the outside world is via this adaptor to the host and then via the host to the outside world If the host does not have connectivity to the outside world the virtual machine will not either To verify whether the host has connectivity to the outside world we can use the command ping on the host The command ping sends ICMP ECHO_REQUESTs to another host Typically if the host has the connectivity to the other host ping will reports that it receives replies from the other host Below shows that we send 3 ICMP ECHO_REQUESTs to host www google com using the command ping from Windows command line and receives 3 replies C gt ping n 3 www google com Pinging www google com 173 194 123 50 with 32 bytes of data Reply from 173 194 123 50 bytes 32 time 20ms TTL 50 Reply from 173 194 123 50 bytes 32 time 2l1ms TTL 50 Reply from 173 194 123 50 bytes 32 time 18ms TTL 50 Ping statistics for 173 194 123 50 Packets Sent 3 Received 3 Lost 0 0 loss Approximate round tr
10. e details For an in depth technical discussion see 11 e link ether 08 00 27 7d 6e a0 The link is an Ethernet link and the address of the Ethernet adaptor is 08 00 27 7d 6e a0 Commonly seen link types include Ethernet LOOPBACK IEEE 1394 PPP TUNNEL TUNNEL6 IEEE 802 11 IEEE 802 15 4 and Net Link o brd ff fff ff ff ff The network device s broadcast address is ff ff ff ff ff f For more comprehensive discussion on link devices attributes and settings see 14 The following is an example on dVM3 to show network configuration via command ip address show debian dVM3 ip address show 1 lo lt LOOPBACK UP LOWER UP gt mtu 65536 qdisc noqueue state UNKNOWN group default link loopback 00 00 00 00 00 00 brd 00 00 00 00 00 00 inet 127 0 0 1 8 scope host lo valid_lft forever preferred lft forever inet6 1 128 scope host valid_lft forever preferred lft forever eth0 lt BROADCAST MULTICAST UP LOWER_UP gt mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link ether 08 00 27 04 de ce brd ff ff ff ff ff ff inet 10 0 2 15 24 brd 10 0 2 255 scope global ethO valid_lft forever preferred lft forever inet6 fe80 a00 27ff fe04 dcce 64 scope link valid_lft forever preferred lft forever eth1 lt BROADCAST MULTICAST UP LOWER_UP gt mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link ether 08 00 27 c6 5c 40 brd ff ff ff ff ff ff inet 192 168 56 103 24 brd 192 168 56 255 scope global ethl valid_lft fo
11. e interpret what we observe as follows e eth0 The name of the network device is eth0 e lt BROADCAST MULTICAST UP LOWER_UP gt It means that 4 bits of the flag word of the network device i e IFF BROADCAST IFF_MULTICAST IFF_UP and IFF_LOWER_UP are set See Linux manual page netdevice 7 for more details What they mean can be summarized as follows The network device supports broadcast and multicast It is up Its lower layer is also up which means the cable is likely connected to the adaptor since the lower layer is layer 1 L1 or physical layer e mtu 1500 The Maximum Transmission Unit MTU is 1500 bytes e qdisc pfifo_fast The packet scheduler is pfifo_fast the default qdisc of each interface Note that qdisc stands for queueing discipline and is a packet scheduler See Linux manual page PFIFO_FAST 8 for more details and 4 Revision 134 7b0b97d898ad 8 SETTING UP VIRTUAL MACHINES e state up The network device is up e mode DEFAULT The link mode is default At present Linux defines two mode default and dormant e group default It means that the network device is in the default device group 9 Currenlty defined devices in a Linux system are in etc iproute2 group e g debian dVM3 more etc iproute2 group device group names 0 default debian dVMB e qlen 1000 The Ethernet buffer transmit queue length is 1000 Note that qlen stands for queue length See Linux manual page netdevice 7 for mor
12. ection to the address assigned to the network adaptor in the Host only mode Using VM3 as an example the Pv4 address we should connect to is 192 168 56 103 See Figure 4 a for a hint and 21 for the detail to connect to the virtual machine Note that the hostname field we are to fill is the IPv4 address Revision 134 7b0b97d898ad 10 SETTING UP VIRTUAL MACHINES b We may want to keep the connection to the host alive Typically without any activity on the SSH terminal to a host for some period of time the connection will be tore down by the host which can be inconvenient to some To keep the connection alive we can let PuTTY send a NULL packet to the virtual machine periodically See Figure 4 b for a hint and 20 for the detail setup ER PuTTY Configuration x ER PuTTY Configuration x Category Category B Session Basic options for your PuTTY session B Session Options controlling the connection i Logging Specify the destination you want to connect to i Logging Sending of null packets to keep session active Terminal Terminal fo Keyboard pst Weme forlP address EP Keyboard Seconds between keepalives 0 to tum off Bel 92 168 56 103 i Sal Features Connector type Fako Low4evel TCP connection options E Window ORaw OTenet O Rogin O Seral E Window EZ Disable Nagle s algorithm TCP_NODELAY option Appearance Appearance C Enable TCP keepalives SO_KEEPALIVE option
13. ent do not affect the linked clone and changes to the disk of the linked clone do not affect the parent For more discussion on the two types of clones see 3 12 To create a linked clone in VirtualBox select the virtual machine added in step 2 and then click on Machines on the menu bar and then select Clone from the menu or simply press the CTRL O key A dialogue window to enter the virtual machine name will appear See Figure 2 a Set the name to an identifiable name e g VM_1_Debian_8 x_en indicating this is the first virtual machine cloned from the Base VM Do not forget to check the Reinitialize the MAC address of all network cards checkbox otherwise the MAC addresses of the ethernet adapters on the cloned virtual machines will be identical to those in the parent virtual machines which we want to avoid Now click on the Next button We can now choose the type of clones to create In the dialogue window that follows choose the Linked Clone radio button See Figure 2 b The linked clone will be created and appear in VirtualBox when we click on the Next button We will call this virtual machine VM2 in the discussion that follows 4 We now need to change the hostname of the virtual machine VM1 In VirtualBox select VM1 and click on the Start button from the toolbar Revision 134 7b0b97d898ad 4 SETTING UP VIRTUAL MACHINES x Clone Virtual Machine Clone Virtual
14. indow will appear In the dialog window open the folder that contains the image and select and open the Virtual Machine Definition file VM_Base_Debian_8 x_en vbox The virtual machine is now added to VirtualBox We refer this virtual machine as Base VM in the discussion that follows We recommend that you keep this VM intact because we want to use it as the base to create clones 3 Next is to clone a virtual machine from the Base VM VirtualBox and other virtualization software can create virtual machines quickly by making clones of existing virtual machines They can create two types of clones linked clone and full clone We recommend linked clones Linked clones are created using an approach similar to snapshot which loosely speaking implies that a linked clone only needs to store the delta the difference of disk data between the linked clone and its parent 13 Therefore if clones and their parent virtual machines share the same software installation linked clones conserves disk space A linked clone depends on the parent virtual machine from which the clone is copied and requires that the parent virtual machine is present in the host with the linked clone i e if we want to move or copy a linked clone to another host we must move or copy the parent virtual machine along with the linked clone Note that both the linked clone and the parent clone will function independently as ongoing changes to the virtual disk of the par
15. ip times in milli seconds Minimum 18ms Maximum 2l1ms Average 19ms C gt which demonstrates that the host has connectivity to the outside world Now we can use the command ping on the virtual machines to verify whether the virtual machines have connectivity to the outside world Log in a virtual machine and issue a ping command The following example is an example on dVM4 however we must repeat it on all virtual machines to verify whether each virtual machine has connectivity to the outside world debian dVM4 ping c 3 www google com PING www google com 216 58 217 132 56 84 bytes of data 64 bytes from iad23s43 in f132 1e100 net 216 58 217 132 icmp seq 1 ttl 128 time 14 1 ms 64 bytes from iad23s43 in f132 1e100 net 216 58 217 132 icmp seq 2 ttl 128 time 15 5 ms 64 bytes from iad23s43 in f132 1e100 net 216 58 217 132 icmp seq 3 ttl 128 time 15 3 ms Revision 134 7b0b97d898ad 7 SETTING UP VIRTUAL MACHINES www google com ping statistics 3 packets transmitted 3 received 0 packet loss time 2004ms rtt min avg max mdev 14 161 15 044 15 577 0 628 ms debian dVM4 In the above we send 3 ICMP ECHO_REQUESTSs to host www google com and receives 3 replies on the virutal machine VM4 Note that although the ping command exists in both Windows and Linux the usage is different You may try different hosts of hosts other than www google com as long as the hosts are
16. ne Item Description Operating System Debian Linux 8 x RAM 64 MB Network Adaptor 1 NAT Network Adaptor 2 Network Adaptor 3 Network Adaptor 4 Host only Adaptor Internal Network dVMen1 Internal Network dVMen1 We configured the Virtual machine with 4 Ethernet adaptors Figure 1 shows the configuration of the 4 virtual Ethernet adaptors Note that all adaptors must have different Ethernet addresses e We enabled Network Adaptor 1 and configured it in the Network Address Translation NAT mode as shown in Figure 1 a This mode allows you to access the outside network from within the virtual machine Therefore the traffic between the virtual machine and the outside network e g the Internet is via this adaptor However from the host you cannot connect to e g establish a Secure Shell connection to this adaptor on the virtual machine without setting up a port forwarding in VirtualBox on the host 6 e We enabled Network Adapter 2 and configured it in the Host only Adaptor mode as shown in Figure 1 b In this mode the adaptor other adaptors in the Host only Adaptor model in this virtual machine and other virtual machines in the same host and the host are on the same internal network This internal network is similar to a lookback interface without the need of the host s physical network interface and importantly it provides connectivity among virtual machines and the host 5 Therefore from the host or other virtual ma
17. ptor with the same setup of another virtual machines in the host is on the same Ethernet e We enabled Network Adaptor 4 and configured it the same as Network Adapter 3 i e configured it in the Internal Network mode as well This adaptor and Network Adaptor 3 are on the same Ethernet i e dVMen1 See Figure 1 d 3 Delopying Multiple Virtual Machines To create a network of virtual machines we will create a few virtual machines using the pre built Linux image discussed in Section 2 You can run as many virtual machines as your CPU RAM and disk space allow Following steps are the guide to create a network of 4 virtual machines on a Windows host 1 Download the pre built virtual machine image a Debian Linux image See Section 2 for the description of the image and the URL to download the image The image is in a 7 zip Revision 134 7b0b97d898ad 3 SETTING UP VIRTUAL MACHINES compressed archive file i e VWM_Base_Debian_8 x_en 7z Then extract the image to folder of your choice e g UserProfile VirtualBox VMs using 7 zip Upon the completion of the extraction we shall be able to locate the image under the selected folder e g User Profile VirtualBox VMs VM_Base_Debian_8 x_en 2 Open the virtual machine image using VirtualBox for which do the following On Virtu alBox click on Machines on the menu bar and then select Add from the menu or simply press the CTRL A key A dialog w
18. rever preferred lft forever inet6 fe80 a00 27 ff fec6 5c40 64 scope link valid_lft forever preferred lft forever 4 eth2 lt BROADCAST MULTICAST gt mtu 1500 qdisc noop state DOWN group default qlen 1000 link ether 08 00 27 12 d4 8d brd ff ff ff ff ff ff 5 eth3 lt BROADCAST MULTICAST gt mtu 1500 qdisc noop state DOWN group default qlen 1000 link ether 08 00 27 1a 78 fd brd ff ff ff ff ff ff debian dVM3 which shows each adaptor s the network layer address information in addition to its link information Below is an brief explanation on the network layer address information e Internet Protocol Version 4 IPv4 address Revision 134 7b0b97d898ad 9 SETTING UP VIRTUAL MACHINES For each adaptor the line headed with inet is the IPv4 address and network assignment in the format of ipv4_address prefix_length e g 127 0 0 1 8 for device lo 10 0 2 15 24 for device eth0 and 192 168 56 103 24 for device eth1 Following the address and network assignment is the scope of the address Table 2 lists 4 possible values of the scope See 1 2 10 for the definition of the 4 values Table 2 IP Scope under IP Address 7 Scope Description global valid everywhere site valid only within this site IPv6 link valid only on this device host valid only inside this host machine Next line specifies two lifetime values of the address The value of valid lifetime follows valid_ift and that of preferred lifetime preferred_ift In the abo
19. ry Luz Mouronte Lpez and Ron J Kovac editors Proceedings of the Seventh International Confe rence on Networking and Services pages 131 135 IARIA 2011 R Hinden and S Deering Ip version 6 addressing architecture RFC 4291 RFC Editor February 2006 http www rfc editor org rfc rfc4291 txt Bert Hubert Thomas Graf Gregory Maxwell Remco van Mook Martijn van Oosterhout Paul B Schroeder Jasper Spaans and Pedro Larroy Linux Advanced Routing amp Traffic Control HOWTO http lartc org howto retrieved on September 28 2015 VMware Inc Types of clone Full and linked https www vmware com support ws5 doc ws_clone_typeofclone html retrieved on September 28 2015 VMware Inc Understanding virtual machine snapshots in vmware esxi and esx 1015180 http kb vmware com selfservice microsites search do language en_ US amp cmd displayKC amp kexternalId 1015180 retrieved on September 28 2015 Matthew G Marsh ip link network device configuration In 15 http www policyrouting org iproute2 doc html ss9 1 1 retrieved on September 28 2015 Matthew G Marsh PROUTE2 Utility Suite Howto http www policyrouting org iproute2 doc html retrieved on September 28 2015 Matthew G Marsh Policy routing using Linux Sams 2001 T Narten R Draves and S Krishnan Privacy extensions for stateless address autoconfigu ration in ipv6 RFC 4941 RFC Editor September 2007 http www rfc editor org rfc rfc4941 txt
20. tems 18 and supports multiple virtual Ethernet cards e g 8 in VirtualBox 4 in multiple networking modes i e not attached network address translation NAT network bridged networking internal networking host only networking and generic networking in VirtualBox 4 5 The guest operating systems is Debian Linux We choose a Debian Linux because it is a basis for many Linux distributions has installation images for for multiple architectures and can be installed on systems with small amount of RAM and disk space The supported architectures include amd64 arm64 armel armhf i386 mips mipsel powerpc ppc64 and els390x In addition we recommend using a Secure Shell client SSH client to access the virtual machine guests We recommend PuTTY because you can download and use it freely 22 PuTTY is a Windows application SETTING UP VIRTUAL MACHINES We use the 7 zip file archiver 19 to compress the pre built Debian Linux guest image described in Section 2 To recap the following software should have been installed on the host before you proceed e Oracle VirtualBox R 4 e PuTTY e 7 zip file archiver 2 Linux Guest Image We created a Debian Linux guest image and the image is available to download from either Dropbox or OneDrive An incomplete but essential summary of the configuration of the virtual machine is in Table 1 Table 1 Configuration of Pre built Linux Virtual Machi
21. ter https serverfault com questions 63014 ip address scope parameter retrieved on September 28 2015 3 Serverfault com Contributors When shall i use linked vs full vm clones http serverfault com a 526952 retrieved on September 28 2015 4 Oracle Corporation editor 4 Components of Linux Traffic Control In Corporation 8 2014 2015 http linux ip net articles Traffic Control HOWTO components html retrieved on September 28 2015 Revision 134 7b0b97d898ad 12 SETTING UP VIRTUAL MACHINES 5 10 11 paan 14 15 16 Lf Oracle Corporation editor 6 2 Introduction to networking modes In Corporation 8 2014 2015 https www virtualbox org manual ch06 html networkingmodes retrieved on September 28 2015 Oracle Corporation editor 6 3 1 Configuring port forwarding with NAT In Corporation 8 2014 2015 https www virtualbox org manual ch06 html natforward retrieved on September 28 2015 Oracle Corporation editor Appendix C IP Address Management In Corporation 8 2014 2015 http linux ip net html tools ip address html retrieved on September 28 2015 Oracle Corporation editor Oracle VM VirtualBox R User Manual Oracle Corporation 2014 2015 https www virtualbox org manual UserManual html retrieved on Septem ber 28 2015 Vlad Dogaru Octavian Purdila and Nicolae Tapus Network interface grouping in the linux kernel In Jaime Lloret Mauri Steffen Fries Ma
22. ve example the values of the two lifetimes are forever which simply means the lifetimes of the addresses are infinity in other words the assignments of the addresses are not temporary See 17 for more detail e Internet Protocol Version 6 IPv6 address Following IPv4 address information is IPv6 address information that is headed by inet The IPv6 addresses have different length and are expressed in a different human friendly notation See 10 for IPv6 address structure Note that we should repeat the above for every virtual machine and make sure that all Ethernet adaptors have different Ethernet addresses 4 Logging in VMs using a Secure Shell client from the host One particular situation of working with the virtual machines we created is that we cannot copy and paste on the terminal window Switching between virtual machines can be sluggish if the host computer is short of RAM To alienate the situation we can use a Secure Shell client to connect to the virtual machines We recommend PuTTY and discuss 3 tips a To connect to a host using PuT TY we need to know the host s IP addresses and to which IP address we can establish connection since the host has more than one IP addresses In Section 2 we discuss the modes of the Ethernet adaptors in the virtual machines In Section 4 we use the ip command to show address information of each network device From the above we conclude that we can only establish a Secure Shell conn
23. vi you may elect to use nano Be aware that user debian does not the permission to change the two files To edit the two files you will need to become the super user The command sudo allows you to run a command as the super user Now edit the etc hosts file sudo nano etc hosts In etc hosts we need to change the line 127 0 0 1 dV Mbase to 127 0 0 1 dVM1 Then edit the etc hostname file sudo nano etc hostname Revision 134 7b0b97d898ad 5 SETTING UP VIRTUAL MACHINES In etc hostname we need to change the line dV Mbase to dVM1 Upon the completion of the above step restart the clone To restart the virtual machine we issue a reboot command from the command line on the terminal as follows sudo reboot After the virtual machine reboots it should declare its hostname as dVM1 Repeat steps 3 5 to make and configure the second the third and the fourth clone Upon the completion we should have five virtual machines VM1 VM2 VM3 VM4 and the Base VM whose hostnames are dVM1 dVM2 dVM3 dVM4 and dVMbase respectively See Figure 3 We recommend that you should conduct future exercises on the clones and not touch the base VM because in the future want to use the base VM as we share virtual machine images a reference point when Oracle VM VirtualBox Manager File Machine Help LE RAE New Settings Discard Start Q NetEd Debian Base E General
24. x home debian Downloads VM _Base_Debian _8 x_en 7z Revision 134 7b0b97d898ad 11 SETTING UP VIRTUAL MACHINES where we assume that the compressed archive is downloaded to the Downloads directory under user debian s home directory i e the archive is downloaded to home debian Downloads PuTTY is a Windows application In Linux and Mac OS X we use the command ssh instead The command ssh is also a command line tool We can connect to a Virtual Machine e g VM3 as follows ssh l debian 192 168 56 103 It is likely that the version of the ssh command also supports IPv6 In other words we can connect to a virtual machine e g VM3 via its IPv6 adderss as follows ssh 1 debian fe80 a00 27 ff fe7f 43dd eth1 6 Summary We gain familiarity to VirtualBox and now have 4 virtual machines running in the host We may run as many virtual machines as CPU RAM and disk space allow In addition we gain familiarity to the following Linux commands or tools e ping e ip e hostname e vi or nano and to the following software on Windows e ping e PuTTY This manual also provides a list of technical references In particular we would like to point eager readers to 1 11 15 16 and the IETF RFCs among which this manual cites RFCs 4291 and 4941 10 17 References 1 Christian Benvenuti Understanding Linux Network Internals O Reilly Media Inc 2005 2 Serverfault com Contributors ip address scope parame

Download Pdf Manuals

image

Related Search

Related Contents

ML5590/91    SIEMENS  EOS 120 VENERE D  Bowers & Wilkins MATRIX 1000 User's Manual  Eminent EM6105  Manual of Guidelines for Inspection of ITS Equipment and Facilities  WHAT MOVES YOUR WORLD User Manual Mounting and  バドミントン  M。NTH Lて「 - 極東産機株式会社  

Copyright © All rights reserved.
Failed to retrieve file