您好,登錄后才能下訂單哦!
查看網卡所在區域:firewall-cmd --get-zone-of-interface=eno16777736
查看服務是否被允許:firewall-cmd --zone=public --query-service=http
防火墻添加端口:
firewall-cmd --permanent --zone=public --add-service=http
firewall-cmd --permanent --zone=public --add-port=9090/tcp
firewall-cmd --reload
firewall-cmd --permanent --zone=public --add-port=8080-8081/tcp
irewall-cmd --reload
nmcli con show [active]
nmcli con show "static-eth0"
nmcli dev status
nmcle dev show eth0
apply modification
systemctl restart network.service
nmcli con reload
nmcli connection show 查看鏈接信息
nmcli device show 查看設備信息
nmcli device status 查看設備狀態
hostnamectl set-hostname desktop.group8.example.com
nmcli connection show
nmcli con modify eno16777736 ipv4.addresses "172.24.8.10/24 172.24.8.254" ipv4.dns "172.24.8.254"
nmcli con modify eno16777736 connection.autoconnect yes ipv4.method manual
nmcli con up eno16777736
systemctl restart network .service
add additional network ipv4 address
nmcli con add con-name ''yeslab" ifname eth0 type ethernet ip4 172.25.1.11/24 gw4 172.25.1.254 新建連接yeslab 并配置IP地址
nmcli con modify "yeslab" ipv4.dns 172.25.254.254 配置yeslab連接dns
nmcli con modify "yeslab" ipv4.addresses 172.25.1.18/24 修改yeslab的IP地址
nmcli con modify "yeslab" connection.autoconnect yes 啟用 yeslab的配置
nmcli con modify "system eth0" connection.autoconnect no 關閉system eth0 d的配置
systemctl restart network .service 重啟網絡服務
nmcli con modify "system eth0" +ipv4.addresses 10.1.1.1/24 為system eth0添加 地址 ,可以同時擁有多個地址
hostnamectl set-hostname serverX.example.com 配置系統名稱
網絡綁定
建立team 端口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/24' 為team口配置IP地址
nmcli con mod y-team ipv4.method manual 配置地址為固定
綁定從物理端口
nmcli con add type team-slave con-name team1-port1 ifname eth2 master team1
nmcli con add type team-slave con-name team1-port2 ifname eth3 master team1
Systemctl restart network
nmcli con up team1
teamdctl team1 state
nmcli device disconnect eth2 關閉端口
Configuring software bridge
建立一個橋接
Nmcli con add type bridge con-name br1 ifname br1
Nmcli con mod br1 ipv4.addresses '192.168.1.100/24
Nmcli con mod br1 ipv4.method manual
Nmcli con add type bridge-slave con-name br1-port1 ifname eth2 master br1
Nmcli con add type bridge-slave con-name br1-port2 ifname eth3 master br1
Ip link
Brctl show
Ping -1 bri 192.168.1.254 使用橋接端口PING測試
Ping -c 10 -I br1 192.168.1.254
Ipv6配置
nmcli connection add con-name y-6 ifname eth0 type ethernet ip6 2016:abcd::2/64
Nmcli connettionh modify y-6 ipv6.mdthod manual
Nmcli connection mokify y-6connection.autoconnect yes
nmcli con modify "system eth0" connection.autoconnect no
Systemctl restart network
Nmcli 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=)
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。