Let us ping! First we will learn the Hello World of a networked machine.

Similar documents
IP over IB Protocol. Introduction CHAPTER

Enabling CDC-ETHER Connection for Skywire CAT1

GM8126 MAC DRIVER. User Guide Rev.: 1.0 Issue Date: December 2010

Wi-Fi Guide: Edimax USB Adapter on BBG

Hostname and IP Address

Accessing the Networking Stack

Network Configuration for Cisco UCS Director Baremetal Agent

Enabling CDC_ETHER Connection for Skywire GSM CAT1

This document guides the user through: 1. Setting up and configuring networking for the BeagleBone black or green with the host.

StampA5D3x/PortuxA5/PanelA5. Quickstart Guide

Access Server: User's and Developer's Guide <<< Previous Next >>>

Sirindhorn International Institute of Technology Thammasat University

CIS Test 1- Practice - Fall 2011

TABLE OF CONTENTS. ACI Solutions Team by Tomas de Leon 2

HP Services zl Module ngenius Integrated Agent Installation and Getting Started Guide

Getting Started with PetaLinux SDK

Quick Start Guide for BeagleBone Black. Table of Contents. by Brian Fraser Last update: Summer, 2015

XE2000/XE3000 IP-PBX: Getting Started Guide Package Contents

Create Test Environment

Setting Up A High-Availability Load Balancer (With Failover and Session Support) With HAProxy/Wackamole/Spread On Debian Etch

GMSplus Customer Connection Test Procedure

NVIDIA Professional Application Center

Configuring the BeagleBone Black s Ethernet Port for SSH Access

Quick guide for configuring a system with multiple IP-LINKs

Networking Approaches in. a Container World. Flavio Castelli Engineering Manager

Hosting Applications Using Configuration Management Tools

Using Juju with a Local Provider with KVM and LXC in Ubuntu LTS

Sirindhorn International Institute of Technology Thammasat University

RG-MACC-BASE_v2.01. Installation Guide

Adding NetFPGA board into CRON. Change wires table, if you change the switch cable connection

FiberstoreOS IP Service Configuration Guide

Clustered Data ONTAP 8.3 Update 2, IPspaces. Self-paced Lab NETAPP UNIVERSITY. NetApp University - Do Not Distribute

Raspberry Pi 3 Starter Kit Hookup Guide

Using Shell Commands

Chapter 5 Network Layer

New System Setup Guide

Interface Management

RG-MACC_2.0 Installation Manual

These documents and software are covered under the terms and conditions of the fp Technologies, Inc. Program License Agreement

Linux. Computer networks - Administration 1DV202. fredag 30 mars 12

Getting Started with Application Hosting

installing Linux Paul Cobbaut

PetaLinux SDK Guide to QEMU System Simulation

Blueprints. Quick Start Guide for installing and running KVM

UCS IPv6 Management Configuration Example

Basics of GNS3 and Cisco IOS

VisibleThread - Server Configuration Help

WLAN on DILNetPC DNP9200 External SWAP Device on DNP9200

Newsreader virtual machines Technical Report NWR

Installation von Oracle Real Application Cluster 10gR1 auf CentOS 4.2 mit Raw-Devices

Application Hosting Configuration Guide for Cisco ASR 9000 Series Routers

Oracle 11g RAC on Linux- CRS Inderpal S. Johal. Inderpal S. Johal

CHAPTER 7 DEMONSTRATE THE PAN IN LINUX

Multiplying Your Server Ubuntu Server and Virtualization

VLAN Configurations. 1 of :18. Available Categories. Adobe. Macromedia

UNIVERSITY OF BOLTON CREATIVE TECHNOLOGIES. BSc (Hons) COMPUTER NETWORKS AND SECURITY SEMESTER ONE EXAMINATION 2014/2015 UNIX MODULE NO: CPU5003

FiberstoreOS. IP Service Configuration Guide

FSOS IP Service Configuration Guide

APPLICATION NOTE. Scope. Reference Documents. Software Ethernet Bridge on SAMA5D3/D4. Atmel SMART SAMA5D3/D4 Series

