SlideShare a Scribd company logo
1 of 34
Download to read offline
If there is any issue at setup or connection contact support@k21technologies.com
Overview of Unix
Activity Guide 5
[Edition 1]
[Last Update 130815]
For any issues/help contact : support@k21technologies.com
If there is any issue at setup or connection contact support@k21technologies.com
Network Configuration & Troubleshooting
It is a connection between two are more machines to communicate with each other.
the basic requirements for Networking are:
 NIC(Networking Interface Controller or Card)
 Media
 Topology
 Protocol
 IP Address
NIC(Networking Interface Controller or Card)
A network interface controller (also known as a network interface card, network adapter, LAN adapter
and by similar terms) is a computer hardware component that connects as a computer to a computer
network. Each NIC will be having a unique MAC address(Media Access Control Address) to avoid
conflicts between same NIC adapters. In Linux these NIC adapter is represented by word "eth". For
Example
Media
Media is the medium via which two different computer's NIC card will be connected. The best example
for media is cable. Example RJ 45, CAT 5 etc
Topology
Topology is the scheme or design in which the computers in the network will be connected to each
other. Example for topology is Bus, Ring, Star, mesh, tree topologies.
Protocol
A network protocol defines rules and conventions for communication between network devices.
Protocols for computer networking all generally use packet switching techniques to send and receive
messages in the form of packets. Network protocols include mechanisms for devices to identify and
make connections with each other, as well as formatting rules that specify how data is packaged into
messages send and received. some protocols also support message acknowledgement and data
compression designed for reliable and/or high-performance network communication. Hundreds of
different computer network protocols have been developed each designed for specifiec purposes and
environments.
If there is any issue at setup or connection contact support@k21technologies.com
Example of protocols are TCP/IP(Transmission Control Protocol),UDP(User Datagram Protocol),HTTP.
The most widely and regularly used protocols for transfering data are TCP and UDP. Let's analyze some
basic differences between TCP/IP and UDP.
TCP/IP UDP
Transmission Control Protocol User Datagram Protocol
It is connection Oriented Connectionless
Reliable Non-Reliable
TCP Acknowledgment will be sent/received No Acknowledgement for UDP
Slow Communication Faster communication
Protocol Number for TCP is 6 Protocol number for UDP is 17
HTTP, FTP, SMTP uses TCP DNS, DHCP uses UDP
IP ADDRESS
An IP ADDRESS can be thought of as being similar to a phone number, Just as every person who
communicates with a telephone is using a phone with unique phone number, every computer that is on
the internet has a unique IP address. Not only on internet but within an organisation every computer is
assigned an IP ADDRESS so that they can communicate with each other. Basically IP ADDRESSING is very
deep concept. To understand the concept of IP Address we need to understand some important aspect
of IP Address which is
 IP Address Classes
 Subnet mask
 Gateway
The above concepts in IP ADDRESSING are very important to understand networking clearly.
IP ADDRESS CLASSES
The IP ADDRESSES are further broken down into classes. These classes are A,B,C,D,E and their possible
ranges can be seen in Figure below.
Class Start End Default subnet
mask
CIDR
Class A 0.0.0.0 127.255.255.255 255.0.0.0 /8
Class B 128.0.0.0 191.255.255.255 255.255.0.0 /16
Class C 192.0.0.0 223.255.255.255 255.255.255.0 /24
Class D(multicast) 224.0.0.0 239.255.255.255
Class E(reserved) 240.0.0.0 255.255.255.255
If there is any issue at setup or connection contact support@k21technologies.com
* CIDR - Classless Inter-Domain Routing
* 127.0.0.0 to 127.255.255.255 is reserved for loopback address
loopback:
A special IP number(127.0.0.1) that is designated for the software loopback interface of a machine.
127.0.0.0 Through 127.255.255.255 is also reserved for loopback and is used for internal testing on local
machines.
Multicast:
Multicasting allows a single message to be sent to a group of receipients. Emailing, teleconferencing, are
examples of multicasting. It uses the network infrastructure and standards to send messages.
Subnet Mask:
A subnet mask allows user to identify which part of an IP address is reserved for the network and which
part is available for host use. By looking at the IP address alone, especially now with classless inter-
domain routing, users cannot tell which part of the address is which. Adding the subnet mask or
netmask gives users all the information needed to calculate network and host portions of the address
with ease. In summary, knowing the subnet mask can allow users to easily calculate whether IP
addresses are on the same subnet or not.
Netmask 255. 255. 255. 0
Binary 11111111 11111111 11111111 00000000
Netmask length 8 16 24 --
Gateway
A gateway is a network point that provides entrance into another network. On the Internet, a node or
stopping point can be either a gateway node or host (end-point) node. Both the computers of the
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.
If there is any issue at setup or connection contact support@k21technologies.com
For example let's say our network is 192.168. something and we want to send a file to other computer
on 10.10 network, so we need a gateway to communicate between two computers of differrent
networks.
some important configuration files / directories of network configurations
#/etc/sysconfig/network-scripts
is the directory which keeps the configuration of network devices connected to the system.
It also keeps the information about the hostname assigned to the system. If you want to change the
hostname permanently, you need to change the hostname in this file.
#/etc/sysconfig/network
If there is any issue at setup or connection contact support@k21technologies.com
#/etc/hosts a file which is responsible for resolving hostname into IP locally, in other word it acts a local
DNS if DNS Server is not accessible.
#/etc/resolv.conf is a file which keeps the address of DNS server to which the clients will be accessing to
resolve IP to hostname and hostname to IP.
#ifconfig : To check IP ADDRESS
#ifconfig eth0 To check the ip of aparticular interface
If there is any issue at setup or connection contact support@k21technologies.com
#ifconfig <adapter name>
#ifconfig eth0
#hostname To check the hostname
#hostname -i To check the ip of the host
#host <ipaddress> To check whether DNS is resolving or not
#host <hostname>
If there is any issue at setup or connection contact support@k21technologies.com
#nslookup <ip address> / nslookup <hostname>
#dig<hostname> The most common command used to check DNS function is "dig"
#dig -x 192.168.2.3
If there is any issue at setup or connection contact support@k21technologies.com
#ping 192.168.2.3 checking network connectivity using ping command
Note:- ( use ctrl+c to stop pinging)
#ping -c <counts> <ip address>
If there is any issue at setup or connection contact support@k21technologies.com
Changing the hostname
 check the current hostname with hostname command
 The syntax for changing the hostname is #hostname <new name>
