server 1 在station1 測試host server1時,無回應,登入server1 查詢網卡設定,
發現網卡eth0 IP 變成DHCP
eth0:0 為192.168.11.254
eth0:0.bak
要將網卡預設為家裡的環境,手動設定把不必要的刪掉,
#cp /etc/sysconfig/network-scripts/ifcfg-eth0:0 /etc/sysconfig/network-scripts/ifcfg-eth0 將eth0:0的設定複製到eth0
#rm /etc/sysconfig/network-scripts/ifcfg-eth0:0 /etc/sysconfig/network-scripts/ifcfg-eth0.bak 刪除eth0:0 eth0:0.bak
GATEWAY 因是家裡環境,預設為192.168.11.1 (看環境指定對應主機),編輯在/etc/sysconfig/network 內,可使用ip r 查詢目前指定的GATEWAY 資料,
因有使用圖形介面啟動,
#ll /etc/sysconfig/networking/devices
#ll /etc/sysconfig/networking/profiles/default/
下面如果有東西將全部的檔案 rm ,service network restart,此時
[root@server1 default]# host server1
server1.example.com has address 192.168.0.254 →出現訊息依舊非 192.168.11.254
查詢 /var/named/chroot/var/named/db.example.com 發現有一行訊息設定為此,
server1.example.com. IN A 192.168.0.254 查詢到的即為此設定,
station ftp 進不去server1 ,此時修改 /var/named/chroot/var/named/db.example.com
server1.example.com. IN A 192.168.0.254 →server1.example.com. IN A 192.168.11.254
$GENERATE 1-253 station$.example.com. A 192.168.0.$→$GENERATE 1-253 station$.example.com. A 192.168.11.$
#service network restart
OK~