IP configuration

IP configuration features:

Feature Default
IP Address and Subnet Mask DHCP/Bootp
Multiple IP Addresses on a VLAN N/A
Default Gateway Address none
Packet Time-To-Live (TTL) 64 seconds
Time Server (Timep)[a] DHCP
Single Source IP Addressing outgoing IP address

[a] For more on this topic, see the "Time Protocols" chapter in the latest Management and Configuration Guide.

IP address and subnet mask. Configuring the switch with an IP address expands your ability to manage the switch and use its features. By default, the switch is configured to automatically receive IP addressing on the default VLAN from a DHCP/Bootp server that has been configured correctly with information to support the switch. (See DHCP/Bootp operation for information on setting up automatic configuration from a server.) However, if you are not using a DHCP/Bootp server to configure IP addressing, use the menu interface or the CLI to manually configure the initial IP values. After you have network access to a device, you can use the WebAgent to modify the initial IP configuration if needed.

For information on how IP addressing affects switch operation, See How IP addressing affects switch operation.

Multinetting: assigning multiple IP addresses to a VLAN. For a given VLAN you can assign up to 32 IP addresses. This allows you to combine two or more subnets on the same VLAN, which enables devices in the combined subnets to communicate normally through the network without needing to reconfigure the IP addressing in any of the combined subnets.

Default gateway operation. The default gateway is required when a router is needed for tasks such as reaching off-subnet destinations or forwarding traffic across multiple VLANs. The gateway value is the IP address of the next-hop gateway node for the switch, which is used if the requested destination address is not on a local subnet/VLAN. If the switch does not have a manually-configured default gateway and DHCP/Bootp is configured on the primary VLAN, then the default gateway value provided by the DHCP or Bootp server will be used. If the switch has a manually configured default gateway, then the switch uses his gateway, even if a different gateway is received via DHCP or Bootp on the primary VLAN. This is also true for manually configured TimeP, SNTP, and Time-To-Live(TTL). (In the default configuration, VLAN 1 is the Primary VLAN.)

For more information on Primary VLANs, see the Advanced Traffic Management Guide.

For more information on TimeP and SNTP, see the “Time Protocols” chapter in the Management and Configuration Guide.

Packet Time-To-Live (TTL). This parameter specifies the maximum number of routers (hops) through which a packet can pass before being discarded. Each router decreases a packet’s TTL by 1 before forwarding the packet. If decreasing the TTL causes the TTL to be 0, the router drops the packet instead of forwarding it. In most cases, the default setting (64) is adequate.

Just want a quick start with IP addressing?

If you just want to give the switch an IP address so that it can communicate on your network, or if you are not using VLANs, HP recommends that you use the Switch Setup screen to quickly configure IP addressing. To do so, do one of the following:

  • Enter setup at the CLI Manager level prompt.

    HP Switch# setup
    
  • Select 8. Run Setup in the Main Menu of the menu interface.

For more on using the Switch Setup screen, See the Installation and Getting Started Guide you received with the switch.

IP addressing with multiple VLANs

In the factory-default configuration, the switch has one, permanent default VLAN (named DEFAULT_VLAN) that includes all ports on the switch. Thus, when only the default VLAN exists in the switch, if you assign an IP address and subnet mask to the switch, you are actually assigning the IP addressing to the DEFAULT_VLAN.


[NOTE: ]

