Changing an interface address
What you can change
You can use the ifconfig command to change the following interface parameters:
- IP address
- Network mask
- Broadcast address
Changing the IP address
To change the IP address of an interface, complete the following step.
Note
You must configure the network mask of the interface when configuring the IP address if the network mask is not classfull (Class A, B, C, or D). By default, a classfull network mask is applied.
Step
|
Action
|
|
1 |
Enter the following command:
ifconfig interface address
interface is the name of the interface of which you want to configure the address.
address is the new IP address for this interface.
Example
You configure a quad-port Ethernet interface e3a with an IP address 192.168.25.10 with the following command:
ifconfig e3a 192.168.25.10
|
Changing the network mask
To change the network mask of an interface, complete the following step.
Step
|
Action
|
|
1 |
Enter the following command:
ifconfig interface netmask mask
interface is the name of a specific interface.
mask is the new network mask for this interface.
Example
You configure a 24-bit mask for the interface e3a configured in the previous example with the following command:
ifconfig e3a netmask 255.255.255.0
|
Changing the broadcast address
To change the broadcast address of an interface, complete the following step.
Step
|
Action
|
|
1 |
Enter the following command:
ifconfig interface broadcast address
interface is the name of a specific interface.
address is the new broadcast address to be used for this interface.
Example
You set a broadcast address of 192.168.25.250 for the network 192.168.25.10 with subnet mask 255.255.255.0, configured in an earlier example, with the following command:
ifconfig e3a broadcast 192.168.25.250
|
Copyright © 1994-2003, Network Appliance, Inc. All rights
reserved.
Part No. 210-00321
File: ifconfi5.htm
Last updated: 01/20/03 14:16:40