Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to configure network card information for linux

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains "how to configure network card information in linux". The content in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn how to configure network card information in linux.

[configure Nic information]

If the network card is not set up, you will not be able to communicate with other machines

Ifcfg-eno16777736 the Nic configuration file in / etc/sysconfig/network-scripts

[root@happy network-scripts] # ls

Ifcfg-eno16777736 ifdown-ppp ifup-eth ifup-sit

Ifcfg-lo ifdown-routes ifup-ippp ifup-Team

Ifdown ifdown-sit ifup-ipv6 ifup-TeamPort

Ifdown-bnep ifdown-Team ifup-isdn ifup-tunnel

Ifdown-eth ifdown-TeamPort ifup-plip ifup-wireless

Ifdown-ippp ifdown-tunnel ifup-plusb init.ipv6-global

Ifdown-ipv6 ifup ifup-post network-functions

Ifdown-isdn ifup-aliases ifup-ppp network-functions-ipv6

Ifdown-post ifup-bnep ifup-routes

Network card type TYPE=Ethernet

Address allocation mode BOOTPROTO=static

Nic name NAME= eno16777736

Whether to start ONBOOT=yes or not

IP address IPADDR=192.168.6.129

Subnet Mask NETMASK=255.255.255.0

Gateway address GATEWAY=192.168.6.1

DNS address DNS1=192.168.6.1

1. Switch to the network card configuration file

[root@happy ~] # cd / etc/sysconfig/network-scripts

2. Configure the network card

[root@happy network-scripts] # vim ifcfg-eno16777736

HWADDR=00:0C:29:B3:64:C2

TYPE=Ethernet

BOOTPROTO=static

DEFROUTE=yes

PEERDNS=yes

PEERROUTES=yes

IPV4_FAILURE_FATAL=no

IPV6INIT=yes

IPV6_AUTOCONF=yes

IPV6_DEFROUTE=yes

IPV6_PEERDNS=yes

IPV6_PEERROUTES=yes

IPV6_FAILURE_FATAL=no

NAME=eno16777736

UUID=f1d8f70c-1520-495b-8c1b-f830823d0611

ONBOOT=yes

IPADDR=192.168.6.129

NETMASKE=255.255.255.0

GATEWAY=192.168.6.1

DNS1=192.168.6.1

3. Restart the network card

[root@happy network-scripts] # systemctl restart network

4. Ping for a moment

[root@happy network-scripts] # ping 192.168.6.129

PING 192.168.6.129 (192.168.6.129) 56 (84) bytes of data.

64 bytes from 192.168.6.129: icmp_seq=1 ttl=64 time=0.051 ms

64 bytes from 192.168.6.129: icmp_seq=2 ttl=64 time=0.070 ms

64 bytes from 192.168.6.129: icmp_seq=3 ttl=64 time=0.045 ms

^ C

-192.168.6.129 ping statistics-

3 packets transmitted, 3 received, 0 packet loss, time 1999ms

Rtt min/avg/max/mdev = 0.045, ms 0.055, 0.070, and 0.012.

Configuration successful

Thank you for reading, the above is the content of "how to configure network card information in linux". After the study of this article, I believe you have a deeper understanding of how to configure network card information in linux, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

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.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report