Note : The above change is temporary and will be last only till you are logged in, If you want to change it
permanantly edit /edit/sysconfig/network file and then logout and login to confirm the change.
Note: already discussed in separate document
Assigning/Changing the IP Address:
Steps for changing the IP Address.
 To change the IP Address use the following utility
#setup or #system-config-network
 It will open a text base utility follow the steps below and change the ip address.
 Restart the network service to apply the changes.
 Make the network service starts after reboot.
 Let’s begin with setup
If there is any issue at setup or connection contact support@k21technologies.com
Move the cursor to Network configuration and press enter
If there is any issue at setup or connection contact support@k21technologies.com
Move the cursor to Edit a device params
Note:- If system-config-network command is used, it will directly take you to above position.
Now select the NIC adapter i.e eth0 and press enter
If there is any issue at setup or connection contact support@k21technologies.com
Assign the above ip address and other details as per your requirement, move the cursor to ‘OK’ and
press enter
If you want static IP just press “Space bar” on “Use DHCP”
If there is any issue at setup or connection contact support@k21technologies.com
If there is any issue at setup or connection contact support@k21technologies.com
Move the cursor to “save” to save the changes in device configuration and press enter.
Once again move the cursor to save and quit and press enter
If there is any issue at setup or connection contact support@k21technologies.com
Finallym move the cursor to quit button and press enter to quit the utility.
Now restart the network services and and check for the IP ADDRESS
#service network restart
If there is any issue at setup or connection contact support@k21technologies.com
If the change is not reflected with above service restart, restart the network manager
#service network manager restart (N and M are case sensitive)
 Now we have successfully assigned an IP address to a machine.
If there is any issue at setup or connection contact support@k21technologies.com
 You can also check the functioning of newly assigned IP address by pinging it from other
machines in the network.
 If it is not pinging from outside then check whether the cable is connected properly or not.
ADVANCED NETWORK CONFIGURATION
IP ALIASING:
on a Linux server, one IP is typically assigned to a NIC(network interface card), i.e ethernet card. The IP
address assigned to the NIC serves as the primary IP. In a situation where you'll need multiple
address(that connect to a same network), you may use IP aliasing feature of the Linux to map multiple IP
address to a single NIC.
If your server has more than one IP address or is on more than one network interface, you can use the IP
Aliasing function in order to control IP Aliasing on system network interfaces.
To create an Alias IP
Turn off the Network Manager, as NM will not support IP Aliasing.
#service NetworkManager stop
If there is any issue at setup or connection contact support@k21technologies.com
#service NetworkManager off
Create the Alias IP by using following command
#ifconfig eth0:192.168.2.10 netmask 255.255.255.0 up
#ping 192.168.2.10
make the changes permanent, else the configuration will be lost if the system is restarted.
Navigate to /etc/sysconfig/network-scripts and create a configuration file for alias ip
cd /etc/sysconfig/network-scripts/
cp -p ifcfg-eth0 ifcfg-eth0:0
Once copied edit as follows
#vi ifcfg-eth1:0
If there is any issue at setup or connection contact support@k21technologies.com
reboot the system and check whether the ip address will be activated or not
likewise you can make any number of aliases needed
NETWORK INTERFACE CONTROLLER(NIC) BONDING:
NIC channel bonding allows multiple network cards to act as one, allowing increased bandwidth and
redundancy.
using more than one hard drive to achieve better performance and fault tolerance is very common. Less
well known is that it's also possible to aggregate more than one network interface into a single logical
interface. In Linux, this is handled by the bonding driver. Benefits of doing this are much the same as the
benefits of aggregating discs using RAID: if one device dies, your server carries on working and by using
two devices in parallel, performance can be imporved.
The first thing you need is two network interfaces. It'snot entirely uncommon for a server to come with
two: one gigabit card on the motherboard and a separate 100mb PCI card. You will need to ensure that
the linux kernel has recognised both interfaces. Running /sbin/ifconfig lists network interfaces.
If there is any issue at setup or connection contact support@k21technologies.com
Typically, you should see both eth0 and eth1 interfaces. If not, make sure that the modules for both
interfaces have been compiled for your kernel and loaded. you may need to do something special if both
devices use the same driver.
Modes of Bonding(Types)
mode=<value>
 balance-rr or 0 - Sets a round-robin policy for fault tolerance and load balancing. Transmission
are received and sent out sequentially on each bonded slave interface beginning with the first
one available.
 active-backup or 1 - Sets an active-backup policy for fault tolerance. Transmissions are received
and sent out via the first available bonded slave interface. Another bonded slave interface is
only used if the active bonded slave interface fails.
 balance-xor or 2 - sets an XOR(exclusive-or) policy for fault tolerance and load balancing. Using
this method, the interface matches up the incoming requestes MAC address with the MAC
address for one of the slave NIC's. Once this link is established, transmission are sent out
sequentially beginning with the first available interface.
 broadcast or 3 - sets a broadcast policy for fault tolerance. All transmissions are sent on all
slave interfaces.
 802.3ad OR 4 - sets an IEEE 802.3ad dynamic link aggregation policy. Creates aggregation
groups that share the same speed and duplex settings. Transmits and receives on all slaves in
the active aggregator, Requires a switch that is 802.3ad compliant.
 balance-tlb or 5 - sets a Transmit Load Balancing(TLB) policy for fault tolerance and load
balancing. The outgoing traffic is distributed according to the current load on each slave
interface. Incoming traffic is received by the current slave. If the receiving slave fails, another
slave takes over the MAC address or the failed slave.
 balance-alb or 6 - Sets an Active Load Balancing(ALB) policy for fault tolerance and load
