20 Router Configuration Commands This chapter describes router configuration commands, including interface configuration. 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
Configuring Global Router Parameters 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. For information about... router id
Refer to page... 20-2
Matrix X Router Command Line Interface Reference Guide
20-1
Configuring Global Router Parameters
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.
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 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.
Example This example sets the router ID to 1.1.1.1: matrix-x(router-config)# router id 1.1.1.1
20-2
Router Configuration Commands
Configuring Routing Interface Settings
Configuring Routing Interface Settings 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. 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
Configuring Routing Interface Settings
interface This command acquires router interface configuration mode for the specified physical port, loopback interface or VLAN.
Syntax interface {vlan vlan-id | loopback loopback-id | port-string}
Parameters vlan vlan-id | loopback loopback-id port-string
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. Specifies the physical port to be configured, as described in Port Strings Used in the CLI on page 10‐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 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.
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 matrix-x(router-config)# interface ge.4.1
20-4
Router Configuration Commands
Configuring Routing Interface Settings
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 10‐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 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.
Example 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: 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
no
Matrix X Router Command Line Interface Reference Guide
20-5
Configuring Routing Interface Settings
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 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.
Mode Switch mode, read‐only. Router Privileged EXEC.
Defaults If no parameters are specified, all information for all IP interfaces is displayed.
Example 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 20-6
Router Configuration Commands
Configuring Routing Interface Settings
The following example displays the output using the brief parameter: matrix-x(switch-rw)-> show ip interface brief Interface IP-Address Status Proto ge.4.6 ge.4.7
10.10.10.10 20.20.20.20
down down
down 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
Matrix X Router Command Line Interface Reference Guide
20-7
Configuring Routing Interface Settings
ip proxy-arp This command enables or disables proxy ARP on an interface.
Syntax ip proxy-arp no ip proxy-arp
Parameters None.
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. The no form of this command disables proxy ARP after it has been enabled.
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. 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 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.1 ge.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
Configuring Routing Interface Settings
ICMP unreachables are not being sent ICMP mask replies are never sent
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
Matrix X Router Command Line Interface Reference Guide
20-9
Configuring Routing Interface Settings
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)# show ip interface ge.4.1 ge.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
Configuring Routing Interface Settings
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)#
Matrix X Router Command Line Interface Reference Guide
20-11
Configuring Routing Interface Settings
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 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 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-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. 20-12
Router Configuration Commands
Configuring Routing Interface Settings
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)#
Matrix X Router Command Line Interface Reference Guide
20-13
Configuring Routing Interface Settings
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: matrix-x(router-config-if-ge.4.2)#
Related Commands no shutdown
20-14
Router Configuration Commands
no
Configuring Routing Interface Settings
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: matrix-x(router-config-if-ge.4.2)#
no
Matrix X Router Command Line Interface Reference Guide
20-15
Managing Router Configurations
Managing Router Configurations Router 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.
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. For information about...
Refer to page...
show running-config
20-16
show startup-config
20-17
write file
20-19
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
Mode Router privileged execution: matrix‐x(router‐exec)#
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.
Example The following example shows the output of this command: matrix-x(router-exec)# show running-config interface ge.4.1 20-16
Router Configuration Commands
Managing Router Configurations
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 matrix-x(router-exec)#
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 [| search regexp]
Parameters | 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 privileged execution: matrix‐x(router‐exec)#
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 Command Line Interface Reference Guide
20-17
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 exit interface 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 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 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 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
20-18
Router Configuration Commands
Managing Router Configurations
write file This command saves the router running configuration.
Syntax write file
Parameters None.
Defaults None.
Mode Router 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.
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 matrix-x(switch-su)-> dir public 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 matrix-x(switch-su)-> show file public/startup_config.txt 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
Matrix X Router Command Line Interface Reference Guide
20-19
Managing Router Configurations
no shutdown exit interface ge.4.3 ip address 30.30.30.30 255.255.255.0 no shutdown exit matrix-x(switch-su)->
20-20
Router Configuration Commands
Reviewing and Configuring ARP
Reviewing and Configuring ARP 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. For information about...
Refer to page...
arp
20-21
arp timeout
20-22
clear arp
20-23
show ip arp
20-23
arp This command adds static entries to the ARP table.
Syntax arp ip-address MAC-addr arpa port-string no 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 10‐2.
Defaults None.
Mode Router Global Configuration.
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.
Matrix X Router Command Line Interface Reference Guide
20-21
Reviewing and Configuring ARP
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 no 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.
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
20-22
Router Configuration Commands
Reviewing and Configuring ARP
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 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 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
Reviewing and Configuring ARP
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.
Defaults If no parameters are specified, all entries in the ARP cache will be displayed.
Mode Router Privileged EXEC.
Examples The 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 eth0 Internet 10.1.221.30 0001.f4da.5a5c ARPA eth0 Internet 10.1.221.232 00c0.9f29.ee39 ARPA eth0 Internet 1.3.0.1 14 0001.f4da.5a3f ARPA vlan.1.1003 Internet 1.3.0.2 0001.f4da.5a5b ARPA vlan.1.1003 Internet 2.1.0.1 0001.f4da.5a5b ARPA vlan.1.2001 Internet 2.1.0.2 17 0001.f4da.3ca8 ARPA vlan.1.2001 Internet 2.2.0.1 0001.f4da.5a5b ARPA vlan.1.2002 Internet 2.2.0.2 17 0001.f43a.d36e ARPA vlan.1.2002
The following table provides an explanation of the command output. 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.
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 0 10.1.221.30 0001.f4da.5a5c eth0 0 0 10.1.221.232 1 00c0.9f29.ee39 eth0 0 0 1.3.0.1 15 0001.f4da.5a3f vlan.1.1003 0 0 1.3.0.2 0001.f4da.5a5b vlan.1.1003 0 0 20-24
Router Configuration Commands
Reviewing and Configuring ARP
2.1.0.1 2.1.0.2 2.2.0.1 2.2.0.2
19 19
0001.f4da.5a5b 0001.f4da.3ca8 0001.f4da.5a5b 0001.f43a.d36e
vlan.1.2001 vlan.1.2001 vlan.1.2002 vlan.1.2002
0 78646969 0 38331428
0 5977169644 0 2913188528
Matrix X Router Command Line Interface Reference Guide
20-25
Configuring Broadcast Settings
Configuring Broadcast Settings Purpose These router level commands configure IP broadcast settings.
About DHCP/BOOTP Relay DHCP/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.
Commands The commands used to configure IP broadcast settings are: For information about...
20-26
Refer to page...
ip forward-protocol
20-27
ip helper-address
20-28
Router Configuration Commands
Configuring Broadcast Settings
ip forward-protocol This command enables UDP broadcast forwarding, specifying which protocols will be forwarded.
Syntax ip forward-protocol {udp [port]} no 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) — 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
Defaults If a port is not specified, default forwarding services will be performed as listed above.
Mode Router Interface Configuration.
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, 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.
Example This example enables forwarding of Domain Naming System UDP broadcasts received on ge.4.1: matrix-x(router-config) interface ge.4.1 matrix-x(router-config-if-ge.4.1)# ip forward-protocol udp 53 Matrix X Router Command Line Interface Reference Guide
20-27
Configuring Broadcast Settings
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
20-28
Router Configuration Commands
Reviewing IP Traffic and Configuring Static Routes
Reviewing IP Traffic and Configuring Static Routes Purpose To review IP traffic and configure static routes.
Commands The commands used to review IP traffic and configure routes are listed below. For information about...
Refer to page...
show ip traffic
20-29
show ip cache
20-30
ip route
20-32
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 EXEC.
Example The following example displays sample output from the command: matrix-x(router-exec)# show ip traffic IP 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
Matrix X Router Command Line Interface Reference Guide
20-29
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 problem UDP Statistics: Rcvd: 1 total, 0 checksum errors, 1 no port Sent: 6 total, 0 forwarded broadcasts TCP Statistics: Rcvd: 0 total, 0 checksum errors, 0 no port Sent: 0 total
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 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.
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 Prefix 1.1.1.4/32 20-30
Router Configuration Commands
Next Hop Direct
Status Local
Interface loopback1
Reviewing IP Traffic and Configuring Static Routes
10.1.216.0/21 10.4.0.0/16 10.10.54.0/24 10.10.45.0/24 1.1.1.5/32 10.5.0.0/16 10.10.54.5/32 10.10.45.5/32
Direct Direct Direct Direct 10.10.54.5 10.10.54.5 10.10.54.5 10.10.45.5
Local Local Local Local Resolved Resolved Resolved Resolved
eth0 vlan.1.1004 ge.8.5 vlan.1.1010 ge.8.5 ge.8.5 ge.8.5 vlan.1.1010
The following example displays packet and byte statistics. matrix-x(router-config)# show ip cache stats Prefix 1.1.1.4/32 10.1.216.0/21 10.4.0.0/16 10.10.54.0/24 10.10.45.0/24 1.1.1.5/32 10.5.0.0/16 10.10.54.5/32 10.10.45.5/32
Next Hop Direct Direct Direct Direct Direct 10.10.54.5 10.10.54.5 10.10.54.5 10.10.45.5
Status Interface Local loopback1 Local eth0 Local vlan.1.1004 Local ge.8.5 Local vlan.1.1010 Resolved ge.8.5 Resolved ge.8.5 Resolved ge.8.5 Resolved vlan.1.1010
Packets 884 0 0 2 14 0 0 0 0
Bytes 123856 0 0 256 1812 0 0 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 Verbose Destination Stats Per IOM IOM Packets 8 14 8 14 Ip Route: 10.10.45.5/32 Nexthops 10.10.45.5
State: Resolved
Destination Stats Per IOM IOM Packets Total 0
Bytes 1812 1812
Interface: vlan.1.1010
Bytes 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 Interface 10.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
Reviewing IP Traffic and Configuring Static Routes
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] no 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 | 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.
Defaults Static routes are not explicitly configured by default.
20-32
Router Configuration Commands
Reviewing IP Traffic and Configuring Static Routes
Mode Router Global Configuration.
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 longerprefixes 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
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 K C K S C
0.0.0.0/0 10.128.0.0/9 65.247.36.0/25 65.247.36.97/32 127.0.0.0/8 127.0.0.1/32
[0/40] via 65.247.36.1, 21d21h, ex0 [0/40] via 65.247.36.2, 21d21h, ex0 [1/0] via 65.247.36.97, 21d21h, ex0 [0/40] via 127.0.0.1, 21d21h, lo0 [0/0] via 127.0.0.1, 21d21h, lo0 [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
20-34
Router Configuration Commands