router configuration commands

34
Matrix X Router Command Line Interface Reference Guide 20-1 20 Router Configuration Commands This chapter describes router configuration commands, including interface configuration. Configuring Global Router Parameters Purpose These commands set parameters at the global router level. These parameter settings can often be overridden at a protocolspecific level. Commands The commands used to configure global router parameters are listed below. For information about... Refer to page... Configuring Global Router Parameters 20-1 Configuring Routing Interface Settings 20-3 Managing Router Configurations 20-16 Reviewing and Configuring ARP 20-21 Configuring Broadcast Settings 20-26 Reviewing IP Traffic and Configuring Static Routes 20-29 For information about... Refer to page... router id 20-2

Upload: api-3838929

Post on 10-Apr-2015

621 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: Router Configuration Commands

20Router Configuration Commands

This chapter describes router configuration commands, including interface configuration.

Configuring Global Router Parameters

PurposeThese commands set parameters at the global router level. These parameter settings can often be overridden at a protocol‐specific level.

CommandsThe commands used to configure global router parameters are listed below.

For information about... Refer to page...

Configuring Global Router Parameters 20-1

Configuring Routing Interface Settings 20-3

Managing Router Configurations 20-16

Reviewing and Configuring ARP 20-21

Configuring Broadcast Settings 20-26

Reviewing IP Traffic and Configuring Static Routes 20-29

For information about... Refer to page...

router id 20-2

Matrix X Router Command Line Interface Reference Guide 20-1

Page 2: Router Configuration Commands

Configuring Global Router Parameters

router idThis command configures the global router ID.

Syntaxrouter id ipv4_addressno router id ipv4_address

Parameters

DefaultsNone.

ModeRouter Global Configuration.

UsageUse 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 the lowest interface IP address is used as the router id.

• If no interfaces are configured at boot time, then 127.0.0.1 is used as the 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.

It is strongly recommended that you set the router ID with the router id command, to avoid unexpected results.

ExampleThis example sets the router ID to 1.1.1.1:

matrix-x(router-config)# router id 1.1.1.1

ipv4_address Specifies a valid IPv4 address.

20-2 Router Configuration Commands

Page 3: Router Configuration Commands

Configuring Routing Interface Settings

Configuring Routing Interface Settings

PurposeThese 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.

CommandsThe commands used to review and configure interface settings are listed below.

For information about... Refer to page...

interface 20-4

show interface 20-5

show ip interface 20-6

ip address 20-7

ip proxy-arp 20-8

ip redirects 20-9

ip unreachables 20-10

mac-address 20-11

mtu 20-11

host-mobility 20-12

shutdown 20-14

no shutdown 20-15

Matrix X Router Command Line Interface Reference Guide 20-3

Page 4: Router Configuration Commands

Configuring Routing Interface Settings

interfaceThis command acquires router interface configuration mode for the specified physical port, loopback interface or VLAN.

Syntaxinterface {vlan vlan-id | loopback loopback-id | port-string}

Parameters

ModeGlobal Router Configuration.

After executing this command, Router Interface Configuration is acquired:

matrix-x(router-config-if-xx.x.x)##

UsageThis 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 17, 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. 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.

ExampleThe 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)-> routermatrix-x(router-exec)# configurematrix-x(router-config)# interface ge.4.1

vlan vlan-id | loopback loopback-id

Specifies the number of the VLAN (ranging form 1 to 4094) or loopback interface to be configured for routing. This interface must be configured for IP routing.

port-string Specifies the physical port to be configured, as described in Port Strings Used in the CLI on page 10‐2.

20-4 Router Configuration Commands

Page 5: Router Configuration Commands

Configuring Routing Interface Settings

show interfaceThis command displays interface information, for a single interface or all interfaces.

Syntaxshow interface [eth0 | port-string]

Parameters

DefaultsIf no interface is specified, information is displayed for all interfaces, including the loopback interface and the Ethernet management port.

ModeRouter Privileged EXEC.

UsageIf 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.

ExampleThe following example shows what is displayed for an IP routed interface:

matrix-x(router-exec)#show interface ge.4.1Physical 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

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 10‐2.

Use the key word eth0 to specify the Ethernet management port on the active Control Module (CM).

Matrix X Router Command Line Interface Reference Guide 20-5

Page 6: Router Configuration Commands

Configuring Routing Interface Settings