NOTE:

  • If multiple VLANs are configured, then each VLAN can have its own IP address. This is because each VLAN operates as a separate broadcast domain and requires a unique IP address and subnet mask. A default gateway (IP) address for the switch is optional, but recommended.

  • In the factory-default configuration, the default VLAN (named DEFAULT_VLAN) is the switch’s primary VLAN. The switch uses the primary VLAN for learning the default gateway address. The switch can also learn other settings from a DHCP or Bootp server, such as (packet) Time-To-Live (TTL), and Timep or SNMP settings. (Other VLANs can also use DHCP or BootP to acquire IP addressing. However, the switch’s gateway, TTL, and TimeP or SNTP values, which are applied globally, and not per-VLAN, will be acquired through the primary VLAN only, unless manually set by using the CLI, Menu, or WebAgent. (If these parameters are manually set, they will not be overwritten by alternate values received from a DHCP or Bootp server.) For more on VLANs, see the chapter titled “Static Virtual LANs” in the Advanced Traffic Management Guide for your switch.

  • The IP addressing used in the switch should be compatible with your network. That is, the IP address must be unique and the subnet mask must be appropriate for your IP network.

  • If you change the IP address through either Telnet access or the WebAgent, the connection to the switch will be lost. You can reconnect by either restarting Telnet with the new IP address or entering the new address as the URL in your web browser.




Menu: configuring IP address, Gateway, and Time-To-Live (TTL)

Do one of the following:

  • To manually enter an IP address, subnet mask, set the IP Config parameter to Manual and then manually enter the IP address and subnet mask values you want for the switch.

  • To use DHCP or Bootp, use the menu interface to ensure that the IP Config parameter is set to DHCP/Bootp, then seeDHCP/Bootp operation.

To configure IP addressing.

  1. From the Main Menu, select:

    
    
     2. Switch Configuration...
    
          5. IP Configuration
    
    
    

    [NOTE: ]

    NOTE: If multiple VLANs are configured, a screen showing all VLANs appears instead of the following screen.

    The Menu interface displays the IP address for any VLAN. If you use the CLI to configure the IP address on a VLAN, use the CLI show ip command to list them.


  2. Press [E] (for Edit).

  3. If the switch needs to access a router, for example, to reach off-subnet destinations, select the Default Gateway field and enter the IP address of the gateway router.

  4. If you need to change the packet Time-To-Live (TTL) setting, select Default TTL and type in a value between 2 and 255.

  5. To configure IP addressing, select IP Config and do one of the following:

    • If you want to have the switch retrieve its IP configuration from a DHCP or Bootp server, at the IP Config field, keep the value as DHCP/ Bootp and go to step 8.

    • If you want to manually configure the IP information, use the Space bar to select Manual and use the [Tab] key to move to the other IP configuration fields.

  6. Select the IP Address field and enter the IP address for the switch.

  7. Select the Subnet Mask field and enter the subnet mask for the IP address.

  8. Press [Enter], then [S] (for Save).

CLI: Configuring IP Address, Gateway, and Time-To-Live (TTL)

Viewing the current IP configuration.

Syntax

show ip

This command displays the IP addressing for each VLAN configured in the switch. If only the DEFAULT_VLAN exists, then its IP configuration applies to all ports in the switch. Where multiple VLANs are configured, the IP addressing is listed per VLAN. The display includes switch-wide packet time-to-live, and (if configured) the switch’s default gateway and Timep configuration.

(You can also use theshow management command to display the IP addressing and time server IP addressing configured on the switch. See the Management and Configuration Guide for your switch.)

For example, in the factory-default configuration (no IP addressing assigned), the switch’s IP addressing appears as:

The switch’s default IP addressing

HP Switch> show ip

 Internet (IP) Service

   IP Routing : Disabled

   Default Gateway :
   Default TTL     : 64
   Arp Age         : 20
   Domain Suffix   :
   DNS server      :

                      |                                           Proxy ARP
VLAN                  | IP Config  IP Address      Subnet Mask    Std Local
--------------------- + ---------- --------------- -------------- ----------
DEFAULT_VLAN          | DHCP/Bootp

With multiple VLANs and some other features configured, show ip provides additional information:

Show IP listing with non-default IP addressing configured

HP Switch(config)# show ip

 Internet (IP) Service

   IP Routing : Disabled

   Default Gateway : 10.20.227.1
   Default TTL     : 64
   Arp Age         : 20
   Domain Suffix   :
   DNS server      :

                      |                                           Proxy ARP
VLAN                  | IP Config  IP Address      Subnet Mask    Std Local
--------------------- + ---------- --------------- -------------- ----------
DEFAULT_VLAN          | Manual     10.28.227.101   255.255.248.0   No   No
VLAN22                | Disabled

Configure an IP address and subnet mask. The following command includes both the IP address and the subnet mask. You must either include the ID of the VLAN for which you are configuring IP addressing or go to the context configuration level for that VLAN. (If you are not using VLANs on the switch—that is, if the only VLAN is the default VLAN—then the VLAN ID is always "1".)


[NOTE: ]

NOTE: The default IP address setting for the DEFAULT_VLAN is DHCP/Bootp. On additional VLANs you create, the default IP address setting is disabled.


Syntax

[no] vlan <vlan-id> ip address <ip-address/mask-length>

or

[no] vlan <vlan-id> ip address <ip-address> <mask-bits>

or

vlan <vlan-id> ip address dhcp-bootp

This example configures IP addressing on the default VLAN with the subnet mask specified in mask bits.

HP Switch(config)# vlan 1 ip address 10.28.227.103
255.255.255.0

This example configures the same IP addressing as the preceding example, but specifies the subnet mask by mask length.

HP Switch(config)# vlan 1 ip address 10.28.227.103/24

This example deletes an IP address configured in VLAN 1.

HP Switch (config) no vlan 1 ip address 10.28.227.103/24

Configure multiple IP addresses on a VLAN (multinetting). The following is supported:

  • Up to 2000 IP addresses for the switch

  • Up to 32 IP addresses for the same VLAN

  • Up to 512 IP VLANs, that is, VLANs on which you can configure IP addresses

  • Each IP address on a VLAN must be for a separate subnet, whether on the same VLAN or different VLANs.

Syntax

[no] vlan <vlan-id> ip address <ip-address/mask-length>

[no] vlan <vlan-id> ip address <ip-address> <mask-bits>

For example, if you wanted to multinet VLAN_20 (VID = 20) with the IP addresses shown below, you would perform steps similar to the following. (For this example, assume that the first IP address is already configured.)

IP Address VID IP Address Subnet Mask
1st address 20 10.25.33.101 255.255.240.0
2nd address 20 10.26.33.101 255.255.240.0
3rd address 20 10.27.33.101 255.255.240.0

Configuring and displaying a multinetted VLAN

HP Switch(config)# vlan 20
HP Switch(vlan-20)# ip address 10.26.33.101/20
HP Switch(vlan-20)# ip address 10.27.33.101/20

HP Switch(config)# show ip

 Internet (IP) Service

   IP Routing      : Disabled

   Default Gateway : 10.20.227.1
   Default TTL     : 64
   Arp Age         : 20
   Domain Suffix   : 
   DNS server      :

                       |                                           Proxy ARP
   VLAN                | IP Config  IP Address      Subnet Mask    Std Local
   ------------------- + ---------- --------------- -------------- ----------
   DEFAULT_VLAN        | Manual     10.20.30.100   255.255.240.0   No   No
   VLAN_20             | Manual     10.25.33.101   255.255.240.0   No   No
                       | Manual     10.26.33.101   255.255.240.0   No   No
                       | Manual     10.27.33.101   255.255.240.0   No   No

If you then wanted to multinet the default VLAN, you would do the following:

Multinetting on the default VLAN

HP Switch(vlan-20)# vlan 1
HP Switch(vlan-1)# ip address 10.21.30.100/20

HP Switch(config)# show ip

 Internet (IP) Service

   IP Routing      : Disabled

   Default Gateway : 10.20.227.1
   Default TTL     : 64
   Arp Age         : 20
   Domain Suffix   : 
   DNS server      :

                       |                                           Proxy ARP
   VLAN                | IP Config  IP Address      Subnet Mask    Std Local
   ------------------- + ---------- --------------- -------------- ----------
   DEFAULT_VLAN        | Manual     10.20.30.100   255.255.240.0   No   No
                       | Manual     10.21.30.100   255.255.240.0   No   No
   VLAN_20             | Manual     10.25.33.101   255.255.240.0   No   No
                       | Manual     10.26.33.101   255.255.240.0   No   No
                       | Manual     10.27.33.101   255.255.240.0   No   No

[NOTE: ]

NOTE: The Internet (IP) Service screen in the Menu interface displays the first IP address for each VLAN. You must use the CLIshow ip command to display the full IP address listing for multinetted VLANs.


Removing or replacing IP addresses in a multinetted VLAN. To remove an IP address from a multinetted VLAN, use the no form of the IP address command shown on page “Syntax”. Generally, to replace one IP address with another, you should first remove the address you want to replace, and then enter the new address.

Configure the optional default gateway. Using the Global configuration level, you can manually assign one default gateway to the switch. (The switch does not allow IP addressing received from a DHCP or Bootp server to replace a manually configured default gateway.)

Syntax

ip default-gateway <ip-address>

For example:

HP Switch(config)# ip default-gateway 10.28.227.115

[NOTE: ]

NOTE: The switch uses the IP default gateway only while operating as a Layer 2 device. While routing is enabled on the switch, the IP default gateway is not used. Thus, to avoid loss of Telnet access to off-subnet management stations, you should use theip route command to configure a static (default) route before enabling routing. For more information, See the chapter titled "IP Routing Features" in the Multicast and Routing Guide for your switch.


Configure Time-To-Live (TTL). The maximum number of routers (hops) through which a packet can pass before being discarded. (The default is 64.) Each router decreases a packet’s TTL by 1 before forwarding the packet. If a router decreases the TTL to 0, the router drops the packet instead of forwarding it.

Syntax

ip ttl <number-of-hops>

HP Switch(config)# ip ttl 60

In the CLI, you can execute this command only from the global configuration level. The TTL default is 64, and the range is 2 - 255.

WebAgent: configuring IP addressing

You can use the WebAgent to access IP addressing only if the switch already has an IP address that is reachable through your network.

  1. In the navigation pane, click Home.

  2. Click Quick Setup.

  3. In the Switch Quick Setup Parameters box, click Change.

  4. Enter the IP address and any other information such as the Subnet mask and Gateway.

  5. Click Save to save your changes.

  6. If you need further information on using the WebAgent, click [?] to access the web-based help available for the switch.

How IP addressing affects switch operation

Without an IP address and subnet mask compatible with your network, the switch can be managed only through a direct terminal device connection to the Console RS-232 port. You can use direct-connect console access to take advantage of features that do not depend on IP addressing. However, to realize the full capabilities HP proactive networking offers through the switch, configure the switch with an IP address and subnet mask compatible with your network. The following table lists the general features available with and without a network-compatible IP address configured.

Features available with and without IP addressing on the switch

Features available without an IP Address Additional features available with an IP Address and subnet mask
  • Direct-connect access to the CLI and the menu interface

  • DHCP or Bootp support for automatic IP address configuration, and DHCP support for automatic Timep server IP address configuration

  • Multiple Spanning Tree Protocol

  • Port settings and port trunking

  • Switch meshing

  • Console-based status and counters information for monitoring switch operation and diagnosing problems through the CLI or menu interface

  • VLANs and GVRP

  • Serial downloads of software updates and configuration files (Xmodem)

  • Link test

  • Port monitoring

  • Password authentication

  • Quality of Service (QoS)

  • Authorized IP manager security

  • WebAgent access, with configuration, security, and diagnostic tools, plus the Alert Log for discovering problems detected in the switch along with suggested solutions

  • SNMP network management access such as PCM+ for network configuration, monitoring, problem-finding and reporting, analysis, and recommendations for changes to increase control and uptime

  • TACACS+, RADIUS, SSH, SSL, and 802.1X authentication

  • Multinetting on VLANs

  • Telnet access to the CLI or the menu interface

  • IGMP

  • TimeP and SNTP server configuration[a]

  • TFTP download of configurations and software updates

  • Access Control Lists (ACLs)

  • IP routing, Multicast Routing

  • VRRP router redundancy

  • PIM-DM and PIM-SM

  • Radius

  • Ping test

[a] For more information on TimeP and SNTP, see the “Time Protocols” chapter in the Management and Configuration Guide.

DHCP/Bootp operation

Overview. DHCP/Bootp is used to provide configuration data from a DHCP or Bootp server to the switch. This data can be the IP address, subnet mask, default gateway, Timep Server address, and TFTP server address. If a TFTP server address is provided, this allows the switch to TFTP a previously saved configuration file from the TFTP server to the switch. With either DHCP or Bootp, the servers must be configured prior to the switch being connected to the network.


[NOTE: ]

NOTE: The switches covered in this guide are compatible with both DHCP and Bootp servers.


The DHCP/Bootp process. Whenever the IP Config parameter in differencesthe switch or in an individual VLAN in the switch is configured to DHCP/Bootp (the default), or when the switch is rebooted with this configuration:

  1. DHCP/Bootp requests are automatically broadcast on the local network. (The switch sends one type of request to which either a DHCP or Bootp server can respond.)

  2. When a DHCP or Bootp server receives the request, it replies with a previously configured IP address and subnet mask for the switch. The switch also receives an IP Gateway address if the server has been configured to provide one. In the case of Bootp, the server must first be configured with an entry that has the switch’s MAC address. (To determine the switch’s MAC address, See Appendix D, “MAC Address Management”.) The switch properly handles replies from either type of server. If multiple replies are returned, the switch tries to use the first reply.)


