Skip to Main Content
Cisco IOS in a Nutshell, 2nd Edition
book

Cisco IOS in a Nutshell, 2nd Edition

by James Boney
August 2005
Intermediate to advanced content levelIntermediate to advanced
798 pages
31h 12m
English
O'Reilly Media, Inc.
Content preview from Cisco IOS in a Nutshell, 2nd Edition

Name

ip address — interface

Synopsis

ip address address subnet-mask [secondary]
no ip address address subnet-mask [secondary]

Configures

The IP address for an interface

Default

No IP address

Description

This command sets the IP address for the interface to address; the network mask used on the network is subnet-mask. The secondary keyword is used to apply a second (or third, or fourth... ) address to an interface. It is allowed only if the interface allows multiple IP addresses.

Example

This command sets the IP address of the ethernet0 interface to 10.10.1.1 and the subnet mask to 255.255.255.0:

interface ethernet0
  ip address 10.10.1.1 255.255.255.0

The following commands use the secondary keyword to add a second IP address to the ethernet0 interface:

interface ethernet0
  ip address 10.10.1.1 255.255.255.0
  ip address 10.10.2.1 255.255.255.0 secondary

This interface will now answer and provide routing for both the 10.10.1.0/24 and 10.10.2.0/24 subnets.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

CISCO IOS in a Nutshell

CISCO IOS in a Nutshell

James Boney
Cisco IOS Cookbook, 2nd Edition

Cisco IOS Cookbook, 2nd Edition

Kevin Dooley, Ian Brown
Cisco Software-Defined Access

Cisco Software-Defined Access

Srilatha Vemula, Jason Gooley, Roddie Hasan

Publisher Resources

ISBN: 0596008694Errata