SlideShare a Scribd company logo
ifconfig



       Kevin O'Brien
Washtenaw Linux Users Group
  http://www.lugwash.org
ifconfig
●   ... stands for interface configurator
●   ... is part of the original internet toolkit
    http://www.faqs.org/docs/linux_network/x-
    087-2-iface.interface.html
●   ... has versions available for Linux, BSD,
    Solaris, and Mac OSX




                                                   2
man page
●   Ifconfig is used to configure the kernel-resident
    network interfaces. It is used at boot time to set
    up interfaces as necessary. After that, it is
    usually only needed when debugging or when
    system tuning is needed.




                                                         3
man page 2
●   If no arguments are given, ifconfig displays
    the status of the currently active interfaces. If
    a single interface argument is given, it
    displays the status of the given interface
    only; if a single -a argument is given, it
    displays the status of all interfaces, even
    those that are down. Otherwise, it configures
    an interface.


                                                        4
Sample output
eth0      Link encap 10Mbps Ethernet HWaddr
  00:0F:20:CF:8B:42
  inet addr 172.16.1.2 Bcast 172.16.1.255 Mask
  255.255.255.0 UP BROADCAST RUNNING MULTICAST
  MTU 1500 Metric 0
  RX packets 3136 errors217 dropped 7 overrun 26
  TX packets 1752 errors 25 dropped 0 overrun 0




                                                   5
What is it saying?
●   eth0 is the interface it is reporting on. It is the
    first of the ethernet interfaces on this
    computer.
●   The Hardware Address is 00:0F:20:CF:8B:42.
    This is sometimes called the MAC address
    (Media Access Control), and is a
    hexadecimal number assigned to the
    ethernet card at the factory.
●   The internet address is 172.16.1.2. This is
    the address assigned to this computer.
                                                          6
What is it saying? 2
●   The Broadcast Address is 172.16.1.255. This
    is an address that can be used to send
    messages to every computer on the same
    subnet as this computer.
●   The Subnet Mask is 255.255.255.0. This can
    be thought of as defining or identifying the
    subnet this computer is part of.
●   The rest of it tells about packets sent,
    received, dropped, etc.

                                                   7
Use for information
●   The first thing most beginners will want to do
    is use this for information.
●   If you find you are not connected to the
    Internet, use this command to see if your
    interface is configured and active.
●   You can use this to check on your IP
    address and subnet mask.
●   There is an equivalent for wireless
    interfaces, called iwconfig.

                                                     8
Parallels for newbies
●   Windows 95 through ME had a command
    called winipcfg
●   Windows NT through Windows Vista have
    ipconfig
●   These are essentially similar to the Unix
    command ifconfig




                                                9
Syntax
●   ifconfig interface [address [parameters]]
●   interface is the interface name, such as eth0
    (first ethernet device) or lo (local host)
●   address is the IP address assigned to the
    interface. This can be specified as a dotted
    quad address, or as a name that can be
    looked up in /etc/hosts.



                                                    10
Parameters
●   up – Makes an interface accessible to the IP
    layer.
●   down – Makes an interface inaccessible to
    the IP layer, i.e. stops all traffic through this
    interface.
●   netmask mask – Sets the subnet mask to be
    used by the interface.
●   broadcast address – Sets the broadcast
    address.

                                                        11
Warning!
●   If you are not a network administrator, be
    very careful about setting addresses from the
    command line. Even people with some
    experience can get confused setting a
    subnet mask. You don't want your interface
    to stop working in some mysterious way.
●   Using this command to get information is
    completely safe.


                                                    12
Warning! 2
●   If you do want to experiment (a very good
    way to learn about these things), just make
    sure you are not using a mission-critical
    computer. Whatever you screw up you will
    need to unscrew.☺




                                                  13
More on this command
●   There are other parameters and options
    available for this command, but they go
    beyond the requirements for this
    presentation. Consult Google or the man
    page for more information.
●   A good readable guide to the basics can be
    found at http://tldp.org/LDP/nag2/x-087-2-
    iface.ifconfig.html


                                                 14
Examples
●   ifconfig eth0 – View the network settings on
    the first Ethernet adapter installed in the
    computer.
●   ifconfig -a – Display information on all
    network interfaces on the computer, active or
    inactive.
●   ifconfig eth0 down – Would take down the
    interface, and no packets would be sent or
    received.
●   ifconfig eth0 up – Would bring the interface
    back up so it could send and receive data.    15
