Change the subnet mask of an interface

Home -> UNIX -> Solaris -> Network administration

20428 views

From the computer of: qmchenry (337 recipes)
Created: Oct 03, 2003


2 comments:
View all comments

Add a comment

Add to:
Add to stumbleuponAdd to del.icio.usDigg itAdd to FURL

If a network interface was configured with the wrong subnet mask as can happen when the default subnet is selected with a variable length subnet mask, a simple configuration change will fix it.

Consider a host that is assigned the IP address 10.50.90.15 in the class C subnet 10.50.90.0/24. The normal subnet mask for a class A 10.* subnet is 255.0.0.0, and this is the value that an operating system will guess given that IP address information alone. To correct this problem permanently so that it will persist after the host reboots, edit the /etc/netmask file and add the following line:

10.50.90.0   255.255.255.0


To reconfigure the interface, say hme0, immediately without rebooting the system, run the following as root:

ifconfig hme0 10.50.90.15 netmask 255.255.255.0

Subscribe to the Tech-Recipes Newsletter

You can get tips like this delivered in your email every week!

Enter your Email

We will never, ever sell your email address or spam you.




2 Recipe comments: View comments

Change the subnet mask of an interface by Anonymous
Re: Change the subnet mask of an interface by isabelle



Related recipes:

  Solaris 10: set subnet mask in zone
  Create a virtual interface in Solaris
  Remove a virtual interface in Solaris
  Configure interface automatically with DHCP
  Check hme ethernet link speed, duplex, and status in Solaris
  Get MAC address without root
  Change the default route in Solaris
  Setting Solaris Network Tunable Parameters
  Simple Solaris IP Multipathing
  View the routing table in Solaris

 

Sponsored links

 

Login

Nickname

Password

Don't have an account yet? You can create one. As a registered user you have some advantages like theme manager, comments configuration and post comments with your name.