FusionSphere虚拟机网络不通

虚拟机侧

1、通过控制台Console或者VNC登录虚拟机。

获取VNC的token链接,因为token有超时失效,该链接获取后长时间不用要重新获取。

# nova get-vnc-console  vmid  novnc

2、登录VNC控制台之后,检查网卡和IP地址是否up,  ARP学习是否正常。

# ifconfig -a

IPv4查询arp表

# arp -a 

IPv6查询arp表

# ip -6 neigh show

正常显示如下

异常显示: 192.168.3.1 dev enp0s3 FAILED

# 查询路由

# route -n

# netstat -rn

同时检查下配置的IP地址是否正确,网络掩码是否正确。

3、虚拟机上抓包。

首先安装对应操作系统版本的tcpdump

# rpm -ivh tcpdump-xxx.rpm

抓包

# tcpdump -i ethx -w /tmp/icmp_ethx.cap

# tcpdump -i ethx host xx.xx.xx.xx and xx.xx.xx.xx -vv

正常情况会有icmp的request和reply报文,如果没有收到则需要在往上层抓包。

虚拟层侧

1、通过neutron查询虚拟机的网络

查询虚拟机port_id

# neutron port-list | grep 虚拟机网卡mac地址

查询虚拟机network_id

# neutron port-show port_id

查询虚拟网络所在的物理网络,如physnet1

# neutron net-show network_id

登录到虚拟机所在主机,使用下面命名确认physnet1的trunk口

# cat /usr/bin/ports_info | python -m json.tool

2、虚拟层抓包

首先需要安装好tcpdump

在虚拟机所在主机抓包

# tcpdump -nne -i trunk0 -w /tmp/hosttrunk0.pcap host xx.xx.xx.xx

# tcpdump -nne -i tap0ee55655-87 -w /tmp/tap.pcap host xx.xx.xx.xx

在FusionSphere首节点上抓包

# tcpdump -nne -i trunk0 -w /tmp/fstrunk0.pcap host xx.xx.xx.xx

在external_api口上抓包

# tcpdump -i external_api  host xx.xx.xx.xx and xx.xx.xx.xx -vv

为啥需要这么抓呢, 它的网络拓扑到底是啥样子?

交换机侧

登录交换机,进入系统视图

<switch>system-view

1、配置ACL规则

[switch] acl ipv6 number 3001

[switch] rule 5 permit icmpv6 source xx.xx.xx.xx/xx  destination xx.xx.xx.xx/xx

[switch] rule 6 permit icmpv6 source xx.xx.xx.xx/xx  destination xx.xx.xx.xx/xx

[switch] commit

[switch] q

2、退出acl,配置流分类

[switch]  traffic classifier radius-test

[switch]  if-match ipv6 acl 3001

[switch]  commit

[switch]  q

3、退出流分类,配置流动作

[switch]  traffic behavior radius-test

[switch]  statistics enable

[switch]  commit

[switch]  q

4、配置流策略

[switch]  traffic policy radius-test

[switch]  classifier radius-test behavior radius-test

[switch]  commit

[switch]  q

4、配置端口使能流策略

[switch]  interface 25ge1/0/7

[switch]  traffic-policy radius-test inbound

[switch]  traffic-policy radius-test outbound

[switch]  commit

[switch]  q

5、查看信息统计

[switch]  display traffic-policy statistics interface 25ge1/0/7

FAQ:

1、在交换机上查询主机所连接的交换机端口

[switch] display ipv6 neighbors brief

2、tcpdump命令详解

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值