Find subnet mask on UNIX
Q. How do I find out subnet mask on UNIX operating system? Can you tell us the name of command and configuration file to store subnetmask under UNIX?
A. A subnetwork/ subnet is a range of logical addresses within the address space that is assigned to an organization. Subnetting is a hierarchical partitioning of the network address space of an organization (and of the network nodes of an autonomous system) into several subnets. Routers constitute borders between subnets. Communication to and from a subnet is mediated by one specific port of one specific router, at least momentarily.
Under UNIX / Linux, you need to use the ifconfig utility to assign an address to a network interface
and/or configure network interface parameters. Same command can display subnet. Just type command ifconfig:
$ ifconfig
OR
$ /sbin/ifconfig
OR
$ /sbin/ifconfig interface-name
lnc0: flags=108843mtu 1500 inet 72.122.61.51 netmask 0xfffffff8 broadcast 72.122.61.55 ether 00:0c:29:32:8a:8c plip0: flags=108810 mtu 1500 lo0: flags=8049 mtu 16384 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3 inet6 ::1 prefixlen 128 inet 127.0.0.1 netmask 0xff000000
Look for inet line you will see an IP address, followed by netmask.
Subscribe to our free e-mail newsletter or RSS feed to get all updates.
You can Email this page to a friend.
Related Other Helpful FAQs:
- Bash Shell Command to Find or Get IP address
- How do I find out my DHCP server address?
- FreeBSD VLAN Configuration
- How to Find out the IP address assigned to eth0 and display IP only
- Finding All Hosts On the LAN From Linux / Windows Workstation
Leave a Reply
We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Thank you very much for stopping by our site!
Tags: address space, autonomous system, configuration file, flags, interface name, interface parameters, lo0, logical addresses, mask, mtu, network address, network interface, network nodes, partitioning, sbin, subnetmask, subnets, subnetting, unix linux, unix operating system



Recent Comments
Today ~ 1 Comment
Today ~ 2 Comments
Yesterday ~ 9 Comments
Yesterday ~ 32 Comments
07/04/2008 07:04 pm (2 days ago) ~ 1 Comment