Configuring IP Addressing, Interface Access, and System Information

IP Configuration

 

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”.)

 

 

N o t e

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: vlan <vlan-id> ip address <ip-address/mask-length>

 

 

or

 

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.

 

HP2512(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.

 

HP2512(config)# vlan 1 ip address 10.28.227.103/24

 

Configure the Optional Default Gateway. You can assign one default

 

gateway to the switch.

 

Syntax: ip default-gateway <ip-address>

 

For example:

 

HP2512(config)# ip default-gateway 11.28.227.115

 

You can execute this command only from the global configuration level.

 

Configure Time-To-Live (TTL). This command sets the time that a packet

 

outbound from the switch can exist on the network. The default setting is 64

 

seconds.

 

Syntax: ip ttl <number-of-seconds>

 

HP2512(config)# ip ttl 60

Addressing, IP Configuring and Access, Interface

5-9