show ip interfaceThis command displays data, including administrative status, IP address, MTU (Maximum Transmission Unit) size and bandwidth, and ACL configurations, for IP‐configured interfaces.

Syntaxshow ip interface [port-string] [brief]

Parameters

ModeSwitch mode, read‐only.

Router Privileged EXEC.

DefaultsIf no parameters are specified, all information for all IP interfaces is displayed.

ExampleThe 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 sentge.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

vlan vlan‐id | loopback loopback‐id

(Optional) Displays information for a specific VLAN or loopback interface.

port‐string (Optional) Specifies the interface media type, slot number, and port number, as described in Port Strings Used in the CLI on page 10‐2.

brief (Optional) Displays a brief summary of all IP interfaces.

20-6 Router Configuration Commands

Page 7: Router Configuration Commands

Configuring Routing Interface Settings

The following example displays the output using the brief parameter:

matrix-x(switch-rw)-> show ip interface briefInterface IP-Address Status Proto

ge.4.6 10.10.10.10 down down ge.4.7 20.20.20.20 down down

ip addressThis command sets, removes, or disables a primary or secondary IP address for an interface.

Syntaxip address ip-address ip-mask [secondary]no ip address ip-address ip-mask

Parameters

DefaultsIf secondary is not specified, the configured address will be the primary address for the interface.

Mode

Router Interface Configuration.

UsageEach 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.

ExampleThe 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.1matrix-x(router-config-if-ge-2.1)# ip address 192.168.1.1 255.255.255.0matrix-x(router-config-if-ge-2.1)# no shutdown

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.

Matrix X Router Command Line Interface Reference Guide 20-7

Page 8: Router Configuration Commands

Configuring Routing Interface Settings

ip proxy-arpThis command enables or disables proxy ARP on an interface.

Syntaxip proxy-arp

no ip proxy-arp

ParametersNone.

DefaultsDisabled.

ModeRouter interface configuration: matrix‐x(router‐config‐if‐xx)#

UsageUse this command to allow the X Router to answer ARP requests intended for another machine on this interface. The no form of this command disables proxy ARP after it has been enabled.

ExampleThe 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.

matrix-x(router-config-if-ge.4.1)# show ip interface ge.4.1ge.4.1 is administratively up, line protocol is up Internet address is 10.10.10.10/24 Broadcast address is 10.10.10.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 being sent ICMP unreachables are not being sent ICMP mask replies are never sent

matrix-x(router-config-if-ge.4.1)# ip proxy-arp

matrix-x(router-config-if-ge.4.1)# show ip interface ge.4.1ge.4.1 is administratively up, line protocol is up Internet address is 10.10.10.10/24 Broadcast address is 10.10.10.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 enabled ICMP redirects are being sent

20-8 Router Configuration Commands

Page 9: Router Configuration Commands

Configuring Routing Interface Settings

ICMP unreachables are not being sent ICMP mask replies are never sent

ip redirectsThis command enables ICMP redirection on the specified interface.

Syntaxip redirects

no ip redirects

ParametersNone.

DefaultsEnabled.

ModeRouter Interface Configuration.

UsageICMP 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.

ExampleThe following example rejects ICMP redirects on interface eth0:

matrix-x(router-config)# interface eth0matrix-x(router-config-if-eth0)# no ip redirects

Matrix X Router Command Line Interface Reference Guide 20-9

Page 10: Router Configuration Commands

Configuring Routing Interface Settings

ip unreachablesThis command enables or disables sending ICMP destination unreachable messages on this interface.

Syntaxip unreachables

no ip unreachables

ParametersNone.

DefaultsEnabled.

ModeRouter interface configuration: matrix‐x(router‐config‐if‐xx)#

UsageUse 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.

ExampleThe 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)# show ip interface ge.4.1ge.4.1 is administratively up, line protocol is up Internet address is 10.10.10.10/24 Broadcast address is 10.10.10.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 not being sent ICMP mask replies are never sent

matrix-x(router-config-if-ge.4.1)#

20-10 Router Configuration Commands

Page 11: Router Configuration Commands

Configuring Routing Interface Settings

mac-addressThis command sets a MAC (Media Access Control) address on an interface.

Syntaxmac-address mac-address

no mac-address mac-address

Parameters

DefaultsBy 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.

ModeRouter Interface Configuration.

ExamplesThe 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

mtuThis command sets the maximum transmission unit (MTU) of the interface.

Syntaxmtu mtu_bytes

no mtu

