Fix your custom templates or give proper reply

Before posting something, READ the changelog, WATCH the videos, howto and provide following:
Your install is: Bare metal, ESXi, what CPU model, RAM, HD, what EVE version you have, output of the uname -a and any other info that might help us faster.

Moderator: mike

Post Reply
sajiby3k
Posts: 11
Joined: Mon Sep 25, 2017 2:19 pm

Fix your custom templates or give proper reply

Post by sajiby3k » Wed Sep 11, 2019 4:55 pm

Hi,

I am modifying the original text as we are here to helping each other.

I have opened a topic at - https://www.eve-ng.net/forum/viewtopic. ... ate#p23695

As the old thread is locked, continuing the discussion here -

I was hoping someone else who is helpful minded can reply to my topic.

I have read section 17.3 and it is not helping me.

It will be kind of developers if they let the topic open and let other users help me, as I can't do it by myself by reading section 17.3 of pdf and using 2.0.3.95 of community version.

Problem is in template I have written -
type: qemu
name: Clavister-cOS
cpulimit: 1
icon: Firewall.png
cpu: 1
ram: 512
ethernet: 4
eth_format: if{1}
But interface numbering starts from if0.

I want to have my interfaces numbered as if1, if2, if3 etc. Not like if0, if1, if2 etc. And no static defination of every single interface like -
eth_name:
- If1
- If2
- If3
- If4
Don't lock this thread, let's others reply to it. May be someone has solved it, the way I want.
Last edited by sajiby3k on Wed Sep 11, 2019 8:01 pm, edited 1 time in total.

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

Re: Fix your custom templates or give proper reply

Post by Uldis (UD) » Wed Sep 11, 2019 6:22 pm

First stop yell, and read Cookbook :)

All you need in this case use this option from section 17.3.2: pic below. and your template will look similar like this:

---
type: qemu
name: Clavister-cOS
cpulimit: 1
icon: Firewall.png
cpu: 1
ram: 512
ethernet: 4
eth_name:
- if1/Mgmt
- if2
- if3
- if4
- if5
- if6
- if7
- if8
- if9
- if10
console: vnc
shutdown: 1
qemu_arch: x86_64
qemu_nic: virtio-net-pci
qemu_options: -machine type=pc,accel=kvm -vga std -usbdevice tablet -boot order=cd
...

Uldis
You do not have the required permissions to view the files attached to this post.

sajiby3k
Posts: 11
Joined: Mon Sep 25, 2017 2:19 pm

Re: Fix your custom templates or give proper reply

Post by sajiby3k » Wed Sep 11, 2019 7:55 pm

Hi,

Many thanks for your reply. Again thanks for helping me out.

The solution you have posted, I have already tried that. That is static definition. I am pre defining a fixed number of interfaces and giving them a name one by one. What happens when I have more than 10 interfaces???

I want to achieve this from section 17.3.2
eth_name:
- eth0/mgmt
eth_format: G0/{2}
Here first interface is named eth0/mgmt. But eth_format between {}, whatever I write inside curly braces eve-ng does not respects it. It always starts from '0'. And that's is my problem.

And another thing - if it is not a developer secret - how your built in templates get custom port names, for example - fortinet.yml has no defination for custom interface names -
name: Fortinet
cpulimit: 1
icon: Firewall.png
cpu: 1
ram: 1024
ethernet: 4
console: telnet
qemu_arch: x86_64
qemu_nic: virtio-net-pci
But when I add a fortinet firewall node - interfaces are numbered port1, port2, port 3 etc.

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

Re: Fix your custom templates or give proper reply

Post by Uldis (UD) » Wed Sep 11, 2019 8:58 pm

if over 10 then numerinc vwill be generic way et11, eth12, eth13
Yes for forti you can name it
Port1, port2....
Automatic porting with brackets is fixed on Pro, but will not be in Community so soon,
So static way is good option anyway

Post Reply