faqts : Computers : Operating Systems : Linux : Networking

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

10 of 11 people (91%) answered Yes
Recently 9 of 10 people (90%) answered Yes

Entry

Operating system: Linux: Network: Setting: View: How to view the network configuration?

Nov 22nd, 2003 12:47
Knud van Eeden,


----------------------------------------------------------------------
--- Knud van Eeden --- 22 November 2003 - 09:12 pm -------------------

Operating system: Linux: Network: Setting: View: How to view the 
network configuration?

---

Method: Overview:

1. use the command '/sbin/ifconfig'

2. check files

   '/etc/hosts' -
    a list of known hosts

   '/etc/resolv.conf' -
    a list of your name servers

   '/etc/lmhosts' -
    a list of smb servers for netbios identification

   '/etc/sysconfig/network-scripts/ifcfg-eth0' -
     information for your first ethernet card

   '/etc/sysconfig/network' -
     info on your network configuration and hostname

---

Method: use the command '/sbin/ifconfig'

Steps: Overview:

 1. In a console type the command:

    /sbin/ifconfig

    You will now see something like for example:

    eth0 Link encap: Ethernet

         HWaddr 00:0C:29:F9:2B:9A

         inet addr: 192.168.1.45

         Bcast: 192.168.1.255

         Mask: 255.255.255.0

         UP BROADCAST RUNNING MULTICAST

         MTU:1500

         Metric:1

         RX packets:642 errors:0 dropped:0 overruns:0 frame:0

         TX packets:463 errors:0 dropped:0 overruns:0 carrier:0

         collisions:0

         txqueuelen: 100

         RX bytes: 126645 (123.6 Kb)

         TX bytes: 37590 (36.7 Kb)

         Interrupt: 10 Base address: 0x10a0

     lo  Link encap: Local Loopback

         inet addr: 127.0.0.1

         Mask: 255.0.0.0

         UP LOOPBACK RUNNING

         MTU : 16346

         Metric : 1

         RX packets:1222 errors:0 dropped:0 overruns:0 frame:0

         TX packets:1222 errors:0 dropped:0 overruns:0 carrier:0

         collisions:0

         txqueuelen: 100

         RX bytes: 95000 (92.7 Kb)

         TX bytes: 95000 (92.7 Kb)

---

[Internet: source: 
http://www.computerbits.com/archive/2002/0500/schroder0205.html]

---

Tested successfully in:

Linux Debian v3

Linux Mandrake v9

Linux Red Hat v9

Linux Slackware v9

Linux SuSE v9

Linux Turbolinux v8

---
---

Method: check file '/etc/sysconfig/network'

---

Steps: Overview:

 1. In a console type the command:

     vi /etc/sysconfig/network

    You will now see e.g.

+-----------------------------------+
|     NETWORKING=yes                |
|                                   |
|     FORWARD_IPV4=false            |
|                                   |
|     HOSTNAME=localhost.localdomain|
|                                   |
|     DOMAINNAME=localdomain        |
|                                   |
|     GATEWAY=192.168.1.1           |
+-----------------------------------+

---

[Internet: source: 
http://computerbits.com/archive/2002/0400/schroder0402.html]

---
---

Internet: see also:

---

Operating system: Network: Set: How to set the network configuration 
from the command line?
http://www.faqts.com/knowledge_base/view.phtml/aid/26809/fid/427

---

[Internet: source: http://www.google.com search for 'how to change 
network settings command line linux': 
http://k12linux.org/netadmin/network.html]

----------------------------------------------------------------------