Configuring a loopback interface – H3C Technologies H3C SecBlade NetStream Cards User Manual

Page 78

Advertising
background image

63

Displaying and maintaining an Ethernet interface or

subinterface

To do…

Use the command…

Remarks

Display Ethernet interface or
subinterface information

display interface [ interface-type ] brief [ down ] [ |
{ begin | exclude | include } regular-expression ]
display interface interface-type { interface-number

| interface-number.subnumber } [ brief ] [ | { begin
| exclude | include } regular-expression ]

Available in any view

Clear the interface or
subinterface statistics

reset counters interface [ interface-type
[ interface-number |

interface-number.subnumber ] ]

Available in user
view

Configuring a loopback interface

Because of the benefits mentioned above, loopback interfaces are widely used in the following
scenarios.

You can configure a loopback interface address as the source address of the IP packets that the
device generates. Because loopback interface addresses are stable unicast addresses, they are

usually used as device identifications. Therefore, when you configure a rule on an authentication or

security server to permit or deny packets generated by a device, you can simplify the rule by

configuring it to permit or deny packets carrying the loopback interface address identifying the
device. Note that, when you use a loopback interface address as the source address of IP packets,

make sure that the route from the loopback interface to the peer is reachable by performing routing

configuration. All data packets sent to the loopback interface are considered as packets sent to the

device itself, so the device does not forward these packets.

Because a loopback interface is always up, it can be used in dynamic routing protocols. For
example, if no router ID is configured for a dynamic routing protocol, the highest loopback interface

IP address is selected as the router ID.

Follow these steps to configure a loopback interface:

To do…

Use the command…

Remarks

Enter system view

system-view

Create a loopback interface and
enter loopback interface view

interface loopback
interface-number

Set the interface description

description text

Optional
By default, the description of a
loopback interface is interface name

Interface.

Shut down the loopback interface

shutdown

Optional
By default, a loopback interface is up.

Advertising