Parameters

Defaults1500 bytes.

ModeRouter interface configuration: matrix‐x(router‐config‐if‐xx)#

mac-address Specifies a 48‐bit MAC address in hexadecimal format.

mtu_bytes Specifies the maximum transmission unit for the interface. The value can range from 68 to 9000 bytes.

Matrix X Router Command Line Interface Reference Guide 20-11

Page 12: Router Configuration Commands

Configuring Routing Interface Settings

UsageThe 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.

ExampleThe following example sets the MTU for interface ge.4.1 to 9000 bytes.

matrix-x(router-config-if-ge.4.1)# mtu 9000

matrix-x(router-config-if-ge.4.1)# show ip interface ge.4.1ge.4.1 is administratively up, line protocol is up Internet address is 10.10.10.10/24 Broadcast address is 10.10.10.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 being sent ICMP unreachables are being sent ICMP mask replies are never sent

host-mobilityUse this command to detect when an IP host moves within a VLAN. 

Syntaxhost-mobility

no host-mobility

ParametersNone.

Defaults• Enabled on VLAN interface.

• Disabled on physical interfaces, and is not configurable.

ModeRouter Interface Configuration. For VLAN interfaces only.

UsageHost 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.

20-12 Router Configuration Commands

Page 13: Router Configuration Commands

Configuring Routing Interface Settings

ExamplesThe following example disables host‐mobility on interface VLAN.1.2. 

matrix-x(switch-su)-> routermatrix-x(router-exec)# configmatrix-x(router-config)# interface vlan.1.2 matrix-x(router-config-if-vlan.1.2)# ip address 10.2.2.2/24matrix-x(router-config-if-vlan.1.2)# no host-mobility matrix-x(router-config-if-vlan.1.2)#no shutdownmatrix-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/24matrix-x(router-config-if-vlan.1.2)# host-mobility matrix-x(router-config-if-vlan.1.2)#no shutdownmatrix-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)#

Note: The show running-config command does not display host mobility enabled.

Matrix X Router Command Line Interface Reference Guide 20-13

Page 14: Router Configuration Commands

Configuring Routing Interface Settings

shutdownThis command sets the interface’s operational status to down. 

Syntaxshutdown

ParametersNone.

DefaultsThe interface is disabled.

ModeRouter Interface Configuration.

UsageMoves the interface to a disabled operational status.

ExampleThe following example puts the interface ge.4.2 into a down state, and displays the current status.

matrix-x(router-config)# interface ge.4.2matrix-x(router-config-if-ge.4.2)# shutdownmatrix-x(router-config-if-ge.4.2)# show interface ge.4.2Physical 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: nomatrix-x(router-config-if-ge.4.2)#

Related Commandsno shutdown

20-14 Router Configuration Commands

Page 15: Router Configuration Commands

Configuring Routing Interface Settings

no shutdownThis command sets the interface’s operational status to up. 

Syntaxno shutdown

ParametersNone.

DefaultsThe interface is disabled.

ModeRouter Interface Configuration.

UsageThe 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.

ExampleThe 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 shutdownmatrix-x(router-config-if-ge.4.2)# show interface ge.4.2Physical 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: nomatrix-x(router-config-if-ge.4.2)#

Matrix X Router Command Line Interface Reference Guide 20-15

Page 16: Router Configuration Commands

Managing Router Configurations

Managing Router ConfigurationsRouter configuration is done with router mode CLI commnads, while switch configuration is done with switch mode CLI commands.

This section demonstrates managing router configuration while operating in router mode only.

PurposeThese router commands are used to review and save the current router configuration. 

CommandsThe commands used to review and save the router configuration are listed below.

show running-configThis command displays the user‐supplied router configuration commands that have been entered to this point while configuring the Matrix X Router.

Syntaxshow running-config

ModeRouter privileged execution: matrix‐x(router‐exec)#

UsageThis 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.

ExampleThe following example shows the output of this command:

matrix-x(router-exec)# show running-config

interface ge.4.1

For information about... Refer to page...

show running-config 20-16

show startup-config 20-17

write file 20-19

20-16 Router Configuration Commands

Page 17: Router Configuration Commands

Managing Router Configurations

ip address 10.10.10.10 255.255.255.0 no shutdown exitinterface ge.4.2 ip address 20.20.20.20 255.255.255.0 no shutdown exitinterface ge.4.3 ip address 30.30.30.30 255.255.255.0 no shutdown exit