balancing. Includes transmit and receive load balancing for IPV4 traffic Receive load balancing is
achieved through ARP negotiation.
If there is any issue at setup or connection contact support@k21technologies.com
Let's assume we have two network interfaces ("eth0" and "eth1") and we want to bond them so they
look like a single interface ("bond0").
Step1: check whether the server is having two Ethernet adapters or not
Step2: Add another Network card and re-check
"/etc/modprobe.conf
alias bond0 bonding
Step3: Make sure the Network Manager is not running, If running stop the services for it and make it
permanent.
If there is any issue at setup or connection contact support@k21technologies.com
The files defining the regular and bonded interfaces are located in the "/etc/sysconfig/network-scripts"
directory. Create a new file called "ifcfg-bond0" for the bonded interface with the following contents
Step4: Create a Bonding configuration file, say bond0 in /etc/sysconfig/network-scripts
#cd /etc/sysconfig/network-scripts
Copy ifcfg-eth0 file to name ifcfg-bond0 cp ifcfg-eth0 ifcfg-bond0
(adjust the network parameters as applicable).
DEVICE=bond0
BOOTPROTO=none
ONBOOT=yes
NETWORK=192.168.0.0
NETMASK=255.255.255.0
IPADDR=192.168.0.171
USERCTL=no
BONDING_OPTS="mode=1 miimon=100"
miimon=<time_in_milliseconds>
If there is any issue at setup or connection contact support@k21technologies.com
specifies( in milliseconds) how often MII link monitoring occurs. This is useful if high availability is
required because MII is used to verify that the NIC is active.
To verify that the driver for a particular NIC supports that MI tool, type the following command as root:
#ethtool <interface_name> | grep "Link detected:"
Step6: Amend the existing "ifcfg-eth0" and "ifcfg-eth1" files, adding the "MASTER" and "SLAVE"
parameters. The contents of these files should look like this.
#eth0
DEVICE=eth0
MASTER=bond0
SLAVE=yes
USERCTL=no
BOOTPROTO=none
ONBOOT=yes
#eth1
DEVICE=eth1
MASTER=bond0
SLAVE=yes
USERCTL=no
BOOTPROTO=none
ONBOOT=yes
Step7: Restart the network services
If there is any issue at setup or connection contact support@k21technologies.com
The bonded interface can be displayed using the ifconfig command, which shows "bond0" running as
the master and both "eth0" and "eth1" running as slaves.
Once the bond is configured it acts like any other Ethernet device (For example I can connect from
putty)
If there is any issue at setup or connection contact support@k21technologies.com
If there is any issue at setup or connection contact support@k21technologies.com
We can also create (alias interfaces) just like we created on eth0 previously For example, you can
configure alias interfaces to handle multiple IP addresses
Create the "ifcfg-bond0:1" and "ifcfg-bond0:2" files in the "/etc/sysconfig/network-scripts" directory
with the following contents.
# ifcfg-bond0:1 file contents
DEVICE=bond0:1
BOOTPROTO=none
ONBOOT=yes
NETWORK=192.168.2.0
NETMASK=255.255.255.0
IPADDR=192.168.2.12
USERCTL=no
BONDING_OPTS="mode=1 miimon=100"
# ifcfg-bond0:2 file contents
DEVICE=bond0:2
BOOTPROTO=none
If there is any issue at setup or connection contact support@k21technologies.com
ONBOOT=yes
NETWORK=192.168.2.0
NETMASK=255.255.255.0
IPADDR=192.168.2.13
USERCTL=no
BONDING_OPTS="mode=1 miimon=100"
Notice, the device names and IP addresses differ from the original "ifcfg-bond0" file.
The ifconfig command shows the three IP addresses being handled by the bond.
If there is any issue at setup or connection contact support@k21technologies.com
If there is any issue at setup or connection contact support@k21technologies.com
To check the status of bonding #cat /prc/net/bonding/bond0
To change the active slave use the following command. #ifenslave –c bond0 eth1
If there is any issue at setup or connection contact support@k21technologies.com
To set a round robin policy for fault tolerance and load balancing, Make the changes in ifcfg-bon0
If there is any issue at setup or connection contact support@k21technologies.com
Finally to detach or remove a adapter from bonding use #ifenslave –d bond0 eth1
If there is any issue at setup or connection contact support@k21technologies.com
Observe the active slave has changed from eth1 to eth0
To re-attach the adapter, reload or restart the network service.
If there is any issue at setup or connection contact support@k21technologies.com
=============End of the Activity 5 Guide========

More Related Content

What's hot

Basic ip traffic management with access control lists
Basic ip traffic management with access control listsBasic ip traffic management with access control lists
Basic ip traffic management with access control listsSourabh Badve
 
Domain name system
Domain name systemDomain name system
Domain name systemDiwaker Pant
 
I pv4 address classes
I pv4 address classesI pv4 address classes
I pv4 address classesmail2rajeev10
 
Troubleshooting Network and Network Utilities
Troubleshooting Network and Network UtilitiesTroubleshooting Network and Network Utilities
Troubleshooting Network and Network UtilitiesRubal Sagwal
 
Tcp Udp Icmp And The Transport Layer
Tcp Udp Icmp And The Transport LayerTcp Udp Icmp And The Transport Layer
Tcp Udp Icmp And The Transport Layertmavroidis
 
Introduction 2 linux
Introduction 2 linuxIntroduction 2 linux
Introduction 2 linuxPapu Kumar
 
Chapter 29 Domain Name System.ppt
Chapter 29 Domain Name System.pptChapter 29 Domain Name System.ppt
Chapter 29 Domain Name System.pptwebhostingguy
 
Chap2. ipv4-arp-icmp
Chap2. ipv4-arp-icmpChap2. ipv4-arp-icmp
Chap2. ipv4-arp-icmp東原 李
 
Introduction to SSH
Introduction to SSHIntroduction to SSH
Introduction to SSHHemant Shah
 
Course 102: Lecture 20: Networking In Linux (Basic Concepts)
Course 102: Lecture 20: Networking In Linux (Basic Concepts) Course 102: Lecture 20: Networking In Linux (Basic Concepts)
Course 102: Lecture 20: Networking In Linux (Basic Concepts) Ahmed El-Arabawy
 

