當前位置:首頁 » 幣種行情 » eth3網卡的配置文件

eth3網卡的配置文件

發布時間: 2025-05-20 07:59:40

『壹』 ubuntu網卡文件位置

1.修改網卡名稱:ens3=>eth0
步驟1:首先切換到 root 賬號,然後 vi /etc/default/grub;
步驟2:修改參數 GRUB_CMDLINE_LINUX 添加 net.ifnames=0 biosdevname=0;
步驟3:然後保存文件,執行命令update-grub
步驟4:編輯文件 /etc/network/interface 保存後重啟ubuntu
步驟5:最後驗證是否修改成功
2.設置eth0
#sudo nano /etc/network/interfaces #編輯網網卡配置文件
auto lo
iface lo inet loopback
auto eth0 #開機自動連接網路
iface eth0 inet static #static表示使用固定ip,dhcp表述使用動態ip
address 192.168.1.168 #設置ip地址
netmask 255.255.255.0 #設置子網掩碼
gateway 192.168.1.1 #設置網關
3. 為網卡配置靜態IP地址
編輯文件/etc/network/interfaces:
sudo nano /etc/network/interfaces
並用下面的行來替換有關eth0的行:# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.3.90
gateway 192.168.3.1
netmask 255.255.255.0
將上面的ip地址等信息換成你自己就可以了.用下面的命令使網路設置生效:
sudo /etc/init.d/networking restart。
4. 設定第二個IP地址(虛擬IP地址)
編輯文件/etc/network/interfaces: sudo vi /etc/network/interfaces
在該文件中添加如下的行:
auto eth0:1
iface eth0:1 inet static
address 192.168.1.60
netmask 255.255.255.0
network x.x.x.x
broadcast x.x.x.x
gateway x.x.x.x
根據你的情況填上所有諸如address,netmask,network,broadcast和gateways等信息。
用下面的命令使網路設置生效:
sudo /etc/init.d/networking restart。

熱點內容
萊特幣國際價格 發布:2025-05-20 11:11:20 瀏覽:738
哪些數字貨幣交易所需要下架 發布:2025-05-20 11:04:01 瀏覽:438
區塊鏈錢包咨詢天下互通 發布:2025-05-20 10:39:32 瀏覽:798
eth轉ok流程 發布:2025-05-20 10:36:58 瀏覽:65
幣圈擼羊毛擼成百萬富翁 發布:2025-05-20 10:31:59 瀏覽:163
去天津中心公園的公交車 發布:2025-05-20 10:27:45 瀏覽:836
區塊鏈幣圈atd 發布:2025-05-20 10:16:04 瀏覽:359
有關數字貨幣的書籍有哪些 發布:2025-05-20 10:11:40 瀏覽:925
ltc萊特幣礦機組裝 發布:2025-05-20 10:10:16 瀏覽:269
幣圈預言機概念新幣 發布:2025-05-20 10:10:09 瀏覽:577