Examples 2
●   ifconfig eth0 192.168.1.102 netmask
    255.255.255.0 broadcast 192.168.1.255 –
    This would assign these values to the first
    Ethernet device installed in the computer. Be
    careful here!




                                                    16

More Related Content

PPTX
Management
PPTX
Amalan Bersukan - Karangan Bahagian Apptx
PPTX
Educational technology meaning &definition
DOCX
Pjm 3107 gimnastik
PPTX
Competence based education
PPTX
IPV6 ADDRESS
PDF
Lengua 9 4
PDF
114624503 guion-teatral
Management
Amalan Bersukan - Karangan Bahagian Apptx
Educational technology meaning &definition
Pjm 3107 gimnastik
Competence based education
IPV6 ADDRESS
Lengua 9 4
114624503 guion-teatral

Similar to The ifconfig Command (20)

DOCX
Useful Linux commands
PDF
Course 102: Lecture 20: Networking In Linux (Basic Concepts)
PPT
dokumen.tips_linux-networking-commands.ppt
PPT
Linux Networking Commands
DOCX
111
DOCX
111
PPTX
Network configuration
DOC
Arp Dan Ipconfig Syntax
PPTX
Linux networking
PDF
Uccn1003 -may10_-_lect02a_-_intro_to_networking_commands_software
PPTX
14 network tools
PPTX
Linux Commands
PDF
Internet Technology (Practical Questions Paper) [CBSGS - 75:25 Pattern] {2013...
PDF
Lesson 01 - Network Assessment
PDF
nwlab-ex1.pdf
PPT
Linux networking
DOCX
PPTX
The hardware and network Cisco-Note.pptx
PDF
Network configuration in Linux
PPTX
TVL- Q1-M3-4 Setup Network Configuration
Useful Linux commands
Course 102: Lecture 20: Networking In Linux (Basic Concepts)
dokumen.tips_linux-networking-commands.ppt
Linux Networking Commands
111
111
Network configuration
Arp Dan Ipconfig Syntax
Linux networking
Uccn1003 -may10_-_lect02a_-_intro_to_networking_commands_software
14 network tools
Linux Commands
Internet Technology (Practical Questions Paper) [CBSGS - 75:25 Pattern] {2013...
Lesson 01 - Network Assessment
nwlab-ex1.pdf
Linux networking
The hardware and network Cisco-Note.pptx
Network configuration in Linux
TVL- Q1-M3-4 Setup Network Configuration
Ad

More from Kevin OBrien (20)

PPTX
American icon pmi
ODP
Tls 1.3
ODP
Forward Secrecy
ODP
Diffie_Hellman-Merkle Key Exchange
ODP
Password best practices and the last pass hack
ODP
SSL certificates
ODP
Encryption basics
ODP
Passwords
PDF
Linux Directory Structure
PDF
Hardware Discovery Commands
PDF
Introduction to linux
PDF
Help, my computer is sluggish
PDF
The ps Command
PDF
Installing Software, Part 3: Command Line
PDF
Installing Software, Part 2: Package Managers
PDF
Installing Software, Part 1 - Repositories
PDF
Installing Linux: Partitioning and File System Considerations
PDF
Find and Locate: Two Commands
PDF
The Shell Game Part 4: Bash Shortcuts
PDF
The Shell Game Part 3: Introduction to Bash
American icon pmi
Tls 1.3
Forward Secrecy
Diffie_Hellman-Merkle Key Exchange
Password best practices and the last pass hack
SSL certificates
Encryption basics
Passwords
Linux Directory Structure
Hardware Discovery Commands
Introduction to linux
Help, my computer is sluggish
The ps Command
Installing Software, Part 3: Command Line
Installing Software, Part 2: Package Managers
Installing Software, Part 1 - Repositories
Installing Linux: Partitioning and File System Considerations
Find and Locate: Two Commands
The Shell Game Part 4: Bash Shortcuts
The Shell Game Part 3: Introduction to Bash
Ad

Recently uploaded (20)

PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
A Presentation on Artificial Intelligence
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Encapsulation theory and applications.pdf
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
NewMind AI Monthly Chronicles - July 2025
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Modernizing your data center with Dell and AMD
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
cuic standard and advanced reporting.pdf
Chapter 3 Spatial Domain Image Processing.pdf
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
The Rise and Fall of 3GPP – Time for a Sabbatical?
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Unlocking AI with Model Context Protocol (MCP)
A Presentation on Artificial Intelligence
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Encapsulation theory and applications.pdf
Spectral efficient network and resource selection model in 5G networks
NewMind AI Monthly Chronicles - July 2025
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Modernizing your data center with Dell and AMD
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Dropbox Q2 2025 Financial Results & Investor Presentation
Per capita expenditure prediction using model stacking based on satellite ima...
Network Security Unit 5.pdf for BCA BBA.
Diabetes mellitus diagnosis method based random forest with bat algorithm
cuic standard and advanced reporting.pdf

The ifconfig Command

  • 1. ifconfig Kevin O'Brien Washtenaw Linux Users Group http://www.lugwash.org
  • 2. ifconfig ● ... stands for interface configurator ● ... is part of the original internet toolkit http://www.faqs.org/docs/linux_network/x- 087-2-iface.interface.html ● ... has versions available for Linux, BSD, Solaris, and Mac OSX 2
  • 3. man page ● Ifconfig is used to configure the kernel-resident network interfaces. It is used at boot time to set up interfaces as necessary. After that, it is usually only needed when debugging or when system tuning is needed. 3
  • 4. man page 2 ● If no arguments are given, ifconfig displays the status of the currently active interfaces. If a single interface argument is given, it displays the status of the given interface only; if a single -a argument is given, it displays the status of all interfaces, even those that are down. Otherwise, it configures an interface. 4
  • 5. Sample output eth0 Link encap 10Mbps Ethernet HWaddr 00:0F:20:CF:8B:42 inet addr 172.16.1.2 Bcast 172.16.1.255 Mask 255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU 1500 Metric 0 RX packets 3136 errors217 dropped 7 overrun 26 TX packets 1752 errors 25 dropped 0 overrun 0 5
  • 6. What is it saying? ● eth0 is the interface it is reporting on. It is the first of the ethernet interfaces on this computer. ● The Hardware Address is 00:0F:20:CF:8B:42. This is sometimes called the MAC address (Media Access Control), and is a hexadecimal number assigned to the ethernet card at the factory. ● The internet address is 172.16.1.2. This is the address assigned to this computer. 6
  • 7. What is it saying? 2 ● The Broadcast Address is 172.16.1.255. This is an address that can be used to send messages to every computer on the same subnet as this computer. ● The Subnet Mask is 255.255.255.0. This can be thought of as defining or identifying the subnet this computer is part of. ● The rest of it tells about packets sent, received, dropped, etc. 7
  • 8. Use for information ● The first thing most beginners will want to do is use this for information. ● If you find you are not connected to the Internet, use this command to see if your interface is configured and active. ● You can use this to check on your IP address and subnet mask. ● There is an equivalent for wireless interfaces, called iwconfig. 8
  • 9. Parallels for newbies ● Windows 95 through ME had a command called winipcfg ● Windows NT through Windows Vista have ipconfig ● These are essentially similar to the Unix command ifconfig 9
  • 10. Syntax ● ifconfig interface [address [parameters]] ● interface is the interface name, such as eth0 (first ethernet device) or lo (local host) ● address is the IP address assigned to the interface. This can be specified as a dotted quad address, or as a name that can be looked up in /etc/hosts. 10
  • 11. Parameters ● up – Makes an interface accessible to the IP layer. ● down – Makes an interface inaccessible to the IP layer, i.e. stops all traffic through this interface. ● netmask mask – Sets the subnet mask to be used by the interface. ● broadcast address – Sets the broadcast address. 11
  • 12. Warning! ● If you are not a network administrator, be very careful about setting addresses from the command line. Even people with some experience can get confused setting a subnet mask. You don't want your interface to stop working in some mysterious way. ● Using this command to get information is completely safe. 12
  • 13. Warning! 2 ● If you do want to experiment (a very good way to learn about these things), just make sure you are not using a mission-critical computer. Whatever you screw up you will need to unscrew.☺ 13
  • 14. More on this command ● There are other parameters and options available for this command, but they go beyond the requirements for this presentation. Consult Google or the man page for more information. ● A good readable guide to the basics can be found at http://tldp.org/LDP/nag2/x-087-2- iface.ifconfig.html 14
  • 15. Examples ● ifconfig eth0 – View the network settings on the first Ethernet adapter installed in the computer. ● ifconfig -a – Display information on all network interfaces on the computer, active or inactive. ● ifconfig eth0 down – Would take down the interface, and no packets would be sent or received. ● ifconfig eth0 up – Would bring the interface back up so it could send and receive data. 15
  • 16. Examples 2 ● ifconfig eth0 192.168.1.102 netmask 255.255.255.0 broadcast 192.168.1.255 – This would assign these values to the first Ethernet device installed in the computer. Be careful here! 16