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

Linux network card configuration

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

Share

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

View the area where the network card is located:

Firewall-cmd-get-zone-of-interface=eno16777736

Check to see if the service is allowed:

Firewall-cmd-zone=public-query-service=http

Firewall add Port:

Firewall-cmd-- permanent-- zone=public-- add-service=httpfirewall-cmd-- permanent-- zone=public-- add-port=9090/tcpfirewall-cmd-- reload firewall-cmd-- permanent-- zone=public-- add-port=8080-8081/tcpirewall-cmd-- reloadnmcli con show [active] nmcli con show "static-eth0" nmcli dev statusnmcle dev show eth0apply modification systemctl restart network.service nmcli con reloadnmcli connection show View Link Information nmcli device show View device Information nmcli device status View device status hostnamectl set-hostname Desktop.group8.example.comnmcli connection shownmcli con modify eno16777736 ipv4.addresses "172.24.8.10 desktop.group8.example.comnmcli connection shownmcli con modify eno16777736 ipv4.addresses 24 172.24.8.254" ipv4.dns "172.24.8.254" nmcli con modify eno16777736 connection.autoconnect yes ipv4.method manualnmcli con up eno16777736systemctl restart network .serviceadd additional network ipv4 addressnmcli con add con-name''yeslab "ifname eth0 type ethernet ip4 172.25.1.11 yeslab 24 gw4 172.25.1.254 New connection yeslab and configure the IP address nmcli con modify" yeslab "ipv4.dns 172.25.254.254 configuration yeslab connection dnsnmcli con modify "yeslab" ipv4.addresses 172.25.1.18Universe 24 modify the IP address of yeslab nmcli con modify "yeslab" connection.autoconnect yes enable configuration of yeslab nmcli con modify "system eth0" connection.autoconnect no close configuration of system eth0 d systemctl restart network .service restart network service nmcli con modify "system eth0" + ipv4.addresses 10.1 .1.1Accord24 add an address for system eth0 Can have multiple addresses at the same time hostnamectl set-hostname serverX.example.com configuration system name

Network binding

Establish a team port

Nmcel con add type team con-name y-team ifname team1 config'{"runner": {"name": "loadbalance"}'

Nmcle con mod y-team ipv4.addresses' 192.168.1.100 Compact 24' configures the IP address for the team port

Nmcli con mod y-team ipv4.method manual configuration address is fixed

Bind from physical port

Nmcli con add type team-slave con-name team1-port1 ifname eth2 master team1nmcli con add type team-slave con-name team1-port2 ifname eth3 master team1Systemctl restart networknmcli con up team1teamdctl team1 statenmcli device disconnect eth2 shuts down port

Configuring software bridge

Establish a bridge

Nmcli con add type bridge con-name br1 ifname br1Nmcli con mod br1 ipv4.addresses' 192.168.1.100/24Nmcli con mod br1 ipv4.method manualNmcli con add type bridge-slave con-name br1-port1 ifname eth2 master br1Nmcli con add type bridge-slave con-name br1-port2 ifname eth3 master br1Ip linkBrctl show Ping-1 bri 192.168.1.254 Test Ping-c 10-I br1 192.168.1.254 using the bridge port PING

Ipv6 configuration

Nmcli connection add con-name ymur6 ifname eth0 type ethernet ip6 2016:abcd::2/64Nmcli connettionh modify ymur6 ipv6.mdthod manualNmcli connection mokify y-6connection.autoconnect yesnmcli con modify "system eth0" connection.autoconnect noSystemctl restart networkNmcli device show```! [] (https://cache.yisu.com/upload/information/20200309/28/12302.jpg?x-oss-process=image/watermark,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_90,type_ZmFuZ3poZW5naGVpdGk=)

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