Linux Fundamentals-14th Unit Linux Network principles and basic settings

Source: Internet
Author: User

Unit 14th Linux Network principles and basic settings

Three types of network card mode diagram

Use the Ifconfig command to maintain the network
features of the ifconfig command
examples of the use of IFCONFIG commands
To start and stop a network card using the Ifup and Ifdown commands
features of the IFUP command
features of the Ifdown command
examples of the use of IFUP commands
examples of the use of IFDOWN commands
Network configuration file
Network configuration file for Nic
What is network configuration
IP Command
ping command
Setup Command
homework after class
"Content of this section"
1. Use the Ifconfig command to maintain the network (see Linux System Management P422)
1) Master the function of the ifconfig command: Displays the details of all the network cards being started or sets the IP address of the network card in the system.
2) flexibly apply the Ifconfig command to set the IP address of the NIC:
For example, modify the command for the IP address of the ETH0 network card with the 172.18.48.56 and subnet mask 255.255.255.128:
Ifconfig eth0 172.18.48.56 netmask 255.255.255.128
2. Use the Ifup and Ifdown commands to start and stop the network card (see Linux System Management P424)
1) Master the function of ifup command: Start the network card specified on the system.
2) Master the function of the Ifdown command: Stop the network card specified on the system.
3) Master The example of using the IFUP command to enable the specified NIC:
Example: The command to start the eth0 Nic: Ifup eth0
4) Master The example of disabling the specified NIC using the Ifdown command:
Can only be used for configuration files
Example: Disable the eth0 NIC command: Ifdown eth0
3. Network configuration file (see Linux System Management P425)
1) Understand the network card configuration file is stored in the/etc/sysconfig/network-scripts directory, and each network card corresponding profile file name to start with ifcfg-, such as eth0 the network configuration file corresponding to this NIC is Ifcfg-eth0.
Add: The virtual machine added network card does not have the configuration file to manually add the configuration or graphics add network card
Lambda master the definition of network configuration: the so-called network configuration (setting) is to modify the network configuration file card corresponding, you can use the text editor (vi) directly edit the network configuration file to reconfigure the network.
4. After-school assignments (spents 35 minutes)
1) View details of all currently started NICs
2) Activate the first NIC of the system
3) temporarily set IP to 192.168.1.10/24 for the system
4) View the details of the first NIC
5) Modify the network adapter profile to set the IP address of the first NIC of the system to 192.168.3.2, the subnet mask set to 255.255.255.0, whether the startup setting is set to Yes
6) Set the IP to 10.0.0.1/8 for the first NIC of the system using the Setup command

Linux Fundamentals-14th Unit Linux Network principles and basic settings

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.