matrix-x(router-exec)#

show startup-configThis command displays the user‐supplied router configuration commands that have been entered and saved as the startup configuration by executing the write file command.

Syntaxshow startup-config [| search regexp]

Parameters

DefaultsIf a search filter is not defined, all the contents of the startup configuration are displayed.

ModeRouter privileged execution: matrix‐x(router‐exec)#

UsageThis 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.

ExampleIn 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.

| 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.

Matrix X Router Command Line Interface Reference Guide 20-17

Page 18: Router Configuration Commands

Managing Router Configurations

matrix-x(router-exec)# show startup-config interface ge.4.1 ip address 10.10.10.10 255.255.255.0 no shutdown exitinterface ge.4.2 ip address 20.20.20.20 255.255.255.0 no shutdown exit

matrix-x(router-exec)# show running-config

interface ge.4.1 ip address 10.10.10.10 255.255.255.0 no shutdown exitinterface ge.4.2 ip address 20.20.20.20 255.255.255.0 no shutdown exitinterface ge.4.3 ip address 30.30.30.30 255.255.255.0 no shutdown exit

matrix-x(router-exec)# write file

matrix-x(router-exec)# show startup-config

interface ge.4.1 ip address 10.10.10.10 255.255.255.0 no shutdown exitinterface ge.4.2 ip address 20.20.20.20 255.255.255.0 no shutdown exitinterface ge.4.3 ip address 30.30.30.30 255.255.255.0 no shutdown exit

20-18 Router Configuration Commands

Page 19: Router Configuration Commands

Managing Router Configurations

write file This command saves the router running configuration.

Syntaxwrite file

ParametersNone.

DefaultsNone.

ModeRouter privileged execution: matrix‐x(router‐exec)#

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. 

ExampleThe 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

matrix-x(switch-su)-> dir public

public/==================================================Name : startup_config.txtType : UnknownSize : 258 bytesLast Access : Mon Sep 19 18:52:04 2005Modification: Mon Sep 19 18:52:04 2005Last Change : Mon Sep 19 18:52:04 2005

matrix-x(switch-su)-> show file public/startup_config.txtinterface ge.4.1 ip address 10.10.10.10 255.255.255.0 no shutdown exitinterface ge.4.2 ip address 20.20.20.20 255.255.255.0

Matrix X Router Command Line Interface Reference Guide 20-19

Page 20: Router Configuration Commands

Managing Router Configurations

no shutdown exitinterface ge.4.3 ip address 30.30.30.30 255.255.255.0 no shutdown exitmatrix-x(switch-su)->

20-20 Router Configuration Commands

Page 21: Router Configuration Commands

Reviewing and Configuring ARP

Reviewing and Configuring ARP

PurposeThese router level commands are used to review and configure the routing ARP table.

CommandsThe commands used to review and configure the ARP table are listed below. 

arpThis command adds static entries to the ARP table.

Syntaxarp ip-address MAC-addr arpa port-string

no arp ip-address MAC-addr arpa port-string

Parameters

DefaultsNone.

ModeRouter Global Configuration.

UsageYou can delete static entries from the ARP table with the no form of this command, but you cannot delete ARP entries for local interfaces.

For information about... Refer to page...

arp 20-21

arp timeout 20-22

clear arp 20-23

show ip arp 20-23

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 10‐2.

Matrix X Router Command Line Interface Reference Guide 20-21

Page 22: Router Configuration Commands

Reviewing and Configuring ARP

The clear arp‐cache command removes dynamic ARP entries only, not local or static entries.

ExamplesThe 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 Commandsclear arp

arp timeoutThis command sets the duration (in seconds) for entries to stay in the ARP table before expiring. 

Syntaxarp timeout seconds

no arp timeout seconds

Parameters

Defaults21,600 seconds (6 hours)

ModeRouter Global Configuration.

UsageThe Matrix X Router can support up to 2000 outstanding unresolved ARP entries. The no form restores the default value of 21,600 seconds.

ExampleThe following example sets the ARP timeout to 600 seconds:

matrix-x(router-config)# arp timeout 600

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.

20-22 Router Configuration Commands

Page 23: Router Configuration Commands

Reviewing and Configuring ARP

clear arpThis command deletes all nonstatic (dynamic) entries from the ARP table.

Syntaxclear arp [ip_address]

Parameters

DefaultsIf an IP address is not specified, all dynamic entries are deleted.

