In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly shows you "how to use the ifconfig command to configure the network card in Linux", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "how to use the ifconfig command to configure the network card in Linux" this article.
Here is a specific description of the simple configuration and state setting of the network card using this command, which involves the transition of IP, MAC and the state of the network card.
Ifconfig configure network card
Configure the IP address of the network card
Ifconfig eth0 192.168.0.1 netmask 255.255.255.0
Configure the IP address of 192.168.0.1 and the 24-bit mask on eth0. What if you want to configure a 192.168.1.1 IP address on eth0? Use the following command
Ifconfig eth0:0 192.168.1.1 netmask 255.255.255.0
At this time, use the ifconifg command to check, you can see the information of the two network cards, namely: eth0 and eth0:0. If you want to add more IP, the name of the network card is followed by: eth0:1, eth0:2... Fill in as many as you want. Ok!
Configure the hardware address of the network card
Ifconfig eth0 hw ether xx:xx
Change the hardware address of the network card, and you can fool the IP address in the local area network.
Disable the network card
Ifconfig eth0 down
Enable the network card
Ifconfig eth0 up
Ifconfig command is very powerful, you can also set the MTU of the network card, promiscuous mode and so on. I will not introduce them one by one. You can study them yourself with your time.
Note: the network card information configured with the Linux ifconfig command will not exist after the machine is rebooted after the network card is restarted. If you want to keep the above configuration information on your computer forever, you need to modify the configuration file of the network card.
The above is all the contents of the article "how to configure a network card with ifconfig commands in Linux". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
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.