分享

创建云实例后,登录后,使用ifconfig无IP地址,求大神指点

bule_sky 发表于 2016-11-29 11:07:26 [显示全部楼层] 只看大图 回帖奖励 阅读模式 关闭右栏 11 12541
控制节点
[root@controller ~]# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: enp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master ovs-system state UP qlen 1000
    link/ether 28:f3:66:27:20:f0 brd ff:ff:ff:ff:ff:ff
3: enp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether d4:3d:7e:67:d6:28 brd ff:ff:ff:ff:ff:ff
    inet 10.27.24.30/8 brd 10.255.255.255 scope global enp3s0
       valid_lft forever preferred_lft forever
    inet6 fe80::d63d:7eff:fe67:d628/64 scope link
       valid_lft forever preferred_lft forever
4: ovs-system: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN
    link/ether 96:a0:53:1e:d2:3b brd ff:ff:ff:ff:ff:ff
5: br-int: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN
    link/ether da:28:b8:84:47:4c brd ff:ff:ff:ff:ff:ff
6: br-provider: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN
    link/ether 28:f3:66:27:20:f0 brd ff:ff:ff:ff:ff:ff
7: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN
    link/ether 52:54:00:ab:1a:46 brd ff:ff:ff:ff:ff:ff
    inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
       valid_lft forever preferred_lft forever
8: virbr0-nic: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast master virbr0 state DOWN qlen 500
    link/ether 52:54:00:ab:1a:46 brd ff:ff:ff:ff:ff:ff
[root@controller ~]# ovs-vsctl show
36b345b7-1beb-4a51-bfb2-801743c04b6b
    Bridge br-provider
        Port phy-br-provider
            Interface phy-br-provider
                type: patch
                options: {peer=int-br-provider}
        Port "enp2s0"
            Interface "enp2s0"
        Port br-provider
            Interface br-provider
                type: internal
    Bridge br-int
        fail_mode: secure
        Port "qr-8c4baa3c-b1"
            tag: 2
            Interface "qr-8c4baa3c-b1"
                type: internal
        Port "qg-1f7f4e1d-b5"
            tag: 1
            Interface "qg-1f7f4e1d-b5"
                type: internal
        Port "tape8962e20-2d"
            tag: 2
            Interface "tape8962e20-2d"
                type: internal
        Port int-br-provider
            Interface int-br-provider
                type: patch
                options: {peer=phy-br-provider}
        Port "tapd68f78f5-01"
            tag: 1
            Interface "tapd68f78f5-01"
                type: internal
        Port br-int
            Interface br-int
                type: internal
    ovs_version: "2.5.0"


