In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
What is the basic knowledge of Linux network management, many novices are not very clear about it. In order to help you solve this problem, the following editor will explain it in detail. People with this need can come and learn. I hope you can get something.
Basic Network profile
Network connection profile (centos):
/ etc/sysconfig/network-scripts/ifcfg-eth0
The device name associated with DEVICE=eth0 # BOOTPROTO= {static | dhcp | none | bootp} # indicates boot protocol static | none indicates static Dhcp indicates dynamic IPADDR=192.168.10.10 # sets IP address NETMASK=255.255.255.0 # sets subnet mask GATEWAY=192.168.10.1 # sets gateway ONBOOT=yes | whether no # automatically activates network interface HWADDR=00:1E:0B:8F:B0:D0 # hardware address should be consistent with the address in hardware but DNS1=202.106.0.20 # specify DNS address USERCTL=yes | no # indicates Whether to allow ordinary users to enable or disable this interface PEERDNS=yes | no # indicates whether to accept the device name BOOTPROTO= {static | dhcp | none | bootp} # associated with the dns address DEVICE=eth0 # specified by the dhcp server when the BOOTPROTO is dhcp | Boot Protocol static | none indicates static Dhcp indicates dynamic IPADDR=192.168.10.10 # sets IP address NETMASK=255.255.255.0 # sets subnet mask GATEWAY=192.168.10.1 # sets gateway ONBOOT=yes | whether no # automatically activates network interface HWADDR=00:1E:0B:8F:B0:D0 # hardware address should be consistent with the address in hardware but DNS1=202.106.0.20 # specify DNS address USERCTL=yes | no # indicates Whether to allow ordinary users to enable or disable this interface PEERDNS=yes | no # indicates whether to accept the dns address specified by the dhcp server when the BOOTPROTO is dhcp.
Network connection profile (ubuntu):
/ etc/network/interfaces
# The primary network interface auto eth0 iface eth0 inet static address 192.168.1.12 gateway 192.168.1.1 netmask 255.255.255.0 # network 192.168.1.0 # broadcast 192.168.1.255 # dns-nameserver 8.8.8.8
DNS configuration file: / etc/resolv.conf/
Nameserver 127.0.0.1 nameserver 127.0.0.1
Controls whether the network is turned on and whether IPv6 is valid and hostname settings file: / etc/sysconfig/network
NETWORKING=YES | NO NETWORKING_IPV6=yes | no HOSTNAME=hostname NETWORKING=YES | NO NETWORKING_IPV6=yes | no HOSTNAME=hostname
Define the host image file: / etc/hosts
172.168.10.1 www.baidu.com alias 172.168.10.1 www.baidu.com alias
Naming mode of network card
Lo: local loopback for native clients to access native server programs
Ppp#: point-to-point
Eth#: Ethernet network card
/ etc/modprobe.conf in RHEL5.0: define the name of the network card according to alias
Define the name of the network card based on the MAC address in RHEL6.0 / etc/udev/rules.d/70-persistent-net.rules: (the udev file is a major change in the Linux2.6 kernel A large number of access entries for different device files are provided in the 2.4kernel / dev directory and a large amount of code under / dev is reduced in the 2.6kernel because the udev mechanism is introduced to automatically create the corresponding device file based on the hardware information recognized by the kernel and give a specific name)
Network management tools
Linux currently provides two network management tools, one is network, the other is NetworkManager.
Network
Network controls that after the configuration information of the network interface is modified, the network service must be restarted to activate the new configuration of the network, thus making the configuration effective. This part of the operation has the same effect on the service as it does when the system is restarted. The control script is the / etc/init.d/network file, which can be followed by the following parameters to manipulate the network service. For example:
/ etc/init.d/network restart / etc/init.d/network restart
You can also use the service command to operate network services such as:
Service network restart service network restart
NetworkManager
RHEL6 new network management tools, can be used to detect the network, automatically connect to the network program. It makes it easy to manage, whether it's a wireless or wired connection. For wireless networks, the network manager can automatically switch to the most reliable wireless network. Using the program of the network manager, you can freely switch between online and offline modes. The network manager can give priority to wired networks. The network manager was originally developed by Redhat and is now managed by GNOME.
The new version of NetworkManager enhances the support of devices and protocols. NetworkManager has a new and beautiful client interface nmtui. "nmtui" is a graphical front end of networkmanager. It can be used to easily configure and manage the network without X Window. Start nmtui:
[root@localhost ~] # nmtui
Basic knowledge of Linux Network Management
NetworkManager features: command line tool commands, a command line interface for NetworkManager. NetworkManager CLI tool nmcli, using nmcli users can query the status of network connections, can also be used to manage. Pros: primitive; syntax is relatively simple; using NetworkManager in CLI is easy to master.
Basic configuration options for nmcli
Nmcli con show # get a UUID list nmcli dev # View Network Devices and their status nmcli r wifi off # close WiFi nmcli con show # get a UUID list nmcli dev # View Network Devices and their status nmcli r wifi off # turn off WiFi
When the NetworkManager daemon starts, it automatically connects to the configured system connection. User connections or unconfigured connections need to be configured and connected through nmcli or desktop tools.
Power on NetworkManager
Chkconfig NetworkManager on or (CentOS7) systemctl enable NetworkManager chkconfig NetworkManager on or (CentOS7) systemctl enable NetworkManager
Start NetworkManager immediately
Service NetworkMnager start or (CentOS7) systemctl start NetworkManager service NetworkMnager start or (CentOS7) systemctl start NetworkManager
NDK basic development process: Linux process
NDK basic development process
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.