Connecting Bare Metal Eve-NG to a Switch Trunk Port

Moderator: mike

Post Reply
aricade
Posts: 4
Joined: Tue May 09, 2017 3:42 pm

Connecting Bare Metal Eve-NG to a Switch Trunk Port

Post by aricade » Fri May 12, 2017 4:26 pm

Please skip to the TL;DR Free version at the bottom if this is to long. Sorry...
I have built a Eve-NG Bare metal box. It has 5 physical interfaces (eth0... eth4). I currently have eth0 connected to my home lan and it has acquired a DHCP address off of my OpenWRT router.
It has a physical connection from eth1 to a trunked port on OpenWRT that has untagged/native vlan id :1 and Tagged Vlan id: 100. OpenWRT also has an interface on Vlan 100 and is running an instance of quagga with ospf.

I want to be able to build lab's that can connect to my home network and vice versa. So that I could ssh directly to my labs through my home LAN, test etc....
As my needs for my home lab continue to evolve; I feel there may be a benefit to be able to connect the Eve-NG host to physical switches (ie maybe Cisco 3560's or Juniper EX's) in future. Is there a way to expose the raw trunk port of a switch to eve-ng and then have my virtual router get bridged to these vlans by configuring an 802.1q trunk interface on the guest VM/router.

So I know I can use brctl or ovs to acomplish some of these goals. I think If I could get ovs working this would be the best solution for the long term. I know I could create different vlan interfaces with brctl and then associate these vlan bridged interfaces (eg eth1.100) to a pnetX interface; Then connect it to the eve-ng labs.

Ok sorry for the long post, I am unsure if I am on the right track...
TL;DR Free Version:
  • OVS setup on EVE-NG Bare metal, HOW?
  • Can OVS support pass through of raw ethernet frames to guest VM's.
  • if latter=true, can guest vm's with configured 802.1q logical interfaces work properly when connected to a pnetX interface mapped to OVS bridge port.
Found this post . But I am recieving the following error. Probably due to my lack of knowledge:

Code: Select all

root@eve-ng1:~# ovs-vsctl add-port ovsbr0 patch_ovsbr0
ovs-vsctl: Error detected while setting up 'patch_ovsbr0'.  See ovs-vswitchd log for details.
root@eve-ng1:~# tail -f /var/log/openvswitch/ovs-vswitchd.log
2017-05-12T10:25:03.201Z|00023|vlog|INFO|opened log file /var/log/openvswitch/ovs-vswitchd.log
2017-05-12T16:21:23.161Z|00024|bridge|WARN|could not open network device patch_ovsbr0 (No such device)
Everything before that step I got working. What am I missing? What do I have to do to make patch_ovsbr0 a device?

Thank you!

Uldis (UD)
Posts: 2937
Joined: Wed Mar 15, 2017 4:44 pm
Location: London
Contact:

Re: Connecting Bare Metal Eve-NG to a Switch Trunk Port

Post by Uldis (UD) » Sat May 13, 2017 7:54 pm

to connect server second port to the real SW, all you need use cloud interface which supports STP.
In the /etc/network/interfaces you have bridge to real nic (eth1 in my case)
but pnet1 is cloud1 in there eve

# Cloud devices
iface eth1 inet manual
auto pnet1
iface pnet1 inet manual
bridge_ports eth1
bridge_stp off

Then connect your EVE switch to that cloud (Cloud1)..use trunking on real SW and EVE virtual SW.
Such setup works

UD

aricade
Posts: 4
Joined: Tue May 09, 2017 3:42 pm

Re: Connecting Bare Metal Eve-NG to a Switch Trunk Port

Post by aricade » Tue May 16, 2017 8:10 pm

OK,

But would it be compatible with a vSRX's?

Code: Select all

ge-0/0/3 {
    vlan-tagging;
    unit 100 {
        vlan-id 100;
        family inet {
            address 192.168.100.111/24;
        }
    }
}

Uldis (UD)
Posts: 2937
Joined: Wed Mar 15, 2017 4:44 pm
Location: London
Contact:

Re: Connecting Bare Metal Eve-NG to a Switch Trunk Port

Post by Uldis (UD) » Tue May 16, 2017 9:00 pm

but of course sir..any vendor connection works great

UD

aricade
Posts: 4
Joined: Tue May 09, 2017 3:42 pm

Re: Connecting Bare Metal Eve-NG to a Switch Trunk Port

Post by aricade » Wed May 17, 2017 1:32 am

ok weird,

I end up bridging vlan 100 like so:

Code: Select all

iface eth1 inet manual


iface eth1.100 inet manual
    vlan-raw-device eth1

auto pnet1
iface pnet1 inet dhcp
    bridge_ports eth1.100
    bridge_stp off
But I will try putting it back. Initially I had trouble with the above JUNOS config in the last post. I could not connect to the 100 vlan I have setup on my OPENWRT router's trunk port.

I will give it another shot but this current config help establish my home LAN connectivity to my eve lab's.

Thank you Sir!

aricade
Posts: 4
Joined: Tue May 09, 2017 3:42 pm

Re: Connecting Bare Metal Eve-NG to a Switch Trunk Port

Post by aricade » Thu May 18, 2017 12:05 am

Doh!

It works, I just needed to put the interface in a zone as the vsrx is in flow mode.

Very Very Very cool!
Thank you UD and sorry for the dumb question.

Post Reply