Showing posts with label Network. Show all posts
Showing posts with label Network. Show all posts

Apr 1, 2014

[Solved]Chrome cannot access Internet

All of a sudden I found my Chrome cannot access internet. In the beginning I thought it's a network problem, especially when I was in office using company proxy.

But I found that Internet Explorer is running, and even Chrome Canary is working normally.
https://www.google.com/intl/en/chrome/browser/canary.html

Chrome

I looked at all posts by didn't find any working solution.

Luckily I found out the root cause:
when I go to chrome-->Settings-->Advanced Settings
I found that change proxy settings is grayed out and it says "Your network proxy settings are being managed by an extension"


This makes me realize that there must be one extension that hijacked my network traffic. Then it is simple:
I found it's a AD blocker I am using, and I simply need to disable it.


Chrome is working well again.
For people might have similar problem, please check the extension you are using if Chrome cannot access internet, and you don't need to do things like uninstall and reinstall Chrome etc.

If you find this blog is useful, please kindly click the ads on this page to help. Thank you very much.

Jan 26, 2014

How to configure static network IP address in Linux

Sometimes in Linux we need to have a static IP address, for example to install a Hadoop cluster, this is a recommended step. Though in windows it can be done graphically, in Linux it has an interesting way to do through a few commands. Let's take a look.

Part One: configure a static IP address in a physical machine
Note: here a physical machine I mean a machine that installs Linux OS directly, rather than a virtual machine.
Also almost all operations here need a sudo access, so we can sudo to an qualified account or add sudo ahead to each of the command.
1. view or edit 70-persistent-net-rules file
open a terminal, type
cat /etc/udev/rules.d/70-persistent-net-rules



By default, the name will be eth0, which means it will use a file name "ifcfg-eth0" to control the network settings,  but you can also let it use a new control file, say for example eth1. This can be done by in terminal, type
vim /etc/udev/rules.d/70-persistent-net-rules

and modify the name value to eth1.

2. Modify a configuration file
cd /etc/sysconfig/network-scripts
ls


You will see a file named ifcfg-eth0, which is the network configuration file as we mentioned earlier.
If you step1 you configured it to use a new file for example eth1, then you need to create a new configuration file:


vim ifcfg-eth1

Please configure it like below.

Note:
1). NM_CONTROLLED must set to no, so that it's not controlled by a service called NetworkManager
2) BOOTPROTO value is static, because it's a static IP. If it's controlled by NetworkManager, the value is dhcp
3) Add the entry for GATEWAY, IPADDR, and DNS here. If you have multiple DNS, you can put DNS1=...; DNS2=...; if you have only one DNS, you just put DNS1=....
4) People might have question that how I can know what values I can input in step 3. Here are two commands that we can use: ifconfig and route

3. Add DNS IP information in /etc/resolv.conf
vim /etc/resolv.conf


4. Persistent the configuration
1) We want to stop NetworkManager, so that the IP is set as we input and will not be changed by the service.
service NetworkManager stop

2) Make service NetworkManager by default not started when reboot system
chkconfig NetworkManager off

3) If you are using a new control file, for example in step 1 you want it to use eth1, and the original one is eth0. We need to bring down eth0 and bring up eth1
ifdown eth0

ifup eth1

4) restart network service
service network restart

5) if in step 3 or 4 you met some errors for example saying eth1 cannot be initialized. please reboot the system
reboot


Now you will have a static IP successfully configured.

Part Two:  configure a static IP address in a VMware virtual machine
configure a static IP in virtual machine is similar as doing it in physical machine, but there are a few differences.
Step 1. Same as step 1 in part one
Difference: In case you run vim /etc/udev/rules.d/70-persistent-net.rules and get the result as below. You may not know which is the right one to change.

Here you need to check in VMware your virtual machine settings by
right click your virtual machine name --> Network Adapter --> Advanced
It will show the MAC address, comparing it with the result above, now you will now it's the second one to modify.

Step 2: the same as Step 2 in part one
Difference: VMware NAT settings by default use 192.168.136.2 as the DNS and GATEWAY


so your configuration setting can be like below

Step 3: the same as Step 3 in part one
Step 4: the same

OK. All set!

If you find this blog is useful, please kindly click the ads on this page to help. Thank you very much.

Dec 6, 2011

VMWare NAT Setting with DHCP disabled

How to config VMware network connection is an interesting process, so I record it here:

Certainly I need to disable DHCP server service, otherwise it may send IP address out and make others not able to connect to company network.

To disable DHCP service, you can run "services.msc" in Windows and see all the services, and disable DHCP server service as shown below.


Then we need to config the network using VMware.

1, Click VMware Network Editor

2. Click NAT-->NAT Settings, get the gateway IP address. For mine, it's 192.168.136.2


3, Manually config the address of the guest OS.
For example, in Windows 7 VM, set the
IP:192.168.56.5,
Gateway: 192.168.56.2,
DNS: 192.168.56.2

Here I use Redhat 6 for example:
1) Open Network Connection

2). Config the IP, Gateway and don't forget the DNS Server


3) because our company adopts a proxy settings, we need to config the proxy settings. Please notice that:
Network Proxy under preference is for GNOME Desktop

To use browser, for example FireFox you need to config it separately.


Great! We can web surfing now!

If you find this article useful, please click the advertisement on this page to help. Thank you very much!