Ethernetting Linux
If you are still with me, you are nearly ready to run. All you need to run are a few commands to start testing your network connection. After you have configured your kernel, you have to configure your Linux machine to suit your network. At this point you need worry about IP addresses. If you are lucky, you will have a network administrator who will have assigned you an IP address and told you the network and broadcast addresses to use. If not, you will have to find out another way. A good way is often to check the configuration of another machine that is already working. The network address is an address that refers to the whole network you are connected to. It is advertised so that people on other networks know how to get to you. Your host IP address is one address that belongs to that network. This must be yours and only yours, or else you will face lots of strange problems, so make sure you don't use a host address someone else is already using. The broadcast address is a special address that allows anyone to send data to everyone on your network. Some special services use this, and it is very important that it be configured to the appropriate value. Another important number you will need is your “netmask”. This is a mechanism that allows your machine to determine which host addresses are local to you (on the same network) and which ones are remote. The following example would be typical of what you would expect to find:
IP address: 202.105.54.56 Network address: 202.105.54.0 Broadcast address: 202.105.54.255 Netmask: 255.255.255.0
Once you have this information, be sure you have the correct software on your Linux machine. You must be particularly careful to ensure that the network tools you have (ifconfig, route) match the version of kernel you use. The NET-2-HOWTO describes where to get these tools and how to install them. If you run the ifconfig program with no command-line arguments, you will see that it lists the device mentioned in the kernel boot messages: “eth0”. This is your Ethernet device. It needs to be configured with the information above, and the ifconfig program is designed to do just that. Use a command line such as:
ifconfig eth0 HOST netmask NETMASK\
broadcast BROADCAST up
So for the above example use the command line:
ifconfig eth0 202.105.54.56\
netmask 255.255.255.0\
broadcast 202.205.54.255 up
If you again run the ifconfig command with no command line arguments, you should see it now has the appropriate values configured.
Once you have your Ethernet device configured, you have one step remaining. As described earlier, the netmask tells your machine which addresses are local and which are remote. If the address is local, your Linux machine can route any datagrams directly to the Ethernet device. If they are remote, datagrams should be sent to the route which supports the link to the rest of the Internet. The router also has an address, so you will need to obtain this from your network administrator. Linux keeps a special table in memory to look up where to send datagrams. This table, called the routing table, is manipulated with the route command. In a simple installation, as you will most likely have, you will need to configure two routes for your Ethernet: one for your local network, and another that tells your Linux machine what to do with datagrams for any remote host. This latter route is called the “default” route.
The route commands are:
route add NETWORK dev eth0 route add default gw ROUTER dev eth0
and for the example listed earlier (assuming the router address is as shown):
route add 202.105.54.0 dev eth0 route add default gw 202.105.54.1 dev eth0
You can use the route -n command to display the contents of the routing table. The -n argument says to show the addresses as numbers and not try to look up their names, because you don't yet have your name resolver configured. To configure your name resolver, you will need to find out the address of the “NameServer” or “DNS” from your network administrator and put this address in your /etc/resolv.conf file in a line that looks like nameserver NNN.NNN.NNN.NNN, where NNN.NNN.NNN.NNN is the IP address of your nameserver.
Now you should be able to telnet to other IP hosts, both local and remote. If you have configured the name resolver of your Linux machine, then you can use their names, otherwise you should use their addresses.
In addition, the Linux Network Administrator's Guide is available from sunsite.unc.edu in the directory /pub/Linux/docs/LDP/, and can be ordered on paper from SSC (the publishers of Linux Journal) and O'Reilly & Associates.
Terry Dawson (terryd@extro.ucc.su.oz.au) has nearly 10 years experience in packet switched data communications, and maintains the NET-2-HOWTO and HAM-HOWTO documents for fun. Terry is keen to see Linux used widely in Amateur Radio applications.
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Sponsored by AMD
If you already use virtualized infrastructure, you are well on your way to leveraging the power of the cloud. Virtualization offers the promise of limitless resources, but how do you manage that scalability when your DevOps team doesn’t scale? In today’s hypercompetitive markets, fast results can make a difference between leading the pack vs. obsolescence. Organizations need more benefits from cloud computing than just raw resources. They need agility, flexibility, convenience, ROI, and control.
Stackato private Platform-as-a-Service technology from ActiveState extends your private cloud infrastructure by creating a private PaaS to provide on-demand availability, flexibility, control, and ultimately, faster time-to-market for your enterprise.
Sponsored by ActiveState
| Non-Linux FOSS: libnotify, OS X Style | Jun 18, 2013 |
| Containers—Not Virtual Machines—Are the Future Cloud | Jun 17, 2013 |
| Lock-Free Multi-Producer Multi-Consumer Queue on Ring Buffer | Jun 12, 2013 |
| Weechat, Irssi's Little Brother | Jun 11, 2013 |
| One Tail Just Isn't Enough | Jun 07, 2013 |
| Introduction to MapReduce with Hadoop on Linux | Jun 05, 2013 |
- Containers—Not Virtual Machines—Are the Future Cloud
- Non-Linux FOSS: libnotify, OS X Style
- Linux Systems Administrator
- Lock-Free Multi-Producer Multi-Consumer Queue on Ring Buffer
- Validate an E-Mail Address with PHP, the Right Way
- RSS Feeds
- Introduction to MapReduce with Hadoop on Linux
- Senior Perl Developer
- Weechat, Irssi's Little Brother
- Technical Support Rep
Featured Jobs
| Linux Systems Administrator | Houston and Austin, Texas | Host Gator |
| Senior Perl Developer | Austin, Texas | Host Gator |
| Technical Support Rep | Houston and Austin, Texas | Host Gator |
| UX Designer | Austin, Texas | Host Gator |
| Web & UI Developer (JavaScript & j Query) | Austin, Texas | Host Gator |
Free Webinar: Hadoop
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Some of key questions to be discussed are:
- What is the “typical” Hadoop cluster and what should be installed on the different machine types?
- Why should you consider the typical workload patterns when making your hardware decisions?
- Are all microservers created equal for Hadoop deployments?
- How do I plan for expansion if I require more compute, memory, storage or networking?




3 hours 38 min ago
4 hours 23 min ago
4 hours 33 min ago
4 hours 38 min ago
6 hours 48 min ago
6 hours 49 min ago
7 hours 34 min ago
8 hours 23 min ago
8 hours 47 min ago
10 hours 23 min ago