Linux IP位址配置

2021-08-04 11:53:31 字數 678 閱讀 9665

底層修改ip:

(1)修改/etc/sysconfig/network-scripts/ifcfg-eth0裡面的ip,子網掩碼,預設閘道器等資訊

我的虛擬機器裡沒有eth0這個檔案,只有eto33??資訊如下圖所示

type為乙太網連線

bootproto引導時為dhcp協議

defroute 將介面設定為預設路由

peerdns 允許網絡卡在啟動時向dhcp伺服器查詢dns資訊,並自動覆蓋/etc/resolv.conf配置檔案

ipv6init 設定yes,啟用ipv6

ipv6_autoconf 自動配置ipv6

name 裝置名稱

uuid 裝置唯一識別符號

device 裝置名稱

onboot 設定yes,開機自動啟用網路連線

未標註的沒有查到詳細資訊

ipaddr,netmask,gateway可配置

(2)*配置之前關掉networkmanager

service networkmanager stop

(3)配置之後/etc/rc.d/init.d/network restart修改生效

linux ip位址配置

centos 系統ip配置 centos系統ip配置檔案的路徑 etc sysconfig network scripts目錄中。以下是ip配置檔案預設的配置 ipv6 init yes ipv6 autoconf yes ipv6 defroute yes ipv6 peerdns yes ipv...

linux ip位址檢視

1.ifconfig 如果找不到ifconfig需要安裝 net tools yum install net tools 或者 apt install net tools ip addr 或者 ip addr show 或者 ip a 4.curl apt install curl 安裝程式 cur...

LinuxIP配置方法

linux伺服器雙網絡卡雙ip和單網絡卡雙ip配置方法 一 雙網絡卡雙ip。eth0為電信,eth1為聯通。cd etc sysconfig network scripts vi ifcfg eth0 device eth0 hwaddr 00 e0 b1 07 d5 86 onboot yes b...