[NOTE: ]

NOTE: If you manually configure default gateway, TTL, TimeP, and/or SNTP parameters on the switch, it ignores any values received for the same parameters via DHCP or Bootp.


If the switch is initially configured for DHCP/Bootp operation (the default), or if it reboots with this configuration, it begins sending request packets on the network. If the switch does not receive a reply to its DHCP/Bootp requests, it continues to periodically send request packets, but with decreasing frequency. Thus, if a DHCP or Bootp server is not available or accessible to the switch when DHCP/Bootp is first configured, the switch may not immediately receive the desired configuration. After verifying that the server has become accessible to the switch, reboot the switch to re-start the process immediately.

DHCP operation. A significant difference between a DHCP configuration and a Bootp configuration is that an IP address assignment from a DHCP server is automatic. Depending on how the DHCP server is configured, the switch may receive an IP address that is temporarily leased. Periodically the switch may be required to renew its lease of the IP configuration. Thus, the IP addressing provided by the server may be different each time the switch reboots or renews its configuration from the server. However, you can fix the address assignment for the switch by doing either of the following:

  • Configure the server to issue an “infinite” lease.

  • Using the switch’s MAC address as an identifier, configure the server with a “Reservation” so that it will always assign the same IP address to the switch. (For MAC address information, See Appendix D, “MAC Address Management”.)