What's hot (20)

Ip security
Ip security Ip security
Ip security
 
Dns
DnsDns
Dns
 
Basic ip traffic management with access control lists
Basic ip traffic management with access control listsBasic ip traffic management with access control lists
Basic ip traffic management with access control lists
 
Domain name system
Domain name systemDomain name system
Domain name system
 
SSH - Secure Shell
SSH - Secure ShellSSH - Secure Shell
SSH - Secure Shell
 
I pv4 address classes
I pv4 address classesI pv4 address classes
I pv4 address classes
 
Secure SHell
Secure SHellSecure SHell
Secure SHell
 
Troubleshooting Network and Network Utilities
Troubleshooting Network and Network UtilitiesTroubleshooting Network and Network Utilities
Troubleshooting Network and Network Utilities
 
MAC & IP addresses
MAC & IP addressesMAC & IP addresses
MAC & IP addresses
 
Basic 50 linus command
Basic 50 linus commandBasic 50 linus command
Basic 50 linus command
 
CCNA presentation.
CCNA presentation.CCNA presentation.
CCNA presentation.
 
DNS Presentation
DNS PresentationDNS Presentation
DNS Presentation
 
Tcp Udp Icmp And The Transport Layer
Tcp Udp Icmp And The Transport LayerTcp Udp Icmp And The Transport Layer
Tcp Udp Icmp And The Transport Layer
 
Introduction 2 linux
Introduction 2 linuxIntroduction 2 linux
Introduction 2 linux
 
Chapter 29 Domain Name System.ppt
Chapter 29 Domain Name System.pptChapter 29 Domain Name System.ppt
Chapter 29 Domain Name System.ppt
 
Network Adapter
Network AdapterNetwork Adapter
Network Adapter
 
Chap2. ipv4-arp-icmp
Chap2. ipv4-arp-icmpChap2. ipv4-arp-icmp
Chap2. ipv4-arp-icmp
 
Introduction to SSH
Introduction to SSHIntroduction to SSH
Introduction to SSH
 
Course 102: Lecture 20: Networking In Linux (Basic Concepts)
Course 102: Lecture 20: Networking In Linux (Basic Concepts) Course 102: Lecture 20: Networking In Linux (Basic Concepts)
Course 102: Lecture 20: Networking In Linux (Basic Concepts)
 
DHCP
DHCPDHCP
DHCP
 

Viewers also liked

Linux training
Linux trainingLinux training
Linux trainingartisriva
 
Linux Based Network Proposal
Linux Based Network ProposalLinux Based Network Proposal
Linux Based Network ProposalChris Riccio
 
Linux conf-admin
Linux conf-adminLinux conf-admin
Linux conf-adminbadamisri
 
ISCSI server configuration
ISCSI server configurationISCSI server configuration
ISCSI server configurationThamizharasan P
 
Linux apache installation
Linux apache installationLinux apache installation
Linux apache installationDima Gomaa
 
Nagios Conference 2013 - David Stern - The Nagios Light Bar
Nagios Conference 2013 - David Stern - The Nagios Light BarNagios Conference 2013 - David Stern - The Nagios Light Bar
Nagios Conference 2013 - David Stern - The Nagios Light BarNagios
 
Apache server configuration
Apache server configurationApache server configuration
Apache server configurationThamizharasan P
 
DNS server configurationDns server configuration
DNS server configurationDns server configurationDNS server configurationDns server configuration
DNS server configurationDns server configurationThamizharasan P
 
Webmin configuration in Linux
Webmin configuration in LinuxWebmin configuration in Linux
Webmin configuration in LinuxThamizharasan P
 
Samba server configuration
Samba server configurationSamba server configuration
Samba server configurationThamizharasan P
 
GlusterFS CTDB Integration
GlusterFS CTDB IntegrationGlusterFS CTDB Integration
GlusterFS CTDB IntegrationEtsuji Nakai
 
Nagios Conference 2013 - Eric Stanley and Andy Brist - API and Nagios
Nagios Conference 2013 - Eric Stanley and Andy Brist - API and NagiosNagios Conference 2013 - Eric Stanley and Andy Brist - API and Nagios
Nagios Conference 2013 - Eric Stanley and Andy Brist - API and NagiosNagios
 
SELinux for Everyday Users
SELinux for Everyday UsersSELinux for Everyday Users
SELinux for Everyday UsersPaulWay
 
Squid proxy-configuration-guide
Squid proxy-configuration-guideSquid proxy-configuration-guide
Squid proxy-configuration-guidejasembo
 
Why favour Icinga over Nagios @ FrOSCon 2015
Why favour Icinga over Nagios @ FrOSCon 2015Why favour Icinga over Nagios @ FrOSCon 2015
Why favour Icinga over Nagios @ FrOSCon 2015Icinga
 
Squid Proxy Server
Squid Proxy ServerSquid Proxy Server
Squid Proxy Server13bcs0012
 

Viewers also liked (20)

Linux training
Linux trainingLinux training
Linux training
 
Linux Based Network Proposal
Linux Based Network ProposalLinux Based Network Proposal
Linux Based Network Proposal
 
Linux conf-admin
Linux conf-adminLinux conf-admin
Linux conf-admin
 
ISCSI server configuration
ISCSI server configurationISCSI server configuration
ISCSI server configuration
 
Linux apache installation
Linux apache installationLinux apache installation
Linux apache installation
 
Nagios Conference 2013 - David Stern - The Nagios Light Bar
Nagios Conference 2013 - David Stern - The Nagios Light BarNagios Conference 2013 - David Stern - The Nagios Light Bar
Nagios Conference 2013 - David Stern - The Nagios Light Bar
 
Apache server configuration
Apache server configurationApache server configuration
Apache server configuration
 
DNS server configurationDns server configuration
DNS server configurationDns server configurationDNS server configurationDns server configuration
DNS server configurationDns server configuration
 
Webmin configuration in Linux
Webmin configuration in LinuxWebmin configuration in Linux
Webmin configuration in Linux
 
Samba server configuration
Samba server configurationSamba server configuration
Samba server configuration
 
