本文介绍了如何在Fedora 19中设置静态IP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在VMware Player(哈佛CS50x设备19)上使用Fedora 19时,即使主机是主机,来宾OS也无法访问Internet.

While using Fedora 19 on VMware player(Harvard CS50x appliance 19) , the guest OS is not able to access the internet even though the host is .

如何设置静态IP地址以访问Internet?

How to set static Ip address to access Internet ?

推荐答案

首先使用ifconfig

编辑该接口的配置文件使用您喜欢的文本编辑器:

Edit the config file for that interfaceusing your favorite text editor:

vi /etc/sysconfig/network-scripts/ifcfg-eth1 //where eth1 is your interface

您需要将BOOTPROTO从dhcp更改为静态,并添加IPADDR,NETMASK,BROADCAST和NETWORK变量.

You will need to change BOOTPROTO from dhcp to static and add IPADDR, NETMASK, BROADCAST and NETWORK variables.

NM_CONTROLLED="yes"
BOOTPROTO=static
DEVICE=eth1
ONBOOT=yes
IPADDR=192.168.8.248
NETMASK=255.255.255.0
BROADCAST=192.168.8.255
NETWORK=192.168.8.0
GATEWAY=192.168.8.1
TYPE=Ethernet
PEERDNS=no

保存文件:w !sudo tee % > /dev/null

还添加您的DNS服务器

Also add your DNS servers

vi /etc/resolv.conf

nameserver your_Router_ip
nameserver 8.8.8.8 # Google's DNS Server

您已准备好浏览!

这篇关于如何在Fedora 19中设置静态IP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 17:13