In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "how to achieve the basic network connection and setting on the RedHat system". In the daily operation, I believe that many people have doubts about how to achieve the basic network connection and setting on the RedHat system. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful for you to answer the doubts about "how to achieve the basic network connection and setting on the RedHat system". Next, please follow the editor to study!
1. Linux graphical network configuration
The easiest way to configure networking in Red Hat Linux is to use the graphical configuration tool Network Connections application. It can set system-wide defaults that affect all users, or it can be configured to activate specific network interfaces (VPN, etc.) only when a specific user logs in.
The configuration steps are as follows:
Open Network Connections (figure 1)
Double-click the existing network connection System eth0 (figure 2), if not, click the Add button on the right to add
Go to the editing page, click IPv4 Settings, and enter the IPv4 settings (figure 3)
The default network connection method is DHCP, which is now changed to manual Manual (you need to know the entire network segment and gateway first, as shown in figure 4)
Click Add to add the IP address (figure 5)
Because my environment is a virtual machine, so I am configured according to the network segment of the virtual machine, and you can configure it according to your own situation. (figure 6)
Click Apply to enter the root password to complete the setting (figure 7)
II. Linux command line network configuration
After talking about the configuration of the graphical interface, we have to introduce the command line network configuration, because in our daily work, it is seldom applied to the graphical interface configuration. In most cases, it is configured with a text command line interface.
Command line configuration, you need to remember two files
1. Modify the file of dns settings
The code is as follows:
/ etc/resolv.conf
Resolv.conf only needs to modify the nameserver parameter.
Examples are as follows:
The code is as follows:
Vi / etc/resolv.conf
# Generated by NetworkManager
Nameserver 192.168.159.2
2. Modify the file of network configuration parameters
/ etc/sysconfig/network-scripts/ifcfg-eth0
The file / etc/sysconfig/network-scripts/ifcfg-eth0 is in / etc/sysconfig/network-script under this directory, and the script file (control file) of the network interface (network card) is stored. Ifcfg-eth0 is the default first network interface. If there are multiple network interfaces in the machine, then the name will be ifcfg-eth2,ifcfg-eth3,ifcfg-eth4. (the files in this directory are very important. It is related to whether the network can work properly.
= set form: set value = value
Set the project as follows:
* DEVICE interface name (device, Nic)
* USERCTL [yes | no] (whether non-root users can control the device)
* BOOTPROTO IP configuration method [none | static | bootp | dhcp] (no protocol is used when booting | IP is statically assigned | BOOTP protocol | DHCP protocol)
* HWADDR MAC address
* whether the network interface is valid when the ONBOOT system is started (yes/no)
* TYPE network type (usually Ethemet)
* NETMASK network mask
* IPADDR IP address
* whether IPV6INIT IPV6 is valid (yes/no)
* GATEWAY default gateway IP address
* BROADCAST broadcast address
* NETWORK network address
= can refer to the following example
The code is as follows:
Vi / etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=static
BROADCAST=192.168.1.255
HWADDR=00:0C:2x:6x:0x:xx
IPADDR=192.168.1.23
NETMASK=255.255.255.0
NETWORK=192.168.1.0
ONBOOT=yes
TYPE=Ethernet
Note: the above content is only for example list, the specific network configuration needs to be modified according to the specific conditions of the machine.
3. Linux common network view commands
Ifconfig to view the current network configuration
Ping, check the current path.
Netstat, check the network situation
For more information on the correct configuration of the above command on the network (figure 8), and on the error configuration (figure 9)
4. Ip, together with route parameter, you can view the current route. For more information, please see (figure 10)
At this point, the study on "how to achieve basic network connections and settings on the RedHat system" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
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.