ModeRouter Privileged EXEC.

ExampleThe following example deletes all dynamic entries from the ARP table:

matrix-x(router-exec)# clear arp-cache

show ip arpThis command displays entries in the ARP (Address Resolution Protocol) table. ARP converts an IP address into a physical address.

Syntaxshow 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) Specifies the entry to delete.

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 [eth0 | port‐string]

(Optional) Displays ARP entries related to 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 10‐2.

Use the key word eth0 to specify the Ethernet management port on the active Control Module (CM).

stats (Optional) Show packet and byte statistics for each entry.

stats_brief (Optional) Show only packet statistics for each entry.

Matrix X Router Command Line Interface Reference Guide 20-23

Page 24: Router Configuration Commands

Reviewing and Configuring ARP

DefaultsIf no parameters are specified, all entries in the ARP cache will be displayed.

ModeRouter Privileged EXEC.

ExamplesThe following example displays output from the command without any optional parameters.

matrix-x(router-exec)# show ip arp

Protocol Address Age(min) Hardware Addr Type Interface-------------------------------------------------------------------------------Internet 10.1.216.1 21 00e0.6368.ebf1 ARPA eth0Internet 10.1.221.30 - 0001.f4da.5a5c ARPA eth0Internet 10.1.221.232 - 00c0.9f29.ee39 ARPA eth0Internet 1.3.0.1 14 0001.f4da.5a3f ARPA vlan.1.1003Internet 1.3.0.2 - 0001.f4da.5a5b ARPA vlan.1.1003Internet 2.1.0.1 - 0001.f4da.5a5b ARPA vlan.1.2001Internet 2.1.0.2 17 0001.f4da.3ca8 ARPA vlan.1.2001Internet 2.2.0.1 - 0001.f4da.5a5b ARPA vlan.1.2002Internet 2.2.0.2 17 0001.f43a.d36e ARPA vlan.1.2002

The following table provides an explanation of the command output.

The following example displays packet and byte statistics.

matrix-x(router-exec)# show ip arp stats

Address Age(min) Hardware Addr Interface Packets Bytes-------------------------------------------------------------------------------10.1.216.1 23 00e0.6368.ebf1 eth0 0 010.1.221.30 - 0001.f4da.5a5c eth0 0 010.1.221.232 1 00c0.9f29.ee39 eth0 0 01.3.0.1 15 0001.f4da.5a3f vlan.1.1003 0 01.3.0.2 - 0001.f4da.5a5b vlan.1.1003 0 0

summary (Optional) Displays the summary of all ARPs.

| search string (Optional) Display 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.

Output What It Displays...

Protocol ARP entry’s type of network address.

Address Network address mapped to the entry’s MAC address.

Age (min) Interval (in minutes) since the entry was entered in the table.

Hardware Addr MAC address mapped to the entry’s network address.

Type Encapsulation type used for the entry’s network address.

Interface The physical interface.

20-24 Router Configuration Commands

Page 25: Router Configuration Commands

Reviewing and Configuring ARP

2.1.0.1 - 0001.f4da.5a5b vlan.1.2001 0 02.1.0.2 19 0001.f4da.3ca8 vlan.1.2001 78646969 59771696442.2.0.1 - 0001.f4da.5a5b vlan.1.2002 0 0 2.2.0.2 19 0001.f43a.d36e vlan.1.2002 38331428 2913188528

Matrix X Router Command Line Interface Reference Guide 20-25

Page 26: Router Configuration Commands

Configuring Broadcast Settings

Configuring Broadcast Settings

PurposeThese router level commands configure IP broadcast settings.

About DHCP/BOOTP RelayDHCP/BOOTP relay functionality is applied with the help of UDP broadcast forwarding. A typical situation occurs when a host requests an IP address with no DHCP server located on that network segment. A routing interface can forward the DHCP request to a server located on another network if:

• UDP broadcast forwarding is enabled with the ip forward‐protocol command, and

• The address of the DHCP server is configured as a helper address on the receiving interface with the ip helper‐address command.

The DHCP/BOOTP relay function will detect the DHCP request and make the necessary changes to the header, replacing the destination address with the address of the server, and the source with its own address, and send it to the server. When the response comes from the server, the DHCP/BOOTP relay function sends it to the host.

CommandsThe commands used to configure IP broadcast settings are: 

For information about... Refer to page...

ip forward-protocol 20-27

ip helper-address 20-28

