Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
This chapter describes router configuration commands, including interface configuration.
Purpose
These commands set parameters at the global router level. These parameter settings can often be
overridden at a protocol‐specific level.
Commands
The commands used to configure global router parameters are listed below.
router id 23-2
router id
This command configures the global router ID.
Syntax
router id ipv4_address
no router id ipv4_address
Parameters
ipv4_address Specifies a valid IPv4 address.
Defaults
None.
Mode
Router global configuration: matrix‐x(router‐config)#
Usage
Use the router id command to configure the global Router ID. The router ID configured with this
command can be overridden in BGP and OSPF.
The system’s router ID is chosen at boot time as follows:
• If a router id is configured with this command, this value is used as the router id.
• If no router id is configured, then the lowest loopback interface IP address is used as the
router id.
• If no loopback interfaces are configured, the lowest interface IP address is used as the router
id.
• If no interfaces are configured at boot time, then random#.0.0.1 is used as the router id, where
random# will be in the range 11 through 223 inclusive.
The least significant 32 bits of the chassis’ MAC address are used to seed the random number
generator, so the default router id for a specific chassis should not change. However, since it is
still possible for more than one chassis to end up with the same default router id, it is strongly
recommended that a unique router id should be manually assigned to each router on the
network. Note that the address 127.0.0.1 will not be used as the default router id.
Once a router id has been chosen by this process at boot time, the only way to change it without
rebooting the system is to use the no router id command.
Note: It is strongly recommended that you set the router ID with the router id command, to avoid
unexpected results.
Example
This example sets the router ID to 1.1.1.1:
matrix-x(router-config)# router id 1.1.1.1
Purpose
These router commands are used to enable routing interface configuration mode on the device, to
create VLAN or loopback routing interfaces, to review the usability status of interfaces configured
for IP, to set IP addresses for interfaces, and to enable interfaces for IP routing at device startup.
See the individual routing protocol chapters in this book for protocol‐specific interface
configuration commands.
Commands
The commands used to review and configure interface settings are listed below.
interface 23-4
ip address 23-8
ip proxy-arp 23-9
ip redirects 23-10
ip unreachables 23-12
mac-address 23-13
mtu 23-13
host-mobility 23-14
shutdown 23-18
no shutdown 23-19
interface
This command acquires router interface configuration mode for the specified physical port,
loopback interface or VLAN.
Syntax
interface {vlan.1.vlan-id | loopbackloopback-id | port-string}
Parameters
vlan.1.vlan-id | Specifies the number of the VLAN (ranging from 1 to 4094) or
loopbackloopback-id loopback interface (ranging from 1 to 99) to be configured for routing.
port-string Specifies the physical port to be configured, as described in Port
Strings Used in the CLI on page 12‐2.
Mode
Global Router Configuration.
After executing this command, Router Interface Configuration is acquired:
matrix-x(router-config-if-xx.x.x)##
Usage
This command configures interfaces for IP routing. It acquires Router Interface Configuration Mode,
and, if the interface has not previously been created, creates a new routing interface.
VLANs must be created from the switch CLI before they can be configured for IP routing. For
details on creating VLANs and configuring them for IP, refer to Chapter 20, 802.1Q VLAN
Commands.
Each VLAN or loopback interface must be configured for routing separately using the interface
command. To end configuration on one interface before configuring another, type exit at the
command prompt to return to global router configuration mode. Alternatively, you can simply
enter another interface command to start configuring another interface. Enabling Router Interface
Configuration mode is required for completing interface‐specific configuration tasks.
Each Matrix X routing module can support up to 256routing interfaces. Each interface can be
configured for the routing protocols.
Example
The following example describes how to:
1. Enter Router User Mode from the switch CLI by executing the router command
2. Enter Router Configuration Mode by executing the configure command and specifying that
commands will be entered at the terminal
3. Enter Router Interface Configuration Mode for Gigabit Ethernet port 1 on slot 4.
matrix-x(switch-su)-> router
matrix-x(router-exec)# configure terminal
matrix-x(router-config)# interface ge.4.1
matrix-x(router-config-if-ge.4.1)#
show interface
This command displays interface information, for a single interface or all interfaces.
Syntax
show interface [eth0 | port-string]
Parameters
eth0 | port-string (Optional) Displays interface information for a specific interface. An
interface can be identified by its physical port string. For a detailed
description of possible port string values, refer to Port Strings Used in the
CLI on page 12‐2.
Use the key word eth0 to specify the Ethernet management port on the
active Control Module (CM).
Defaults
If no interface is specified, information is displayed for all interfaces, including the loopback
interface and the Ethernet management port.
Mode
Router privileged execution: matrix‐x(router‐exec)#
Usage
If a physical interface has not been configured as an IP routed interface, the information displayed
by this command is limited to physical port information. If the interface has been configured as a
routed interface, additional information about the logical interface is displayed.
Examples
The following example shows what is displayed for an IP routed interface:
matrix-x(router-exec)#show interface ge.4.1
Physical interface: ge.4.1 index 4001
type: 802.2 MTU: 1500
status: up MAC: 2:0:8:1:0:0
refcount: 2 up-to-down-transitions: 0
p2p: no maskedp2p: no loop: no simplex: no allmulti: no
Logical interface: 192.168.1.10
Index: 4001 MTU: 1436 masklen: 24
As Number: 0 refcount: 2
broadcast address: 192.168.1.255
primary: yes active: yes bcast: yes loop: no
mcast: yes simplex: no noroute: no tun: no
reg: no del: no keepall: no priv: no disable: no
The following example shows how to set the descriptive text for a VLAN interface and then
display that information:
matrix-x(router-config)# interface vlan.1.1
matrix-x(router-config-if-vlan.1.1)# description "Engineering Network"
matrix-x(router-config-if-vlan.1.1)# end
matrix-x(router-exec)# show interface vlan.1.1
show ip interface
This command displays data, including administrative status, IP address, MTU (Maximum
Transmission Unit) size and bandwidth, and ACL configurations, for IP‐configured interfaces.
Syntax
show ip interface [port-string] [brief]
Parameters
Mode
Switch mode, read‐only.
Router privileged execution: matrix‐x(router‐exec)#
Defaults
If no parameters are specified, all information for all IP interfaces is displayed.
Examples
The following example illustrates the command output when no parameters are specified:
matrix-x(switch-rw)-> show ip interface
ge.4.6 is administratively down, line protocol is down
Internet address is 10.10.10.10/24
Broadcast address is 255.255.255.255
Address determined by setup command
MTU is 9000 bytes
Helper address is not set
Directed broadcast forwarding is enabled
No Multicast groups joined
Proxy ARP is not enabled
ICMP redirects are not being sent
ICMP unreachables are always sent
ICMP mask replies are never sent
ge.4.7 is administratively down, line protocol is down
Internet address is 20.20.20.20/24
Broadcast address is 255.255.255.255
Address determined by setup command
MTU is 1500 bytes
Helper address is not set
Directed broadcast forwarding is enabled
No Multicast groups joined
Proxy ARP is not enabled
ICMP redirects are not being sent
ICMP unreachables are always sent
ICMP mask replies are never sent
The following example displays output of a configuration using the brief parameter:
matrix-x(switch-su)-> show ip interface brief
Interface IP-Address Status Proto
ge.1.1 1.2.3.4/16 up up
2.4.6.8/24 secondary
3.6.9.12/24 secondary
2.5.6.8/24 secondary
2.6.6.8/24 secondary
2.7.6.8/24 secondary
2.8.6.8/24 secondary
2.9.6.8/24 secondary
2.10.6.8/24 secondary
2.11.6.8/24 secondary
2.12.6.8/24 secondary
2.13.6.8/24 secondary
2.14.6.8/24 secondary
2.15.6.8/24 secondary
2.16.6.8/24 secondary
ge.1.4 11.1.1.1/16 up up
loopback1 1.1.1.1/32 up up
vlan.1.100 100.1.1.1/16 up down
ip address
This command sets, removes, or disables a primary or secondary IP address for an interface.
Syntax
ip address ip-address ip-mask [secondary]
no ip address ip-address ip-mask
Parameters
ip‐address Specifies the IP address of the interface to be added or removed.
ip‐mask Specifies the mask for the associated IP subnet, either in 0‐32 or a.b.c.d format
secondary (Optional) Specifies that the configured IP address is a secondary address.
Defaults
If secondary is not specified, the configured address will be the primary address for the interface.
Mode
Router Interface Configuration.
Usage
Each Matrix X routing module supports up to 1024 routing interfaces, with up to 64 secondary
addresses allowed for each primary IP address. The no form removes the specified IP address and
disables the interface for IP processing.
Since interfaces are not enabled by default, you must use the no shutdown command to enable
them. Otherwise, when you leave interface configuration mode, the interface will be disabled.
Example
The following example sets the IP address to 192.168.1.1 and the network mask to 255.255.255.0 for
the Gigabit Ethernet port 1 on the module in slot 2:
matrix-x(router-config)# interface ge.2.1
matrix-x(router-config-if-ge-2.1)# ip address 192.168.1.1 255.255.255.0
matrix-x(router-config-if-ge-2.1)# no shutdown
ip proxy-arp
This command enables or disables proxy ARP on an interface.
Syntax
ip proxy-arp [default-route]
no ip proxy-arp [default-route]
Parameters
default‐route (Optional) Enables both proxy ARP and proxy ARP on the default
route.
When used with the no form of this command, disables only proxy
ARP on the default route, and will have no effect on proxy ARP over
other routes.
Defaults
Disabled.
Mode
Router interface configuration: matrix‐x(router‐config‐if‐xx)#
Usage
Use this command to allow the X Router to answer ARP requests intended for another machine on
this interface.
When ip proxy‐arp is executed without the default‐route parameter, proxy ARP is enabled but
NOT for the default route. When ip proxy‐arp default route is executed, both proxy ARP and
proxy ARP on the default route are enabled.
The no ip proxy‐arp command without the default‐route parameter disables both proxy ARP and
proxy ARP on the default route. The no ip proxy‐arp default‐route command disables only proxy
ARP on the default route, and will have no effect on proxy ARP over other routes.
Example
The following example first shows that proxy ARP is not enabled on interface ge.4.1, then enables
it, then shows that the interface configuration has changed. Note that proxy ARP on the default
route is not enabled.
matrix-x(router-config-if-ge.4.1)# show ip interface ge.4.1
ge.4.1 is administratively up, line protocol is up
Internet address is 10.10.10.10/24
matrix-x(router-config-if-ge.4.1)# ip proxy-arp
ip redirects
This command enables ICMP redirection on the specified interface.
Syntax
ip redirects
no ip redirects
Parameters
None.
Defaults
Enabled.
Mode
Router Interface Configuration.
Usage
ICMP redirects are messages sent by a router to an originator of data, indicating that a different
hop should be used to reach the destination. A router sends a redirect when a routing table lookup
for a received datagram results in transmission of the datagram out the same interface on which it
was received.
The negative form of this command, no ip redirects, rejects ICMP redirects.
Example
The following example rejects ICMP redirects on interface eth0:
matrix-x(router-config)# interface eth0
matrix-x(router-config-if-eth0)# no ip redirects
ip unreachables
This command enables or disables sending ICMP destination unreachable messages on this
interface.
Syntax
ip unreachables
no ip unreachables
Parameters
None.
Defaults
Enabled.
Mode
Router interface configuration: matrix‐x(router‐config‐if‐xx)#
Usage
Use this command to enable or disable the X Router from sending ICMP destination unreachable
messages. Use the no form of this command to disable sending these messages.
Example
The following example disables sending ICMP destination unreachable messages and then
displays the routing interface configuration.
matrix-x(router-config-if-ge.4.1)# no ip unreachables
matrix-x(router-config-if-ge.4.1)#
mac-address
This command sets a MAC (Media Access Control) address on an interface.
Syntax
mac-address mac-address
no mac-address mac-address
Parameters
mac-address Specifies a 48‐bit MAC address in hexadecimal format.
Defaults
By default, every routing interface uses the same MAC address. If the user needs interfaces to use
different MAC addresses, this command will allow it. It is the user’s responsibility to select a
MAC address that will not conflict with other devices.
Mode
Router Interface Configuration.
Examples
The following example shows the assignment of MAC address 003.4317.7a99 to interface ge.4.2.
matrix-x(router-config-if-ge.4.2)# mac-address 003.4317.7a99
The following example clears the assignment of MAC address 003.4317.7a99 to interface ge.4.2.
matrix-x(router-config-if-ge.4.2)# no mac-address 003.4317.7a99
mtu
This command sets the maximum transmission unit (MTU) of the interface.
Syntax
mtu mtu_bytes
no mtu
Parameters
mtu_bytes Specifies the maximum transmission unit for the interface. The value
can range from 68 to 9000 bytes.
Defaults
1500 bytes.
Mode
Router interface configuration: matrix‐x(router‐config‐if‐xx)#
Usage
The maximum transmission unit is the largest possible unit of data that can be sent on a given
physical medium. Use this command to set the MTU for an interface. The no form of this
command resets the MTU to the default value of 1500 bytes.
To take advantage of BGP jumbo frame support, you should configure both ingress and egress
interfaces to use an MTU of 9000 bytes.
Example
The following example sets the MTU for interface ge.4.1 to 9000 bytes.
matrix-x(router-config-if-ge.4.1)# mtu 9000
host-mobility
Use this command to detect when an IP host moves within a VLAN.
Syntax
host-mobility
no host-mobility
Parameters
None.
Defaults
• Enabled on VLAN interface.
• Disabled on physical interfaces, and is not configurable.
Mode
Router Interface Configuration. For VLAN interfaces only.
Usage
Host mobility enables the hardware to detect when an IP host moves within a VLAN. However,
there are asymmetrical routing topologies where mobility thrashing can occur. If this happens, it
is recommended that you disable host mobility by using the no host‐mobility command.
Note: The show running-config command does not display host mobility enabled.
Examples
The following example disables host‐mobility on interface VLAN.1.2.
matrix-x(switch-su)-> router
matrix-x(router-exec)# config
matrix-x(router-config)# interface vlan.1.2
matrix-x(router-config-if-vlan.1.2)# ip address 10.2.2.2/24
matrix-x(router-config-if-vlan.1.2)# no host-mobility
matrix-x(router-config-if-vlan.1.2)#no shutdown
matrix-x(router-config-if-vlan.1.2)# show running-config
interface vlan.1.2
ip address 10.2.2.2 255.255.255.0
no host-mobility
no shutdown
exit
matrix-x(router-config-if-vlan-2)#
The following example enables host‐mobility on interface VLAN.1.2. Note that you cannot see
host‐mobility enabled using the show running‐config command.
matrix-x(router-config)# interface vlan.1.2
matrix-x(router-config-if-vlan.1.2)# ip address 10.2.2.2/24
matrix-x(router-config-if-vlan.1.2)# host-mobility
matrix-x(router-config-if-vlan.1.2)#no shutdown
matrix-x(router-config-if-vlan.1.2)# show running-config
interface vlan.1.2
ip address 10.2.2.2 255.255.255.0
no shutdown
exit
matrix-x(router-config-if-vlan.1.2)#
ip host-mobility
Use this command to remove the specified host IP address from the no host mobility (host
mobility disabled) table and restore the learned or static non‐clustered ARP entry to the interface
state.
Syntax
ip host-mobility {IP address}
Parameters
IP address Specify the IP address to add to or remove from the no host mobility
table.
Mode
Router configuration mode: matrix‐x(router‐config)#
Defaults
None.
Usage
This command removes the specified host IP address from the no‐host‐mobility table and restores
the learned or static non‐clustered ARP entry to the interface state. If the interface state is off then
it remains off. To preserve precedence order, delete the dynamic ARP entry and allow ARP to
reccur. Static non‐clustered ARP entries must manually corrected.
Examples
The following example enters the 1.2.3.4 address into the no ip host mobility table, displays the
entire table, then removes the 1.2.3.4 address from the no ip host mobility table and, finally,
displays the empty table:
matrix-x(router-config)# no ip host-mobility 1.2.3.4
matrix-x(router-config)# show ip host-mobility
Protocol Address
----------------
Internet 1.2.3.4
Protocol Address
----------------
show ip host-mobility
Use this command to display the no IP host mobility (host mobility disabled) table.
Syntax
show ip host-mobility [IP address]
Parameters
IP address (Optional) Specifies a particular IP address to return host mobility
information for.
Mode
Switch mode, read‐only.
Router configuration mode: matrix‐x(router‐config)#
Router privileged execution: matrix‐x(router‐exec)#
Defaults
If no parameters are specified, all information for the no host mobility table is displayed.
Examples
The following example illustrates the command output when no parameters are specified:
matrix-x(switch-su)-> show ip host-mobility
Protocol Address
----------------
Internet 1.2.3.4
shutdown
This command sets the interface’s operational status to down.
Syntax
shutdown
Parameters
None.
Defaults
The interface is disabled.
Mode
Router Interface Configuration.
Usage
Moves the interface to a disabled operational status.
Example
The following example puts the interface ge.4.2 into a down state, and displays the current status.
matrix-x(router-config)# interface ge.4.2
matrix-x(router-config-if-ge.4.2)# shutdown
matrix-x(router-config-if-ge.4.2)# show interface ge.4.2
Physical interface: ge.4.2 index 4002
type: 802.2 MTU: 1500
status: down MAC: 2:0:46:1:0:0
refcount: 1 up-to-down-transitions: 1
p2p: no maskedp2p: no loop: no simplex: no allmulti: no
matrix-x(router-config-if-ge.4.2)#
Related Commands
no shutdown
no shutdown
This command sets the interface’s operational status to up.
Syntax
no shutdown
Parameters
None.
Defaults
The interface is disabled.
Mode
Router Interface Configuration.
Usage
The default for the interface is shutdown. Therefore, you must enter the no shutdown command
to enable the interface. Otherwise, when you leave the interface configuration mode, the interface
will remain disabled.
Example
The following example puts the interface ge.4.2 into a up state, and displays the current status.
matrix-x(router-config)# interface ge.4.2
matrix-x(router-config-if-ge.4.2)# no shutdown
matrix-x(router-config-if-ge.4.2)# show interface ge.4.2
Physical interface: ge.4.2 index 4002
type: 802.2 MTU: 1500
status: up MAC: 2:0:46:1:0:0
refcount: 1 up-to-down-transitions: 0
p2p: no maskedp2p: no loop: no simplex: no allmulti: no
matrix-x(router-config-if-ge.4.2)#
Warning: Configurations created in router mode are not automatically persistent, unlike switch
mode. You must execute the write file command to save router configurations.
Purpose
These router commands are used to review and save the current router configuration.
Commands
The commands used to review and save the router configuration are listed below.
show running-config
This command displays the user‐supplied router configuration commands that have been entered
to this point while configuring the Matrix X Router.
Syntax
show running-config [section] [outfile path-to/outfilename] [| search regexp]
Parameters
section (Optional) Display only the specified section of the configuration. A list
of valid section names can be displayed by entering show
running‐config ?.
outfile path‐to/ (Optional) Specifies a file in which to store the configuration. Options
outfilename for path‐to are a file path on the active or standby CM, a file path on a
USB drive attached to the active or standby CM, or the URL of an FTP,
SCP (secure copy), or TFTP server.
On the active CM, valid directories that can be specified are public or
local. On the standby CM, the valid directory is local. To specify the
standby CM, you must precede the directory with standby:—otherwise,
the active CM is assumed.
A file path on an attached USB drive is specified as usb:pathname or
standby:usb:pathname where pathname may include one or more
directory levels in addition to the filename itself.
| search regexp (Optional) Display the lines in the configuration file that match the
search regular expression.
Mode
Router global execution mode: matrix‐x(router‐exec)#
Router configuration mode: matrix‐x(router‐config)#
Switch mode, read‐only
Usage
This command displays the current router configuration that is running on the X Router. The
running configuration includes all those CLI configuration commands that have been entered
manually since the last system restart. Commands entered manually are not saved as part of the
startup configuration until the write file command is executed, at which point the running
configuration is stored on the system in NVRAM and becomes the startup configuration.
Use the show startup‐config command to display the startup configuration, which includes all the
router configuration commands that were entered up to the point when the write file command
was executed.
Examples
The following example shows the output of this command:
matrix-x(router-exec)# show running-config
interface ge.4.1
This example displays only the policy map section of the running config.
matrix-x(router-config)# show running-config policy-map
!
# router
router
configure terminal
policy-map myPolicyMap
description "My policy map"
exit
exit
exit
show startup-config
This command displays the user‐supplied router configuration commands that have been entered
and saved as the startup configuration by executing the write file command.
Syntax
show startup-config [outfile path-to/outfilename] [| search regexp]
Parameters
outfile path‐to/ (Optional) Specifies a file in which to store the configuration. Options
outfilename for path‐to are a file path on the active or standby CM, a file path on a
USB drive attached to the active or standby CM, or the URL of an FTP,
SCP (secure copy), or TFTP server.
On the active CM, valid directories that can be specified are public or
local. On the standby CM, the valid directory is local. To specify the
standby CM, you must precede the directory with standby:—otherwise,
the active CM is assumed.
A file path on an attached USB drive is specified as usb:pathname or
standby:usb:pathname where pathname may include one or more
directory levels in addition to the filename itself.
| search regexp (Optional) Pipe command output through the filter defined by the
search regular expression and display the lines in the configuration file
that match the search regular expression.
Defaults
If a search filter is not defined, all the contents of the startup configuration are displayed.
Mode
Router global execution mode: matrix‐x(router‐exec)#
Router configuration mode: matrix‐x(router‐config)#
Switch mode, read‐only
Usage
This command displays the CLI configuration commands that have been entered manually since
the last system restart and that have been saved as part of the startup configuration with the write
file command.
The output of this command may differ from the output of the show running‐config command,
because only the commands that were entered prior to executing the last write file command are
displayed by this command. The show running‐config command displays all the CLI commands
entered since the system was restarted, including those command entered after the execution of
the write file command.
Example
In the following example, the output of the show startup‐config command at first is different
from the output of the show running‐config command. Then, the write file command is
executed, which causes the running configuration to be saved as the startup configuration. By
executing the show startup‐config command after the write file command, we show that the
startup configuration is now the same as the running configuration.
matrix-x(router-exec)# show startup-config
interface ge.4.1
ip address 10.10.10.10 255.255.255.0
no shutdown
exit
interface ge.4.2
ip address 20.20.20.20 255.255.255.0
no shutdown
exit
interface ge.4.1
ip address 10.10.10.10 255.255.255.0
no shutdown
exit
interface ge.4.2
ip address 20.20.20.20 255.255.255.0
no shutdown
exit
interface ge.4.3
ip address 30.30.30.30 255.255.255.0
no shutdown
exit
interface ge.4.1
ip address 10.10.10.10 255.255.255.0
no shutdown
exit
interface ge.4.2
ip address 20.20.20.20 255.255.255.0
no shutdown
exit
interface ge.4.3
ip address 30.30.30.30 255.255.255.0
no shutdown
exit
write file
This command saves the router running configuration.
Warning: Configurations created in router mode are not automatically persistent, unlike switch
mode. You must execute the write file command to save router configurations.
Syntax
write file
Parameters
None.
Defaults
None.
Mode
Router global execution mode: matrix‐x(router‐exec)#
Router configuration mode: matrix‐x(router‐config)#
Usage
The write file command must be executed in order to save the router running configuration to
NVRAM. If this command is not executed, router configuration changes will not be saved upon
reboot.
Executing this command also creates or overwrites a file named startup_config.txt in the public
directory. The contents of the startup_config.txt file is the same running configuration that is
saved to NVRAM.
Example
The following example illustrates the write file command and the startup_config.txt file created
by executing this command.
matrix-x(router-exec)# write file
matrix-x(router-exec)# exit
public/
==================================================
Name : startup_config.txt
Type : Unknown
Size : 258 bytes
Last Access : Mon Sep 19 18:52:04 2005
Modification: Mon Sep 19 18:52:04 2005
Last Change : Mon Sep 19 18:52:04 2005
Purpose
These router level commands are used to review and configure the routing ARP table.
Commands
The commands used to review and configure the ARP table are listed below.
arp 23-27
arp
This command adds static entries to the ARP table.
Syntax
arp ip-address MAC-addr arpa port-string
Parameters
ip-address Specifies the IP address of the interface being added.
MAC-addr Specifies the MAC address of the interface being added.
arpa Specifies the type of ARP entry.
port-string Specifies the interface media type, slot number, and port number, as
described in Port Strings Used in the CLI on page 12‐2.
Defaults
None.
Mode
Router global configuration: matrix‐x(router‐config)#
Usage
You can delete static entries from the ARP table with the no form of this command, but you cannot
delete ARP entries for local interfaces.
The clear arp‐cache command removes dynamic ARP entries only, not local or static entries.
Examples
The following example adds a static entry to the ARP table:
matrix-x(router-config)# arp 192.168.20.1 0200.0801.0000 arpa ge.4.2
The following example removes the static entry added in the above example:
matrix-x(router-config)# no arp 192.168.20.1 0200.0801.0000 arpa ge.4.2
Related Commands
clear arp
arp timeout
This command sets the duration (in seconds) for entries to stay in the ARP table before expiring.
Syntax
arp timeout seconds
Parameters
seconds Specifies the interval an entry remains in the ARP cache, ranging from 0 to 65535
seconds. A value of 0 specifies that ARP entries will never be aged out.
Defaults
21,600 seconds (6 hours)
Mode
Router global configuration: matrix‐x(router‐config)#
Usage
The Matrix X Router can support up to 2000 outstanding unresolved ARP entries. The no form
restores the default value of 21,600 seconds.
Example
The following example sets the ARP timeout to 600 seconds:
matrix-x(router-config)# arp timeout 600
clear arp
This command deletes all nonstatic (dynamic) entries from the ARP table.
Syntax
clear arp [ip_address]
Parameters
ip_address (Optional) Specifies the entry to delete.
Defaults
If an IP address is not specified, all dynamic entries are deleted.
Mode
Router privileged execution: matrix‐x(router‐exec)#
Example
The following example deletes all dynamic entries from the ARP table:
matrix-x(router-exec)# clear arp-cache
show ip arp
This command displays entries in the ARP (Address Resolution Protocol) table. ARP converts an
IP address into a physical address.
Syntax
show ip arp [stats] [stats_brief] [summary] [| search string]
[ip-address [stats] [stats_brief] [verbose]] [H.H.H [stats]]
[Interface {eth0 | port-string} [stats] [stats_brief]]
Parameters
ip‐address (Optional) Displays ARP entries related to a specific IP address.
H.H.H (Optional) Displays ARP entries related to a specific 48‐bit hardware
address, in xxxx.xxxx.xxxx format.
Interface (Optional) Displays ARP entries related to a specific interface. An interface
[eth0 | port‐string] can be identified by its physical port string. For a detailed description of
possible port string values, refer to Port Strings Used in the CLI on
page 12‐2.
Use the key word eth0 to specify the Ethernet management port on the
active Control Module (CM).
stats (Optional) Shows packet and byte statistics for each entry.
stats_brief (Optional) Shows only packet statistics for each entry.
summary (Optional) Displays the summary of all ARPs.
| search string (Optional) Displays the contents of the ARP table that match the search
string. Refer to Table 1‐2 on page 1‐6 for a list of the regular‐expression
operators that can be used as the search string.
Defaults
If no parameters are specified, all entries in the ARP cache will be displayed.
Mode
Router privileged execution: matrix‐x(router‐exec)#
Examples
The following example displays output from the command without any optional parameters.
matrix-x(router-exec)# show ip arp
The following table provides an explanation of the command output.
Age (min) Interval (in minutes) since the entry was entered in the table.
The following example displays packet and byte statistics.
matrix-x(router-exec)# show ip arp stats
Purpose
These router level commands configure IP broadcast settings.
Commands
The commands used to configure IP broadcast settings are:
ip forward-protocol 23-33
ip helper-address 23-34
ip forward-protocol
This command enables UDP broadcast forwarding, specifying which protocols will be forwarded.
Syntax
ip forward-protocol {udp [port]}
Parameters
udp Specifies UDP as the IP protocol subject to broadcast forwarding.
port (Optional) Specifies a destination port that controls which UDP services are
forwarded. If not specified, received UDP broadcasts are forwarded on the
following default ports:
• Trivial File Transfer Protocol (TFTP) — port 69
• Domain Naming System — port 53
• Time service — port 37
• NetBIOS Name Server — port 137
• NetBIOS Datagram Server — port 138
• TACACS service — port 49
• EN‐116 Name Service — port 42
• Boot Protocol (BOOTP) client and server datagrams — ports 67 and 68
Defaults
If a port is not specified, default forwarding services will be performed as listed above.
Mode
Router global configuration: matrix‐x(router‐config)#
Usage
This command works in conjunction with the ip helper‐address command to configure UDP
broadcast forwarding. Refer to the ip helper‐address command for information on specifying a
new destination for UDP broadcasts.
The no form of this command removes a UDP port or protocol, disabling forwarding. If a port is
not specified, UDP broadcast forwarding will be disabled on all ports.
Note: If a certain service exists inside the device, the no form of this command should be used to
disable the forwarding for the associated port. In particular, DHCP/BOOTP relay and DHCP server
may not be enabled concurrently in the device.
Example
This example enables forwarding of Domain Naming System UDP broadcasts.
matrix-x(router-config)# ip forward-protocol udp 53
ip helper-address
This command enables DHCP/BOOTP relay and the forwarding of local UDP broadcasts
specifying a new destination address.
Syntax
ip helper-address address
no ip helper-address address
Parameters
address Specifies a destination address for forwarding UDP broadcasts. This address must
be a unicast address.
Defaults
None.
Mode
Router Interface Configuration.
Usage
This command works in conjunction with the ip forward‐protocol command, which defines the
forward protocol and port number. You can use this command to define up to 20 helper address
per interface.
The no form of this command disables forwarding UDP datagrams to the specified address.
Example
The following example permits UDP broadcasts from hosts received on VLAN 1 to reach server
191.168.1.10 and broadcasts received on VLAN 2 to reach server 192.24.1.2:
matrix-x(router-config)#ip forward-protocol udp
matrix-x(router-config)# interface vlan 1
matrix-x(router-config-if-vlan-1)# ip helper-address 192.168.1.10
matrix-x(router-config-if-vlan-1)# exit
matrix-x(router-config)# interface vlan 2
matrix-x(router-config-if-vlan-2)# ip helper-address 192.24.1.2
Purpose
To review IP traffic and configure static routes.
Commands
The commands used to review IP traffic and configure routes are listed below.
ip route 23-38
show ip traffic
This command displays statistics about IP traffic sent to and received from the Matrix X Router’s
Control Module (CM).
Syntax
show ip traffic
Parameters
None.
Defaults
None.
Mode
Router privileged execution: matrix‐x(router‐exec)#
Router global configuration: matrix‐x(router‐config)#
Example
The following example displays sample output from the command:
matrix-x(router-exec)# show ip traffic
IP Statistics:
Rcvd: 20788 total, 20654 local destination
0 header errors, 0 unknown protocol
Frags: 0 reassembled, 0 timeouts, 0 couldn't reassemble
0 fragmented, 0 couldn't fragment
Mcast/Bcast: 0 received
Sent: 21264 generated, 0 forwarded, 0 no route
ICMP Statistics:
Rcvd: 92 total, 0 checksum errors, 0 redirects, 74 unreachable, 2 echo
16 echo reply, 0 mask requests, 0 quench
0 parameter, 0 timestamp, 0 time exceeded,
Sent: 77 total, 0 redirects, 75 unreachable, 0 echo, 2 echo reply
0 mask requests, 0 mask replies, 0 quench, 0 timestamp
0 time exceeded, 0 parameter problem
TCP statistics:
Rcvd: 17233 total, 0 checksum errors
Sent: 17149 total
UDP Statistics:
Rcvd: 3376 total, 85 checksum errors, 1 no port
Sent: 4021 total
matrix-x(router-exec)#
show ip cache
This command displays information about the forwarding cache.
Syntax
show ip cache [stats] [stats_brief] [summary] [| search string]
[ip-addr mask [stats] [stats_brief] [verbose]]
Parameters
stats (Optional) Show packet and byte statistics for each route.
stats_brief (Optional) Show only packet statistics for each route.
summary (Optional) Show a summary of all IP cache routes.
| search string (Optional) Display the contents of the cache that match the search
string. Refer to Table 1‐2 on page 1‐6 for a list of the regular‐expression
operators that can be used as the search string.
ip‐addr mask (Optional) Show information for the route specified by IPv4 address
and mask. The mask can be entered as an integer between 0 and 32 (for
example, /24) or in dotted quad notation (for example, 255.255.255.0).
verbose (Optional) Show all statistics information available.
Defaults
None.
Mode
Router privileged execution: matrix‐x(router‐exec)#
Router global configuration: matrix‐x(router‐config)#
Examples
The following example displays output from this command with no parameters:
matrix-x(router-exec)# show ip cache
Ip Cache Verbose
Destination Stats Per IOM
IOM Packets Bytes
8 14 1812
8 14 1812
Ip Route: 10.10.45.5/32
Nexthops
10.10.45.5 State: Resolved Interface: vlan.1.1010
The following example displays the use of a search string.
matrix-x(router-config)# show ip cache | search "10.10.*"
ip route
This command adds or removes a static IP route.
Syntax
ip route prefix {mask | masklen} {ipv4-address | interface-name | next-hop}
[distance] [tag tag] [metric value] [unicast] [multicast] [noinstall] [reject]
[retain] [blackhole]
Parameters
prefix Specifies an IPv4 address as a single destination for which a static route is
being defined.
[mask | masklen] The prefix mask for the destination, specified in dotted‐quad format or the
length of a mask specified as an integer from 0 to 32, inclusive.
[ipv4‐address | Specifies either an IPv4 address as the next hop for the static route or the
interface‐name | physical interface name to be used with the static route.
next‐hop]
distance (Optional) Specifies an administrative distance for this route, ranging from 1
to 255, and it defaults to 60 if it is not specified.
tag tag (Optional) Specifies a tag value that can be used as a match value for
controlling redistribution via route maps. The value for tag can be an integer
from 0 to 4,294,967,295, inclusive.
metric value (Optional) Specifies a metric for the route ranging from 0 to 2,147,483,647.
Optionally specify one or more of the following command flags:
unicast Indicates that this static route should be installed in the unicast RIB.
This flag is implicitly specified by default.
multicast Indicates that this static route should be installed in the multicast RIB.
noinstall Specifies that this static route is not to be installed in the kernel forwarding
table.
reject Causes the router to refuse to route traffic that would be forwarded
according to the associated static route. Instead of forwarding a packet as a
normal route, reject routes cause packets to be dropped and unreachable
messages to be sent to the packet originators.
retain Prevents specific static routes from being removed.
blackhole Causes this route to be installed as a blackhole route, enabling the router to
refuse to route various prefixes.
Defaults
Static routes are not explicitly configured by default.
Mode
Router global configuration: matrix‐x(router‐config)#
Usage
Use the ip route command to configure up to 2048 static routes within the router. Each static route
must consist of a valid IP prefix and mask as the destination. Each static route must also contain
either an IPv4 address, which acts as the static route next hop, and/or a physical interface to be
associated with the static route. In addition, you can specify a preference for each configured static
route and flags to be associated with each route.
The negative form of this command, no ip route, removes a static route. Because you can
configure multiple static routes for a single prefix, you must include all arguments that were used
to configure the route in the negative form of this command.
Examples
The following example configures a static route for prefix 192.168.0.0 with a mask of 255.255.0.0.
The next hop is configured to be 10.1.1.1, and the preference is configured as 50.
matrix-x(router-config)# ip route 192.168.0.0 255.255.0.0 10.1.1.1 50
The following example configures a static route for prefix 10.1.0.0 with a mask of 255.255.0.0. This
static route is going to be associated with interface ge.4.2 with a preference of 20 and a tag value of
2. Finally, this static route will be installed in both the unicast and multicast RIBs, but it will not be
installed in the kernel forwarding table. Note that order is not important when specifying static
route flags.
matrix-x(router-config)#ip route 10.1.0.0 255.255.0.0 ge.4.2 20 tag 2 unicast
multicast noinstall
The following example configures two static routes for the same prefix, 192.2.0.0 255.255.0.0. The
first is configured for interface ge.4.1 with a preference of 40. The second is configured for
interface ge.4.2 with a preference of 50. Both are configured to be installed in the multicast RIB.
matrix-x(router-config)# ip route 192.2.0.0 255.255.0.0 ge.4.1 40 multicast
matrix-x(router-config)# ip route 192.2.0.0 255.255.0.0 ge.4.2 50 multicast
In the following example, the second configuration in the previous example is removed:
matrix-x(router-config)# no ip route 192.2.0.0 255.255.0.0 ge.4.2 50 multicast
The basic forms of the show ip route command are described individually below:
matrix-x(router-exec)# show ip route summary
This form of the command returns summarized route information that includes the number of
nodes and the number of routes:
matrix-x(router-exec)# show ip route [unicast | multicast]
This form of the command returns all routes stored in either the unicast or multicast RIB. If a RIB
specified is not given, then all routes in the unicast RIB are reported:
matrix-x(router-exec)# show ip route [unicast | multicast] [ipv4-addr (mask ||
longer-prefixes)]
This form of the command allows you to query a RIB given a specific destination address. If no
mask is given, then the natural mask of the user‐supplied destination is assumed. If the longer-
prefixes option is not specified, then only an exact match in the RIB for the supplied destination
(and mask) is reported. On the other hand, if longer-prefixes is specified, then routes for all
destinations covered by the destination (and mask) are reported.
matrix-x(router-exec)# show ip route [unicast | multicast] [rip | bgp | static |
dvmrp | isis | connected]
When specifying the OSPF protocol, you can also optionally provide an instance‐id. Within the
Matrix X Router, you can run multiple instances of OSPF, where each instance is identified with an
instance ID. By specifying an instance‐id, you can query for all routes installed by a specific
instance of OSPF. If the instance‐id is omitted, then routes installed by all OSPF instances are
returned.
matrix-x(router-exec)# show ip route [unicast | multicast] list access-list-name
This form of the command allows you to, in effect, query a RIB for only those routes covered by an
access list. An error is generated if an access list named, access‐list‐name, has not been defined.
K 0.0.0.0/0 [0/40] via 65.247.36.1, 21d21h, ex0
K 10.128.0.0/9 [0/40] via 65.247.36.2, 21d21h, ex0
C 65.247.36.0/25 [1/0] via 65.247.36.97, 21d21h, ex0
K 65.247.36.97/32 [0/40] via 127.0.0.1, 21d21h, lo0
S 127.0.0.0/8 [0/0] via 127.0.0.1, 21d21h, lo0
C 127.0.0.1/32 [1/0] via 127.0.0.1, 21d21h, lo0
The following example returns information for all routes in the unicast RIB installed by OSPF. The
results indicate that the unicast RIB contains only one such route.
matrix-x(router-exec)# show ip route ospf
Codes: C - connected, S - static, R - RIP, B - BGP,
O - OSPF, D - DVMRP, 3 - OSPF3, I - IS-IS,
K - Kernel, A - Aggregate
O 65.247.36.224/28 [1/0] via 65.247.36.254 21d21h, ex0