RedhatLinuxSysAdmin 





Redhat Linux System Admin  «Prev  Next»
Lesson 2 Obtaining your network information
Objective Identify your required network parameters.
Before you can connect to a TCP/IP network, you need to know your:
  1. IP address
  2. Subnet
  3. Netmask
  4. Gateway
TCP/IP: Set of protocols that facilitate controlling the transmission of packets of information.
If you are connecting to an existing, administered network, then the administrator will provide this information. Otherwise, you need to decide on an addressing scheme yourself.

IP address

An IP address uniquely identifies a host in a TCP/IP network with a 32-bit number.
  1. IP address: A set of numbers that is a unique label for that interface on the network. It is represented by the notation X.X.X.X, where each X is a decimal number from 0 to 255.
  2. 32-bit: A number that has 32 binary digits. 32-bit IP addresses are written as four numbers separated by dots, X.X.X.X, where each number is in the range 0 to 255. Think of it as a string of 32 1's and 0's.
Your computer's IP address can be assigned in several ways:
  1. Statically
  2. Dynamically with DHCP
  3. Dynamically with BOOTP

You need to decide whether to assign your IP address statically or dynamically. Use a statically assigned IP address if the machine needs a fixed address. For example, computer labs and offices with permanent installations usually use static IP addresses for simplicity. Use DHCP or BOOTP when your network server assigns IP addresses automatically.
Subnets and routing
Computers on the same subnet communicate directly, without the need for routing.
The computers label data with destination and return addresses and send it to the subnet. Each host on the subnet inspects the data, but only the intended recipient reads the data; the other hosts ignore it.
  1. Subnet: A set of machines that communicate without the assistance of a router. Networks and subnets are connected with routers to make larger networks.
  2. Routing: Subnets communicate through routers, so that only messages intended for a subnet's hosts are received. Without routing, data must be sent to every connected host, a very inefficient practice in large networks.
A high level view of routing
A high level view of routing
When computers send information from one subnet to another, they send the data through a router. That subnet, in turn, hands the data off to another router, which sends the data to the next subnet, until the data reaches its destination. This all works a little like the Post Office. Computers send data through routers, acting like a post office for two neighborhoods.

Gateway and netmask
The departure and entry point to your network is called the gateway, which is usually a router on the network that directs traffic into and out of your subnet. The gateway can derive the destination subnet from the destination IP address using a netmask. If you know your IP address and netmask, you can easily find your subnet. The following SlideShow examines netmasks.
Netmask: A set of numbers which indicates the network class. When its binary representation is anded with an interface IP address, the result is the network address.


Using Netmask to Find Subnet
You need to provide Linux with your netmask so it knows its subnet address. When your computer has a data packet whose destination subnet address is not the same as its own, it sends the packet to the gateway. If the destination computer is on the same subnet (and so shares the same subnet address) there is no need to send it through a gateway.
In the next lesson, you will configure a network connection using netcfg.

Obtaining Network Info - Exercise
Before moving on to the next lesson, click the Exercise link below to match network parameters with their descriptions.
Required Network Parameters