用户工具

站点工具


02-工程实践:cloudstack:troubleshooting

差别

这里会显示出您选择的修订版和当前版本之间的差别。

到此差别页面的链接

两侧同时换到之前的修订记录前一修订版
后一修订版
前一修订版
02-工程实践:cloudstack:troubleshooting [2022/09/03 13:26] – [VLAN不足] annhe02-工程实践:cloudstack:troubleshooting [2022/09/03 13:55] (当前版本) annhe
行 5: 行 5:
 - 家庭路由器,Shared网络下,模板的网卡是DHCP时,可以获取到IP地址,那么是谁负责分配的IP,即DHCP服务器是谁?是家里的路由器?还是CloudStack里的虚拟路由器? - 家庭路由器,Shared网络下,模板的网卡是DHCP时,可以获取到IP地址,那么是谁负责分配的IP,即DHCP服务器是谁?是家里的路由器?还是CloudStack里的虚拟路由器?
 - DHCP分配的IP是否有变化的风险?是否需要设置为static?有什么手段可以设置为static? - DHCP分配的IP是否有变化的风险?是否需要设置为static?有什么手段可以设置为static?
 +
 +Q群回答:
 +
 +
 +acs((大概是apache cloudstack缩写))本身就是dhcp的,通过mac固定了ip地址,除非你通过acs改变ip或者网内有其他dhcp服务器干扰,否则不会有问题
 +
 +参见:[stackoverflow](https://serverfault.com/questions/880900/can-i-request-a-specific-ip-address-via-dhcp-without-rejecting-an-offer-of-a-dif),使用 [lease block](https://manpages.debian.org/bullseye/isc-dhcp-client/dhclient.conf.5.en.html#LEASE_DECLARATIONS)
 +
 +```
 +fixed-address ip-address;
 +
 +The fixed-address statement is used to set the ip address of a particular lease. This is required for all lease statements. The IP address must be specified as a dotted quad (e.g., 12.34.56.78).
 +```
 +
 +查看 cloudstack dhcp 的配置
 +
 +```
 +# ps aux |grep client
 +root       766  0.0  0.4 102904  2360 ?        Ss   05:15   0:00 /sbin/dhclient -1 -q -lf /var/lib/dhclient/dhclient--eth0.lease -pf /var/run/dhclient-eth0.pid -H vm-centos eth0
 +
 +# cat /var/lib/dhclient/dhclient--eth0.lease
 +lease {
 +  interface "eth0";
 +  fixed-address 192.168.0.163;
 +  option subnet-mask 255.255.255.0;
 +  option dhcp-lease-time 86400;
 +  option routers 192.168.0.1;
 +  option dhcp-message-type 5;
 +  option dhcp-server-identifier 192.168.0.1;
 +  option domain-name-servers 192.168.0.1;
 +  option dhcp-renewal-time 43200;
 +  option dhcp-rebinding-time 75600;
 +  renew 6 2022/09/03 15:33:00;
 +  rebind 0 2022/09/04 00:58:59;
 +  expire 0 2022/09/04 03:58:59;
 +}
 +lease {
 +  interface "eth0";
 +  fixed-address 192.168.0.163;
 +  option subnet-mask 255.255.255.0;
 +  option routers 192.168.0.1;
 +  option dhcp-lease-time 86400;
 +  option dhcp-message-type 5;
 +  option domain-name-servers 192.168.0.1;
 +  option dhcp-server-identifier 192.168.0.1;
 +  option dhcp-renewal-time 43200;
 +  option dhcp-rebinding-time 75600;
 +  renew 6 2022/09/03 16:17:38;
 +  rebind 0 2022/09/04 02:15:01;
 +  expire 0 2022/09/04 05:15:01;
 +}
 +
 +```
 +
  
 ### VLAN不足 ### VLAN不足
02-工程实践/cloudstack/troubleshooting.1662182782.txt.gz · 最后更改: 2022/09/03 13:26 由 annhe