networking in linux

19
By : Varnnit Jain 9990888972 Networking In Linux

Upload: varnnit-jain

Post on 22-Jan-2018

154 views

Category:

Education


6 download

TRANSCRIPT

Page 1: Networking in linux

By : Varnnit Jain

9990888972

Networking In Linux

Page 2: Networking in linux

Introduction Computers are connected in a network to exchange

information or resources with each other. Two or more computer are connected through network media called computer media.

There are a number of network devices or media that are involved to form computer network.

Computer loaded with Linux Operation System can also be a part of network whether it is a small or large network by multitasking and multi user natures.

Maintaining of system and network up and running is a task of System / Network Administrator’s job. In this article we are going to review frequently used network configuration and troubleshoot commands in Linux.

Page 3: Networking in linux

Network Interface Names

The linux kernel names interface with a specific

prefix depending on the type of interface.

For Example : all Ethernet interfaces start with

eth, regardless of the specific hardware vendor.

Following the prefix, each interface is numbered,

starting at zero.

etho, eth1 and eth2 would refer to the first,

second and third Ethernet interfaces.

Other interfaces include wlan0 for the first

wireless device, virbr0 for the internal bridge set

up for virtual hosts, bond0 for the first bonded

network device, and so on.

Page 4: Networking in linux

Network Configuration and

Troubleshooting

To check IP address of the system

#ip a

#ip ad

#ip add

Page 5: Networking in linux

Network Configuration and

Troubleshooting (Cont.)

Network and IP configuration settings

#system-config-network

#system-config-network-tui

Page 6: Networking in linux

Network Configuration and

Troubleshooting (Cont.)

To start network manually

#service network start

To restart network configuration

#service network restart

Page 7: Networking in linux

Network Configuration and

Troubleshooting (Cont.)

To keep network settings on when system

restarts

#chkconfig network on

For checking connectivity between systems.

#ping (IP address)

Page 8: Networking in linux

Network Configuration and

Troubleshooting (Cont.)

To disable NIC card/Interface (Here eth0)

#ifdown eth0

To enable NIC card/Interface (Here eth0)

#ifup eth0

Page 9: Networking in linux

Network Configuration and

Troubleshooting (Cont.)

To check the hostname

#hostname

To change the hostname

#hostname new_name

Page 10: Networking in linux

Configuration on System Network configuration in GUI mode.

#system-config-network

Firewall configuration in GUI mode.

#system-config-firewall

Date and time configuration in GUI mode.

#system-config-date

To setup different settings of the system. (complete setup console in GUI mode).

#setup

To check system IP configuration#ifconfig (same as ipconfig in windows)

Page 11: Networking in linux

Scenario

We have two systems. One with IP 10.0.0.1 and

another with IP 10.0.0.2 . We have to setup

network between both of these systems in order

to ping them to each other.

Step 1 : Enable the interface of the first system.

Page 12: Networking in linux

Step 2 : Set IP 10.0.0.1 to the ethernet 0 of the

first system.

using #system-config-network

Page 13: Networking in linux

Step 3 : Select the device you want to configure.

(Here we will chose eth0).

Page 14: Networking in linux

Step 4 : Network configuration window appears on the screen.

Fill in the required blanks

Page 15: Networking in linux

Step 5 : Set the IP 10.0.0.1

Page 16: Networking in linux

Step 6 : Enable the Interface eth0 using #ifupeth0

Check the IP configuration of the same port using #ifconfig

IP for the first system has been set successfully.

Page 17: Networking in linux

Repeat the steps for the second system.

Set IP 10.0.0.2

Page 18: Networking in linux

The network has been set between both the systems.

You can simply check the connectivity between the two.

Use the command ping 10.0.0.2 from first PC and see the results.

Page 19: Networking in linux