Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Command-Reference] Add CLI docs for IP interface loopback action #2216

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions doc/Command-Reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -3657,6 +3657,25 @@ This command is used to display the configured MPLS state for the list of config
Ethernet4 enable
```

**show interfaces loopback-action**

This command displays the configured loopback action

- Usage:
```
show ip interfaces loopback-action
```

- Example:
```
root@sonic:~# show ip interfaces loopback-action
Interface Action
------------ ----------
Ethernet232 drop
Vlan100 forward
```


**show interfaces tpid**

This command displays the key fields of the interfaces such as Operational Status, Administrative Status, Alias and TPID.
Expand Down Expand Up @@ -3803,6 +3822,7 @@ This sub-section explains the following list of configuration on the interfaces.
9) advertised-types - to set interface advertised types
10) type - to set interface type
11) mpls - To add or remove MPLS operation for the interface
12) loopback-action - to set action for packet that ingress and gets routed on the same IP interface

From 201904 release onwards, the “config interface” command syntax is changed and the format is as follows:

Expand Down Expand Up @@ -4336,6 +4356,29 @@ MPLS operation for either physical, portchannel, or VLAN interface can be config
admin@sonic:~$ sudo config interface mpls remove Ethernet4
```

**config interface loopback-action <interface_name> <action> (Versions >= 202205)**

This command is used for setting the action being taken on packets that ingress and get routed on the same IP interface.
Loopback action can be set on IP interface from type physical, portchannel, VLAN interface and VLAN subinterface.
Loopback action can be drop or forward.

- Usage:
```
config interface loopback-action --help
Usage: config interface loopback-action [OPTIONS] <interface_name> <action>

Set IP interface loopback action

Options:
-?, -h, --help Show this message and exit.
```

- Example:
```
admin@sonic:~$ config interface loopback-action Ethernet0 drop
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since 'show' is part of 'ip' sub-command, should we have this as 'config interface ip loopback-action ...'

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. I am closing his PR, those changes will be part of PR #2192

admin@sonic:~$ config interface loopback-action Ethernet0 forward

```
Go Back To [Beginning of the document](#) or [Beginning of this section](#interfaces)

## Interface Naming Mode
Expand Down