Fedora14 static configuration of fixed IP addresses and host machine IP addresses in the same network segment using virtual machine bridging and solutions to several problems (NFS mounting step 1)

Source: Internet
Author: User

To mount NFS, the first step is to enable the virtual machine to bridge the Internet. You do not need to check the box below the bridge Internet. The IP address and Host IP address must be configured in the same network segment.

Record the following steps:

I. I initially referred:

1), # ifconfig eth0 up (Note: After the system is installed, the default Nic is eth0. This command activates this Nic .)

2), # chkconfig -- level 2345 network on (Note: Step 2: Set the startup when the NIC enters the system. If you want to automatically obtain the IP address to access the Internet each time you start the system, you must set the network service to start when the system starts. Linux is different from windows in that many services are stopped by default, and you start the service when you use the service, but it is not set to start by default, the next time you enter the system, the service is still stopped. The following describes how to set the network service to start when the system starts. Use the chkconfig command to enable the network service to be started by default when the system startup level is 2345 .)

3) create a NIC configuration file for eth0.

Command; # gedit/etc/sysconfig/network-scripts/ifcfg-eth0

Write the following content in it:

Device = eth0
Ipaddr = 192.168.2.211)
Netmask = 255.255.255.0 (subnet mask)
Gateway = 192.168.2.1 (This is the gateway. Here I can configure it just like the host gateway. An online tutorial says that the virtual machine gateway needs to be configured as the actual IP address of the host machine. This is not required for my verification! You must pay attention to it!)


Dns1 = 192.168.2.1 (Note that you must write it as dns1. The content is the same as that of the host machine. Instead of recognizing the DNS, his grandmother's ............ Really good!)
Bootproto = static
Onboot = Yes

After saving, use service network start or service network restart to indicate an error. The error message is as follows:

Rtnetlink answers: file exists

Rtnetlink answers: file exists

Rtnetlink answers: file exists

Rtnetlink answers: file exists

There will be several such errors!

See http://www.cnblogs.com/shawnloong/archive/2011/11/23/2260757.html. Why? It turns out that in addition to a network to manage Nic information, Fedora also has a NetworkManager to manage. The two are in conflict. Disable NetworkManager. This is a little different from ubuntu. I remember Ubuntu uses NetworkManager for management.

The closing method is as follows:

# Chkconfig -- level 0123456 NetworkManager off

# Service NetworkManager stop
# Service network stop
# Service network start

Okay, try again service network restart and see if you can access the Internet ???

I still do not seem to be able to access the Internet, and refer to the http://www.linuxdiyf.com/bbs/viewthread.php? Tid = 204442 & extra = Page % 3d & page = 1 in this article, replace DNS in the first article with dns1, and then save it. If you cannot access the Internet, modify the IP address in the configuration file, which may conflict with other computers.
My host machine IP address is 192.168.2.209. The Virtual Machine "fedora" experiment will be able to access the Internet at 192.168.2.211. Haha!

My final configuration file content is:

Device = eth0
Type = Ethernet
Bootproto = static
Ipv6init = No

Onboot = Yes
# Hwaddr = 14-0000e9-e1-91-94 (this sentence is not required,Http://www.linuxdiyf.com/bbs/viewthread.php? Tid = 204442 & extra = Page % 3d & page = 1 in this article, you do not need to configure the hardware address of your computer!)

Userctl = Yes
Peerdns = Yes
Nm_controlled = Yes
Ipaddr = 192.168.2.211
Dns1 = 192.168.2.1 (it must be written as dns1, instead of DNS,10 million notes! I made a special experiment !!! Written as DNS, Baidu cannot open it!)
Gateway = 192.168.2.1 (the gateway can be written as the host,You do not need to write the actual IP address of the host.)
Netmask = 255.255.255.0


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.