The Network [Network Address] [Subnet Mask] Cisco command

The Cisco 'network [network address] [subnet mask]' command is a powerful tool used to configure IP addresses and subnet masks on Cisco networking equipment. It is commonly employed in various network configurations, including router-to-router connections, router-to-end-device connections, and inter-VLAN routing.

Command Format:

How the Command Works:

Upon issuing the 'network' command, the following actions are performed:

  1. The Cisco device examines the specified network address and subnet mask.
  2. It calculates the network range based on the network address and subnet mask.
  3. The device then assigns the calculated network range to the configured interface.
  4. The interface is configured with an IP address within the assigned network range.

Usage Scenarios:

The 'network' command is commonly utilized in the following situations:

  1. Configuring IP Addresses on Interfaces: Assigning IP addresses and subnet masks to interfaces on Cisco routers and switches.
  2. Creating Subnets: Dividing a network into smaller subnets, each with its own IP address range.
  3. Configuring Inter-VLAN Routing: Establishing IP connectivity between different VLANs within a network.
  4. Configuring Router-to-Router Links: Setting up IP addresses and subnet masks on router interfaces to facilitate communication between routers.

Supported Equipment:

The 'network' command is supported on a wide range of Cisco networking devices, including:

  1. Routers: Cisco routers of various models and generations, such as the Cisco 1941, 2901, and 3945 series.
  2. Switches: Cisco Catalyst switches, including the Cisco Catalyst 2960, 3750, and 4500 series.
  3. Firewalls: Cisco ASA and ISR firewalls.

Command Variations:

The 'network' command has several variations depending on the specific requirements:

  1. IPv4 vs. IPv6: The command syntax differs for configuring IPv4 and IPv6 addresses.
  2. Static vs. Dynamic IP Addresses: The command can be used to configure both static IP addresses (manually assigned) and dynamic IP addresses (assigned through DHCP).
  3. Named vs. Numeric Addresses: The command allows configuring IP addresses using both numeric (e.g., 10.1.1.1) and named addresses (e.g., webserver1).

Summary:

The 'network [network address] [subnet mask]' command is a vital tool in Cisco networking, enabling the assignment of IP addresses and subnet masks to interfaces on routers and switches. Its flexibility and wide range of applications make it essential for network configuration and management tasks.

network [network address] [subnet mask] Usage Examples

  1. Configure a Network Address:

    • Syntax: network 192.168.1.0 255.255.255.0

    • Description: Configures the IP address and subnet mask for a network.

    • Example: Configures the IP address 192.168.1.0 with a subnet mask of 255.255.255.0.

  1. Assign an IP Address to an Interface:

    • Syntax: network 192.168.1.0 255.255.255.0 interface GigabitEthernet0/1

    • Description: Configures an IP address and subnet mask for a specific interface.

    • Example: Assigns the IP address 192.168.1.2 to the GigabitEthernet0/1 interface.

  1. Add a Secondary IP Address to an Interface:

    • Syntax: network 192.168.2.0 255.255.255.0 secondary

    • Description: Adds a secondary IP address and subnet mask to an interface.

    • Example: Adds the secondary IP address 192.168.2.1 to the GigabitEthernet0/1 interface.

  1. Remove a Secondary IP Address from an Interface:

    • Syntax: no network 192.168.2.0 255.255.255.0 secondary

    • Description: Removes a secondary IP address and subnet mask from an interface.

    • Example: Removes the secondary IP address 192.168.2.1 from the GigabitEthernet0/1 interface.

  1. Display Network Information:

    • Syntax: show ip interface brief

    • Description: Displays a summary of IP interface information, including IP addresses and subnet masks.

  1. Display Detailed Network Information:

    • Syntax: show ip interface

    • Description: Displays detailed IP interface information, including IP addresses, subnet masks, and other interface-related information.

  1. Verify Network Configuration:

    • Syntax: ping [IP address]

    • Description: Sends an ICMP echo request to a specified IP address to verify network connectivity.

    • Example: Verifies connectivity to the IP address 192.168.1.1.