發新話題

重新啟動網絡,IP消失了?需要ipaliases重新啟動

重新啟動網絡,IP消失了?需要ipaliases重新啟動

Restarted network, IP's gone?
重新啟動網絡,下面這個命令千萬不要亂用
/etc/rc.d/init.d/network restart
很有可能造成你的伺服器IP消失,或變成幽靈IP

補救方法就是:
ipaliases重新啟動
/etc/init.d/ipaliases restart

然後重建Rebuild the IP Address Pool 才能再度釋放自由IP

以後要重新啟動網絡,試試下面這兩個個命令就好
[root@aaa1 ~]# sysctl -p
[root@aaa1 ~]# /etc/rc.d/init.d/network start

不要restart因為它會Shutting down
Shutting down interface eth0:                              [  OK  ]
Shutting down loopback interface:                          [  OK  ]
Bringing up loopback interface:                            [  OK  ]
Bringing up interface eth0:                                [  OK  ]

TOP

WHM: system has 0 free ips - Missing IP address?
The Planet Forums > Control Panels > cPanel/WHM
ServerNewbie
Jun 26 2010, 09:20 AM
Hello,

We have 5 IP addresses with our server.

1 is the main address of our server,
2 IP's are bound to 2 sites,
1 is bound to IPMI, according to The Planet.

That's 4 of the 5 addresses used.

But WHM says "System has 0 free ips". We don't see the IP address show up in "Show IP Address Usage" in WHM or when we we run ifconfig.

Can someone please shine a light on this?

Thanks,
Ann (ServerNewbie)
JeffreyR
Jun 27 2010, 08:59 AM
Ann,

I've taken a quick look at your situation, and the IP you are referring to isn't in use and should be available. You can try adding the IP separately through WHM - IP Functions -> Add a new IP Address. Another suggestion would be to check your /etc/ips file through the command line. If an IP address isn't listed there, you can add it using the following format:

IP Address:Subnet Mask:Broadcast Address

Once it has been added, you can refresh the existing IPs using the following command:

CODE
/etc/init.d/ipaliases restart


Any IP addresses added to /etc/ips should then be visible.

If you need a hand with any of this, or things get any more complicated, feel free to open a ticket with our technical support department, or send me a PM with more information. Just let us know and we'll make sure you're squared away.

- Jeff

TOP

區域網路中 NAT 不能工作

    NAT 無法正確的工作原因有很多,不過,如果你確定你的區域網路連線已經正常,而且主機可以正確的連上 Internet,另外,用戶端的 DNS 設定也是正確的(這一步常常有人搞錯!),那麼可能發生的問題大概就是沒有將 IPv4 打開吧!雖然 /etc/sysconfig/network 當中已經設定了FORWARD_IPV4=yes 的項目,但是仍然有可能沒有開啟這一個項目,那麼就以下面的指令來開啟吧!

        echo 1 > /proc/sys/net/ipv4/ip_forward

    你可以將這個指令寫入 net.sh 裡面,或者是直接寫在 /etc/rc.d/rc.local 這個檔案中。另外,還有一點,就是你的 GateWay 設定錯誤了!這個在上面的 network 檔案說明中已經提到了,你可以在詳細的看一看!或者是使用 route -n 這個指令來察看一下你的 route table (路由表)例如:

         
        [vbird@tsai vbird]$ route -n
        Kernel IP routing table
        Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
        192.168.1.2     0.0.0.0         255.255.255.255 UH    0      0        0 eth0
        172.16.11.8     0.0.0.0         255.255.255.255 UH    0      0        0 ppp0
        192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
        127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo
        0.0.0.0         172.16.11.8     0.0.0.0         UG    0      0        0 ppp0

    仔細看到上面喔:

        * 第六行顯示你的對內網域為 192.168.1.0 這一個,且在 Iface 的地方,顯示了你的界面卡使用的是 eth0 這一個界面卡;

        * 另外,你的對外通訊閘(就是最後一行,由於是對外,所以會寫出 0.0.0.0 的 Destination )是以 172.16.11.8 這一個,且你的介面是 ppp0 這一個!

    瞭解了嗎?對內與對外的 route table 是不一樣的,如果你的對外 Iface 顯示 eth0 的話,那就表示你的路由設定錯誤了!這時你就必須要修改一下你的 /etc/sysconfig/network 檔案囉!然後再以

        /etc/rc.d/init.d/network restart

    來重新啟動!

TOP

發新話題

本站所有圖文均屬網友發表,僅代表作者的觀點與本站無關,如有侵權請通知版主會盡快刪除。