Get the A+ 4 Real e-book for your own computer.
Click Here!

Custom Search







Table Of Contents  CertiGuide to A+ (A+ 4 Real)
 9  Chapter 5: The Linux Operating System
      9  Networking with Linux

Previous Topic/Section
ifconfig - Configure a Network Interface
Previous Page
Pages in Current Topic/Section
1
Next Page
Chapter 6: The Graphical Interface of the LINUX OS
Next Topic/Section

route - Show /Manipulate the IP Routing Table

The route command will show you the existing routing table and more importantly, if your system operates through a gateway, the default gateway can be setup using this command. Entering the basic command, route, will show the existing routing table. For example:

Destination Gateway Genmask Flags Metric Ref Use Iface

192.168.1.0 * 255.255.255.0 U 0 0 0 eth0

127.0.0.0 * 255.0.0.0 U 0 0 0 lo

default 192.168.1.1 0.0.0.0 UG 0 0 0 eth0

This shows for this machine that a default gateway exists at IP address 192.168.1.1. The default gateway if not set can be added using the route command in the following format:

route add default gw gateway_ip

Where gateway_ip would be the IP address of the gateway/router for the subnet.

Setting up interfaces in this manner will last until next reboot. Each distribution has a file in the /etc directory where this configuration information is stored. For example, RedHat and Mandrake store this information and more somewhere in the directory /etc/sysconfig. The location that RedHat uses is the file /etc/sysconfig/network-scripts/ifcfg-eth0. The location of the file for your system could be found using the command:

grep -r „IPADDR’ /etc/*

This search should be done with super user privileges. The file and a line in the file that the string IPADDR matches would be shown. This should contain the assigned IP address.

Finallly the file /etc/resolv.conf must have the apprpprate DNS nameserver's ip address added so that DNS lookups will occur. Add a line like this:

namserver DNS_IP

where DNS_IP is the actual ip address of the DNS server.


Previous Topic/Section
ifconfig - Configure a Network Interface
Previous Page
Pages in Current Topic/Section
1
Next Page
Chapter 6: The Graphical Interface of the LINUX OS
Next Topic/Section

If you find CertiGuide.com useful, please consider making a small Paypal donation to help the site, using one of the buttons below. You can also donate a custom amount using the far right button (not less than $1 please, or PayPal gets most/all of your money!) In lieu of a larger donation, you may wish to consider buying an inexpensive PDF equivalent of the CertiGuide to A+ (A+ 4 Real) from StudyExam4Less.com. Thanks for your support!
Donate $2
Donate $5
Donate $10
Donate $20
Donate $30
Donate: $



Home - Table Of Contents - Contact Us

CertiGuide to A+ (A+ 4 Real) (http://www.CertiGuide.com/apfr/) on CertiGuide.com
Version 1.0 - Version Date: March 29, 2005

Adapted with permission from a work created by Tcat Houser et al.
CertiGuide.com Version Copyright 2005 Charles M. Kozierok. All Rights Reserved.
Not responsible for any loss resulting from the use of this site.