IP Routing Commands
Use these commands to enable and configure IP routing on the switch.
autostate
M4250
M4350
This command enables AutoState for a VLAN routing interface. AutoState changes the state of a VLAN routing interface automatically based on link state events (up or down).
By default, AutoState is disabled, which means that a VLAN routing interface could remain up even if the link is down.
| Format | autostate |
| Mode | Interface Config |
no autostate
This command disables AutoState for a VLAN routing interface.
| Format | no autostate |
| Mode | Interface Config |
routing
M4250
M4350
This command enables IPv4 and IPv6 routing for an interface or range of interfaces. You can view the current value for this function with the show ip brief command. The value is labeled as Routing Mode.
| Default | disabled |
| Format | routing |
| Mode | Interface Config |
no routing
This command disables routing for an interface.
You can view the current value for this function with the show ip brief command. The value is labeled as Routing Mode.
| Format | no routing |
| Mode | Interface Config |
ip routing
M4250
M4350
This command enables the IP routing for the switch.
| Format | ip routing |
| Mode | Global Config |
no ip routing
This command disables IP routing for the switch.
| Format | no ip routing |
| Mode | Global Config |
ip address
M4250
M4350
This command configures an IP address on an interface or range of interfaces. You can also use this command to configure one or more secondary IP addresses on the interface. The command supports RFC 3021 and accepts using 31-bit prefixes on IPv4 point-to-point links. This command adds the label IP address in the command show ip interface.
| Format | ip address ipaddr {subnetmask | /prefix-length} [secondary] |
| Mode | Interface Config |
| Parameter | Description |
|---|---|
| ipaddr | The IP address of the interface. |
| subnetmask | A 4-digit dotted-decimal number which represents the subnet mask of the interface. |
| /prefix-length | Implements RFC 3021. Using the / notation of the subnet mask, this is an integer that indicates the length of the subnet mask. Range is 5 to 32 bits. |
Command example:
The following example configures the subnet mask with an IP address in the dotted decimal format on interface 0/4/1.
(NETGEAR Switch) #config
(NETGEAR Switch) (Config)#interface 0/4/1
(NETGEAR Switch) (Interface 0/4/1)#ip address 192.168.10.1 255.255.255.254
Command example:
The following example configures the subnet mask with an IP address in the / notation on interface 0/4/1.
(NETGEAR Switch) #config
(NETGEAR Switch) (Config)#interface 0/4/1
(NETGEAR Switch) (Interface 0/4/1)#ip address 192.168.10.1 /31
no ip address
This command deletes an IP address from an interface. The value for ipaddr is the IP address of the interface in a.b.c.d format where the range for a, b, c, and d is 1-255. The value for subnetmask is a 4-digit dotted-decimal number which represents the Subnet Mask of the interface. To remove all of the IP addresses (primary and secondary) configured on the interface, enter the command no ip address.
| Format | no ip address [ipaddr {subnetmask | /prefix-length} [secondary]] |
| Mode | Interface Config |
ip address dhcp
M4250
M4350
This command enables the DHCPv4 client on an in-band interface so that it can acquire network information, such as the IP address, subnet mask, and default gateway, from a network DHCP server. When DHCP is enabled on the interface, the system automatically deletes all manually configured IPv4 addresses on the interface.
To enable the DHCPv4 client on an in-band interface and send DHCP client messages with the client identifier option, use the ip address dhcp client-id configuration command in interface configuration mode.
| Default | disabled |
| Format | ip address dhcp [client-id] |
| Mode | Interface Config |
Command example:
The following example enables DHCPv4 on interface 0/4/1:
(NETGEAR Switch) #config
(NETGEAR Switch) (Config)#interface 0/4/1
(NETGEAR Switch) (Interface 0/4/1)#ip address dhcp
no ip address dhcp
The no ip address dhcp command releases a leased address and disables DHCPv4 on an interface. The no form of the ip address dhcp client-id command removes the client-id option and also disables the DHCP client on the in-band interface.
| Format | no ip address dhcp [client-id] |
| Mode | Interface Config |
ip default-gateway
M4250
M4350
This command manually configures a default gateway for the switch. Only one default gateway can be configured. If you invoke this command multiple times, each command replaces the previous value.
When the system does not have a more specific route to a packet’s destination, it sends the packet to the default gateway. The system installs a default IPv4 route with the gateway address as the next hop address. The route preference is 253. A default gateway configured with this command is more preferred than a default gateway learned from a DHCP server.
| Format | ip default-gateway ipaddr |
| Mode | Global Config |
| Parameter | Description |
|---|---|
| ipaddr | The IPv4 address of an attached router. |
Command example:
The following example sets the default gateway to 10.1.1.1:
(NETGEAR Switch) #config
(NETGEAR Switch) (Config)#ip default-gateway 10.1.1.1
no ip default-gateway
This command removes the default gateway address from the configuration.
| Format | no ip default-gateway ipaddr |
| Mode | Interface Config |
ip load-sharing
M4250
M4350
This command configures the IP equal-cost multipath (ECMP) load balancing mode.
| Default | 6 |
| Format | ip load-sharing mode {inner | outer} |
| Mode | Global Config |
| Parameter | Description |
|---|---|
| mode |
|
| inner | The inner IP header is used for tunneled packets. |
| outer | The outer IP header is used for tunneled packets. |
no ip load-sharing
This command resets the IP ECMP load balancing mode to default mode (6).
| Format | no ip load-sharing |
| Mode | Global Config |
ip unnumbered gratuitous-arp accept
M4250
M4350
This command enables the switch to automatically configure static interface routes to an unnumbered peer when the switch dynamically receives gratuitous ARP messages. The switch uses the IP address of the loopback interface (see the ip unnumbered loopback command) as the IP address for the unnumbered peer. This behavior is enabled by default.
| Format | ip unnumbered gratuitous-arp accept |
| Mode | Interface Config |
no ip unnumbered gratuitous-arp accept
This command prevents the switch from automatically configuring static interface routes to an unnumbered peer when the switch dynamically receives gratuitous ARP messages.
| Format | no ip unnumbered gratuitous-arp accept |
| Mode | Interface Config |
ip unnumbered loopback
M4250
M4350
This command enables the switch to identify an unnumbered interface and specifies the numbered loopback interface from which the unnumbered interface can borrow an address.
The interface-id argument specifies the loopback interface ID from 0 to 63.
| Format | ip unnumbered loopback interface-id |
| Mode | Interface Config |
no ip unnumbered loopback
This removes an unnumbered interface configuration.
| Format | no ip unnumbered loopback |
| Mode | Interface Config |
release dhcp
M4250
M4350
Use this command to force the DHCPv4 client to release the leased address from a specified interface or VLAN. The DHCP client sends a DHCP Release message telling the DHCP server that it no longer needs the IP address, and that the IP address can be reassigned to another. To specify an actual interface or port, do the following:
- For an M4250 series switch, use the argument slot/port.
- For an M4350 series switch, use the argument unit/slot/port, as shown in the command format.
| Format | release dhcp {unit/slot/port | vlan vlan-id} |
| Mode | Privileged EXEC |
renew dhcp
M4250
M4350
Use this command to force the DHCPv4 client to immediately renew an IPv4 address lease for a specified interface or VLAN. To specify an actual interface or port, do the following:
- For an M4250 series switch, use the argument slot/port.
- For an M4350 series switch, use the argument unit/slot/port, as shown in the command format.
| Format | renew dhcp {unit/slot/port | service-port | vlan vlan-id} |
| Mode | Privileged EXEC |
ip route
M4250
M4350
This command configures a static route. The ipaddr parameter is a valid IP address, and subnetmask is a valid subnet mask. The nexthopip parameter is a valid IP address of the next hop router. Specifying Null0 as the nexthop parameter adds a static reject route. The optional preference parameter is an integer (value from 1 to 255) that allows you to specify the preference value (sometimes called administrative distance) of an individual static route. Among routes to the same destination, the route with the lowest preference value is the route entered into the forwarding database. By specifying the preference of a static route, you control whether a static route is more or less preferred than routes from dynamic routing protocols. The preference also controls whether a static route is more or less preferred than other static routes to the same destination. A route with a preference of 255 cannot be used to forward traffic.
Optionally, you can also add a description and a tracking number from 1 to 128.
To specify an actual interface or port, do the following:
- For an M4250 series switch, use the argument slot/port.
- For an M4350 series switch, use the argument unit/slot/port, as shown in the command format.
For the static routes to be visible, you must perform the following steps:
- Enable IP routing globally.
- Enable IP routing for the interface.
- Confirm that the associated link is also up.
| Default | preference—1 |
| Format | ip route ipaddr subnetmask {nexthopip | Null0 | {{interface {unit/slot/port | vlan vlan-id} [nexthopip]}} [preference] [description description] [track number] |
| Mode | Global Config |
no ip route
This command deletes a single next hop to a destination static route. If you use the nexthopip argument, the next hop is deleted. If you use the preference keyword, the preference value of the static route is reset to its default. The other keywords and arguments function in a similar way.
| Format | no ip route ipaddr subnetmask {nexthopip | Null0 | {{interface {unit/slot/port | vlan vlan-id} [nexthopip]}} |
| Mode | Global Config |
ip route default
M4250
M4350
This command configures the default route. The value for nexthopip is a valid IP address of the next hop router. The preference is an integer value from 1 to 255. A route with a preference of 255 cannot be used to forward traffic. Optionally, you can also add a description and a tracking number from 1 to 128.
| Default | preference—1 |
| Format | ip route default nexthopip [preference] [description description] [track number] |
| Mode | Global Config |
no ip route default
This command deletes all configured default routes. If the optional nexthopip parameter is designated, the specific next hop is deleted from the configured default route and if the optional preference value is designated, the preference of the configured default route is reset to its default.
| Format | no ip route default [nexthopip] |
| Mode | Global Config |
ip route distance
M4250
M4350
This command sets the default distance (preference) for static routes. The distance can be a number in the range of 1–255. Lower route distance values are preferred when determining the best route. The ip route and ip route default commands allow you to optionally set the distance (preference) of an individual static route. The default distance is used when no distance is specified in these commands. Changing the default distance does not update the distance of existing static routes, even if they were assigned the original default distance. The new default distance will only be applied to static routes created after invoking the ip route distance command.
| Default | 1 |
| Format | ip route distance number |
| Mode | Global Config |
no ip route distance
This command sets the default static route preference value on the switch. Lower route preference values are preferred when determining the best route.
| Format | no ip route distance |
| Mode | Global Config |
ip route net-prototype
M4250
M4350
This command adds net prototype IPv4 routes to the hardware.
| Format | ip route net-prototype prefix/prefix-length nexthopip num-routes |
| Mode | Global Config |
| Parameter | Definition |
|---|---|
| prefix/prefix-length | The destination network and mask for the route. |
| nexthopip | The next-hop IP address, which must belong to an active routing interface but does not need to be resolved. |
| num-routes | The number of routes that must be added to the hardware starting from the specified prefix argument and within the specified prefix length. |
no ip route net-prototype
This command deletes all the net prototype IPv4 routes that were added to the hardware.
| Format | no ip route net-prototype |
| Mode | Global Config |
ip netdirbcast
M4250
M4350
This command enables the forwarding of network-directed broadcasts on an interface or range of interfaces. When enabled, network directed broadcasts are forwarded. When disabled they are dropped.
| Default | disabled |
| Format | ip netdirbcast |
| Mode | Interface Config |
no ip netdirbcast
This command disables the forwarding of network-directed broadcasts. When disabled, network directed broadcasts are dropped.
| Format | no ip netdirbcast |
| Mode | Interface Config |
ip prefix-list
M4250
M4350
To create a prefix list or add a prefix list entry, use the ip prefix-list command in Global Configuration mode. Prefix lists allow matching of route prefixes with those specified in the prefix list. Each prefix list includes a sequence of prefix list entries ordered by their sequence numbers. A router or switch sequentially examines each prefix list entry to determine if the route’s prefix matches that of the entry. An empty or nonexistent prefix list permits all prefixes. An implicit deny action is assumed if a prefix does not match any entries of a prefix list. Once a match or deny occurs, the router or switch does not go through the rest of the list.
Up to 128 prefix lists may be configured. The maximum number of statements allowed in prefix list is 64.
| Default | No prefix lists are configured by default. When neither the ge nor the le option is configured, the destination prefix must match the network/length exactly. If the ge option is configured without the le option, any prefix with a network mask greater than or equal to the ge value is considered a match. Similarly, if the le option is configured without the ge option, a prefix with a network mask less than or equal to the le value is considered a match. |
| Format | ip prefix-list list-name {[seq number] {permit | deny} network/length [ge length] [le length] | renumber [renumber-interval] [first-statement-number]} |
| Mode | Global Configuration |
| Parameter | Description |
|---|---|
| list-name | The text name of the prefix list. Up to 32 characters. |
| seq number | (Optional) The sequence number for this prefix list statement. Prefix list statements are ordered from lowest sequence number to highest and applied in that order. If you do not specify a sequence number, the switch automatically selects a sequence number five larger than the last sequence number in the list. Two statements may not be configured with the same sequence number. The value range for number is from 1 to 4,294,967,294. |
| permit | Permits routes for which the destination prefix matches the statement. |
| deny | Denies routes for which the destination prefix matches the statement. |
| network/length | Specifies the match criteria for routes being compared to the prefix list statement. The network can be any valid IP prefix. The length is any IPv4 prefix length from 0 to 32. |
| ge length | (Optional) If this option is configured, then a prefix is only considered a match if its network mask length is greater than or equal to this value. This value must be longer than the network length and less than or equal to 32. |
| le length | (Optional) If this option is configured, then a prefix is only considered a match if its network mask length is less than or equal to this value. This value must be longer than the ge length and less than or equal to 32. |
| renumber renumber-interval first-statement-number | (Optional) Provides the option to renumber the sequence numbers of the IP prefix list statements with a specified interval starting from a particular sequence number. The valid range for renumber-interval is 1–100, and the valid range for first-statement-number is 1–1000. |
Command example:
The following example configures a prefix list that allows routes with one of two specific destination prefixes, 172.20.0.0/16 and 192.168.1.0/24:
(NETGEAR Switch)(config)# ip prefix-list apple seq 10 permit 172.20.0.0/16
(NETGEAR Switch)(config)# ip prefix-list apple seq 20 permit 192.168.10/24
Command example:
The following example disallows only the default route:
(NETGEAR Switch)(config)# ip prefix-list orange deny 0.0.0.0/0
(NETGEAR Switch)(config)# ip prefix-list orange permit 0.0.0.0/0 ge 1
no ip prefix-list
Use this command to delete a prefix list or a statement in a prefix list. The command deletes the entire prefix list. To remove an individual statement from a prefix list, you must specify the statement exactly, with all its options.
| Format | no ip prefix-list list-name [[seq number] {permit | deny} network/length [ge length] [le length]] |
| Mode | Global Configuration |
ip prefix-list description
M4250
M4350
This command applies a text description to a prefix list.
| Default | No description |
| Format | ip prefix-list list-name description text |
| Mode | Global Configuration |
| Parameter | Description |
|---|---|
| list-name | The text name of the prefix list. Up to 32 characters. |
| text | The text description of the prefix list. You can enter up to 80 characters. |
no ip prefix-list description
This command removes a text description from a prefix list.
| Format | no ip prefix-list list-name description |
| Mode | Global Configuration |
ip mtu
M4250
M4350
This command sets the IP Maximum Transmission Unit (MTU) on a routing interface or range of interfaces. The IP MTU is the size of the largest IP packet that can be transmitted on the interface without fragmentation. Forwarded packets are dropped if they exceed the IP MTU of the outgoing interface. The MTU size is a number in the range 68–12270.
OSPF advertises the IP MTU in the Database Description packets it sends to its neighbors during database exchange. If two OSPF neighbors advertise different IP MTUs, they will not form an adjacency.
| Default | 1500 bytes |
| Format | ip mtu size |
| Mode | Interface Config |
no ip mtu
This command resets the ip mtu to the default value.
| Format | no ip mtu |
| Mode | Interface Config |
encapsulation
M4250
M4350
This command configures the link layer encapsulation type for the packet on an interface or range of interfaces. The encapsulation type can be ethernet or snap.
| Default | ethernet |
| Format | encapsulation {ethernet | snap} |
| Mode | Interface Config |
show dhcp lease
M4250
M4350
This command displays a list of IPv4 addresses currently leased from a DHCP server on a specific in-band interface or all in-band interfaces. This command does not apply to service or network ports.
To specify an actual interface or port, do the following:
- For an M4250 series switch, use the argument slot/port.
- For an M4350 series switch, use the argument unit/slot/port, as shown in the command format.
| Format | show dhcp lease [interface unit/slot/port | vlan vlan-id] |
| Modes | Privileged EXEC |
| Term | Definition |
|---|---|
| IP address, Subnet mask | The IP address and network mask leased from the DHCP server. |
| DHCP Lease server | The IPv4 address of the DHCP server that leased the address. |
| State | State of the DHCPv4 Client on this interface. |
| DHCP transaction ID | The transaction ID of the DHCPv4 Client. |
| Lease | The time (in seconds) that the IP address was leased by the server. |
| Renewal | The time (in seconds) when the next DHCP renew Request is sent by DHCPv4 Client to renew the leased IP address. |
| Rebind | The time (in seconds) when the DHCP Rebind process starts. |
| Retry count | Number of times the DHCPv4 client sends a DHCP REQUEST message before the server responds. |
show ip brief
M4250
M4350
This command displays all the summary information of the IP, including the ICMP rate limit configuration and the global ICMP Redirect configuration.
| Format | show ip brief |
| Modes |
Privileged EXEC User EXEC |
| Term | Definition |
|---|---|
| Default Time to Live | The computed TTL (Time to Live) of forwarding a packet from the local router to the final destination. |
| Routing Mode | Shows whether the routing mode is enabled or disabled. |
| Maximum Next Hops | The maximum number of next hops the packet can travel. |
| Maximum Routes | The maximum number of routes the packet can travel. |
| ICMP Rate Limit Interval | Shows how often the token bucket is initialized with burst-size tokens. Burst-interval is from 0 to 2147483647 milliseconds. The default burst-interval is 1000 msec. |
| ICMP Rate Limit Burst Size | Shows the number of ICMPv4 error messages that can be sent during one burst-interval. The range is from 1 to 200 messages. The default value is 100 messages. |
| ICMP Echo Replies | Shows whether ICMP Echo Replies are enabled or disabled. |
| ICMP Redirects | Shows whether ICMP Redirects are enabled or disabled. |
Command example:
(NETGEAR Switch) #show ip brief
Default Time to Live........................... 64
Routing Mode................................... Disabled
Maximum Next Hops.............................. 4
Maximum Routes................................. 128
ICMP Rate Limit Interval....................... 1000 msec
ICMP Rate Limit Burst Size..................... 100 messages
ICMP Echo Replies.............................. Enabled
ICMP Redirects................................. Enabled
show ip dhcp client statistics
M4250
M4350
Use this command to display the client-specific DHCP statistics on all interfaces or for a specific interface.
- The show ip dhcp client statistics command shows the statistics on all DHCP client-enabled interfaces.
- The show ip dhcp client statistics interface command shows the statistics on a specific interface but only if the interface is DHCP-client enabled.
To specify an actual interface or port, do the following:
- For an M4250 series switch, use the argument slot/port.
- For an M4350 series switch, use the argument unit/slot/port, as shown in the command format.
| Format | show ip dhcp client statistics [interface unit/slot/port | vlan vlan-id] |
| Modes | Privileged EXEC |
| Term | Definition |
|---|---|
| DHCP DISCOVER | The number of DHCP Discover packets sent by the client. |
| DHCP REQUEST | The number of DHCP Request packets sent by the client. |
| DHCP RELEASE | The number of DHCP Release packets sent by the client. |
| DHCP INFORM | The number of DHCP Inform packets sent by the client. |
| DHCP REBIND | The number of DHCP Rebind packets sent by the client. |
| DHCP RENEW | The number of DHCP Renew packets sent by the client. |
| DHCP OFFER | The number of DHCP Offer packets sent by the client. |
| DHCP ACK | The number of DHCP Acknowledgment packets sent by the client. |
| DHCP NACK | The number of DHCP Negative Acknowledgment packets sent by the client. |
Command example:
(NETGEAR Switch)#show ip dhcp client statistics
DHCP Client Statistics for Interface 1/0/5
------------------------------------------------
Messages Sent
---------- ------
DHCP DISCOVER.................................. 4
DHCP REQUEST................................... 0
DHCP RELEASE................................... 0
DHCP INFORM.................................... 0
DHCP REBIND.................................... 0
DHCP RENEW..................................... 0
Messages Received
---------- ----------
DHCP OFFER..................................... 0
DHCP ACK....................................... 0
DHCP NACK...................................... 0
DHCP Client Statistics for Interface 1/0/9
------------------------------------------------
Messages Sent
---------- ------
DHCP DISCOVER.................................. 2
DHCP REQUEST................................... 0
DHCP RELEASE................................... 0
DHCP INFORM.................................... 0
DHCP REBIND.................................... 0
DHCP RENEW..................................... 0
Messages Received
---------- ----------
DHCP OFFER..................................... 0
DHCP ACK....................................... 0
DHCP NACK...................................... 0
Command example:
(NETGEAR Switch)#show ip dhcp client statistics interface 1/0/5
DHCP Client Statistics for Interface 0/5
------------------------------------------------
Messages Sent
---------- ------
DHCP DISCOVER.................................. 1
DHCP REQUEST................................... 0
DHCP RELEASE................................... 0
DHCP INFORM.................................... 0
DHCP REBIND.................................... 0
DHCP RENEW..................................... 0
Messages Received
---------- ----------
DHCP OFFER..................................... 0
DHCP ACK....................................... 0
DHCP NACK...................................... 0
show ip interface
M4250
M4350
This command displays all pertinent information about the IP interface. To specify an actual interface or port, do the following:
- For an M4250 series switch, use the argument slot/port.
- For an M4350 series switch, use the argument unit/slot/port, as shown in the command description and format.
The argument unit/slot/port corresponds to a physical routing interface or VLAN routing interface. The keyword vlan is used to specify the VLAN ID of the routing VLAN.
The vlan-id is a number in the range 1–4093. The loopback number is in the range 0–7.
| Format | show ip interface {unit/slot/port | vlan vlan-id | loopback number} |
| Modes |
Privileged EXEC User EXEC |
| Term | Definition |
|---|---|
| Routing Interface Status | Determines the operational status of IPv4 routing Interface. The possible values are Up or Down. |
| Primary IP Address | The primary IP address and subnet masks for the interface. This value appears only if you configure it. |
| Method | Shows whether the IP address was configured manually or acquired from a DHCP server. |
| Secondary IP Address | One or more secondary IP addresses and subnet masks for the interface. This value appears only if you configure it. |
| Helper IP Address | The helper IP addresses configured by the command ip helper-address (Interface Config). |
| Routing Mode | The administrative mode of router interface participation. The possible values are enable or disable. This value is configurable. |
| Administrative Mode | The administrative mode of the specified interface. The possible values of this field are enable or disable. This value is configurable. |
| Forward Net Directed Broadcasts | Displays whether forwarding of network-directed broadcasts is enabled or disabled. This value is configurable. |
| Proxy ARP | Displays whether Proxy ARP is enabled or disabled on the system. |
| Local Proxy ARP | Displays whether Local Proxy ARP is enabled or disabled on the interface. |
| Active State | Displays whether the interface is active or inactive. An interface is considered active if its link is up and it is in forwarding state. |
| Link Speed Data Rate | An integer representing the physical link data rate of the specified interface. This is measured in Megabits per second (Mbps). |
| MAC Address | The burned in physical address of the specified interface. The format is 6 two-digit hexadecimal numbers that are separated by colons. |
| Encapsulation Type | The encapsulation type for the specified interface. The types are: Ethernet or SNAP. |
| IP MTU | The maximum transmission unit (MTU) size of a frame, in bytes. |
| Bandwidth | Shows the bandwidth of the interface. |
| Destination Unreachables | Displays whether ICMP Destination Unreachables may be sent (enabled or disabled). |
| ICMP Redirects | Displays whether ICMP Redirects may be sent (enabled or disabled). |
| DHCP Client Identifier | The client identifier is displayed in the output of the command only if DHCP is enabled with the client-id option on the in-band interface. See the ip address dhcp command. |
Command example:
(NETGEAR Switch) #show ip interface 1/0/2
Routing Interface Status....................... Down
Primary IP Address............................. 1.2.3.4/255.255.255.0
Method......................................... Manual
Secondary IP Address(es)....................... 21.2.3.4/255.255.255.0
............................................... 22.2.3.4/255.255.255.0
Helper IP Address.............................. 1.2.3.4
............................................... 1.2.3.5
Routing Mode................................... Disable
Administrative Mode............................ Enable
Forward Net Directed Broadcasts................ Disable
Proxy ARP...................................... Enable
Local Proxy ARP................................ Disable
Active State................................... Inactive
Link Speed Data Rate........................... Inactive
MAC Address.................................... 00:10:18:82:0C:68
Encapsulation Type............................. Ethernet
IP MTU......................................... 1500
Bandwidth...................................... 100000 kbps
Destination Unreachables....................... Enabled
ICMP Redirects................................. Enabled
Command example:
The following example enables the DHCP client on a VLAN routing interface:
(NETGEAR Switch) #show ip interface vlan 10
Routing Interface Status................. Up
Method................................... DHCP
Routing Mode............................. Enable
Administrative Mode...................... Enable
Forward Net Directed Broadcasts.......... Disable
Active State............................. Inactive
Link Speed Data Rate..................... 10 Half
MAC address.............................. 00:10:18:82:16:0E
Encapsulation Type....................... Ethernet
IP MTU................................... 1500
Bandwidth................................ 10000 kbps
Destination Unreachables................. Enabled
ICMP Redirects........................... Enabled
Interface Suppress Status................ Unsuppressed
DHCP Client Identifier................... 0NETGEAR-0010.1882.160E-vl10
show ip interface brief
M4250
M4350
This command displays summary information about IP configuration settings for all ports on the switch, and indicates how each IP address was assigned.
| Format | show ip interface brief |
| Modes |
Privileged EXEC User EXEC |
| Term | Definition |
|---|---|
| Interface | Valid unit and port number separated by a forward slash. |
| State | Routing operational state of the interface. |
| IP Address | The IP address of the routing interface in 32-bit dotted decimal format. |
| IP Mask | The IP mask of the routing interface in 32-bit dotted decimal format. |
| Method |
Indicates how each IP address was assigned. The field contains one of the following values:
|
Command example:
(alpha1) #show ip interface brief
Interface State IP Address IP Mask Method
---------- ----- --------------- --------------- --------
1/0/17 Up 192.168.75.1 255.255.255.0 DHCP
show ip load-sharing
M4250
M4350
This command displays the configured IP ECMP load balancing mode.
| Format | show ip load-sharing |
| Mode | Privileged EXEC |
Command example:
(NETGEAR Switch) #show ip load-sharing
ip load-sharing 6 inner
show ip protocols
M4250
M4350
This command lists a summary of the configuration and status for each unicast routing protocol that is running. The command lists routing protocols that are configured and enabled. If you specify a protocol, the command output is limited to the protocol.
| Format | show ip protocols [rip] |
| Mode | Privileged EXEC |
| Term | Description |
|---|---|
| RIP Admin Mode | Whether RIP is globally enabled. |
| Split Horizon Mode | Whether RIP advertises routes on the interface on which the routes are received. |
| Default Metric | The metric assigned to redistributed routes. |
| Default Route Advertise | Whether the switch is originating a default route. |
| Distance | The administrative distance for RIP routes. |
| Redistribution | A table showing information for each source protocol (connected and static). For each of these sources, the distribution list and metric are shown. Fields that are not configured are left blank. |
| Interface | The interfaces on which RIP is enabled and the version that is sent and accepted on each interface. |
Command example:
Routing Protocol.......................... RIP
RIP Admin Mode............................ Enable
Split Horizon Mode........................ Simple
Default Metric............................ Not configured
Default Route Advertise................... Disable
Distance.................................. 120
Redistribution:
Source Metric Dist List Match
--------- ------ --------- --------------------------------------
connected 6
static 10 15
Interface Send Recv
--------- ---- ----
0/25 RIPv2 RIPv2
show ip route
M4250
M4350
This command displays the routing table. The ip-address specifies the network for which the route is to be displayed and displays the best matching best-route for the address. The mask specifies the subnet mask for the specified ip-address. When you use the longer-prefixes keyword, the ip-address and mask pair becomes the prefix, and the command displays the routes to the addresses that match that prefix. Use the protocol parameter to specify the protocol that installed the routes. The value for protocol can be connected, rip, or static. For an M4350 series switch, ospf is also supported.
Use the optional all parameter to display all routes including best and non-best routes. If you do not use the all parameter, the command displays only the best route.
| Format | show ip route [{ip-address [protocol] | ip-address mask [longer-prefixes] [protocol] | protocol}] [all] |
| Modes |
Privileged EXEC User EXEC |
| Term | Definition |
|---|---|
| Route Codes | The key for the routing protocol codes that might appear in the routing table output. |
The show ip route command displays the routing tables in the following format:
Code IP-Address/Mask [Preference/Metric] via Next-Hop, Route-Timestamp, Interface,
Truncated
The columns for the routing table display the following information:
| Term | Definition |
|---|---|
| Code | The codes for the routing protocols that created the routes. |
| Default Gateway | The IP address of the default gateway. When the system does not have a more specific route to a packet's destination, it sends the packet to the default gateway. |
| IP-Address/Mask | The IP-Address and mask of the destination network corresponding to this route. |
| Preference | The administrative distance associated with this route. Routes with low values are preferred over routes with higher values. |
| Metric | The cost associated with this route. |
| via Next-Hop | The outgoing router IP address to use when forwarding traffic to the next router (if any) in the path toward the destination. |
| Route-Timestamp |
The last updated time for dynamic routes. The format of Route-Timestamp will be Days:Hours:Minutes if days > = 1 Hours:Minutes:Seconds if days < 1 |
| Interface | The outgoing router interface to use when forwarding traffic to the next destination. For reject routes, the next hop interface would be Null0 interface. |
| T | A flag appended to a route to indicate that it is an ECMP route, but only one of its next hops has been installed in the forwarding table. The forwarding table may limit the number of ECMP routes or the number of ECMP groups. When an ECMP route cannot be installed because such a limit is reached, the route is installed with a single next hop. Such truncated routes are identified by a T after the interface name. |
To administratively control the traffic destined to a particular network and prevent it from being forwarded through the switch, you can configure a static reject route on the switch. Such traffic would be discarded and the ICMP destination unreachable message is sent back to the source. This is typically used for preventing routing loops.
Command example:
(NETGEAR Switch) #show ip route
Route Codes: R - RIP Derived, C - Connected, S - Static
Default gateway is 1.1.1.2
C 1.1.1.0/24 [0/1] directly connected, 0/11
C 2.2.2.0/24 [0/1] directly connected, 0/1
C 5.5.5.0/24 [0/1] directly connected, 0/5
S 7.0.0.0/8 [1/0] directly connected, Null0
C 11.11.11.0/24 [0/1] directly connected, 0/11
S 12.0.0.0/8 [5/0] directly connected, Null0
S 23.0.0.0/8 [3/0] directly connected, Null0
C 1.1.1.0/24 [0/1] directly connected, 0/11
C 2.2.2.0/24 [0/1] directly connected, 0/1
C 5.5.5.0/24 [0/1] directly connected, 0/5
C 11.11.11.0/24 [0/1] directly connected, 0/11
S 10.3.2.0/24 [1/0] via 1.1.1.2, 0/11
show ip route ecmp-groups
M4250
M4350
This command reports all current ECMP groups in the IPv4 routing table. An ECMP group is a set of two or more next hops used in one or more routes. The groups are numbered arbitrarily from 1 to n. The output indicates the number of next hops in the group and the number of routes that use the set of next hops. The output lists the IPv4 address and outgoing interface of each next hop in each group.
| Format | show ip route ecmp-groups |
| Mode | Privileged EXEC |
Command example:
(NETGEAR Switch) #show ip route ecmp-groups
ECMP Group 1 with 2 next hops (used by 1 route)
172.20.33.100 on interface 2/33
172.20.34.100 on interface 2/34
ECMP Group 2 with 3 next hops (used by 1 route)
172.20.32.100 on interface 2/32
172.20.33.100 on interface 2/33
172.20.34.100 on interface 2/34
ECMP Group 3 with 4 next hops (used by 1 route)
172.20.31.100 on interface 2/31
172.20.32.100 on interface 2/32
172.20.33.100 on interface 2/33
172.20.34.100 on interface 2/34
show ip route hw-failure
M4250
M4350
This command displays the routes that were not added to the hardware because of hash errors or because the table was full.
| Format | show ip route hw-failure |
| Mode | Privileged EXEC |
Command example:
(NETGEAR Switch) #show ip route hw-failure
Route Codes: R - RIP Derived, C - Connected, S - Static
K - Kernel, P - Net Prototype
P 66.6.6.0/24 [1/1] via 9.0.0.2, 01d:22h:15m, 0/1 hw-failure
P 66.6.7.0/24 [1/1] via 9.0.0.2, 01d:22h:15m, 0/1 hw-failure
P 66.6.8.0/24 [1/1] via 9.0.0.2, 01d:22h:15m, 0/1 hw-failure
P 66.6.9.0/24 [1/1] via 9.0.0.2, 01d:22h:15m, 0/1 hw-failure
show ip route kernel
M4250
M4350
A kernel route is a special route that can be configured into the Linux kernel, for example, through the Linux shell. The command output marks such a route with a K to denote that the route is installed in the kernel.
Use the optional all parameter to display all routes including best and nonbest routes. If you do not use the all parameter, the command displays only the best route.
| Format | show ip route kernel [all] |
| Mode | Privileged EXEC |
Command example:
(NETGEAR Switch) #show ip route kernel
Route Codes: C - Connected, S - Static R - RIP Derived
K - Kernel, P - Net Prototype
Default Gateway(s): 172.26.2.1
show ip route net-prototype
M4250
M4350
This command displays the net prototype routes. The output of the command displays the net prototype routes with a P.
| Format | show ip route net-p |
| Mode | Privileged EXEC |
Command example:
(NETGEAR Switch) #show ip route net-prototype
Route Codes: R - RIP Derived, C - Connected, S - Static,
K - Kernel, P - Net Prototype
P 56.6.6.0/24 [1/1] via 9.0.0.2, 01d:22h:15m, 0/1
P 56.6.7.0/24 [1/1] via 9.0.0.2, 01d:22h:15m, 0/1
show ip route summary
M4250
M4350
This command displays a summary of the state of the routing table. When the optional all keyword is specified, some statistics, such as the number of routes from each source, include counts for alternate routes. An alternate route is a route that is not the most preferred route to its destination and therefore is not installed in the forwarding table. To include only the number of best routes, do not use the optional keyword.
| Format | show ip route summary [all] |
| Modes |
Privileged EXEC User EXEC |
| Term | Definition |
|---|---|
| Connected Routes | The total number of connected routes in the routing table. |
| Static Routes | Total number of static routes in the routing table. |
| RIP Routes | Total number of routes installed by RIP protocol. |
| Reject Routes | Total number of reject routes installed by all protocols. |
| Net Prototype Routes | The number of net prototype routes. |
| Total Routes | Total number of routes in the routing table. |
| Best Routes (High) | The number of best routes currently in the routing table. This number only counts the best route to each destination. The value in parentheses indicates the highest count of unique best routes since counters were last cleared. |
| Alternate Routes | The number of alternate routes currently in the routing table. An alternate route is a route that was not selected as the best route to its destination. |
| Route Adds | The number of routes that have been added to the routing table. |
| Route Modifies | The number of routes that have been changed after they were initially added to the routing table. |
| Route Deletes | The number of routes that have been deleted from the routing table. |
| Unresolved Route Adds | The number of route adds that failed because none of the route’s next hops were on a local subnet. Note that static routes can fail to be added to the routing table at startup because the routing interfaces are not yet up. In such a situation, the counter is incremented. The static routes are added to the routing table when the routing interfaces come up. |
| Invalid Route Adds | The number of routes that failed to be added to the routing table because the route was invalid. A log message is written for each of these failures. |
| Failed Route Adds | The number of routes that failed to be added to the routing table because of a resource limitation in the routing table. |
| Hardware Failed Route Adds | The number of routes that failed to be inserted into the hardware because of a hash error or a table-full condition. |
| Reserved Locals | The number of routing table entries reserved for a local subnet on a routing interface that is down. Space for local routes is always reserved so that local routes can be installed when a routing interface bounces. |
| Unique Next Hops (High) | The number of distinct next hops used among all routes currently in the routing table. These include local interfaces for local routes and neighbors for indirect routes. The value in parentheses indicates the highest count of unique next hops since counters were last cleared. |
| Next Hop Groups (High) | The current number of next hop groups in use by one or more routes. Each next hop group includes one or more next hops. The value in parentheses indicates the highest count of next hop groups since counters were last cleared. |
| ECMP Groups (High) | The number of next hop groups with multiple next hops. The value in parentheses indicates the highest count of next hop groups since counters were last cleared. |
| ECMP Groups | The number of next hop groups with multiple next hops. |
| ECMP Routes | The number of routes with multiple next hops currently in the routing table. |
| Truncated ECMP Routes | The number of ECMP routes that are currently installed in the forwarding table with just one next hop. The forwarding table may limit the number of ECMP routes or the number of ECMP groups. When an ECMP route cannot be installed because such a limit is reached, the route is installed with a single next hop. |
| ECMP Retries | The number of ECMP routes that have been installed in the forwarding table after initially being installed with a single next hop. |
| Routes with n Next Hops | The current number of routes with each number of next hops. |
Command example:
(NETGEAR Switch) #show ip route summary
Connected Routes............................... 7
Static Routes.................................. 1
RIP Routes..................................... 20
Reject Routes.................................. 0
Total routes................................... 1032
Best Routes (High)............................. 1032 (1032)
Alternate Routes............................... 0
Route Adds..................................... 1010
Route Modifies................................. 1
Route Deletes.................................. 10
Unresolved Route Adds.......................... 0
Invalid Route Adds............................. 0
Failed Route Adds.............................. 0
Reserved Locals................................ 0
Unique Next Hops (High)........................ 13 (13)
Next Hop Groups (High)......................... 13 (14)
ECMP Groups (High)............................. 2 (3)
ECMP Routes.................................... 1001
Truncated ECMP Routes.......................... 0
ECMP Retries................................... 0
Routes with 1 Next Hop......................... 31
Routes with 2 Next Hops........................ 1
Routes with 4 Next Hops........................ 1000
clear ip route (M4250 series switch)
M4250
This command lets you reset the IPv4 routing table counters or remove various types of routes in the IPv4 routing table.
| Format | clear ip route {all | counters | rip [ip-address subnet-mask [interface slot/port]]} |
| Mode | Privileged EXEC |
| Term | Definition |
|---|---|
| all | Removes all dynamic routes from the IPv4 routing table. Static routes are not removed. |
| counters | The command resets the IPv4 routing table counters to zero. These are the IPv4 routing table counters that display in the output of the show ip route summary command (see show ip route summary). The command resets event counters only. Counters that display in the current state of the routing table, such as the number of routes of each type, are not reset. |
| rip | Removes all RIP routes from the IPv4 routing table. By using the ip-address and subnet-mask parameters you can remove specific RIP routes. In addition, you can remove specific RIP routes from specific next hop interfaces by using the interface option and slot/port parameter. |
clear ip route (M4350 series switch)
M4350
This command lets you reset the IPv4 routing table counters or remove various types of routes in the IPv4 routing table.
| Format | clear ip route {all | counters | ospf [ip-address subnet-mask [interface unit/slot/port]] | rip [ip-address subnet-mask [interface unit/slot/port]]} |
| Mode | Privileged EXEC |
| Term | Definition |
|---|---|
| all | Removes all dynamic routes from the IPv4 routing table. Static routes are not removed. |
| counters | The command resets the IPv4 routing table counters to zero. These are the IPv4 routing table counters that display in the output of the show ip route summary command (see show ip route summary). The command resets event counters only. Counters that display in the current state of the routing table, such as the number of routes of each type, are not reset. |
| ospf | Removes all OSPF routes from the IPv4 routing table. By using the ip-address and subnet-mask parameters you can remove specific OSPF routes. In addition, you can remove specific OSPF routes from specific next hop interfaces by using the interface option and unit/slot/port parameter. |
| rip | Removes all RIP routes from the IPv4 routing table. By using the ip-address and subnet-mask parameters you can remove specific RIP routes. In addition, you can remove specific RIP routes from specific next hop interfaces by using the interface option and unit/slot/port parameter. |
show ip route preferences
M4250
M4350
This command displays detailed information about the route preferences for each type of route. Route preferences are used in determining the best route. Lower router preference values are preferred over higher router preference values. A route with a preference of 255 cannot be used to forward traffic.
| Format | show ip route preferences |
| Modes |
Privileged EXEC User EXEC |
| Term | Definition |
|---|---|
| Local | The local route preference value. |
| Static | The static route preference value. |
| RIP | The RIP route preference value. |
| Configured Default Gateway | The route preference value of the statically-configured default gateway. |
| DHCP Default Gateway | The route preference value of the default gateway learned from the DHCP server. |
Command example:
(NETGEAR Switch) #show ip route preferences
Local.......................................... 0
Static......................................... 1
RIP............................................ 120
Configured Default Gateway..................... 253
DHCP Default Gateway........................... 254
show ip prefix-list
M4250
M4350
This command displays configuration and status for a specific IPv4 prefix list.
| Format | show ip prefix-list {listname [prefix/length [longer | first-match]] | listname seq 1-4294967294 | detail [listname]| summary [listname]} |
| Mode | Privileged EXEC |
| Parameter | Description |
|---|---|
| listname | The name of the prefix list. |
| prefix-length | The IPv4 network number and length (in bits) of the network mask in the a.b.c.d/len format. |
| first-match | Displays the entry of a prefix list that matches the specified network and length. |
| longer | Displays all entries of a prefix list that are more specific than the specified network and length. |
| seq sequence-number | The sequence number for the prefix list. |
| detail | Displays detailed information about all prefix lists. |
| summary | Displays summarized information about all prefix lists. |
The command output includes the following information.
| Field | Description |
|---|---|
| Count | The number of entries in the prefix list. |
| Range Entries | The number of entries that match the input range. |
| Ref Count | The number of entries that reference the prefix list. |
| Seq | The sequence number of the entry in the prefix list. |
| Permit/Deny | The permit or deny action that is taken. |
| Sequences | The range of sequence numbers for the entries in the prefix list. |
| Hit Count | The number of matches for the prefix list. |
Command example:
(NETGEAR Switch)#show ipv6 prefix-list fred
(Routing) #show ip prefix-list fred
ip prefix-list fred:
count: 3, range entries: 3, sequences: 5 - 15, refcount: 0
seq 5 permit 10.10.1.1/20 ge 22
seq 10 permit 10.10.1.2/20 le 30
seq 15 permit 10.10.1.2/20 ge 29 le 30
Command example:
(NETGEAR Switch)#show ip prefix-list summary fred
ip prefix-list fred:
count: 3, range entries: 3, sequences: 5 - 15, refcount: 0
Command example:
(NETGEAR Switch)#show ip prefix-list detail fred
ip prefix-list fred:
count: 3, range entries: 3, sequences: 5 - 15, refcount: 0
seq 5 permit 10.10.1.1/20 ge 22 (hitcount: 0)
seq 10 permit 10.10.1.2/20 le 30 (hitcount: 0)
seq 15 permit 10.10.1.2/20 ge 29 le 30 (hitcount: 0)
show ip stats
M4250
M4350
This command displays IP statistical information. Refer to RFC 1213 for more information about the fields that are displayed.
| Format | show ip stats |
| Modes |
Privileged EXEC User EXEC |
show routing heap summary
M4250
M4350
This command displays a summary of the memory allocation from the routing heap. The routing heap is a chunk of memory set aside when the system boots for use by the routing applications.
| Format | show routing heap summary |
| Mode | Privileged EXEC |
| Parameter | Description |
|---|---|
| Heap Size | The amount of memory, in bytes, allocated at startup for the routing heap. |
| Memory In Use | The number of bytes currently allocated. |
| Memory on Free List | The number of bytes currently on the free list. When a chunk of memory from the routing heap is freed, it is placed on a free list for future reuse. |
| Memory Available in Heap | The number of bytes in the original heap that have never been allocated. |
| In Use High Water Mark | The maximum memory in use since the system last rebooted. |
Command example:
(NETGEAR Switch) #show routing heap summary
Heap Size....................... 95053184
Memory In Use................... 56998
Memory on Free List............. 47
Memory Available in Heap........ 94996170
In Use High Water Mark.......... 57045