美文网首页
[M-003]conf:PKC-云平台虚机网络配置

[M-003]conf:PKC-云平台虚机网络配置

作者: JeffenCheung | 来源:发表于2020-03-09 21:48 被阅读0次

issue

  • 虚拟机绑定公网IP(floating ip);
  • ip link 已经 set up ;
  • 网络已经restart;
  • status: 登录裸金属上去ping不通这个虚机的ip,但在页面上虚机可ping通裸金属

solutions

  • 每个租户有自己的安全组
  • 安全组放开权限(进出双向、远端CIDR):
    • ALL ICMP
    • ALL TCP
    • ALL UDP

Step by step

  • step0 新建公网IP,如share_net必需挂载路由route ,可以最后再绑定后创建的云主机
  • step1:新建网络资源/虚拟网卡
  • step2:在虚拟网卡中绑定云主机
  • step3:查看云主机刚刚挂载的网卡信息
# 查看网卡信息
ip a
ifconfig
# enp1s0 inet 地址 192.168.x.x
# enp6s0
  • step4:添加网卡信息配置
    Important Tip :DHCP means Dynamic Host Configuration Protocol.
# 编辑网卡
vi /etc/network/interfaces
# Ctl+o编辑添加
auto lo
iface lo inet loopback
auto enp1s0
iface enp1s0 inet dhcp
# 可添加多个网卡
auto enp6s0
iface enp6s0 inet dhcp
# Ctl+: wq 保存退出
:wq
  • step5:重启网络
sudo /etc/init.d/networking restart
# 确认网卡配置
ifconfig

相关文章

网友评论

      本文标题:[M-003]conf:PKC-云平台虚机网络配置

      本文链接:https://www.haomeiwen.com/subject/jesdkhtx.html