Configuration commands

Use these M4500 CLI commands to enable IP routing on the switch and interfaces, configure IP addresses, static routes, load sharing, and IP MTU.

routing

This command enables routing for an interface.

Default Disable
Format

routing

no routing

Mode Interface Config
Fields Definition
no Disable routing for an interface.

ip routing

This command enables the IP Router Admin Mode for the master switch.

Default Disable
Format

ip routing

no ip routing

Mode Global Config
Fields Definition
no Disable the IP Router Admin Mode for the master switch.

ip address

This command configures an IP address on an interface. The IP address may be a secondary IP address.

Default None
Format

ip address <ipaddr> {<subnet-mask> | <prefix-lengh>} [secondary]

no ip address <ipaddr> <subnet-mask> [secondary]

Mode Interface Config
Fields Definition
<ipaddr> IP address of the interface.
<subnet-mask> Subnet mask of the interface.
<prefix-lengh> Implements RFC 3021 via using the / notation of the subnet mask. This integer indicates the length of the subnet mask. Range is from 1 to 31.
[secondary] It is a secondary IP address.
no Delete an IP address from an interface.

ip address dhcp

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 (DHCP Option 61), use the ip address dhcp client-id command in interface configuration mode.

Default Disable
Format

ip address dhcp [{restart | client-id}]

no ip address dhcp [client-id]

Mode Interface Config
Fields Definition
[restart] To restart the DHCPv4 client to acquire an IP Address from DHCP server.
[client-id] To send the DHCPv4 messages with the DHCP client identifier.
no This command releases a leased address and disables DHCPv4 on an interface.

ip default-gateway

This command manually configures a global default gateway address. Only one default gateway can be configured. If you invoke this commands several times, each command replaces the previous configuration.

Default None
Format

ip default-gateway <ipaddr>

no ip default-gateway

Mode Global Config
Fields Definition
<ipaddr> A valid IPv4 address.
no Remove the default gateway address from the configuration.

ip load-sharing

This command manually configures the IP ECMP load balancing mode.

Default 6 inner
Format

ip load-sharing <1-6> {inner | outer}

no ip load-sharing

Mode Global Config
Fields Definition
<1 - 6>

The load balancing or sharing mode for all ECMP groups.

1: Based on a hash using the Source IP address of the packet. 2: Based on a hash using the Destination IP address of the packet. 3: Based on a hash using the Source and Destination IP addresses of the

packet.

4: Based on a hash using the Source IP address and the Source TCP/UDP Port

field of the packet.

5: Based on a hash using the Destination IP address and the Destination

TCP/UDP Port field of the packet.

6: Based on a hash using the Source and Destination IP address, and the

Source and Destination TCP/UDP Port fields of the packet.

no Reset the load balancing or sharing mode to the defaulte mode, 6.

ip route

This command configures a static route. Use the optional vrf parameter to configure the static route in the specified virtual router instance.

Default None
Format