For more information on either of these procedures, See the documentation provided with the DHCP server.

Bootp operation. When a Bootp server receives a request it searches its Bootp database for a record entry that matches the MAC address in the Bootp request from the switch. If a match is found, the configuration data in the associated database record is returned to the switch. For many Unix systems, the Bootp database is contained in the /etc/bootptab file. In contrast to DHCP operation, Bootp configurations are always the same for a specific receiving device. That is, the Bootp server replies to a request with a configuration previously stored in the server and designated for the requesting device.

Bootp Database Record Entries. A minimal entry in the Bootp table file /etc/bootptab to update an IP address and subnet mask to the switch or a VLAN configured in the switch would be similar to this entry:

8212switch:\
   ht=ether:\
   ha=0030c1123456:\
   ip=10.66.77.88:\
   sm=255.255.248.0:\
   gw=10.66.77.1:\
   hn:\
   vm=rfc1048

An entry in the Bootp table file /etc/bootptab to tell the switch or VLAN where to obtain a configuration file download would be similar to this entry:

8212switch:\
    ht=ether:\
    ha=0030c1123456:\
    ip=10.66.77.88:\
    sm=255.255.248.0:\
    gw=10.66.77.1:\
    lg=10.22.33.44:\
    T144="switch.cfg":\
    vm=rfc1048

