CLI configuration of adding interface to virtual router

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Palo Alto Networks Approved
Palo Alto Networks Approved
Community Expert Verified
Community Expert Verified

CLI configuration of adding interface to virtual router

L1 Bithead

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.

1 accepted solution

Accepted Solutions

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

View solution in original post

2 REPLIES 2

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

L1 Bithead

Hi Astardzhiev, thanks for your accurate explanation.

 

  • 1 accepted solution
  • 2073 Views
  • 2 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

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!