Configuring a Standalone VCL Environment using VMware Server 2.0

JBOX2 (Saturn Ring) Appliance General Guide

Ubuntu LTS Precise

Renesas Koelsch Hardware Setup and Software Installation

Packet Generator User Guider V0.1

Application of Mininet

UNIVERSITY OF BOLTON CREATIVE TECHNOLOGIES. BSc (Hons) COMPUTER NETWORKS AND SECURITY SEMESTER ONE EXAMINATION 2017/2018 UNIX MODULE NO: CPU5003

Packet Generator User Guide V0.4

CANopen Object Browser, Version 0.2

Internet Tool Practice. 이지민 장동현

IPv6 LAB. Practical IPv6. Alvaro Vives 27 June 2017 Workshop on Open Source Solutions for the IoT


PetaLinux SDK User Guide. Getting Started Guide

INSTALLATION RUNBOOK FOR Hitachi Block Storage Driver for OpenStack

The Network Layer. Internet solutions. Nixu Oy PL 21. (Mäkelänkatu 91) Helsinki, Finland. tel fax.

High Availability of IBM Security Directory Server using Heartbeat A highly available authentication system

Using vswitch on z/vm

CS158 - Assignment 9 Faster Naive Bayes? Say it ain t so...

Deploy Dual Stack CentOS 7 Instance in AWS

For personnal use only

Javier Sedano David Fernández

Taking Advantage of Bluetooth for Communications and More by Hunyue Yau

Helium Operator Manual (CLI)

High Availability for Cisco RAN Management Systems

Host Redundancy, and IPoIB and SRP Redundancies

IPv6 (IP( version 6) 6 Essentials Ch0: Overwiew. Louis Chuang Fu Jen Catholic University EE ENCL

Configuring Real Servers for DSR

Blackford Computing Lab Test Plan IPV6 Basic Test Plan - BCTP101.1 Feb

PetaLinux SDK User Guide. Getting Started Guide

STEP BY STEP ORACLE RAC 12C (FLEX ASM) INSTALLATION ON LINUX X86_64 (VM)

raw]$ uname -a Linux laguna el6.x86_64 #1 SMP Tue Jan 29 11:47:41 EST 2013 x86_64 x86_64 x86_64 GNU/Linux

LAN Setup Reflection

Detecting Sniffers on Your Network

LS9200 User Guide LinkSprite Technologies, Inc.

ssh keys, yum, ntp, rsync

Replace HyperFlex Self-Signed SSL Certificates with CA-issued Certificates

LAN Setup Reflection. Ask yourself some questions: o Does your VM have the correct IP? o Are you able to ping some locations, internal and external?

Printed by Jed Crandall Sep 01, 11 6:35 netsstuff.txt PCMCIA USB IDE SCSI. Network interfaces. Framebuffer devices. Display.

Linux Networking. How Networking Works Configuring Networking in Linux Using system-config-network Network debugging Wireless networking IPv6

KLASS User Guide. LiveCD Release Version 1.1. KLASS Release Version 2.2.0

Lab I: Using tcpdump and Wireshark

Transcription:

AN INTRODUCTION TO LINUX NETWORKING In this article, we ll explore networking under GNU/Linux. You ll find it interesting to manage the entire network through certain valid keystrokes known as commands. Imagine that you have to access the contents of several other machines from a mount point in your machine. Then imagine shutting down, rebooting, and installing applications on those remote machines, all at one time? Could you configure the WLAN and LAN interfaces from the CLI? This tutorial gives you some insights to the exciting bytes on controlling your network under GNU/Linux. First we will learn the Hello World of a networked machine. Let us ping! ping is a universal command that is available on every operating system to test the reachability of a network. When you shoot your terminal with the ping command and an IP address as its argument, the machine will try to send some bits of raw data towards the machine owning that IP address. If some machine exists with that IP address, it will send back certain bits. Thus the machine receives the bits and it confirms that a path is available from the current machine to the other through a network. We can check the existence of certain machines on the network by just pinging. To see which machines are up in the current network, let s write a bit of shell script. Open vim as the root: # vim /usr/bin/netup.sh and key in the following lines in it:

