SlideShare une entreprise Scribd logo
1  sur  16
Télécharger pour lire hors ligne
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

Contenu connexe

Tendances

Basics Of Networking (Overview)
Basics Of Networking (Overview)Basics Of Networking (Overview)
Basics Of Networking (Overview)
ashiesh0007
 

Tendances (20)

System administration with automation
System administration with automationSystem administration with automation
System administration with automation
 
V.P.N And Proxy server
V.P.N And Proxy serverV.P.N And Proxy server
V.P.N And Proxy server
 
02 protocols and tcp-ip
02 protocols and tcp-ip02 protocols and tcp-ip
02 protocols and tcp-ip
 
Multi threading model
Multi threading modelMulti threading model
Multi threading model
 
Basics Of Networking (Overview)
Basics Of Networking (Overview)Basics Of Networking (Overview)
Basics Of Networking (Overview)
 
Internet Protocols
Internet ProtocolsInternet Protocols
Internet Protocols
 
Network protocol
Network protocolNetwork protocol
Network protocol
 
6 understanding DHCP
6 understanding DHCP6 understanding DHCP
6 understanding DHCP
 
installation of VM and ubuntu.pptx
installation of VM and ubuntu.pptxinstallation of VM and ubuntu.pptx
installation of VM and ubuntu.pptx
 
Vpn presentation
Vpn presentationVpn presentation
Vpn presentation
 
1. introduction to communication networks subject introduction
1. introduction to communication networks   subject introduction1. introduction to communication networks   subject introduction
1. introduction to communication networks subject introduction
 
Computer Networking
Computer NetworkingComputer Networking
Computer Networking
 
Firewall and its types and function
Firewall and its types and functionFirewall and its types and function
Firewall and its types and function
 
DHCP
DHCPDHCP
DHCP
 
Networking in linux
Networking in linuxNetworking in linux
Networking in linux
 
Computer Network
Computer NetworkComputer Network
Computer Network
 
Troubleshooting Your Network.pptx
Troubleshooting Your Network.pptxTroubleshooting Your Network.pptx
Troubleshooting Your Network.pptx
 
CCNA v6.0 ITN - Chapter 11
CCNA v6.0 ITN - Chapter 11CCNA v6.0 ITN - Chapter 11
CCNA v6.0 ITN - Chapter 11
 
Windows Server 2012 Installation and Configurtion Superiorgrw
Windows Server 2012 Installation and Configurtion SuperiorgrwWindows Server 2012 Installation and Configurtion Superiorgrw
Windows Server 2012 Installation and Configurtion Superiorgrw
 
NETWORK PROTOCOL
NETWORK PROTOCOLNETWORK PROTOCOL
NETWORK PROTOCOL
 

En vedette (6)

IPV6 ADDRESS
IPV6 ADDRESSIPV6 ADDRESS
IPV6 ADDRESS
 
Lengua 9 4
Lengua 9 4Lengua 9 4
Lengua 9 4
 
114624503 guion-teatral
114624503 guion-teatral114624503 guion-teatral
114624503 guion-teatral
 
La familiapeligra libreto
La familiapeligra libretoLa familiapeligra libreto
La familiapeligra libreto
 
Guion teatral
Guion teatralGuion teatral
Guion teatral
 
Guión de teatro
Guión de teatroGuión de teatro
Guión de teatro
 

Similaire à The ifconfig Command

Networking question
Networking questionNetworking question
Networking question
DEVBEJ
 
Linux networking
Linux networkingLinux networking
Linux networking
sanakiyan
 
ccna 1 chapter 2 v5.0 exam answers 2014
ccna 1 chapter 2 v5.0 exam answers 2014ccna 1 chapter 2 v5.0 exam answers 2014
ccna 1 chapter 2 v5.0 exam answers 2014
Đồng Quốc Vương
 
CCNA at a glance
CCNA at a glanceCCNA at a glance
CCNA at a glance
Vikas Raut
 
Linux hpc-cluster-setup-guide
Linux hpc-cluster-setup-guideLinux hpc-cluster-setup-guide
Linux hpc-cluster-setup-guide
jasembo
 

Similaire à The ifconfig Command (20)

Linux Commands
Linux CommandsLinux Commands
Linux Commands
 
Networking question
Networking questionNetworking question
Networking question
 
Linux networking
Linux networkingLinux networking
Linux networking
 
Useful Linux commands
Useful Linux commandsUseful Linux commands
Useful Linux commands
 
Ccnav5.org ccna 3-v50_final_exam_2014
Ccnav5.org ccna 3-v50_final_exam_2014Ccnav5.org ccna 3-v50_final_exam_2014
Ccnav5.org ccna 3-v50_final_exam_2014
 