[root@controller ~]# ifconfig
enp2s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether 28:f3:66:27:20:f0  txqueuelen 1000  (Ethernet)
        RX packets 35930  bytes 3200604 (3.0 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 6  bytes 252 (252.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

enp3s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.27.24.30  netmask 255.0.0.0  broadcast 10.255.255.255
        inet6 fe80::d63d:7eff:fe67:d628  prefixlen 64  scopeid 0x20<link>
        ether d4:3d:7e:67:d6:28  txqueuelen 1000  (Ethernet)
        RX packets 82327  bytes 11025506 (10.5 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 50425  bytes 19394967 (18.4 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 0  (Local Loopback)
        RX packets 150626  bytes 54640283 (52.1 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 150626  bytes 54640283 (52.1 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

virbr0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 192.168.122.1  netmask 255.255.255.0  broadcast 192.168.122.255
        ether 52:54:00:ab:1a:46  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0


计算节点


[root@compute ~]# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: enp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master ovs-system state UP qlen 1000
    link/ether 28:f3:66:27:20:e0 brd ff:ff:ff:ff:ff:ff
3: enp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 44:8a:5b:49:5d:85 brd ff:ff:ff:ff:ff:ff
    inet 10.27.24.20/8 brd 10.255.255.255 scope global enp3s0
       valid_lft forever preferred_lft forever
    inet6 fe80::468a:5bff:fe49:5d85/64 scope link
       valid_lft forever preferred_lft forever
4: ovs-system: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN
    link/ether 1e:d4:05:7d:77:84 brd ff:ff:ff:ff:ff:ff
5: br-int: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN
    link/ether 82:57:ab:3d:a4:40 brd ff:ff:ff:ff:ff:ff
6: br-provider: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN
    link/ether 28:f3:66:27:20:e0 brd ff:ff:ff:ff:ff:ff
7: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN
    link/ether 52:54:00:31:92:85 brd ff:ff:ff:ff:ff:ff
    inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
       valid_lft forever preferred_lft forever
8: virbr0-nic: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast master virbr0 state DOWN qlen 500
    link/ether 52:54:00:31:92:85 brd ff:ff:ff:ff:ff:ff
9: qbraf955df4-9c: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP
    link/ether 76:e0:91:81:88:75 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::74e0:91ff:fe81:8875/64 scope link
       valid_lft forever preferred_lft forever
10: qvoaf955df4-9c@qvbaf955df4-9c: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master ovs-system state UP qlen 1000
    link/ether 3e:43:3e:b3:7b:e1 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::3c43:3eff:feb3:7be1/64 scope link
       valid_lft forever preferred_lft forever
11: qvbaf955df4-9c@qvoaf955df4-9c: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master qbraf955df4-9c state UP qlen 1000
    link/ether 76:e0:91:81:88:75 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::74e0:91ff:fe81:8875/64 scope link
       valid_lft forever preferred_lft forever
12: qbrb50a2eff-4e: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP
    link/ether 42:c0:ef:b7:5f:3a brd ff:ff:ff:ff:ff:ff
    inet6 fe80::40c0:efff:feb7:5f3a/64 scope link
       valid_lft forever preferred_lft forever
13: qvob50a2eff-4e@qvbb50a2eff-4e: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master ovs-system state UP qlen 1000
    link/ether da:88:71:fd:c8:37 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::d888:71ff:fefd:c837/64 scope link
       valid_lft forever preferred_lft forever
14: qvbb50a2eff-4e@qvob50a2eff-4e: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master qbrb50a2eff-4e state UP qlen 1000
    link/ether 42:c0:ef:b7:5f:3a brd ff:ff:ff:ff:ff:ff
    inet6 fe80::40c0:efff:feb7:5f3a/64 scope link
       valid_lft forever preferred_lft forever
15: tapb50a2eff-4e: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master qbrb50a2eff-4e state UNKNOWN qlen 500
    link/ether fe:16:3e:4d:07:ba brd ff:ff:ff:ff:ff:ff
    inet6 fe80::fc16:3eff:fe4d:7ba/64 scope link
       valid_lft forever preferred_lft forever
16: tapaf955df4-9c: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master qbraf955df4-9c state UNKNOWN qlen 500
    link/ether fe:16:3e:e5:fd:41 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::fc16:3eff:fee5:fd41/64 scope link
       valid_lft forever preferred_lft forever
[root@compute ~]#
[root@compute ~]#
[root@compute ~]#
[root@compute ~]#
[root@compute ~]# ovs-vsctl show
1f7df655-528a-401a-a2b6-e1b108ffb8fa
    Bridge br-int
        fail_mode: secure
        Port "qvoaf955df4-9c"
            tag: 1
            Interface "qvoaf955df4-9c"
        Port br-int
            Interface br-int
                type: internal
        Port int-br-provider
            Interface int-br-provider
                type: patch
                options: {peer=phy-br-provider}
        Port "qvob50a2eff-4e"
            tag: 1
            Interface "qvob50a2eff-4e"
    Bridge br-provider
        Port phy-br-provider
            Interface phy-br-provider
                type: patch
                options: {peer=int-br-provider}
        Port br-provider
            Interface br-provider
                type: internal
        Port "enp2s0"
            Interface "enp2s0"
    ovs_version: "2.5.0"

[root@compute ~]# ifconfig
enp2s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether 28:f3:66:27:20:e0  txqueuelen 1000  (Ethernet)
        RX packets 58952  bytes 5294916 (5.0 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 36  bytes 5856 (5.7 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

enp3s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.27.24.20  netmask 255.0.0.0  broadcast 10.255.255.255
        inet6 fe80::468a:5bff:fe49:5d85  prefixlen 64  scopeid 0x20<link>
        ether 44:8a:5b:49:5d:85  txqueuelen 1000  (Ethernet)
        RX packets 59823  bytes 8353075 (7.9 MiB)
        RX errors 0  dropped 2  overruns 0  frame 0
        TX packets 33086  bytes 6303958 (6.0 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 0  (Local Loopback)
        RX packets 10586  bytes 562991 (549.7 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 10586  bytes 562991 (549.7 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

qbraf955df4-9c: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::74e0:91ff:fe81:8875  prefixlen 64  scopeid 0x20<link>
        ether 76:e0:91:81:88:75  txqueuelen 0  (Ethernet)
        RX packets 45  bytes 5944 (5.8 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 8  bytes 648 (648.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

qbrb50a2eff-4e: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::40c0:efff:feb7:5f3a  prefixlen 64  scopeid 0x20<link>
        ether 42:c0:ef:b7:5f:3a  txqueuelen 0  (Ethernet)
        RX packets 46  bytes 6008 (5.8 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 9  bytes 738 (738.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

qvbaf955df4-9c: flags=4419<UP,BROADCAST,RUNNING,PROMISC,MULTICAST>  mtu 1500
        inet6 fe80::74e0:91ff:fe81:8875  prefixlen 64  scopeid 0x20<link>
        ether 76:e0:91:81:88:75  txqueuelen 1000  (Ethernet)
        RX packets 38  bytes 5278 (5.1 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 25  bytes 2760 (2.6 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

qvbb50a2eff-4e: flags=4419<UP,BROADCAST,RUNNING,PROMISC,MULTICAST>  mtu 1500
        inet6 fe80::40c0:efff:feb7:5f3a  prefixlen 64  scopeid 0x20<link>
        ether 42:c0:ef:b7:5f:3a  txqueuelen 1000  (Ethernet)
        RX packets 20  bytes 2350 (2.2 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 43  bytes 5688 (5.5 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

qvoaf955df4-9c: flags=4419<UP,BROADCAST,RUNNING,PROMISC,MULTICAST>  mtu 1500
        inet6 fe80::3c43:3eff:feb3:7be1  prefixlen 64  scopeid 0x20<link>
        ether 3e:43:3e:b3:7b:e1  txqueuelen 1000  (Ethernet)
        RX packets 25  bytes 2760 (2.6 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 38  bytes 5278 (5.1 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

qvob50a2eff-4e: flags=4419<UP,BROADCAST,RUNNING,PROMISC,MULTICAST>  mtu 1500
        inet6 fe80::d888:71ff:fefd:c837  prefixlen 64  scopeid 0x20<link>
        ether da:88:71:fd:c8:37  txqueuelen 1000  (Ethernet)
        RX packets 43  bytes 5688 (5.5 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 20  bytes 2350 (2.2 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

tapaf955df4-9c: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::fc16:3eff:fee5:fd41  prefixlen 64  scopeid 0x20<link>
        ether fe:16:3e:e5:fd:41  txqueuelen 500  (Ethernet)
        RX packets 9  bytes 1464 (1.4 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 8  bytes 648 (648.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

tapb50a2eff-4e: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::fc16:3eff:fe4d:7ba  prefixlen 64  scopeid 0x20<link>
        ether fe:16:3e:4d:07:ba  txqueuelen 500  (Ethernet)
        RX packets 27  bytes 4392 (4.2 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 17  bytes 2112 (2.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

virbr0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 192.168.122.1  netmask 255.255.255.0  broadcast 192.168.122.255
        ether 52:54:00:31:92:85  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

组网图.PNG




已有(12)人评论

跳转到指定楼层
einhep 发表于 2016-11-29 14:55:05
到这下面看看是否有错误 /var/log/neutron/dhcp-agent.log


回复

使用道具 举报

bule_sky 发表于 2016-11-29 18:50:46
einhep 发表于 2016-11-29 14:55
到这下面看看是否有错误 /var/log/neutron/dhcp-agent.log

hello,没有错误啊
回复

使用道具 举报

einhep 发表于 2016-11-29 20:35:14
bule_sky 发表于 2016-11-29 18:50
hello,没有错误啊

你的内网ip和floating ip是什么?
网段这样很难搞的。
建议floating ip和本机ip是同一个网段。
回复

使用道具 举报

bule_sky 发表于 2016-11-29 21:24:05
设是我的配置
[root@controller ~]# cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

10.27.24.30 controller
10.27.24.20 compute
回复

使用道具 举报

bule_sky 发表于 2016-11-29 21:24:59
bule_sky 发表于 2016-11-29 21:24
设是我的配置
[root@controller ~]# cat /etc/hosts
127.0.0.1   localhost localhost.localdomain local ...

这是VM的浮动IP地址
instance.PNG
回复

使用道具 举报

bule_sky 发表于 2016-11-29 21:27:15
einhep 发表于 2016-11-29 20:35
你的内网ip和floating ip是什么?
网段这样很难搞的。
建议floating ip和本机ip是同一个网段。

VM云主机网段为:1.1.1.0/24
浮动IP和自己电脑(包括控制节点)都是10.27.0.0 网段的
回复

使用道具 举报

langke93 发表于 2016-11-30 08:28:40
推荐这个:可以更换下网段
openstack【juno】入门高级篇:为何你的实例ping不通外网【详述】
http://www.aboutyun.com/forum.php?mod=viewthread&tid=13508


回复

使用道具 举报

bule_sky 发表于 2016-11-30 13:38:35
langke93 发表于 2016-11-30 08:28
推荐这个:可以更换下网段
openstack【juno】入门高级篇:为何你的实例ping不通外网【详述】
http://www. ...

我是实体机,搭的环境
回复

使用道具 举报

nextuser 发表于 2016-12-1 09:46:48
bule_sky 发表于 2016-11-30 13:38
我是实体机,搭的环境

抓一下包吧
回复

使用道具 举报

12下一页
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

推荐上一条 /2 下一条