20-26 Router Configuration Commands

Page 27: Router Configuration Commands

Configuring Broadcast Settings

ip forward-protocolThis command enables UDP broadcast forwarding, specifying which protocols will be forwarded.

Syntaxip forward-protocol {udp [port]}

no ip forward-protocol {udp [port]}

Parameters

DefaultsIf a port is not specified, default forwarding services will be performed as listed above.

ModeRouter Interface Configuration.

UsageThis 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.

ExampleThis example enables forwarding of Domain Naming System UDP broadcasts received on ge.4.1:

matrix-x(router-config) interface ge.4.1matrix-x(router-config-if-ge.4.1)# ip forward-protocol udp 53

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) — port69• 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

Note: If a certain service exists inside the device, and there is no need to forward the request to remote networks, the no form of this command should be used to disable the forwarding for the specific port. Such requests will not be automatically blocked from being forwarded, just because a service for them exists in the device.

Matrix X Router Command Line Interface Reference Guide 20-27

Page 28: Router Configuration Commands

Configuring Broadcast Settings

ip helper-addressThis command enables DHCP/BOOTP relay and the forwarding of local UDP broadcasts specifying a new destination address.

Syntaxip helper-address address

no ip helper-address address

Parameters

DefaultsNone.

ModeRouter Interface Configuration.

UsageThis 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.

ExampleThe 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 udpmatrix-x(router-config)# interface vlan 1matrix-x(router-config-if-vlan-1)# ip helper-address 192.168.1.10matrix-x(router-config-if-vlan-1)# exitmatrix-x(router-config)# interface vlan 2matrix-x(router-config-if-vlan-2)# ip helper-address 192.24.1.2

address Specifies a destination address for forwarding UDP broadcasts. This address must be a unicast address.

20-28 Router Configuration Commands

Page 29: Router Configuration Commands

Reviewing IP Traffic and Configuring Static Routes

Reviewing IP Traffic and Configuring Static Routes

PurposeTo review IP traffic and configure static routes.

CommandsThe commands used to review IP traffic and configure routes are listed below.

show ip trafficThis command displays statistics about IP traffic sent to and received from the Matrix X Router’s Control Module (CM).

Syntaxshow ip traffic

ParametersNone.

DefaultsNone.

ModeRouter Privileged EXEC.

ExampleThe following example displays sample output from the command:

matrix-x(router-exec)# show ip trafficIP Statistics: Rcvd: 10 total, 6 local destination 0 header errors 0 unknown protocol, 0 security failures Frags: 0 reassembled, 0 timeouts 0 couldn't reassemble 0 fragmented, 0 couldn't fragment Bcast: 1 received, 8 sent Mcast: 0 received, 16 sent Sent: 24 generated, 0 forwarded 0 no route

For information about... Refer to page...

show ip traffic 20-29

show ip cache 20-30

ip route 20-32

Matrix X Router Command Line Interface Reference Guide 20-29

Page 30: Router Configuration Commands

Reviewing IP Traffic and Configuring Static Routes

ICMP Statistics: Rcvd: 4 total, 0 checksum errors, 0 redirects, 0 unreachable, 4 echo 0 echo reply, 0 mask requests, 0 quench 0 parameter, 0 timestamp, 0 time exceeded, Sent: 6 total, 0 redirects, 0 unreachable, 0 echo, 4 echo reply 0 mask requests, 2 mask replies, 0 quench, 0 timestamp 0 info reply, 0 time exceeded, 0 parameter problemUDP Statistics: Rcvd: 1 total, 0 checksum errors, 1 no port Sent: 6 total, 0 forwarded broadcastsTCP Statistics: Rcvd: 0 total, 0 checksum errors, 0 no port Sent: 0 total

show ip cacheThis command displays information about the forwarding cache.

Syntaxshow ip cache [stats] [stats_brief] [summary] [| search string] [ip-addr mask [stats] [stats_brief] [verbose]]

Parameters

DefaultsNone.

ModeRouter privileged execution: matrix‐x(router‐exec)#

Router global configuration: matrix‐x(router‐config)#

ExamplesThe following example displays output from this command with no parameters:

matrix-x(router-exec)# show ip cache

Prefix Next Hop Status Interface1.1.1.4/32 Direct Local loopback1

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 mast 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.

20-30 Router Configuration Commands

Page 31: Router Configuration Commands

Reviewing IP Traffic and Configuring Static Routes