GlusterFS CTDB Integration
GlusterFS CTDB IntegrationGlusterFS CTDB Integration
GlusterFS CTDB Integration
 
Nagios Conference 2013 - Eric Stanley and Andy Brist - API and Nagios
Nagios Conference 2013 - Eric Stanley and Andy Brist - API and NagiosNagios Conference 2013 - Eric Stanley and Andy Brist - API and Nagios
Nagios Conference 2013 - Eric Stanley and Andy Brist - API and Nagios
 
SELinux for Everyday Users
SELinux for Everyday UsersSELinux for Everyday Users
SELinux for Everyday Users
 
Squid server
Squid serverSquid server
Squid server
 
Squid proxy-configuration-guide
Squid proxy-configuration-guideSquid proxy-configuration-guide
Squid proxy-configuration-guide
 
Linux
LinuxLinux
Linux
 
Squid Server
Squid ServerSquid Server
Squid Server
 
Why favour Icinga over Nagios @ FrOSCon 2015
Why favour Icinga over Nagios @ FrOSCon 2015Why favour Icinga over Nagios @ FrOSCon 2015
Why favour Icinga over Nagios @ FrOSCon 2015
 
Squid Proxy Server
Squid Proxy ServerSquid Proxy Server
Squid Proxy Server
 
FILE SERVER
FILE SERVERFILE SERVER
FILE SERVER
 

Similar to Network configuration in Linux

Welcome to IP Surveillance 101
Welcome to IP Surveillance 101Welcome to IP Surveillance 101
Welcome to IP Surveillance 101grantsupplies
 
Tcpip networking basics_and_troubleshooting
Tcpip networking basics_and_troubleshootingTcpip networking basics_and_troubleshooting
Tcpip networking basics_and_troubleshootingKumar
 
Networking For Application Developers by Roy Kim
Networking For Application Developers by Roy KimNetworking For Application Developers by Roy Kim
Networking For Application Developers by Roy KimRoy Kim
 
Network Design for a company
Network Design for a companyNetwork Design for a company
Network Design for a companyrosu555
 
Simplified Networking and Troubleshooting for K-12 Teachers
Simplified Networking and Troubleshooting for K-12 TeachersSimplified Networking and Troubleshooting for K-12 Teachers
Simplified Networking and Troubleshooting for K-12 Teacherswebhostingguy
 
Design an Implementation of A Messaging and Resource Sharing Software
Design an Implementation of A Messaging and Resource Sharing SoftwareDesign an Implementation of A Messaging and Resource Sharing Software
Design an Implementation of A Messaging and Resource Sharing Softwarenilabarai
 
computer network designing- final year project
computer network designing- final year projectcomputer network designing- final year project
computer network designing- final year projectAboubacar Mchangama
 
Ip Addressing Basics
Ip Addressing BasicsIp Addressing Basics
Ip Addressing Basicstmavroidis
 
Tutorial mikrotik step by step anung muhandanu
Tutorial mikrotik step by step  anung muhandanu Tutorial mikrotik step by step  anung muhandanu
Tutorial mikrotik step by step anung muhandanu Alessandro De Suoodh
 
Quantum composers white paper ethernet connectivity
Quantum composers white paper  ethernet connectivityQuantum composers white paper  ethernet connectivity
Quantum composers white paper ethernet connectivityQuantum Composers
 

Similar to Network configuration in Linux (20)

Welcome to IP Surveillance 101
Welcome to IP Surveillance 101Welcome to IP Surveillance 101
Welcome to IP Surveillance 101
 
Tcpip networking basics_and_troubleshooting
Tcpip networking basics_and_troubleshootingTcpip networking basics_and_troubleshooting
Tcpip networking basics_and_troubleshooting
 
Networking For Application Developers by Roy Kim
Networking For Application Developers by Roy KimNetworking For Application Developers by Roy Kim
Networking For Application Developers by Roy Kim
 
Network Design for a company
Network Design for a companyNetwork Design for a company
Network Design for a company
 
Project report,nowrin
Project report,nowrinProject report,nowrin
Project report,nowrin
 
Networking 101
Networking 101Networking 101
Networking 101
 
Networking 101
Networking 101Networking 101
Networking 101
 
Networking 101
Networking 101Networking 101
Networking 101
 
Networking 101
Networking 101Networking 101
Networking 101
 
GREAT MINDS
GREAT MINDSGREAT MINDS
GREAT MINDS
 
Simplified Networking and Troubleshooting for K-12 Teachers
Simplified Networking and Troubleshooting for K-12 TeachersSimplified Networking and Troubleshooting for K-12 Teachers
Simplified Networking and Troubleshooting for K-12 Teachers
 
Applications.docx
Applications.docxApplications.docx
Applications.docx
 
Tutorial mikrotik step by step
Tutorial mikrotik step by stepTutorial mikrotik step by step
Tutorial mikrotik step by step
 
Design an Implementation of A Messaging and Resource Sharing Software
Design an Implementation of A Messaging and Resource Sharing SoftwareDesign an Implementation of A Messaging and Resource Sharing Software
Design an Implementation of A Messaging and Resource Sharing Software
 
computer network designing- final year project
computer network designing- final year projectcomputer network designing- final year project
computer network designing- final year project
 
class30.ppt
class30.pptclass30.ppt
class30.ppt
 
Networking
NetworkingNetworking
Networking
 
Ip Addressing Basics
Ip Addressing BasicsIp Addressing Basics
Ip Addressing Basics
 
Tutorial mikrotik step by step anung muhandanu
Tutorial mikrotik step by step  anung muhandanu Tutorial mikrotik step by step  anung muhandanu
Tutorial mikrotik step by step anung muhandanu
 
Quantum composers white paper ethernet connectivity
Quantum composers white paper  ethernet connectivityQuantum composers white paper  ethernet connectivity
Quantum composers white paper ethernet connectivity
 

More from Mohammed Yazdani

Installing webmin on linux
Installing webmin on linux Installing webmin on linux
Installing webmin on linux Mohammed Yazdani
 
Configuring vnc server in linux
Configuring vnc server  in linux Configuring vnc server  in linux
Configuring vnc server in linux Mohammed Yazdani
 
