the network parameters of Ubuntu are saved in the file/etc/network/interfaces, and the default settings use DHCP, as follows:# The Primary network interfaceAuto Eth0Iface eth0 inet DHCPHere's how to set up a static IP:(1) Edit/etc/network/interfaces1.1) block the DHCP line# The Primary network interfaceAuto Eth0#iface eth0 inet DHCP1.2) Add parameters related to static
Modify static IP under UbuntuOpen a./etc/network/interfaces file and modify it to the followingAuto Eth0Iface eth0 inet StaticAddress 172.30.1.xxxNetwork 255.255.0.0Gateway 172.30.1.1Add the DNS address, open the/etc/resolvconf/resolv.conf.d/base file, and add DNS as followsNameServer 180.76.76.76NameServer 8.8.8.8
Modify static
In ubuntu 8.10, gnome is used by default, and DHCP is used by default to automatically obtain IP addresses. Set the static IP address and restart it.
1. Set IPSudo gedit/etc/Network/interfaces
Auto LoIface lo Inet loopback # Lo is the local loopback address: 127.1
Auto eth0Iface eth0 Inet staticAddress 192.168.1.152Gateway 192.168.1.1Netmask 255.255.255.0Net
24
Aug
Running Ubuntu in VMware is a waste of resources to enable the graphic interface. 2 GB of content is already half of that of Windows 7. You don't have to do anything else when you start VMware. In addition, the default network mode of VMware is net. The virtual machine obtains an IP address through DHCP, And I am used to using xshell to access the virtual machine through SSH. The dynamic IP
Ubuntu 12.04 set static IP 1. Configuring a static IP address$sudo vi/etc/network/interfacesThe original content only has the following two lines:Auto LoIface Lo inet LoopbackAppend the following to the end:Auto Eth0Iface eth0 inet StaticAddress 192.168.0.88Gateway 192.168.0.1Netmask 255.255.255.0Network 192.168.0.0Bro
Fedora 17 Using Virtual Machine bridging method for static configuration of fixed IP address 1) # ifconfig p3p1 up (Note: After my system is installed, the default Nic is p3p1. This command activates this Nic. You can change the name as needed .) 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
In a virtual machine, the openSUSE system uses static IP configuration records to connect to the host through NAT.
View VM ip status
View the current ip address range and gateway information.
In this way, you can obtain the gateway information and the ip address
Computer User1. First, go to the "control panel" rarr; "view network status and tasks" rarr; "Change adapter settings" on Windows, as shown in the following figure.2. Click "local connection"-"details" in the network connection panel to view your IP address information.3. Remember the information, close the details dialog box, and right-click "local connection"> "attribute.4. In the po
In Linux (Debian), set static IP addresses of Intranet and Internet NICs. Modify vim/etc/network/interfaces for a single Nic as follows: [plain] # This file describes the network interfaces available on your system # and how to activate them. for more information, see interfaces (5 ). authorization # The loopback network interface auto lo iface lo inet loopback # The primary network interface allow-hotplug
Title: How to set a static IP address for a Linux system
Centos OS 6.5Vi/etc/sysconfig/network-scripts/ifcfg-Default modification:/etc/sysconfig/network-scripts/ifcfg-eth0File:/etc/sysconfig/network-scripts/ifcfg-eth0 for eth0device=Eth0bootproto= none# This line ensures that the interface would be isbrought up during boot. Onboot= for most outbound connections.# the address, netmask, and gateway is all
(1) The intuitive way is: if you use the fedora system, enter setup in the command line and enter the static IP address according to the wizard, refer to my article "Building a NAT test environment for VMware Workstation"
(2) modify the configuration file and enterVim/etc/sysconfig/network-ScriptS/ifcfg-eth0
Device = eth0Onboot = YesBootproto = staticIpaddr = 192.168.0.3Netmask = 255.255.255.0Gateway = 192
Setting IP addresses in Linux is simple. Generally, you can use the ip command tool or directly modify the configuration file.
This section describes how to configure a configuration file.
Redhat series (CentOS Redhat ):
You must modify three files and then restart the network.
The first file: IP configuration file.
Path:/etc/sysconfig/network-scripts/
Usually
Php uses static classes to obtain client IP addresses
/**
* Miscellaneous utility methods.
*/
Final class Utils {
Private function _ construct (){
}
/**
* Get IP address
* @ Return string IP address string
*/
Public
1. Find the file and make the following changes:Sudo Vim/etc/Network/interfacesModify the following parts:Auto eth0Iface eth0 Inet staticAddress 192.168.0.117Gateway 192.168.0.1 # Check whether the gateway address is the IP address.Netmask 255.255.255.0Network 192.168.0.0Broadcast 192.168.0.2552. Modify DNS resolutionThe DNS server address is automatically assigned because DHCP resolution is used in the past.Once set to a
Wired network:1. Locate the file and make the following changes:sudo vim/etc/network/interfacesModify the following sections:Auto Eth0Iface eth0 inet StaticAddress 192.168.0.117Gateway 192.168.0.1 #这个地址你要确认下 Gateways are not this addressNetmask 255.255.255.0Network 192.168.0.0Broadcast 192.168.0.2552. Modify DNS ResolutionDNS server addresses are automatically assigned because they were previously resolved by DHCPAnd once the static
Http://www.cnblogs.com/objectorl/archive/2012/09/27/vmware-ubuntu-nat-static-ip-settings.htmlRefer to the above method, but this version needs to take one more stepGedit/etc/networkmanager/networkmanager.confChange Managed=false to TrueThe steps are as follows:Static IP SettingsView NAT Mode IP1 gedit/etc/network/interfacesAdd the following contentIface eth0 inet
First go to the Network-scripts folder #:cd/etc/sysconfig/network-scriptsThen use VI to edit Ifcfg-eth0 #:vi ifcfg-eth0 #仅eth0网卡一个DEVICE = eth0 #设备名称BOOTPROTO = static #获取IP的方式或依赖的协议, where auto is changed to static broadcast=192.168.1.255 # Broadcast address, typically the last IP of the netw
1. Configure a static IP address for the network card edit the file/etc/network/interfaces:sudo vi/etc/network/interfaces and replace the line about eth0 with the following line: # The Primary network Interfaceauto eth0iface eth0 inet staticaddress 192.168.2.1gateway 192.168.2.254netmask 255.255.255.0#network 192.168.2.0#broadcast 192.168.2.2552 Replace the above IP
Met MTU Status Name--- ---------- ---------- ------------ ---------------------------1 4294967295 connected Loopback Pseudo-Interface 1Connected Local Connection1400 Disconnected Local Connection * 94, in the above display content to find you to use the Internet connection deidx that number, in the following command (I Internet de network card shi "local link" so idx is 10). Then, in the Command Prompt window, enter:Netsh-c "I i" Add Neighbors "192.168.16.1" "00-22-aa-cc-a0-af" enterinstruction
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.