Network Integration  «Prev  Next»
Lesson 2 Obtaining your network information
Objective Identify your required network parameters.

Obtaining your Network information during Linux Integration

Before you can connect to a TCP/IP[1] network, you need to know your:
  1. IP address
  2. Subnet
  3. Netmask
  4. Gateway
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[2] uniquely identifies a host in a TCP/IP network with a 32-bit[3] number. 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
[1]:
communicate directly, without the need for routing
[1]:
. 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.

A high level view of routing:
A high level view of routing: The router connects the Internet to the individual hosts by means of the subnet.

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[4]. If you know your IP address and netmask, you can easily find your subnet. The following series of images examines netmasks.

Using netmask to find the Subnet during Linux Network Integration

1) An inbound packet of data arrives at your subnet's gateway presenting its destination and return addresses.
1) An inbound packet of data arrives at your subnet's gateway presenting its destination and return addresses

2) The subnet's netmask determines how much of the IP address is shared by all
2) The subnet's netmask determines how much of the IP address is shared by all hosts on the subnet. The IP addresses are compared in binary notation. Ones (1x) in the netmask indicate that you copy the number from 192.43.10.2 to the destination subnet in the same place.

3) The destination subnet matches the gateway's subnet, so the data is posted
3) The destination subnet matches the gateway's subnet, so the data is posted

4) The destination host receives the data; the other hosts ignore it.
4) The destination host receives the data; the other hosts ignore it.

  1. An inbound packet of data arrives at your subnet's gateway presenting its destination and return addresses
  2. The subnet's netmask determines how much of the IP address is shared by all hosts on the subnet.
  3. The destination subnet matches the gateway's subnet, so the data is posted
  4. The destination host receives the data; the other hosts ignore it.

IP addressing and subnetting: Calculate a subnet mask using the subnet's formula

Subnet: A portion of a network that shares a common address component. On TCP/IP networks, subnets are defined as all devices whose IP addresses have the same prefix. For example, all devices with IP addresses that start with 100.100.100. would be part of the same subnet.
Dividing a network into subnets is useful for both security and performance reasons. IP networks are divided using a subnet mask.
Gateway: A gateway is a network point that acts as an entrance to another network. On the Internet, a node or stopping point can be either a gateway node or a host (end-point) node. Both the computers of Internet users and the computers that serve pages to users are host nodes. The computers that control traffic within your company's network or at your local Internet service provider (ISP) are gateway nodes. Can transcode or allow different protocols to talk to each other.

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
[1] TCP/IP: Set of protocols that facilitate controlling the transmission of packets of information.
[2] 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.
[3] 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.
[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.
[1] 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.
[2] 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.