Administering Remote System in Linux
Administering Remote System in Linux Administering Remote System in Linux
Administering Remote System in Linux Mohammed Yazdani
 
User and group administration in Linux
User and group administration in LinuxUser and group administration in Linux
User and group administration in LinuxMohammed Yazdani
 
Solaris 10 installation on vmware
Solaris 10 installation on vmware Solaris 10 installation on vmware
Solaris 10 installation on vmware Mohammed Yazdani
 
Backup and restore in linux
Backup and restore in linux Backup and restore in linux
Backup and restore in linux Mohammed Yazdani
 
Installation of Oracle Linux 5.4 32 bit on vmware
Installation of Oracle Linux 5.4 32 bit on vmware Installation of Oracle Linux 5.4 32 bit on vmware
Installation of Oracle Linux 5.4 32 bit on vmware Mohammed Yazdani
 

More from Mohammed Yazdani (8)

Installing webmin on linux
Installing webmin on linux Installing webmin on linux
Installing webmin on linux
 
Configuring vnc server in linux
Configuring vnc server  in linux Configuring vnc server  in linux
Configuring vnc server in linux
 
Administering Remote System in Linux
Administering Remote System in Linux Administering Remote System in Linux
Administering Remote System in Linux
 
Overview on Linux
Overview on LinuxOverview on Linux
Overview on Linux
 
User and group administration in Linux
User and group administration in LinuxUser and group administration in Linux
User and group administration in Linux
 
Solaris 10 installation on vmware
Solaris 10 installation on vmware Solaris 10 installation on vmware
Solaris 10 installation on vmware
 
Backup and restore in linux
Backup and restore in linux Backup and restore in linux
Backup and restore in linux
 
Installation of Oracle Linux 5.4 32 bit on vmware
Installation of Oracle Linux 5.4 32 bit on vmware Installation of Oracle Linux 5.4 32 bit on vmware
Installation of Oracle Linux 5.4 32 bit on vmware
 

Recently uploaded

SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 

Recently uploaded (20)

SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 

