Archive

Posts Tagged ‘network’

Setting Up Network Interfaces in Linux

September 17th, 2009 2 comments

Nowadays computer provides us a great deal of opportunities (of course, the majority of users can easily go without many of them), but with no exaggerations “surfing the net” represents one of the most important and essential ones. People who use Linux OS argue that given operating system is perfect for Web. In fact it’s hardly possible to disagree with them; however before you can start surfing the web the first thing you need to do is to configure network interfaces.

What are the network interfaces? They represent devices that are used to transmit and receive packages of data. The examples of network interface devices are: Ethernet card, ISDN adapter, modem and etc. You can imagine that a network interface is a mailbox or an end of pipe, where you can send information and receive an answer. The integral attribute of network interface is address.

Generally users encounter with IP (Internet Protocol) networks. In the given review we are going to consider IPv4 (4th version of IP addresses), which are still very popular among the end users. After that we will discuss how to setup a network connection in Linux, taking as an example Ethernet card (which presents an interface allowing to connect a PC to the net with the help of copper twisted pair cable with the data transfer speed of up to 1GB/s). You can setup other interfaces in a similar way. To setup the interface in Linux the following steps should be completed:

  • Physical installation of the card in the system (we suppose you’ve already done this step or the interface is in the motherboard of your computer; moreover don’t forget to plug in the cable as well)
  • Installation of the proper drivers, so Linux can work with your card
  • Specifying IP address and some other parameters, which are needed for IP network

In Linux OS network interfaces (as the majority of other devices) are set up with the help of text files, which can vary depending on distributions, for example:

Distribution Interface and routing setting
Debian /etc/init.d/network
Ubuntu /etc/network/interfaces
Slackware /etc/rc.d/rc.inet1
RedHat /etc/sysconfig/network-scripts/ifup-<ifname>

We are going to review it by Ubuntu example.

Read more…