≡ Menu

network interface

Q. How do I configuring TCP/IP and the network interface under AIX UNIX operating system?
[click to continue…]

Where Does Linux Save Wireless Card Settings?

Q. I'd like to get more information about my wireless settings stored under CentOS / RHEL / Fedora Linux. Where Does Linux Save Wireless Card Settings?
[click to continue…]

Q. How do I set the routing metric on my network device under Fedora / RHEL / Red Hat / CentOS Linux server / workstation operating system?
[click to continue…]

Q. My RHEL / CentOS Linux 4.x virtual network interfaces go down when I bring down eth0:0. How do I fix this issue?
[click to continue…]

Q. I run quite large network with different subnets. I'd like to know how can I find out duplicate IP address under Linux / UNIX?

A. You can use arpping command. The arping utility performs an action similar to ping command, but at the Ethernet layer. You can send ARP REQUEST to a neighbor host / computers.

Task: Send ARP request

Let us find out reachability of an IP on the local Ethernet with arping i.e send ARP request
$ sudo arping -I eth0 -c 3

ARPING from ra0
Unicast reply from [00:18:39:6A:C6:8B]  2.232ms
Unicast reply from [00:18:39:6A:C6:8B]  1.952ms
Sent 3 probes (1 broadcast(s))
Received 3 response(s)


  • -I eth0 : Specify network interface i.e. name of network device where to send ARP REQUEST packets. This option is required.
  • -c 3 : Stop after sending 3 ARP REQUEST packets

Task: Find duplicate IP

The -D option specifies duplicate address detection mode (DAD). It returns exit status 0, if DAD succeeded i.e. no replies are received.
$ sudo arping -D -I eth0 -c 2
If duplicated you should see zero exit status:
$ echo $?
Always use following syntax for duplicate address detection with arping:
$ sudo arping -D -I <interface-name> -c 2 <IP-ADDRESS-TO-TEST>
$ echo $?


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
$ /sbin/ifconfig
$ /sbin/ifconfig interface-name

lnc0: flags=108843 mtu 1500
        inet netmask 0xfffffff8 broadcast
        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 netmask 0xff000000

Look for inet line you will see an IP address, followed by netmask.

Debian / Ubuntu Linux Setting a Default Gateway

Q. How do I setup a default gateway on Debian or Ubuntu Linux? My router IP is and I'd like to setup this as a default gateway for Debian Linux.

A. You can use command line tool such as
a] ip command - show / manipulate routing, devices, policy routing and tunnels

b] route command - show / manipulate the IP routing table

c] Save routing information to a configuration file so that after reboot you get same default gateway.

ip command to set a default router to

Login as the root and type:
# ip route add default via
$ sudo ip route add default via

route command to set a default router to

Login as the root and type:
# route add default gw
$ sudo route add default gw

Save routing information to a configuration file /etc/network/interfaces

Open /etc/network/interfaces file
# vi /etc/network/interfaces
$ sudo vi /etc/network/interfaces
Find eth0 or desired network interface and add following option
Save and close the file. Restart networking:
# /etc/init.d/networking restart
$ sudo /etc/init.d/networking restart