Network Commands
Use these M4500 CLI commands to configure the in-band network interface IP address, gateway, DHCP, MTU, and management IP filters, and display network settings.
show ip interface
This command displays configuration settings associated with the switch's network interface. The network interface is the logical interface used for in-band connectivity with the switch via any of the switch's front panel ports. The configuration parameters associated with the switch's network interface do not affect the configuration of the front panel ports through which traffic is switched or routed.
| Default | None |
| Format | show ip interface |
| Mode | Privileged Exec |
Display Message
| Parameter | Definition |
|---|---|
| VLAN ID | Indicates whether the VLAN ID is used for this vlan interface. |
| Interface Status | Indicates whether the interface is up or down. |
| IP Address | The IP address of the interface. The factory default value is 0.0.0.0 |
| Subnet Mask | The IP subnet mask for this interface. The factory default value is 0.0.0.0 |
| MAC Address | The MAC address used for in-band connectivity. |
| Network Configuration Protocol Current | Indicates which network protocol is being used. The options are bootp | dhcp | none. |
show ip filter
This command displays management IP filter status and all designated management stations.
| Default | None |
| Format | show ip filter |
| Mode | Privileged Exec |
mtu
Use the mtu command to set the maximum transmission unit(MTU) size, in bytes, for frames that ingress or egress the interface. You can use the mtu command to configure jumbo frame support for physical and port-channel(LAG) interfaces.
| Default | 1518 (untagged) |
| Format | mtu <1518-9412> |
| Mode | Interface Config |
no mtu
This command sets the default MTU size(in bytes) for the interface.
| Format | no mtu |
| Mode | Interface Config |
interface vlan
This command is used to create a vlan interface and enter Interface-vlan configuration mode.
| Default | None |
| Format | interface vlan <vlan-id> |
| Mode | Global Config |
| Parameter | Definition |
|---|---|
| <vlan-id> | VLAN ID (Range: 1 - 4093). |
ip address
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".
| Default |
IP address: 0.0.0.0 Subnet Mask: 0.0.0.0 |
| Format | ip address <ipaddr> {subnetmask | /prefix-length} [secondary] |
| Mode | Interface-Vlan Config |
| Parameter | Definition |
|---|---|
| ipaddr | The IP address of the interface. |
| subnetmask | A 4-digit dotted-decimal number which represents the subnet mask of the interface. |
| masklen | Implements RFC 3021. Using the/notation of the subnet mask, this is and integer that indicates the length of subnet mask. Range is 5 to 32 bits. |
Example: The following example of the command shows the configuration of the subnet mask with an IP address in the dotted decimal format on interface vlan 100.
(M4500-32C) (if-vlan100)#ip address 192.168.10.2 255.255.255.254
(M4500-32C) (if-vlan100)#
no ip addess
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-Vlan Config |
ip default-gateway
This command sets the IP Address of the default gateway.
| Default | IP address: 0.0.0.0 |
| Format |
|
| Mode | Global Config |
| Parameter | Definition |
|---|---|
| < gateway-addr > | IP address of the default gateway. |
| no | Restore the default IP address of the default gateway. |
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.
| Default | None |
| Format | ip address dhcp [{client-id | restart}] |
| Mode | Interface Config |
| Parameter | Definition |
|---|---|
| client-id | Enable the DHCP client to specify the unique client identifier (option 61). |
| restart | Restarts the DHCP process. |
no ip address dhcp
Use this command to release a leased address and disable DHCPv4 on an interface.
| Format | no ip address dhcp [client-id] |
| Mode | Interface Config |
ip filter
This command is used to enable the IP filter function.
| Default | Disabled |
| Format | ip filter |
| Mode | Global Config |
no ip filter
Disable ip filter.
| Format | no ip filter |
| Mode | Global Config |
ip filter <name> {ipv4|ipv6}<ipAddr>[<mask>]
This command is used to set an IP address to be a filter.
| Default | None |
| Format |
|
| Mode | Global Config |
| Parameter | Definition |
|---|---|
| <name> | The name of the IP filter. |
| <ipAddr> | Specifies an IP address to the filter. |
| <mask> | Specifies the mask for a range filter. |
| <prefix/length> | Specifies an IPv6 prefix and prefix length. |
no ip filter<name>
Remove this IP address from filter.
| Format | no ip filter <name> |
| Mode | Global Config |