[kanchilug] 1D1C - ifconfig

  • From: Dhana Sekar <tkdhanasekar@xxxxxxxxx>
  • To: ILUG-C <ilugc@xxxxxxxxxxxxx>, kanchilug@xxxxxxxxxxxxx
  • Date: Wed, 26 Jun 2013 14:55:13 +0530

command: ifconfig
purpose: Configures or displays network interface parameters for a network
              using TCP/IP.

syntax: ifconfig [options]

examples:

1. To view network settings of an ethernet adapter
    $ ifconfig eth0

2. To display details of all interfaces including disabled interfaces
    $ ifconfig -a

3. To disable an interface
    $ ifconfig eth0 down

4. To enable an interface
    $ ifconfig eth0 up

5. To assign an ip-address to an interface
    $ ifconfig ethh0 192.168.1.33

6. To change subnet mask of interface eth0
    $ ifconfig eth0 netmask 255.255.255.0

7. To change broadcast address of interface of interface eth0
    $ ifconfig eth0 broadcast 192.168.2.33

8. To assign ip-address, subnet mask, and broadcast address
    at same time to interface eth0
    $ ifconfig eth0 192.168.1.33 netmask 255.255.255.0 broadcast 192.168.2.33

9. To change the maximum transition unit to xxx for eth0
    $ ifconfig eth0 mtu xxx

10. To enable promiscuous mode
      $ ifconfig eth0 promisc
      in promiscuous mode  the eth card does not drop the packet whether the
      packet belongs to itself or not it allow the packets to flow through it

11. To put interface in normal mode
      $ ifconfig eth0 -promisc

for more info:  $ man ifconfig

regards,
dhanasekar
Kanchilug Blog : http://kanchilug.wordpress.com

To subscribe/unsubscribe kanchilug mailing list : 
http://kanchilug.wordpress.com/join-mailing-list/

Other related posts: