Quote:
I assume you want a static IP address. I know it can be done through a GUI, but the method depends on what DE (desktop environment) you are using.Originally Posted by $ilent 
Hi
I have recently changed my wireless security to WPA2, and since then i reinstalled vmware and v7 client, problem I have now is my vmware's IP keeps changing every hour or so, and so HFM only reports ppd for short period of time. How do I stop vmware getting a new IP address all the time?

Hi
I have recently changed my wireless security to WPA2, and since then i reinstalled vmware and v7 client, problem I have now is my vmware's IP keeps changing every hour or so, and so HFM only reports ppd for short period of time. How do I stop vmware getting a new IP address all the time?
Here's how I did it in CLI:
Warning: TMI! (Click to show)
Find the name of your interface:
Yours will probably be eth0.
Edit the file /etc/network/interfaces. I use vim, but many people like nano:
Include the following lines in the file:
If the iface eth0 line already exists, make sure to change dhcp to static.
address - Choose an IP address for your interface outside of the DHCP range of your router. In my case, my router uses the range 192.168.1.100 to 192.168.1.149.
netmask - This will usually be 255.255.255.0 for a home network
network - The first three bytes will be the same as your IP address, and the last one is 0.
broadcast - Same as network except that it ends in 255.
gateway - Enter the local IP address of your router.
I'm not sure if it's necessary to add the DNS servers, but I did it anyway. You can get the nameserver addresses from many places such as within Linux, your router's status page, or from within Windows.
In Linux:
Alternatively, in Windows, go to Control Panel\Network and Internet\Network Connections. Right click on your interface and select Status. Look for the line that says, "IPv4 DNS Servers." There should be a couple of addresses listed there.
Anyway, enter the DNS servers in the interfaces file with a space between them. Save your changes and exit.
Restart the networking service:
Check to make sure the changes worked:
Test your internet connection:
Test your DNS nameservers:
If the results look good, you're all set!
Code:
$ ifconfig
eth0 Link encap:Ethernet HWaddr 50:e5:49:ef:70:fc
inet addr:192.168.1.100 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::52e5:49ff:feef:70fc/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:425940 errors:0 dropped:26 overruns:0 frame:0
TX packets:424331 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:401395218 (401.3 MB) TX bytes:406242299 (406.2 MB)
Interrupt:20 Memory:f7c00000-f7c20000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:969 errors:0 dropped:0 overruns:0 frame:0
TX packets:969 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:120493 (120.4 KB) TX bytes:120493 (120.4 KB)
Yours will probably be eth0.
Edit the file /etc/network/interfaces. I use vim, but many people like nano:
Code:
$ sudo vim /etc/network/interfaces
Include the following lines in the file:
Code:
# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.1.2
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
# DNS Nameservers
dns-nameservers xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx
If the iface eth0 line already exists, make sure to change dhcp to static.
address - Choose an IP address for your interface outside of the DHCP range of your router. In my case, my router uses the range 192.168.1.100 to 192.168.1.149.
netmask - This will usually be 255.255.255.0 for a home network
network - The first three bytes will be the same as your IP address, and the last one is 0.
broadcast - Same as network except that it ends in 255.
gateway - Enter the local IP address of your router.
I'm not sure if it's necessary to add the DNS servers, but I did it anyway. You can get the nameserver addresses from many places such as within Linux, your router's status page, or from within Windows.
In Linux:
Code:
$ cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver xxx.xxx.xxx.xxx
nameserver xxx.xxx.xxx.xxx
Alternatively, in Windows, go to Control Panel\Network and Internet\Network Connections. Right click on your interface and select Status. Look for the line that says, "IPv4 DNS Servers." There should be a couple of addresses listed there.
Anyway, enter the DNS servers in the interfaces file with a space between them. Save your changes and exit.
Restart the networking service:
Code:
$ sudo service networking restart
Check to make sure the changes worked:
Code:
$ ifconfig eth0
eth1 Link encap:Ethernet HWaddr 50:e5:49:ef:70:fc
inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::52e5:49ff:feef:70fc/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:431086 errors:0 dropped:78 overruns:0 frame:0
TX packets:428154 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:402493513 (402.4 MB) TX bytes:408746518 (408.7 MB)
Interrupt:20 Memory:f7c00000-f7c20000
Test your internet connection:
Code:
$ ping -c 3 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_req=1 ttl=41 time=26.2 ms
64 bytes from 8.8.8.8: icmp_req=2 ttl=41 time=25.7 ms
64 bytes from 8.8.8.8: icmp_req=3 ttl=41 time=26.0 ms
--- 8.8.8.8 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 25.704/25.990/26.254/0.260 ms
Test your DNS nameservers:
Code:
$ ping -c 3 google.com
PING google.com (74.125.134.101) 56(84) bytes of data.
64 bytes from gg-in-f101.1e100.net (74.125.134.101): icmp_req=1 ttl=41 time=27.1 ms
64 bytes from gg-in-f101.1e100.net (74.125.134.101): icmp_req=2 ttl=41 time=26.2 ms
64 bytes from gg-in-f101.1e100.net (74.125.134.101): icmp_req=3 ttl=41 time=26.2 ms
--- google.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 26.251/26.565/27.175/0.451 ms
If the results look good, you're all set!
BTW, I'm looking forward to folding for Team Intel again!
Edited by valvehead - 10/18/12 at 10:49pm



