Network configuration in Linux

  • 1. If there is any issue at setup or connection contact support@k21technologies.com Overview of Unix Activity Guide 5 [Edition 1] [Last Update 130815] For any issues/help contact : support@k21technologies.com
  • 2. If there is any issue at setup or connection contact support@k21technologies.com Network Configuration & Troubleshooting It is a connection between two are more machines to communicate with each other. the basic requirements for Networking are:  NIC(Networking Interface Controller or Card)  Media  Topology  Protocol  IP Address NIC(Networking Interface Controller or Card) A network interface controller (also known as a network interface card, network adapter, LAN adapter and by similar terms) is a computer hardware component that connects as a computer to a computer network. Each NIC will be having a unique MAC address(Media Access Control Address) to avoid conflicts between same NIC adapters. In Linux these NIC adapter is represented by word "eth". For Example Media Media is the medium via which two different computer's NIC card will be connected. The best example for media is cable. Example RJ 45, CAT 5 etc Topology Topology is the scheme or design in which the computers in the network will be connected to each other. Example for topology is Bus, Ring, Star, mesh, tree topologies. Protocol A network protocol defines rules and conventions for communication between network devices. Protocols for computer networking all generally use packet switching techniques to send and receive messages in the form of packets. Network protocols include mechanisms for devices to identify and make connections with each other, as well as formatting rules that specify how data is packaged into messages send and received. some protocols also support message acknowledgement and data compression designed for reliable and/or high-performance network communication. Hundreds of different computer network protocols have been developed each designed for specifiec purposes and environments.
  • 3. If there is any issue at setup or connection contact support@k21technologies.com Example of protocols are TCP/IP(Transmission Control Protocol),UDP(User Datagram Protocol),HTTP. The most widely and regularly used protocols for transfering data are TCP and UDP. Let's analyze some basic differences between TCP/IP and UDP. TCP/IP UDP Transmission Control Protocol User Datagram Protocol It is connection Oriented Connectionless Reliable Non-Reliable TCP Acknowledgment will be sent/received No Acknowledgement for UDP Slow Communication Faster communication Protocol Number for TCP is 6 Protocol number for UDP is 17 HTTP, FTP, SMTP uses TCP DNS, DHCP uses UDP IP ADDRESS An IP ADDRESS can be thought of as being similar to a phone number, Just as every person who communicates with a telephone is using a phone with unique phone number, every computer that is on the internet has a unique IP address. Not only on internet but within an organisation every computer is assigned an IP ADDRESS so that they can communicate with each other. Basically IP ADDRESSING is very deep concept. To understand the concept of IP Address we need to understand some important aspect of IP Address which is  IP Address Classes  Subnet mask  Gateway The above concepts in IP ADDRESSING are very important to understand networking clearly. IP ADDRESS CLASSES The IP ADDRESSES are further broken down into classes. These classes are A,B,C,D,E and their possible ranges can be seen in Figure below. Class Start End Default subnet mask CIDR Class A 0.0.0.0 127.255.255.255 255.0.0.0 /8 Class B 128.0.0.0 191.255.255.255 255.255.0.0 /16 Class C 192.0.0.0 223.255.255.255 255.255.255.0 /24 Class D(multicast) 224.0.0.0 239.255.255.255 Class E(reserved) 240.0.0.0 255.255.255.255
  • 4. If there is any issue at setup or connection contact support@k21technologies.com * CIDR - Classless Inter-Domain Routing * 127.0.0.0 to 127.255.255.255 is reserved for loopback address loopback: A special IP number(127.0.0.1) that is designated for the software loopback interface of a machine. 127.0.0.0 Through 127.255.255.255 is also reserved for loopback and is used for internal testing on local machines. Multicast: Multicasting allows a single message to be sent to a group of receipients. Emailing, teleconferencing, are examples of multicasting. It uses the network infrastructure and standards to send messages. Subnet Mask: A subnet mask allows user to identify which part of an IP address is reserved for the network and which part is available for host use. By looking at the IP address alone, especially now with classless inter- domain routing, users cannot tell which part of the address is which. Adding the subnet mask or netmask gives users all the information needed to calculate network and host portions of the address with ease. In summary, knowing the subnet mask can allow users to easily calculate whether IP addresses are on the same subnet or not. Netmask 255. 255. 255. 0 Binary 11111111 11111111 11111111 00000000 Netmask length 8 16 24 -- Gateway A gateway is a network point that provides entrance into another network. On the Internet, a node or stopping point can be either a gateway node or host (end-point) node. Both the computers of the 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.
  • 5. If there is any issue at setup or connection contact support@k21technologies.com For example let's say our network is 192.168. something and we want to send a file to other computer on 10.10 network, so we need a gateway to communicate between two computers of differrent networks. some important configuration files / directories of network configurations #/etc/sysconfig/network-scripts is the directory which keeps the configuration of network devices connected to the system. It also keeps the information about the hostname assigned to the system. If you want to change the hostname permanently, you need to change the hostname in this file. #/etc/sysconfig/network
  • 6. If there is any issue at setup or connection contact support@k21technologies.com #/etc/hosts a file which is responsible for resolving hostname into IP locally, in other word it acts a local DNS if DNS Server is not accessible. #/etc/resolv.conf is a file which keeps the address of DNS server to which the clients will be accessing to resolve IP to hostname and hostname to IP. #ifconfig : To check IP ADDRESS #ifconfig eth0 To check the ip of aparticular interface
  • 7. If there is any issue at setup or connection contact support@k21technologies.com #ifconfig <adapter name> #ifconfig eth0 #hostname To check the hostname #hostname -i To check the ip of the host #host <ipaddress> To check whether DNS is resolving or not #host <hostname>
  • 8. If there is any issue at setup or connection contact support@k21technologies.com #nslookup <ip address> / nslookup <hostname> #dig<hostname> The most common command used to check DNS function is "dig" #dig -x 192.168.2.3
  • 9. If there is any issue at setup or connection contact support@k21technologies.com #ping 192.168.2.3 checking network connectivity using ping command Note:- ( use ctrl+c to stop pinging) #ping -c <counts> <ip address>
  • 10. If there is any issue at setup or connection contact support@k21technologies.com Changing the hostname  check the current hostname with hostname command  The syntax for changing the hostname is #hostname <new name> Note : The above change is temporary and will be last only till you are logged in, If you want to change it permanantly edit /edit/sysconfig/network file and then logout and login to confirm the change. Note: already discussed in separate document Assigning/Changing the IP Address: Steps for changing the IP Address.  To change the IP Address use the following utility #setup or #system-config-network  It will open a text base utility follow the steps below and change the ip address.  Restart the network service to apply the changes.  Make the network service starts after reboot.  Let’s begin with setup
  • 11. If there is any issue at setup or connection contact support@k21technologies.com Move the cursor to Network configuration and press enter
  • 12. If there is any issue at setup or connection contact support@k21technologies.com Move the cursor to Edit a device params Note:- If system-config-network command is used, it will directly take you to above position. Now select the NIC adapter i.e eth0 and press enter
  • 13. If there is any issue at setup or connection contact support@k21technologies.com Assign the above ip address and other details as per your requirement, move the cursor to ‘OK’ and press enter If you want static IP just press “Space bar” on “Use DHCP”
  • 14. If there is any issue at setup or connection contact support@k21technologies.com
  • 15. If there is any issue at setup or connection contact support@k21technologies.com Move the cursor to “save” to save the changes in device configuration and press enter. Once again move the cursor to save and quit and press enter
  • 16. If there is any issue at setup or connection contact support@k21technologies.com Finallym move the cursor to quit button and press enter to quit the utility. Now restart the network services and and check for the IP ADDRESS #service network restart
  • 17. If there is any issue at setup or connection contact support@k21technologies.com If the change is not reflected with above service restart, restart the network manager #service network manager restart (N and M are case sensitive)  Now we have successfully assigned an IP address to a machine.
  • 18. If there is any issue at setup or connection contact support@k21technologies.com  You can also check the functioning of newly assigned IP address by pinging it from other machines in the network.  If it is not pinging from outside then check whether the cable is connected properly or not. ADVANCED NETWORK CONFIGURATION IP ALIASING: on a Linux server, one IP is typically assigned to a NIC(network interface card), i.e ethernet card. The IP address assigned to the NIC serves as the primary IP. In a situation where you'll need multiple address(that connect to a same network), you may use IP aliasing feature of the Linux to map multiple IP address to a single NIC. If your server has more than one IP address or is on more than one network interface, you can use the IP Aliasing function in order to control IP Aliasing on system network interfaces. To create an Alias IP Turn off the Network Manager, as NM will not support IP Aliasing. #service NetworkManager stop
  • 19. If there is any issue at setup or connection contact support@k21technologies.com #service NetworkManager off Create the Alias IP by using following command #ifconfig eth0:192.168.2.10 netmask 255.255.255.0 up #ping 192.168.2.10 make the changes permanent, else the configuration will be lost if the system is restarted. Navigate to /etc/sysconfig/network-scripts and create a configuration file for alias ip cd /etc/sysconfig/network-scripts/ cp -p ifcfg-eth0 ifcfg-eth0:0 Once copied edit as follows #vi ifcfg-eth1:0
  • 20. If there is any issue at setup or connection contact support@k21technologies.com reboot the system and check whether the ip address will be activated or not likewise you can make any number of aliases needed NETWORK INTERFACE CONTROLLER(NIC) BONDING: NIC channel bonding allows multiple network cards to act as one, allowing increased bandwidth and redundancy. using more than one hard drive to achieve better performance and fault tolerance is very common. Less well known is that it's also possible to aggregate more than one network interface into a single logical interface. In Linux, this is handled by the bonding driver. Benefits of doing this are much the same as the benefits of aggregating discs using RAID: if one device dies, your server carries on working and by using two devices in parallel, performance can be imporved. The first thing you need is two network interfaces. It'snot entirely uncommon for a server to come with two: one gigabit card on the motherboard and a separate 100mb PCI card. You will need to ensure that the linux kernel has recognised both interfaces. Running /sbin/ifconfig lists network interfaces.
  • 21. If there is any issue at setup or connection contact support@k21technologies.com Typically, you should see both eth0 and eth1 interfaces. If not, make sure that the modules for both interfaces have been compiled for your kernel and loaded. you may need to do something special if both devices use the same driver. Modes of Bonding(Types) mode=<value>  balance-rr or 0 - Sets a round-robin policy for fault tolerance and load balancing. Transmission are received and sent out sequentially on each bonded slave interface beginning with the first one available.  active-backup or 1 - Sets an active-backup policy for fault tolerance. Transmissions are received and sent out via the first available bonded slave interface. Another bonded slave interface is only used if the active bonded slave interface fails.  balance-xor or 2 - sets an XOR(exclusive-or) policy for fault tolerance and load balancing. Using this method, the interface matches up the incoming requestes MAC address with the MAC address for one of the slave NIC's. Once this link is established, transmission are sent out sequentially beginning with the first available interface.  broadcast or 3 - sets a broadcast policy for fault tolerance. All transmissions are sent on all slave interfaces.  802.3ad OR 4 - sets an IEEE 802.3ad dynamic link aggregation policy. Creates aggregation groups that share the same speed and duplex settings. Transmits and receives on all slaves in the active aggregator, Requires a switch that is 802.3ad compliant.  balance-tlb or 5 - sets a Transmit Load Balancing(TLB) policy for fault tolerance and load balancing. The outgoing traffic is distributed according to the current load on each slave interface. Incoming traffic is received by the current slave. If the receiving slave fails, another slave takes over the MAC address or the failed slave.  balance-alb or 6 - Sets an Active Load Balancing(ALB) policy for fault tolerance and load balancing. Includes transmit and receive load balancing for IPV4 traffic Receive load balancing is achieved through ARP negotiation.
  • 22. If there is any issue at setup or connection contact support@k21technologies.com Let's assume we have two network interfaces ("eth0" and "eth1") and we want to bond them so they look like a single interface ("bond0"). Step1: check whether the server is having two Ethernet adapters or not Step2: Add another Network card and re-check "/etc/modprobe.conf alias bond0 bonding Step3: Make sure the Network Manager is not running, If running stop the services for it and make it permanent.
  • 23. If there is any issue at setup or connection contact support@k21technologies.com The files defining the regular and bonded interfaces are located in the "/etc/sysconfig/network-scripts" directory. Create a new file called "ifcfg-bond0" for the bonded interface with the following contents Step4: Create a Bonding configuration file, say bond0 in /etc/sysconfig/network-scripts #cd /etc/sysconfig/network-scripts Copy ifcfg-eth0 file to name ifcfg-bond0 cp ifcfg-eth0 ifcfg-bond0 (adjust the network parameters as applicable). DEVICE=bond0 BOOTPROTO=none ONBOOT=yes NETWORK=192.168.0.0 NETMASK=255.255.255.0 IPADDR=192.168.0.171 USERCTL=no BONDING_OPTS="mode=1 miimon=100" miimon=<time_in_milliseconds>
  • 24. If there is any issue at setup or connection contact support@k21technologies.com specifies( in milliseconds) how often MII link monitoring occurs. This is useful if high availability is required because MII is used to verify that the NIC is active. To verify that the driver for a particular NIC supports that MI tool, type the following command as root: #ethtool <interface_name> | grep "Link detected:" Step6: Amend the existing "ifcfg-eth0" and "ifcfg-eth1" files, adding the "MASTER" and "SLAVE" parameters. The contents of these files should look like this. #eth0 DEVICE=eth0 MASTER=bond0 SLAVE=yes USERCTL=no BOOTPROTO=none ONBOOT=yes #eth1 DEVICE=eth1 MASTER=bond0 SLAVE=yes USERCTL=no BOOTPROTO=none ONBOOT=yes Step7: Restart the network services
  • 25. If there is any issue at setup or connection contact support@k21technologies.com The bonded interface can be displayed using the ifconfig command, which shows "bond0" running as the master and both "eth0" and "eth1" running as slaves. Once the bond is configured it acts like any other Ethernet device (For example I can connect from putty)
  • 26. If there is any issue at setup or connection contact support@k21technologies.com
  • 27. If there is any issue at setup or connection contact support@k21technologies.com We can also create (alias interfaces) just like we created on eth0 previously For example, you can configure alias interfaces to handle multiple IP addresses Create the "ifcfg-bond0:1" and "ifcfg-bond0:2" files in the "/etc/sysconfig/network-scripts" directory with the following contents. # ifcfg-bond0:1 file contents DEVICE=bond0:1 BOOTPROTO=none ONBOOT=yes NETWORK=192.168.2.0 NETMASK=255.255.255.0 IPADDR=192.168.2.12 USERCTL=no BONDING_OPTS="mode=1 miimon=100" # ifcfg-bond0:2 file contents DEVICE=bond0:2 BOOTPROTO=none
  • 28. If there is any issue at setup or connection contact support@k21technologies.com ONBOOT=yes NETWORK=192.168.2.0 NETMASK=255.255.255.0 IPADDR=192.168.2.13 USERCTL=no BONDING_OPTS="mode=1 miimon=100" Notice, the device names and IP addresses differ from the original "ifcfg-bond0" file. The ifconfig command shows the three IP addresses being handled by the bond.
  • 29. If there is any issue at setup or connection contact support@k21technologies.com
  • 30. If there is any issue at setup or connection contact support@k21technologies.com To check the status of bonding #cat /prc/net/bonding/bond0 To change the active slave use the following command. #ifenslave –c bond0 eth1
  • 31. If there is any issue at setup or connection contact support@k21technologies.com To set a round robin policy for fault tolerance and load balancing, Make the changes in ifcfg-bon0
  • 32. If there is any issue at setup or connection contact support@k21technologies.com Finally to detach or remove a adapter from bonding use #ifenslave –d bond0 eth1
  • 33. If there is any issue at setup or connection contact support@k21technologies.com Observe the active slave has changed from eth1 to eth0 To re-attach the adapter, reload or restart the network service.
  • 34. If there is any issue at setup or connection contact support@k21technologies.com =============End of the Activity 5 Guide========