ccna 1 chapter 2 v5.0 exam answers 2014
ccna 1 chapter 2 v5.0 exam answers 2014ccna 1 chapter 2 v5.0 exam answers 2014
ccna 1 chapter 2 v5.0 exam answers 2014
 
Managing the system and network connection Linux
Managing the system and network connection LinuxManaging the system and network connection Linux
Managing the system and network connection Linux
 
CCNA at a glance
CCNA at a glanceCCNA at a glance
CCNA at a glance
 
How to Use GSM/3G/4G in Embedded Linux Systems
How to Use GSM/3G/4G in Embedded Linux SystemsHow to Use GSM/3G/4G in Embedded Linux Systems
How to Use GSM/3G/4G in Embedded Linux Systems
 
Networking
NetworkingNetworking
Networking
 
111
111111
111
 
111
111111
111
 
Linux network tools (Maarten Blomme)
Linux network tools (Maarten Blomme)Linux network tools (Maarten Blomme)
Linux network tools (Maarten Blomme)
 
03 linuxfirewall1
03 linuxfirewall103 linuxfirewall1
03 linuxfirewall1
 
CCNA CheatSheet
CCNA CheatSheetCCNA CheatSheet
CCNA CheatSheet
 
CMIT 350 FINAL EXAM CCNA CERTIFICATION PRACTICE EXAM
CMIT 350 FINAL EXAM CCNA CERTIFICATION PRACTICE EXAMCMIT 350 FINAL EXAM CCNA CERTIFICATION PRACTICE EXAM
CMIT 350 FINAL EXAM CCNA CERTIFICATION PRACTICE EXAM
 
lab1
lab1lab1
lab1
 
ENSA_Module_10.pptx
ENSA_Module_10.pptxENSA_Module_10.pptx
ENSA_Module_10.pptx
 
Securing Switch Access
Securing Switch Access Securing Switch Access
Securing Switch Access
 
Linux hpc-cluster-setup-guide
Linux hpc-cluster-setup-guideLinux hpc-cluster-setup-guide
Linux hpc-cluster-setup-guide
 

Plus de Kevin OBrien

Plus de Kevin OBrien (20)

American icon pmi
American icon   pmiAmerican icon   pmi
American icon pmi
 
Tls 1.3
Tls 1.3Tls 1.3
Tls 1.3
 
Forward Secrecy
Forward SecrecyForward Secrecy
Forward Secrecy
 
Diffie_Hellman-Merkle Key Exchange
Diffie_Hellman-Merkle Key ExchangeDiffie_Hellman-Merkle Key Exchange
Diffie_Hellman-Merkle Key Exchange
 
Password best practices and the last pass hack
Password best practices and the last pass hackPassword best practices and the last pass hack
Password best practices and the last pass hack
 
SSL certificates
SSL certificatesSSL certificates
SSL certificates
 
Encryption basics
Encryption basicsEncryption basics
Encryption basics
 
Passwords
PasswordsPasswords
Passwords
 
Linux Directory Structure
Linux Directory StructureLinux Directory Structure
Linux Directory Structure
 
Hardware Discovery Commands
Hardware Discovery CommandsHardware Discovery Commands
Hardware Discovery Commands
 
Introduction to linux
Introduction to linuxIntroduction to linux
Introduction to linux
 
Help, my computer is sluggish
Help, my computer is sluggishHelp, my computer is sluggish
Help, my computer is sluggish
 
The ps Command
The ps CommandThe ps Command
The ps Command
 
Installing Software, Part 3: Command Line
Installing Software, Part 3: Command LineInstalling Software, Part 3: Command Line
Installing Software, Part 3: Command Line
 
Installing Software, Part 2: Package Managers
Installing Software, Part 2: Package ManagersInstalling Software, Part 2: Package Managers
Installing Software, Part 2: Package Managers
 
Installing Software, Part 1 - Repositories
Installing Software, Part 1 - RepositoriesInstalling Software, Part 1 - Repositories
Installing Software, Part 1 - Repositories
 
Installing Linux: Partitioning and File System Considerations
Installing Linux: Partitioning and File System ConsiderationsInstalling Linux: Partitioning and File System Considerations
Installing Linux: Partitioning and File System Considerations
 
Find and Locate: Two Commands
Find and Locate: Two CommandsFind and Locate: Two Commands
Find and Locate: Two Commands
 
The Shell Game Part 4: Bash Shortcuts
The Shell Game Part 4: Bash ShortcutsThe Shell Game Part 4: Bash Shortcuts
The Shell Game Part 4: Bash Shortcuts
 
The Shell Game Part 3: Introduction to Bash
The Shell Game Part 3: Introduction to BashThe Shell Game Part 3: Introduction to Bash
The Shell Game Part 3: Introduction to Bash
 

Dernier

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 

Dernier (20)

What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 

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