Recent Changes - Search:




Determining Your IP Address

When Linux is installed, the ethernet device is called eth0

For wireless interface it will be called wlan0

The ifconfig command.

[root@ibm ~]# ifconfig -a

eth0 Link encap:Ethernet HWaddr 00:80:48:38:C6:14

          inet addr:  Bcast:  Mask:

Finding the interrupts associated with /proc/interrupts

file to get a listing of all the interrupt IRQs used by the system.

[root@ibm ~]# cat /proc/interrupts

  0:  419048047          XT-PIC  timer
  1:     144347          XT-PIC  i8042
  2:          0          XT-PIC  cascade
  3:     443514          XT-PIC  Intel ICH
  5:          0          XT-PIC  i915@pci:0000:00:02.0
  8:          3          XT-PIC  rtc
  9:   12726117          XT-PIC  uhci_hcd
 10:          0          XT-PIC  acpi, uhci_hcd, eth0
 11:       3216          XT-PIC  ehci_hcd, uhci_hcd
 12:         66          XT-PIC  i8042
 14:    1320937          XT-PIC  libata
 15:         18          XT-PIC  ide1

NMI: 0 ERR: 0

Changing Your IP Address:

[root@ibm ~]# ifconfig eth0 netmask up

[root@ibm sysconfig]# ll /etc/sysconfig/network

-rw-r--r-- 1 root root 48 Nov 27 05:12 /etc/sysconfig/network

The configuraton file can be found at /etc/sysconfig/network-scripts directory.

Interface eth0 has a file called ifcfg-eth0, eth1 uses ifcfg-eth1, and so on.

[root@ibm ~]# cd /etc/sysconfig/network-scripts

[root@ibm network-scripts]# ls -l

        total 316
       -rw-r--r--  3 root root   122 Nov 27 05:14 ifcfg-eth0
       -rw-r--r--  3 root root   162 Sep 26 10:45 ifcfg-eth0:1

Using the startup and stop script/commands the ifdown and ifup commands:

[root@ibm ~]# which ifdown /sbin/ifdown

[root@ibm ~]# which ifup /sbin/ifup

Using the command ifup and if down

[root@ibm ~]# ifdown eth0 [root@ibm ~]# ifup eth0

Configuring the DNS server to use:


Creating multiple IP addresses associated with a single NIC.

IP aliasing is one of the most common ways of creating multiple IP addresses associated with a single NIC.

[root@ibm ~]# ifconfig eth0:0 netmask up

We have to create a /etc/sysconfig/network-scripts/ifcfg-eth0:0 file


Configuring the default gateway:

[root@ibm ~]# route add default gw eth0

Updating the /etc/sysconfig/network file to reflect the change.


Checking the current routing table

[trinity@ibm ~]$ netstat -nr

Adding Routes using the file /etc/sysconfig/network-scripts/route-eth0

File /etc/sysconfig/network-scripts/route-eth0 via

Checking network card status and speed etc..

mii-tool - view, manipulate media-independent interface status

[root@ibm ~]# mii-tool -v

eth0: negotiated 100baseTx-FD, link ok

  product info: vendor 00:00:00, model 0 rev 0
  basic mode:   autonegotiation enabled
  basic status: autonegotiation complete, link ok
  capabilities: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD
  advertising:  100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD
  link partner: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD flow-control

Another Tool.

The ethtool command

  ethtool - Display or change ethernet card settings

[root@ibm ~]# ethtool eth0

Settings for eth0:

        Supported ports: [ TP MII ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
        Supports auto-negotiation: Yes
        Advertised link modes:  10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
        Advertised auto-negotiation: Yes
        Speed: 100Mb/s
        Duplex: Full
        Port: MII
        PHYAD: 32
        Transceiver: internal
        Auto-negotiation: on
        Supports Wake-on: pumbg
        Wake-on: d
        Current message level: 0x00000007 (7)
        Link detected: yes
Edit - History - Print - Recent Changes - Search
Page last modified on January 26, 2006, at 01:10 AM