ip address
This command sets the IPv4 address for the currently selected VLAN interface. Use
the
no
form to restore the default IP address.
Syntax
ip address {ip-address netmask | bootp | dhcp} [secondary]
no ip address
ip-address - IP address
netmask - Network mask for the associated IP subnet. This mask identifie s
the host address bits used for routing to specific subnets.
boo tp - Obtains IP address from BOOTP.
dhcp - Obta ins IP address from DH CP.
secondary - Specifies a secondary IP address .
Default Setting
DHCP
Command Mode
Interface Configuration (VLAN)
Command Usage
If this router is dir ectly conne cte d to end n ode devic es ( or conne cted to en d
nodes via shared media) that will be assig ned to a spec ific subn et, the n
create a router interface for each VLAN that will support routing. The router
interface consists of an IP address and subnet mask. Thi s interface a ddress
defines both the network number to which the router interface is attached and
the router’s host number on that network. In other words, a router interfa ce
address defines the network segment that is connecte d to that int erface , and
allows IP packets to be sent to or from the router.
Befor e any network interf aces are con figured on the router, first creat e a
VLAN for each unique user grou p, or for each network application and its
associated users. Then assign the ports associated wit h each of these
VLANs.
An IP add ress mu st be assi gned to thi s device to ga in mana gement access
over the network or to connect the router to existing IP subnets. A specific IP
address can be manually configured , or the ro uter can b e directed to obta in
an address from a BOOTP or DHCP server. Valid IP addresses consist of four
numbers, 0 to 255, separated by periods. Anything outside this format will not
be accepted by the configuration program.
An interf ace can have onl y one primar y IP addres s, but can have man y
secondary IP addresses. In other words, seconda ry addresse s need to be
specified if more than one IP subnet can be accessed through this interfa ce.
Note that a secondary address cannot be configured prior to setting th e
primary IP address, and the primary address cannot be removed if a
secondary address is still present. Also, if any router in a network segment
41-3
Basic IP Configuration
41