12 ip addressing commands, 1 ip address – CANOGA PERKINS 9175 Command Reference User Manual

Page 183

Advertising
background image

CanogaOS Command Reference

12-1

12 IP Addressing Commands

12.1 ip address

To set a primary or secondary IP address for an interface, use the ip address command in interface

configuration mode. To remove an IP address or disable IP processing, use the no form of this

command.


Command Syntax

ip address {address wildcard-mask | address/prefix-length} [secondary]

address IPv4

address.

wildcard-mask

Mask for the associated IP subnet..

prefix-length

Prefix length of the address.

secondary

(Optional) Specifies that the configured address is a secondary IP address.

If this keyword is omitted, the configured address is the primary IP address.


Default

No IP address is defined for the interface.


Command Mode

Interface configuration


Usage

An interface can have one primary IP address and multiple secondary IP addresses. Packets generated

by the switch always use the primary IP address. Therefore, all switches and access servers on a

segment should share the same primary network number.

Hosts can determine subnet masks using the Internet Control Message Protocol (ICMP) mask request

message. Switch respond to this request with an ICMP mask reply message.

You can disable IP processing on a particular interface by removing its IP address with the no ip

address command. If the software detects another host using one of its IP addresses, it will print an

error message on the console.

The optional secondary keyword allows you to specify up to 15 secondary addresses. Secondary

addresses are treated like primary addresses, except the system never generates datagrams other than

routing updates with secondary source addresses. IP broadcasts and Address Resolution Protocol (ARP)

requests are handled properly, as are interface routes in the IP routing table.

Secondary IP addresses can be used in a variety of situations. The following are the most common

applications:
„ There may not be enough host addresses for a particular network segment. For example, your

subnetting allows up to 254 hosts per logical subnet, but on one physical subnet you need 300 host

addresses. Using secondary IP addresses on the switchs or access servers allows you to have two

logical subnets using one physical subnet.

„ Many older networks were built using Level 2 bridges. The judicious use of secondary addresses

can aid in the transition to a subnetted, router-based network. Switches on an older, bridged

segment can be easily made aware that many subnets are on that segment.

Advertising