Chapter 5
68
Description:
Lists defined subnets; defines a subnet; deletes a subnet
definition; or deletes all subnet definitions.
<name> is a label, that can be specified by subnet add and later
used by subnet delete to delete the subnet.
<i/f> is not used, but is present for historical reasons and must
be specified as either “.” or a valid interface name.
<IP address> is the IP address of the subnet being defined (only
those bits of <dest> corresponding to bits set in <mask> are
relevant).
<mask> is the subnet mask of the subnet being defined,
specified as four hexadecimal numbers separated by colons.
A subnet is defined automatically for each interface, with a
name formed by appending .home to the device name. The only
significant use for the subnet command is to change the masks
for these automatic subnet, if the default masks (see device
command) are not correct. Subnet definitions for other subnet
can also be useful in conjunction with RIP v1.0, which does not
communicate subnet masks.
Example:
mymachine> ip device
# typedevfileIP address
device etherether//nicemtu 1500 192.168.2.1
device vlaneether//lanemtu 1500 192.168.55.1
mymachine> ip subnet
subnet vlane.home. 192.168.55.0ff:ff:ff:00 vlane
subnet ether.home. 192.168.2.0ff:ff:ff:00 ether
mymachine> ip subnet add vlane.home.192.168.55.1 ff:ff:fc:0
mymachine> ip subnet
subnet vlane.home. 192.168.52.0ff:ff:fc:00 vlane
subnet ether.home. 192.168.2.0ff:ff:ff:00 ether