- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
04-13-2023 03:33 PM
Hi,
When add a interface into virtual router using cli, do I need to copied all the interfaces in the virtual router currently, then add this new interface into the list?
For example, current default virtual router has two interface ethernet1/1 and ethernet1/2, I want to add another interface ethernet1/3
what I need to do is only "set network virtual-router default interface [ ethernet1/3 ]"
or I have to do "set network virtual-router default interface [ ethernet1/1 ethernet1/2 ethernet1/3]
If the latter one, it'll involve some programming work if doing automation in real world environment as we don't know what interfaces already in the virtual router, so need to get the list first and then add the interface into the list and issue the set command.
04-13-2023 11:49 PM
Hi @nowayout ,
I can confirm that you don't need to list existing interfaces when adding new one to virtual-router.
If you run the fillowing command it will add to the existing list, and will not override it:
> set network virtual-router default interface ethernet1/3
The square brackets are options in your case, they are needed if you want to add multiple interfaces with single command.
Even if you are adding multiple interfaces with [ ethernet1/4 ethernet1/5 ethernet1/6 ], it will still only add those three without overriding or removing any interface from the list.
Now if you want to remove interface/s from the list you either remove interface one by one or all interfaces at once:
# will remove only one interface from the list and the rest will remain
> delete network virtual-router default interface ethernet1/3
# will remove all interface from virtual router
> delete network virtual-router default interface
04-13-2023 11:49 PM
Hi @nowayout ,
I can confirm that you don't need to list existing interfaces when adding new one to virtual-router.
If you run the fillowing command it will add to the existing list, and will not override it:
> set network virtual-router default interface ethernet1/3
The square brackets are options in your case, they are needed if you want to add multiple interfaces with single command.
Even if you are adding multiple interfaces with [ ethernet1/4 ethernet1/5 ethernet1/6 ], it will still only add those three without overriding or removing any interface from the list.
Now if you want to remove interface/s from the list you either remove interface one by one or all interfaces at once:
# will remove only one interface from the list and the rest will remain
> delete network virtual-router default interface ethernet1/3
# will remove all interface from virtual router
> delete network virtual-router default interface
04-14-2023 11:01 PM
Hi Astardzhiev, thanks for your accurate explanation.
Click Accept as Solution to acknowledge that the answer to your question has been provided.
The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!
These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!
The LIVEcommunity thanks you for your participation!