where:

8212switch is a user-defined symbolic name to help you find the correct section of the bootptab file. If you have multiple switches that will be using Bootp to get their IP configuration, you should use a unique symbolic name for each switch.
ht is the "hardware type". For the switches covered in this guide, enter ether (for Ethernet). This tag must precede the ha tag.
ha is the "hardware address". Use the switch's (or VLAN's) 12-digit MAC address.
ip is the IP address to be assigned to the switch (or VLAN).
sm is the subnet mask of the subnet in which the switch (or VLAN) is installed.
gw is the IP address of the default gateway.
lg TFTP server address (source of final configuration file)
T144 is the vendor-specific "tag" identifying the configuration file to download.
vm is a required entry that specifies the Bootp report format. Use rfc1048 for the switches covered in this guide.

[NOTE: ]

NOTE: The above Bootp table entry is a sample that will work for the switch when the appropriate addresses and file names are used.


Network preparations for configuring DHCP/Bootp

In its default configuration, the switch is configured for DHCP/Bootp operation. However, the DHCP/Bootp feature will not acquire IP addressing for the switch unless the following tasks have already been completed:

  • For Bootp operation

    • A Bootp database record has already been entered into an appropriate Bootp server

    • The necessary network connections are in place

    • The Bootp server is accessible from the switch

  • For DHCP operation

    • A DHCP scope has been configured on the appropriate DHCP server

    • The necessary network connections are in place

    • A DHCP server is accessible from the switch


[NOTE: ]

NOTE: Designating a primary VLAN other than the default VLAN affects the switch’s use of information received via DHCP/Bootp. For more on this topic, See the chapter describing VLANs in the Advanced Traffic Management Guide for your switch.


After you reconfigure or reboot the switch with DHCP/Bootp enabled in a network providing DHCP/Bootp service, the switch does the following:

  • Receives an IP address and subnet mask and, if configured in the server, a gateway IP address and the address of a Timep server.

  • If the DHCP/Bootp reply provides information for downloading a configuration file, the switch uses TFTP to download the file from the designated source, then reboots itself. (This assumes that the switch or VLAN has connectivity to the TFTP file server specified in the reply, that the configuration file is correctly named, and that the configuration file exists in the TFTP directory.)