#/bin/bash for i in 192.168.1.{1..255}; // checks 192.168.1.x class of IPs. do ping -c2 $i > /dev/null; [ $? -eq 0 ] && echo $i is up. trap "exit" SIGINT // To force exit when Ctrl+C keystroke is applied. done Save the file, and make it executable by running the following command: chmod a+x /usr/bin/netup.sh Now, run the script as: [slynux@gnuxbox ~]$ netup.sh 192.168.1.1 is up. 192.168.1.3 is up. 192.168.1.4 is up. Configuring your network

Now, let us look at how to configure your machine on the network. You can configure it using two methods. It can be configured manually by the ifconfig command for static IP addressing or it can be done via the DHCP (Direct Host Control Protocol). Static IP addressing is the one that you explicitly instruct the system to use by giving an IP address for a given Ethernet or wireless interface. In case you re using the DHCP, simply issuing the dhclient command will fetch the system an available IP address from the DHCP server in your network. Note that it may not be the same IP address that your machine fetches each time you issue dhclient. Interface cards Machines are networked either via network cables or using wireless protocols. LAN cards used for networking are known as Ethernet and wireless LAN (WLAN) cards. We interface the network via this outlet. In *nix platforms, Ethernet cards or WLAN cards are denoted as eth0, eth1, etc, or wlan0, wlan1, etc, respectively. ifconfig We have ifconfig, a.k.a the interface config, for setting up a network on the machine. To get information about the availability of interface devices available on the current machine, open a terminal and execute the following as the root: [slynux@gnuxbox ~]# ifconfig -a eth0 Link encap:ethernet HWaddr 00:1C:23:FB:37:22 inet6 addr: fe80::21c:23ff:fefb:3722/64 Scope:Link UP BROADCAST MULTICAST MTU:1500 Metric:1

RX packets:9724 errors:0 dropped:0 overruns:0 frame:0 TX packets:2720 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:2400589 (2.2 MiB) TX bytes:645396 (630.2 KiB) Interrupt:17 lo Link encap:local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:76320 errors:0 dropped:0 overruns:0 frame:0 TX packets:76320 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:87151068 (83.1 MiB) TX bytes:87151068 (83.1 MiB) wlan0 Link encap:ethernet HWaddr 00:1C:BF:87:25:D2 inet addr:192.168.1.143 Bcast:192.168.1.255 Mask:255.255.255.0 inet6 addr: fe80::21c:bfff:fe87:25d2/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:45302 errors:0 dropped:0 overruns:0 frame:0

TX packets:37510 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:31091293 (29.6 MiB) TX bytes:9734025 (9.2 MiB) Here I have three interfaces eth0, lo and wlan0, where: eth0 corresponds to the Ethernet card lo corresponds to a loopback device that points to the localhost network wlan0 corresponds to the wireless LAN card Static IP addressing For static IP addressing, issue the following command as the root: ifconfig <device name< <ip address> For example: ifconfig eth0 192.168.0.2 ifconfig -a gives you details of all interface devices and configurations. In order to receive details of only one Ethernet device, execute ifconfig eth0. The following is an example output: [root@gnubox slynux]# ifconfig eth0 eth0 Link encap:ethernet HWaddr 00:1C:23:FB:37:22

inet addr:192.168.0.2 Bcast:192.168.0.255 Mask:255.255.255.0 inet6 addr: fe80::21c:23ff:fefb:3722/64 Scope:Link UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:9724 errors:0 dropped:0 overruns:0 frame:0 TX packets:2720 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:2400589 (2.2 MiB) TX bytes:645396 (630.2 KiB) Interrupt:17 Now, let us go about setting the subnet mask. This is done easily with ifconfig, as follows: ifconfig eth0 192.168.0.2 netmask 255.255.255.0 Now that the IP address and subnet mask is configured (or reconfigured), how do you get your Ethernet up (i.e., available) and down? The ifup and ifdown commands help you with that as follows: ifup eth0 ifdown eth0