How do I configuring TCP/IP and the network interface under AIX UNIX operating system?
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?
Q. How do I set the routing metric on my network device under Fedora / RHEL / Red Hat / CentOS Linux server / workstation operating system?
My RHEL / CentOS Linux 4.x virtual network interfaces go down when I bring down eth0:0. How do I fix this issue?
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 192.168.1.1:
$ sudo arping -I eth0 -c 3 192.168.1.1
ARPING 192.168.1.1 from 192.168.1.106 ra0
Unicast reply from 192.168.1.1 [00:18:39:6A:C6:8B] 2.232ms
Unicast reply from 192.168.1.1 [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 192.168.1.1
If 192.168.1.1 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 $?
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:
$ /sbin/ifconfig interface-name
lnc0: flags=108843 mtu 1500
inet 22.214.171.124 netmask 0xfffffff8 broadcast 126.96.36.199
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.
Q. How do I setup a default gateway on Debian or Ubuntu Linux? My router IP is 192.168.1.254 and I’d like to setup this as a default gateway for Debian Linux.