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

Debian Redhat standard network card configuration

2025-02-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

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

For Debian Linux

Set ip temporarily first Then log in to root@ubuntu:~# ifconfig eth0 10.11.12.2/24root@raspberrypi:~# vim / etc/network/interfaces# Please note that this file is written to be used with dhcpcd.# For static IP Consult / etc/dhcpcd.conf and 'man dhcpcd.conf'.auto loiface lo inet loopback#auto eth0#allow-hotplug eth0#iface eth0 inet manualauto eth0iface eth0 inet staticaddress 10.11.12.19netmask 255.255.255.0gateway 10.11.12.13dns-nameservers 180.76.76.76 223.5.5.5auto wlan0allow-hotplug wlan0iface wlan0 inet manualwpa-conf / etc/wpa_supplicant/wpa_supplicant.confauto wlan1allow-hotplug wlan1iface wlan1 inet manualwpa-conf / etc/wpa_supplicant/wpa_supplicant.confroot@raspberrypi:~ # restart network root@ubuntu:~# ifdown eth0 & & ifup eth0 or: root@raspberrypi:~# / etc/init.d/networking restart [....] Restarting networking (via systemctl): networking.serviceWarning: Unit file of networking.service changed on disk, 'systemctl daemon-reload' recommended.. Ok root@raspberrypi:~# echo $? 0 Test root@raspberrypi:~# ping www.baidu.comPING www.a.shifen.com (115.239.210.27) 56 (84) bytes of data.64 bytes from 115.239.210.27: icmp_seq=1 ttl=57 time=2.76 ms64 bytes from 115.239.210.27: icmp_seq=2 ttl=57 time=2.78 Ms ^ C-www.a.shifen.com ping statistics-2 packets transmitted, 2 received, 0 packet loss Time 1001msrtt min/avg/max/mdev = 2.761 / 2.770 / 2.780 / 0.053 msroot@raspberrypi:~#

For Redhat Linux

Temporarily modify the network card IPifconfig eth0 172... 16.0.5 4d23-a333-a84da8341***ONBOOT=yesNM_CONTROLLED=yesBOOTPROTO=staticIPADDR=172.16.0.103NETMASK=255.255.255.0GATEWAY=172.16.0.111DNS1=114.114.114.114DNS2=8.8.8.8 16 up add gateway route add default gw 172.16.0.111 temporarily modify the default DNSvim / etc/resolv.confvim / etc/sysconfig/network-scripts/ifcfg-eth2DEVICE=eth2HWADDR=00:0C:29:36:**:**TYPE=EthernetUUID=7eaffa26-ee97-4d23-a333-a84da8341***ONBOOT=yesNM_CONTROLLED=yesBOOTPROTO=staticIPADDR=172.16.0.103NETMASK=255.255.255.0GATEWAY=172.16.0.111DNS1=114.114.114.114DNS2=8.8.8.8

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

Network Security

Wechat

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

12
Report