Linux and Win7 set static IP

Source: Internet
Author: User

Ubuntu Static IP Settings

Check Network
Ifconfig (not ipconfig)
Must have 2 addresses
One loopback address: 127.0.0.1
An actual address: 192.168.3.58


sudo vim/etc/network/interfaces add 2 addresses.

Auto Lo
Iface Lo inet Loopback

# The Primary network interface
Auto P2P1
Iface p2p1 inet Static
Address 192.168.3.38
Netmask 255.255.255.0
Network 192.168.3.0
Gateway 192.168.3.1
Broadcast 192.168.0.255

If DHCP is resolved, DNS server addresses are automatically assigned
If the IP is static, you need to set the DNS manually

sudo vim/etc/resolv.conf
NameServer 192.168.3.1 (same domain, both 3)

If Ifconfig does not check for newly added addresses. Restart IP
sudo ifup Nic P2p1

Restart the network card (enter the INIT.D directory to see the networking file)
sudo/etc/init.d/networking restart

Win7 Static IP settings

Cmd-ipconfig-all
View all. Based on this information. To set the static IP

Open Network Sharing Center--Change adapter settings--Network--Properties
ipv4--Property--Use the following IP
Both the gateway and the DNS server are the first bits of the IP address
such as ip192.168.3.188
Both the gateway and DNS are 1
192.168.3.1

Linux and Win7 set static IP

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.