In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
Ubuntu how to modify the configuration file to achieve network configuration, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain in detail for you, people with this need can come to learn, I hope you can gain something.
1. The default content of opening the / etc/network/interfaces file of ubuntu is as follows:
The code is as follows:
Auto lo
Iface lo inet loopback
Configuration method for dynamic acquisition:
The code is as follows:
Auto eth0
Iface eth0 inet dhcp
Configuration method of static allocation:
The code is as follows:
Auto eth0
Iface eth0 inet static
Address 192.168.0.1
Netmask 255.255.255.0
Gateway 192.168.0.1
Modify the save of the configuration file according to the configuration requirements (dynamic allocation or automatic acquisition).
two。 Add domain name server: open / etc/resolv.conf file
Add this line: nameserver 202.99.166.4
3. Restart the network
$/ etc/init.d/networking restart (this command is to restart the network card)
Or
$ifdown eth0
$ifup eth0 (these two commands are targeted to restart a network interface, because a system may have multiple network interfaces)
4. Check whether the parameters of the network configuration are correct (you can check whether the network configuration has been modified with each operation)
$ifconfig
5. See if you can communicate with ping.
Ping disconnected gateway indicates that there is a problem with network configuration, ping does not have access to domain name, indicates that dns has a problem.
Sometimes you need to modify the hardware address of the network card:
Method 1:
The code is as follows:
$ifconfig eth0 hw ether XX:XX:XX:XX:XX:XX
$/ etc/init.d/networking restart (restart the network card)
Method 2:
To modify the hardware address permanently, edit the / etc/network/interfaces file directly and add a line after iface eth0 inet static: pre-up ifconfig eth0 hw ether xx:xx:xx:xx:xx:xx (MAC to be changed)
$sudo / etc/init.d/networking restart (restart the network card)
Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.