ip route [vrf <vrf-name>] <networkaddr> <subnetmask> {<nexthopip> | Null0 | interface {<slot/port> | vlan <vlan-id>} [<nexthopip>]} [ [<1-255 >] [description <description>]

no ip route <networkaddr> <subnetmask> [{{<nexthopip> [<1-255 > | description]} | {Null0 [<1-255 > | description]}}]

Mode Global Config
Fields Definition
<vrf-name> Specify the name of the VRF in which this static route is installed.
<networkaddr> A valid IP address.
<subnetmask> A valid subnet mask.
<nexthopip> IP address of the next hop router.
<vlan-id> The VLAN ID used for this interface. The range of the VLAN ID is from 1 to 4093.
<1-255> The preference value of this route. The range is 1 to 255.
<description> The description for the route.
Null0 Null interface.
no Delete all next hops to a destination static route. If the optional <nextHopRtr> parameter is designated, the next hop is deleted and if the optional preference value is designated, the preference value of the static route is reset to its default value, 1.

ip route default

This command configures the default route. Use the optional vrf parameter to configure the static route in the specified virtual router instance.

Format ip route [vrf <vrf-name>] default <nexthopip> [1-255]

no ip route [vrf <vrf-name>] default [{<nexthopip> | <1-255>}]

Fields Definition
vrf-name Specify the name of the VRF in which this static route is installed.
<nexthopip> IP address of the next hop router.
<1-255> Precedence value of this route.
Default None
Mode Global Config

ip route distance

This command sets the default distance (preference) for static routes. Use the optional vrf parameter to configure the default distance (preference) for static routes in the specified virtual router instance.

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.

Format ip route [vrf <vrf-name>] distance <1-255>

no ip route [vrf <vrf-name>] distance

Fields Definition
vrf-name Specify the name of the VRF in which this static route is installed.
<1-255> Default the Distance value of static routes. The range is 1 to 255.
Default The default preference value is 1
Mode Global Config

ip route static bfd

This command configures the BFD for static route. To remove the BFD for static route, use no form of this command.

The switch BFD supports single-hop mode and multiple-hop mode.

Depending on status of the BFD session, static routes are added to or removed from the IP routing table. When a BFD session with a specific next hop goes down, all the static routes with the same next hop will be removed from the IP routing table. Once the BFD session comes up, all the static routes with the same next hop will be added into the IP routing table.

Default None
Format

ip route static bfd <next-hop-ip-addr> <src-ip-addr>

no ip route static bfd <nexthopip> <srcip>

Mode Global Config
Fields Definition
<nexthopip> IP address of the next hop router.
<srcip> Local IP address of static route for BFD. This IP address must be one of the interface IP address.

ip route vrf static bfd

This command configures the BFD for static route with specific VRF. To remove the BFD for static route with specific VRF, use no form of this command.

Default None
Format

ip route vrf <vrf-name> static bfd <next-hop-ip-addr> <src-ip-addr>

no ip route vrf <vrf-name> static bfd <nexthopip> <srcip>

Mode Global Config
Fields Definition
<vrf-name> VRF Name in which the the static route is configured
<nexthopip> IP address of the next hop router.
<srcip> Local IP address of static route for BFD.

ip mtu

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.

Packets originated on the router, such as OSPF packets, may be fragmented by the IP stack.

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. (unless OSPF has been instructed to ignore differences in IP MTU with the ip ospf mtu-ignore command.)

Default The default value is 1500.
Format

ip mtu <68-9394>

no ip mtu

Mode Interface Config
Fields Definition
<68-9394> The IP MTU on a routing interface. The range is 68 bytes to the <Interface MTU value-18> bytes.

ip unnumbered gratuitous-arp accept

This command enables the configuration of static interface routes to the unnumbered peer dynamically on receiving gratuitous ARP.

Default Interface route installation for receiving gratuitous ARP is enabled by default.
Format

ip unnumbered gratuitous-arp accept

no ip unnumbered gratuitous-arp accept

Mode Interface Config
Fields Definition
no Disable interface route configuration on receiving gratuitous ARP.

ip unnumbered loopback

This command identifies unnumbered interfaces and specifies the numbered interface providing the borrowed address.

Default Interface are numbered by default.
Format

ip unnumbered loopback <0-63>

no ip unnumbered

Mode Interface Config
Fields Definition
<0-63> The loopback interface number. The loopback interface provides the borrowed address and cannot be unnumbered.
no Removes the unnumbered configuration.

encapsulation

This command configures the link layer encapsulation type for the packet.

Default The default value is ethernet.
Format encapsulation {ethernet | snap}
Mode Interface Config
Restrictions Routed frames are always Ethernet encapsulated when a frame is routed to a VLAN.
Fields Definition
ethernet The link layer encapsulation type is ethernet.
snap The link layer encapsulation type is SNAP.

fpti

Use this command to enable FPTI mode either globally (in Global Config mode) or for a specific interface (in Interface Config mode).

Format fpti

no fpti

Default Enabled
Mode Global Config

Interface Config