Ask Your Question
1

two vlan networks attached to an instance

asked 2014-02-12 15:15:22 -0500

vpaul gravatar image

Hi there,

I'd like to attach two networks to an instance. Neutron mode is vlan and there is an external L3 device managing vlans. I'm able to attach single interface with no issues. There is connectivity, etc. Adding second interface looks ok. There are no spawning issues, IP addresses are assigned, etc. But there is no connectivity on both interfaces.

Any ideas would be appreciated.

Thank you.

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
2

answered 2014-02-13 03:45:34 -0500

DaveJ gravatar image

It's difficult to say without more information.

Does it matter which order you attach the interfaces on? Do both networks work individually, or just one? Have you setup any custom routing rules - what does /etc/resolv.conf contain?

When you say no connectivity, how are you testing this? Is the link down, or you just can't ping another host (external or internal)

Can you provide a dump from

neutron net-list

neutron subnet-list

neutron router-list

neutron port-list

This might provide some useful information.

edit flag offensive delete link more
2

answered 2014-08-29 12:46:20 -0500

dbaxps gravatar image

updated 2014-08-31 06:11:40 -0500

Problem here is to add second NIC declaration to standard glance image having just one NIC defined. Cinder volume has been used to create 2 NICs interfaces each one per one VLAN

UPDATE as of 08/30/2014 . View Setup QCOW2 standard CentOS 7 image to work with 2 VLANs

Notice, that same schema would work for any F20 or Ubuntu QCOW2 images via qemu-nbd mount increasing number of NICs up to 2,3,... Approach suggested up here is universal. Any cinder volume been built up on updated glance image ( 2 NICs ready ) would be 2 NICs ready as well

image description

    Created CentOS 7 VM (with bootable cinder volume) with one interface and launched it. Logged into VM.
    cd /etc/network/interfaces and added ifcfg-eth1 like ifcfg-eth0
    [root@centos07rsx network-scripts]# cat ifcfg-eth1
    DEVICE="eth1"
    BOOTPROTO="dhcp"
    ONBOOT="yes"
    TYPE="Ethernet"
    USERCTL="yes"
    PEERDNS="yes"
    IPV6INIT="no"
    PERSISTENT_DHCLIENT="1"
    Suspended instance and deleted instance , but kept cinder volume safe.
    Using same cinder volume created new CentOS 7 instance with 2 NIC interfaces defined and attached 
    private and demonet via launch interface in dashboard

    [root@icehouse1 ~(keystone_admin)]# ip netns
    qrouter-ecf9ee4e-b92c-4a5b-a884-d753a184764b
    qrouter-4135e351-9ae4-4e89-9b23-7b131b2c4e6c
    qdhcp-8b22b262-c9c1-4138-8092-0581195f0889
    qdhcp-140d25a4-0d98-4424-a35a-2a985b2f0a17
    [root@icehouse1 ~(keystone_admin)]# neutron net-list
    +--------------------------------------+---------+-----------------------------------------------------+
    | id                                   | name    | subnets                                             |
    +--------------------------------------+---------+-----------------------------------------------------+
    | 8b22b262-c9c1-4138-8092-0581195f0889 | private | 06530f5a-31af-4a14-a40f-808ee2e9e3ad 40.0.0.0/24    |
    | 140d25a4-0d98-4424-a35a-2a985b2f0a17 | demonet | f2e318f8-05c6-4dda-8e8e-07f7a8f2c91a 10.0.0.0/24    |
    | 295a5bba-c219-407f-830d-911cd2214349 | public  | c8421c61-7d85-4cf8-a5c8-03c05982bff9 192.168.1.0/24 |
    +--------------------------------------+---------+-----------------------------------------------------+

    [root@icehouse1 ~(keystone_admin)]# ip netns exec qdhcp-8b22b262-c9c1-4138-8092-0581195f0889 ping  40.0.0.64
    PING 40.0.0.64 (40.0.0.64) 56(84) bytes of data.
    64 bytes from 40.0.0.64: icmp_seq=1 ttl=64 time=1.50 ms
    64 bytes from 40.0.0.64: icmp_seq=2 ttl=64 time=0.552 ms
    64 bytes from 40.0.0.64: icmp_seq=3 ttl=64 time=0.924 ms
    64 bytes from 40.0.0.64: icmp_seq=4 ttl=64 time=0.546 ms
    ^C
    --- 40.0.0.64 ping statistics ---
    4 packets transmitted, 4 received, 0% packet loss, time 3001ms
    rtt min/avg/max/mdev = 0.546/0.882/1.508/0.393 ms
    [root@icehouse1 ~(keystone_admin)]# ip netns exec qdhcp-140d25a4-0d98-4424-a35a-2a985b2f0a17 ping 10.0.0.17
    PING 10.0.0.17 (10.0.0.17) 56(84) bytes of data.
    64 bytes from 10.0.0.17: icmp_seq=1 ttl=64 time=1.08 ms
    64 bytes from 10.0.0.17: icmp_seq=2 ttl=64 time=0.805 ms
    64 bytes from 10.0.0.17: icmp_seq=3 ttl=64 time=0.518 ms
    64 bytes from 10.0.0.17: icmp_seq=4 ttl=64 time=0.522 ms
    64 bytes from 10.0.0.17: icmp_seq=5 ttl=64 time=0.540 ms
    ^C
    --- 10.0.0.17 ping statistics ---
    5 packets transmitted, 5 received, 0% packet loss, time 4001ms
    rtt min/avg/max/mdev = 0.518/0.694/1.089/0.227 ms
    [root@icehouse1 ~(keystone_admin)]# ip netns exec qdhcp-140d25a4-0d98-4424-a35a-2a985b2f0a17 ssh centos@10.0.0.17
    The authenticity of host '10.0.0.17 (10.0.0.17)' can't be established ...
(more)
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2014-02-12 15:15:22 -0500

Seen: 402 times

Last updated: Aug 31 '14