10.1.216.0/21 Direct Local eth0 10.4.0.0/16 Direct Local vlan.1.1004 10.10.54.0/24 Direct Local ge.8.5 10.10.45.0/24 Direct Local vlan.1.1010 1.1.1.5/32 10.10.54.5 Resolved ge.8.5 10.5.0.0/16 10.10.54.5 Resolved ge.8.5 10.10.54.5/32 10.10.54.5 Resolved ge.8.5 10.10.45.5/32 10.10.45.5 Resolved vlan.1.1010

The following example displays packet and byte statistics. 

matrix-x(router-config)# show ip cache stats

Prefix Next Hop Status Interface Packets Bytes1.1.1.4/32 Direct Local loopback1 884 12385610.1.216.0/21 Direct Local eth0 0 0 10.4.0.0/16 Direct Local vlan.1.1004 0 0 10.10.54.0/24 Direct Local ge.8.5 2 256 10.10.45.0/24 Direct Local vlan.1.1010 14 18121.1.1.5/32 10.10.54.5 Resolved ge.8.5 0 0 10.5.0.0/16 10.10.54.5 Resolved ge.8.5 0 0 10.10.54.5/32 10.10.54.5 Resolved ge.8.5 0 0 10.10.45.5/32 10.10.45.5 Resolved vlan.1.1010 0 0

The following example displays the output of the summary parameter.

matrix-x(router-config)# show ip cache summary

Route Cache Summary Number of Routes: 9

The following example displays the output when using the IP address and verbose parameters.

matrix-x(router-config)# show ip cache 10.10.45.4/24 verbose

Ip Cache VerboseDestination Stats Per IOMIOM Packets Bytes8 14 18128 14 1812Ip Route: 10.10.45.5/32

Nexthops 10.10.45.5 State: Resolved Interface: vlan.1.1010

Destination Stats Per IOMIOM Packets BytesTotal 0 0

The following example displays the use of a search string.

matrix-x(router-config)# show ip cache | search "10.10.*"

Prefix Next Hop Status Interface10.10.45.0/24 Direct Local vlan.1.1010 1.1.1.5/32 10.10.45.5 Resolved vlan.1.1010 10.5.0.0/16 10.10.45.5 Resolved vlan.1.1010 10.10.45.5/32 10.10.45.5 Resolved vlan.1.1010

Matrix X Router Command Line Interface Reference Guide 20-31

Page 32: Router Configuration Commands

Reviewing IP Traffic and Configuring Static Routes

ip routeThis command adds or removes a static IP route.

Syntaxip route prefix {mask | masklen} {ipv4-address | interface-name | next-hop}[distance] [tag tag] [metric value] [unicast] [multicast] [noinstall] [reject] [retain] [blackhole]

no ip route prefix {mask | masklen} {ipv4-address | interface-name | next-hop}[distance] [tag tag] [metric value] [unicast] [multicast] [noinstall] [reject] [retain] [blackhole]

Parameters

DefaultsStatic routes are not explicitly configured by default.

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 | interface‐name |next‐hop]

Specify either an IPv4 address as the next hop for the static route, or specify just the physical interface name to be used with the static route.

distance (Optional) Specify an administrative distance for this route, ranging from 1 to 255, and it defaults to 60 if it is not specified.

tag tag (Optional) Specify 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) Specify 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.

20-32 Router Configuration Commands

Page 33: Router Configuration Commands

Reviewing IP Traffic and Configuring Static Routes

ModeRouter Global Configuration.

UsageUse 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.

ExamplesThe 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 multicastmatrix-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 

Matrix X Router Command Line Interface Reference Guide 20-33

Page 34: Router Configuration Commands

Reviewing IP Traffic and Configuring Static Routes

(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, ex0K 10.128.0.0/9 [0/40] via 65.247.36.2, 21d21h, ex0C 65.247.36.0/25 [1/0] via 65.247.36.97, 21d21h, ex0K 65.247.36.97/32 [0/40] via 127.0.0.1, 21d21h, lo0S 127.0.0.0/8 [0/0] via 127.0.0.1, 21d21h, lo0C 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 ospfCodes: C - connected, S - static, R - RIP, B - BGP, O - OSPF, D - DVMRP, 3 - OSPF3, I - IS-IS, K - Kernel, A - AggregateO 65.247.36.224/28 [1/0] via 65.247.36.254 21d21h, ex0

20-34 Router Configuration Commands