Nối mạng giữa máy ảo dùng VMWare với máy thật và với Internet

  • View
    153

  • Download
    4

Embed Size (px)

Transcript

1.

N i m ng gi a my

o dng VMWare v i my th t v v i Internet

Cho cc b n! h c t t cc mn trong khoa PC c v nay l b mn cng ngh ph n c ng thu c khoa CNTT, m i h c vin iSPACE u t ng dng qua cc ch ng trnh t o my o ph c vu cho vi c ci th i u hnh, ci ph n m m nghin c u thay v ph i ci t t c trn my th t. Nh ng ch c t ai bi t l trong cc ph n m m t o my o th ph n m m VMWare l m t ph n m m r t m nh v cn lm c nhi u vi c khc n a. Hm nay ti s gi i thi u cho cc b n v m t tnh n ng kh th v c a VMWare, l ch c n ng t o cc thi t b m ng o (Net Card, Switch, Bridge). Khi ci VMWare ln c lc t my o chng ta k t n i v i my th t c v th m ch c th i ra Internet c, nh ng i khi l i khng th k t n i v i my th t c ch ng ni l i ra Internet. Bi vi t ny gip cc b n c th k t n i c my o v i my th t ngay c khi my th t khng c g n Card m ng th t. H n n a n u my th t c g n Card m ng th t v i net c th cc my o c ng i net c lun! Cc b c c u hnh cho my th t v my o thng nhau (n i m ng v ch a s c d li u c v i nhau): - Tr c tin cc b n ci t ch ng trnh t o my o VMWare 6.0 - T o m t my o nh bnh th ng v ci th i u hnh cho my tnh o ny (N u cc b c ny b n ch a lm bao gi th hy ch d p khc ti s Post bi h ng d n ci t v s d ng VMWare, cn by gi mnh ti p t c nh) ho c t m th i c th

tham kh o bi vi t ny: http://www.ispace.edu.vn/forum/showt...2890#post42890 - Link download VMware 7.1: http://www.mediafire.com/?sharekey=0...c677439c55585a - Sau khi ci t xong h i u hnh cho my o b n Shutdown n v lm ti p cc b c sau: + M VMWare ln ch n my tnh o b n mu n k t n i v i my tnh th t v lm cc b c sau: Ch n Edit > Virtual Network Settings > Host Virtual Adapters nh 2 hnh d i:

Ch n Add... Select VMNet to add b n ch n Switch

g n card m ng ny vo.

VM

Sau kh nh n OK

Sau kh nh n Apply

c m c c c Th ny th hi n c c Switch o c a VM are (c 10 Switch o t VMnet0-VMnet9) V card m n g chng ta v a t o ra c g n vo Switch VMnet2 nh hnh d i:

2 # A E D C 4@ B (4 ) $ 7 1 A4@ # $ 9 (!88 7 6 5 4

2 1 0 ) (' & % $! # ! "! 10 c c c VM 2 c : s c VM 0 VM

9

3 3

H s Virual Network Mapping

Sau khi nh n OK b n tr l i mn hnh giao di n chnh c a ph n m m VM are, ch n m y mnh mu n k t n i v i m y th t ( y ti ch n m y ang ci Windows XP) ch n Edit virtual machine Settings nh hnh d i thi t l p k t n i cho card m ng c am y o

Q

Card m ng c a m y o m c

nh

c k t ni vo Bridge VMnet0 (n i theo ki u Bridge vo Switch VMnet0) nh

hnh d

I

I

H

G

F

P

I F

I

I F

i:

Do h i ny mnh t o Card m ng o "VMware Network Adapter VMnet2" cho m y th t v k t n i vo Switch o VMnet2 (Switch 2) c a VMWare nn mnh c ng k t n i card m ng c a m y o vo VMnet2 (Switch 2) gi a m y o v m y th t c th th y nhau nh hnh d i:

Sau khi k t n i c 2 card m ng c a m y th t v m y o vo c n g VMnet2 (c n g 1 Switch 2) th chng ta ti n hnh c u hnh a ch IP cho 2 card m ng ny nh 2 hnh d i y C u hnh Ip cho may o

R

R

R

U

R

S

U

R

T

R S

S

C u hnh Ip cho may th t

Y

Nh v y l m y th t v m y o thng nhau. Chng ta ki m tra k t n i b ng l nh Ping (nh l chng ta cho m y o l 10.10.10.3 v IP c a m y th t l 10.10.10.10). By gi mnh s ng t m y o nh l nh Pin -t K t qu nh n c nh hnh pha d i l OK.

t a ch IP 10.10.10.10

V

X

W

V

`

V

V

Chc cc b n thnh cng! Ti s ti p t c h ng d n cc b n k t n i thm m t my o vo Switch ny n a v k t n i c 2 my o c n g i ra Inetnet vao tu n sau. Chc cc b n cu i tu n vui v ! n h n l i nn! Sau y mnh s h n d n cc b n c u hnh cho my o thn ra Internet nh h a tu n tr c. - ng ra th mnh c th dng c u hnh NAT m c nh c a VMWare lun, nh ng y ti mu n cc b n th y m t i u l cc b n c th thay i NAT theo c a mnh. - By gi cc b n m VMWare ln vo Edit > Virtual Network Settings > Host Virtual Adapters ch n NAT v lm nh hnh d i (chng ta i NAT m c nh t VMnet8 sang VMnet2 m tu n tr c chng ta thm vo)

- Cc b n n dng Gateway IP Address pha bn ph i c a hnh trn (c a ch l 10.10.10.2), chng s dng n lm Default Gateway cho card m ng c a my o. - By gi b n kh i ng my o Windows XP tu n tr c b n c u hnh ln v thm vo cc dng nh hnh d i:

a

b

c

e

f

f

b

ed

f

f

a

d

Chc cc b n thnh cng! C u hnh SubNet cho m t VMNet D i y ti s h ng d n cc b n cch c u hnh Subnet cho m t Switch VMWare (VMNet) c u hnh Sebnet cho m t VMNet cc b n m ch n g trnh VMWare ln vo ch n Edit --> Virtual Network Editor... Xu t hi n hnh nh sau:

g

- Trong hnh trn b n nh vo 2 a ch DNS server c a nh cung c p, 203.113.131.1). B n c th dng DNS khc. - V y l thnh qu v t v t ny t i gi :

y ti dng 2 DNS c a Viettel (203.113.188.1 v

g

i

h

B n click ch n th Host Virtual Network Maping nh hnh, ch n VMNet no b n mu n c u hnh Subnet (VD: VMNet8), click vo d u > bn ph i v ch n Sebnet... nh trong hnh. Xu t hi n h p tho i nh hnh d i:

S a l i Subnet nh hnh (VD t 192.168.130.0 thnh 192.168.131.0) Sau vo NAT ki m tra k t qu v Getway IP address. K t qu thu c nh hnh d i:

p

- Hnh bn tri l Getway IP address khi ch a i Subnet - Hnh bn ph i l Getway IP address khi i Subnet Chc cc b n thnh cng nh Ngu n: ispace.edu.vn