SlideShare a Scribd company logo
Network Tools
Network Basics
• Host – is a computer system on the network.
• Server – provides resources to clients via the network.
• Client – uses services from servers on the network.
• Protocol – a globally defined way for clients and servers
to communicate a service
• With Linux and Unix systems most tools are basing data
transfer on Network transport. The most outstanding
example of this is the X Server and Clients.
These initialize Network connection to provide a GUI
Telnet
• telnet is an application that enables users to connect to
a remote system
• The telnet server simulates a terminal to allow you to
connect to and work on a remote system, including:
– Operating a session on a remote machine.
– Alternating between the remote session and the local
session.
– Accessing machines that do not run under the Unix
environment, and vice versa
• Telnet protocol is very simple – it transfers every key
typed. For this reason the telnet program is sometimes
used to debug problems with servers by emulating
protocols manually
Ftp
• The ftp program is a command line interface to the ftp
protocol for file transfer.
• ftp uses a set of commands to connect, authenticate and
view and transfer files
• The ftp server allows access to the file system of the
host, under certain limits. Ftp allows to transfer files to
and from the remote host.
• Many implementations of ftp exists, including the web
browsers.
• It is much less common today to use the ftp program,
but the ftp protocol is in very common use on the internet
Wget and curl
• In today’s computing world, the internet speaks mainly
http.
• Besides its use as the html protocol, it is now used as a
downloading protocol, besides ftp
• Getting files from the internet can be done with a browser
• But on a server when you don’t have a GUI, a browser is
not available
• There is an exception: the lynx text based browser
displays can be used in terminal windows
• But, if all you want is to download a file when you have a
url, all you need is wget or curl, two tools that will act as
ftp or http clients and will do all that is necessary to
connect, authenticate and deliver the file to your local
system
SSH- secure connection
• SSH is the secured alternative to both trust and telnet
• All traffic in ssh is encrypted, so it cannot be
eavesdropped
• It is very simple to set up a password-less authentication
using a key-pair. There is no way for a third party to pose
as client
SSH- secure connection
• Ssh has a set of utilities for various needs:
– ‘ssh’ remote connect to a system (open a shell by
default, or execute any command using –c)
– ‘scp’ copy files between systems in a format similar to
cp
$ scp fromhost:/frompath tohost:topath
– ‘sftp’ ftp like interactive program with enhanced
security
– SSH tunneling: transfer any protocol over an ssh
connection, securing it
SSH- secure connection
• Linux uses SSH as the main transport for Graphical
Display data, in case these are needed on a remote
machine.
• SSH Tunneling is being used in order to transfer the
data, instead of the older method of working directly with
the X Server
• In order for ssh to support getting the Display data from
a remote hosts, it should be invoked with the ‘-X’ flag
@ Copyrights InterBit LTD.
Networking Subsystem
• NIC configuration entity is called an interface.
• Interface configuration files are located in:
/etc/sysconfig/network-scripts
• NIC drivers need to be compiled into kernel or
loaded as modules.
• Interfaces have names based on their types:
– Ethernet – eth0,eth1,eth2….
– PPP – ppp0,ppp1….
– etc..
@ Copyrights InterBit LTD.
ifconfig
• General network interface configuration
and debugging utility.
• Used to set up network interfaces during boot
time and runtime.
• Supports multiple address families – ipv4, ipv6
@ Copyrights InterBit LTD.
ifconfig
• Interface specific tuning – txqueue length, MTU,
etc..
• Query interface network statistics – packets
tx/rx,packet loss,etc…
• Configuring eth0 interface using ifconfig can be
as easy as:
$ ifconfig eth0 10.0.0.1 up
• Ifconfig will derive the netmask, broadcast
address based on the ip given.
@ Copyrights InterBit LTD.
ifconfig
• Queriying newly set interface eth0:
$ ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:01:02:F3:36:83
inet addr:10.0.0.1 Bcast:10.255.255.255 Mask:255.0.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:5 errors:0 dropped:0 overruns:0 frame:0
TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:50 TX bytes:124
Interrupt:20 Base address:0x2280
@ Copyrights InterBit LTD.
Routing
• Routing table is manipulated using /sbin/route.
• Setting default gateway:
$ /sbin/route add default gw 10.0.0.138
• Setting route to specific network:
$ /sbin/route add –net 172.16.0.0 gw  10.0.0.254
• Set a route permanent by either
/etc/sysconfig/route
or by adding the route command to
/etc/rc.d/rc.local
• Removing routing entry:
$ /sbin/route del –net 172.16.0.0 gw  10.0.0.254
@ Copyrights InterBit LTD.
Viewing network connections
• ‘netstat’ prints network connections, routing
table, interface statistics.
• Printing routing table:
$ netstat –r
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window Iface
212.150.51.136 * 255.255.255.248 U 40 eth0
default 212.150.51.137 0.0.0.0 UG 40 eth0
@ Copyrights InterBit LTD.
Viewing network connections
• Listing open connections and their state:
$ netstat –n
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 32803 212.150.53.141:6881 80.162.21.171:63273 ESTABLISHED
tcp 0 0 212.150.53.141:6882 219.93.56.246:2214 ESTABLISHED
tcp 0 81 212.150.53.141:4982 81.86.150.228:4891 ESTABLISHED
tcp 0 0 212.150.53.141:49525 82.42.56.48:4662 TIME_WAIT
• Printing Varios protocol specific statistics:
$ netstat –s
@ Copyrights InterBit LTD.
Persistent Network config
• Network startup script uses configuration files
to set up networking upon boot.
• Network configuration files are located under
‘/etc/sysconfig/’.
• ‘/etc/sysconfig/network’ file defines non
interface specific network configuration:
– NETWORKING=<YES|NO>.
– GATEWAY=<default gateway ip>.
– GATEWAYDEV=<default gateway interface>.
@ Copyrights InterBit LTD.
Persistent Network config
• Interface specific configuration files located in
‘/etc/sysconfig/network-scripts’.
• Each interface has a corresponding config file of
the following scheme:
ifcfg-<interface>
@ Copyrights InterBit LTD.
Persistent Network config
• Sample
/etc/sysconfig/network-scripts/ifcfg-eth0:
DEVICE=eth0
BOOTPROTO=none # valid values are dhcp,none,bootp
ONBOOT=yes
NETWORK=10.0.1.0
NETMASK=255.255.255.0
IPADDR=10.0.1.27
USERCTL=no # can be controlled by non root
@ Copyrights InterBit LTD.
IP Aliasing
• Method of specifying multiple ip addresses for a
single NIC is called ip aliasing.
• In order to use ip aliasing, a kernel must be
compiled with ip aliasing support.
• Ip aliasing is configured by specifying an
interface of the following form:
<first interface on a nic>:’n’ – where n is a number
@ Copyrights InterBit LTD.
IP Aliasing
• Example:
$ ifconfig eth0 172.16.3.1 up
$ ifconfig eth0:1 172.16.3.10
$ ifconfig –a
eth0
Link encap:10Mbps Ethernet HWaddr 00:8E:B8:83:19:20
inet addr:172.16.3.1 Bcast:172.16.3.255 Mask:255.255.255.0 UP BROADCAST RUNNING
PROMISC MULTICAST MTU:1500 Metric:1
RX packets:334036 errors:0 dropped:0 overruns:0
TX packets:11605 errors:0 dropped:0 overruns:0 Interrupt:7 Base address:0x378
eth0:1
Link encap:10Mbps Ethernet HWaddr 00:8E:B8:83:19:20
inet addr:172.16.3.10 Bcast:172.16.3.255 Mask:255.255.255.0 UP BROADCAST RUNNING
MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0
TX packets:0 errors:0 dropped:0 overruns:0
@ Copyrights InterBit LTD.
IP Aliasing
• Defining boot time ip aliased interfaces is done
similarly to regular interfaces.
• Example:
/etc/sysconfig/network-scripts/ifcfg-eth0:1
DEVICE=eth0:1
BOOTPROTO=none
ONBOOT=yes
NETWORK=172.16.3.0
NETMASK=255.255.255.0
IPADDR=172.16.3.10
USERCTL=no
@ Copyrights InterBit LTD.
NIC link configuration
• Most current NICs and network devices support
auto- negotiation of speed and duplex.
• ‘/sbin/ethtool’ is used to view, manage NIC
auto- negotiation.
• Disabling auto-negotiation and forcing 100Mbit
Full Duplex mode:
$ /sbin/ethtool eth0 –s autoneg off speed 100 duplex full
• Use ethtool eth0 to view current link
configuration.
@ Copyrights InterBit LTD.
NIC link configuration
# ethtool eth0
Settings for eth0:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Advertised auto-negotiation: Yes
Speed: 10Mb/s
Duplex: Half
Port: MII
PHYAD: 1
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: g
Wake-on: g
Current message level: 0x00000007 (7)
Link detected: yes
@ Copyrights InterBit LTD.
Network kernel parameters
• Network related tunable parameters located in
‘/proc/sys/net’
• Ip forwarding enabled/disabled by
‘/proc/sys/net/ipv4/ip_forward’
• Interface specific kernel tunables located at:
‘/proc/sys/net/ipv4/conf/<interface>’
@ Copyrights InterBit LTD.
Network Tracing
• tcpdump is a network tracing tool. It connects
to a network interface, and print out
information about every packet going through
this interface
• Syntax:
tcpdump [options]
• Options:
– -i interface trace packets on interface
– -w file write data to file
@ Copyrights InterBit LTD.
Network Tracing
– -r file get data from file
Note: tcpdump output data files are written in PCAP
format, which is the same format that is used by tools
like ethereal and wireshark

More Related Content

PPTX
20 common port numbers and their purposes
salamassh
 
PDF
Linux Networking Explained
Thomas Graf
 
PPTX
TCLSH and Macro Ping Test on Cisco Routers and Switches
NetProtocol Xpert
 
PPTX
Well known protocols port numbers
Varinder Singh Walia
 
PDF
Port numbers
Jagannadh Rao
 
PPTX
TELNET and SSH by MUSTAFA SAKHAI
MUSTAFA SAKHAI
 
PDF
class12_Networking2
T. J. Saotome
 
PPTX
Ports and protocols
siva rama
 
20 common port numbers and their purposes
salamassh
 
Linux Networking Explained
Thomas Graf
 
TCLSH and Macro Ping Test on Cisco Routers and Switches
NetProtocol Xpert
 
Well known protocols port numbers
Varinder Singh Walia
 
Port numbers
Jagannadh Rao
 
TELNET and SSH by MUSTAFA SAKHAI
MUSTAFA SAKHAI
 
class12_Networking2
T. J. Saotome
 
Ports and protocols
siva rama
 

What's hot (19)

DOCX
Network interview questions
rajasekar1712
 
PDF
debugging openstack neutron /w openvswitch
어형 이
 
PPTX
Telnet & SSH Configuration
Vinod Gour
 
DOCX
Packet Tracer: SNMP, Netflow, Sys-log
Rafat Khandaker
 
PPTX
Network tunneling techniques
inbroker
 
PPT
NAT and PAT
Muuluu
 
PDF
pfSense firewall workshop guide
Sopon Tumchota
 
PDF
6 networking
richarddxd
 
PDF
CCNA 1 Chapter 6 v5.0 2014
Đồng Quốc Vương
 
PDF
Zdalna komunikacja sieciowa - zagadnienia sieciowe
Agnieszka Kuba
 
PPTX
Ssh tunnel
Amandeep Singh
 
PDF
NAT- Network Address Translation
Eng. Emad Al-Atoum
 
DOCX
Examen ccna capitulo 6 en ingles
Carlos Galviz Sanchez
 
PPTX
OpenvSwitch Deep Dive
rajdeep
 
PPT
Sockets in unix
swtjerin4u
 
PPTX
Part 6 : Internet applications
Olivier Bonaventure
 
PPT
Server configuration
Aisha Talat
 
PDF
Network telnet ssh
Stefan Fodor
 
PPT
Computer Network - Telnet and Gopher
Manoj Kumar
 
Network interview questions
rajasekar1712
 
debugging openstack neutron /w openvswitch
어형 이
 
Telnet & SSH Configuration
Vinod Gour
 
Packet Tracer: SNMP, Netflow, Sys-log
Rafat Khandaker
 
Network tunneling techniques
inbroker
 
NAT and PAT
Muuluu
 
pfSense firewall workshop guide
Sopon Tumchota
 
6 networking
richarddxd
 
CCNA 1 Chapter 6 v5.0 2014
Đồng Quốc Vương
 
Zdalna komunikacja sieciowa - zagadnienia sieciowe
Agnieszka Kuba
 
Ssh tunnel
Amandeep Singh
 
NAT- Network Address Translation
Eng. Emad Al-Atoum
 
Examen ccna capitulo 6 en ingles
Carlos Galviz Sanchez
 
OpenvSwitch Deep Dive
rajdeep
 
Sockets in unix
swtjerin4u
 
Part 6 : Internet applications
Olivier Bonaventure
 
Server configuration
Aisha Talat
 
Network telnet ssh
Stefan Fodor
 
Computer Network - Telnet and Gopher
Manoj Kumar
 
Ad

Similar to 14 network tools (20)

PPTX
linux networking laboratory presentation .pptx
AnuradhaJadiya1
 
PDF
Linux network tools (Maarten Blomme)
Avansa Mid- en Zuidwest
 
DOCX
Ports and protocols
Kailash Kumar
 
PPTX
Internet Internet Protocols.pptx( technology)
ujjawalr9027
 
PPTX
Byte Ordering - Unit 2.pptx
RockyBhai46825
 
PPTX
09 Systems Software Programming-Network Programming.pptx
KushalSrivastava23
 
PPT
SOHO Network Setup Tutorial
junaidahmedsaba
 
PDF
Module 1 slides
AnaniaKapala
 
PPTX
Harmonia open iris_basic_v0.1
Yongyoon Shin
 
PDF
packet traveling (pre cloud)
iman darabi
 
PPTX
PYTHON -Chapter 5 NETWORK - MAULIK BORSANIYA
Maulik Borsaniya
 
PPTX
DCUS17 : Docker networking deep dive
Madhu Venugopal
 
PDF
Networking
Tarun Jaiswal
 
PDF
Tcpip Intro
Adil Jafri
 
PDF
Information Theft: Wireless Router Shareport for Phun and profit - Hero Suhar...
idsecconf
 
PPTX
Small office Home office , network setup in details
apel7
 
PDF
Ngrep commands
Rishu Seth
 
PDF
DevCon 5 (July 2013) - WebSockets
Crocodile WebRTC SDK and Cloud Signalling Network
 
ODP
There and back again
Jon Spriggs
 
PPTX
Application Protocol
Chandnigupta80
 
linux networking laboratory presentation .pptx
AnuradhaJadiya1
 
Linux network tools (Maarten Blomme)
Avansa Mid- en Zuidwest
 
Ports and protocols
Kailash Kumar
 
Internet Internet Protocols.pptx( technology)
ujjawalr9027
 
Byte Ordering - Unit 2.pptx
RockyBhai46825
 
09 Systems Software Programming-Network Programming.pptx
KushalSrivastava23
 
SOHO Network Setup Tutorial
junaidahmedsaba
 
Module 1 slides
AnaniaKapala
 
Harmonia open iris_basic_v0.1
Yongyoon Shin
 
packet traveling (pre cloud)
iman darabi
 
PYTHON -Chapter 5 NETWORK - MAULIK BORSANIYA
Maulik Borsaniya
 
DCUS17 : Docker networking deep dive
Madhu Venugopal
 
Networking
Tarun Jaiswal
 
Tcpip Intro
Adil Jafri
 
Information Theft: Wireless Router Shareport for Phun and profit - Hero Suhar...
idsecconf
 
Small office Home office , network setup in details
apel7
 
Ngrep commands
Rishu Seth
 
DevCon 5 (July 2013) - WebSockets
Crocodile WebRTC SDK and Cloud Signalling Network
 
There and back again
Jon Spriggs
 
Application Protocol
Chandnigupta80
 
Ad

More from Shay Cohen (19)

PPT
Linux Performance Tunning Memory
Shay Cohen
 
PPT
Linux Performance Tunning Kernel
Shay Cohen
 
PPT
Linux Performance Tunning introduction
Shay Cohen
 
ODP
chroot and SELinux
Shay Cohen
 
ODP
Linux Internals - Kernel/Core
Shay Cohen
 
PPTX
Infra / Cont delivery - 3rd party automation
Shay Cohen
 
PPTX
13 process management
Shay Cohen
 
PPTX
12 linux archiving tools
Shay Cohen
 
PPTX
11 linux filesystem copy
Shay Cohen
 
PPTX
10 finding files
Shay Cohen
 
PPT
08 text processing_tools
Shay Cohen
 
PPT
07 vi text_editor
Shay Cohen
 
PPT
06 users groups_and_permissions
Shay Cohen
 
PPT
05 standard io_and_pipes
Shay Cohen
 
PPT
04 using and_configuring_bash
Shay Cohen
 
PPT
03 browsing the filesystem
Shay Cohen
 
PPT
02 linux desktop usage
Shay Cohen
 
PPT
09 string processing_with_regex copy
Shay Cohen
 
PPT
01 linux history overview
Shay Cohen
 
Linux Performance Tunning Memory
Shay Cohen
 
Linux Performance Tunning Kernel
Shay Cohen
 
Linux Performance Tunning introduction
Shay Cohen
 
chroot and SELinux
Shay Cohen
 
Linux Internals - Kernel/Core
Shay Cohen
 
Infra / Cont delivery - 3rd party automation
Shay Cohen
 
13 process management
Shay Cohen
 
12 linux archiving tools
Shay Cohen
 
11 linux filesystem copy
Shay Cohen
 
10 finding files
Shay Cohen
 
08 text processing_tools
Shay Cohen
 
07 vi text_editor
Shay Cohen
 
06 users groups_and_permissions
Shay Cohen
 
05 standard io_and_pipes
Shay Cohen
 
04 using and_configuring_bash
Shay Cohen
 
03 browsing the filesystem
Shay Cohen
 
02 linux desktop usage
Shay Cohen
 
09 string processing_with_regex copy
Shay Cohen
 
01 linux history overview
Shay Cohen
 

Recently uploaded (20)

PPTX
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
PDF
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
PPTX
The-Ethical-Hackers-Imperative-Safeguarding-the-Digital-Frontier.pptx
sujalchauhan1305
 
PDF
OFFOFFBOX™ – A New Era for African Film | Startup Presentation
ambaicciwalkerbrian
 
PDF
AI-Cloud-Business-Management-Platforms-The-Key-to-Efficiency-Growth.pdf
Artjoker Software Development Company
 
PPTX
Applied-Statistics-Mastering-Data-Driven-Decisions.pptx
parmaryashparmaryash
 
PDF
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
PDF
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
PDF
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
PDF
The Future of Artificial Intelligence (AI)
Mukul
 
PDF
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
PDF
How ETL Control Logic Keeps Your Pipelines Safe and Reliable.pdf
Stryv Solutions Pvt. Ltd.
 
PDF
Trying to figure out MCP by actually building an app from scratch with open s...
Julien SIMON
 
PPTX
The Future of AI & Machine Learning.pptx
pritsen4700
 
PDF
Using Anchore and DefectDojo to Stand Up Your DevSecOps Function
Anchore
 
PDF
The Future of Mobile Is Context-Aware—Are You Ready?
iProgrammer Solutions Private Limited
 
PDF
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
PDF
Economic Impact of Data Centres to the Malaysian Economy
flintglobalapac
 
PPTX
Agile Chennai 18-19 July 2025 | Emerging patterns in Agentic AI by Bharani Su...
AgileNetwork
 
PDF
Accelerating Oracle Database 23ai Troubleshooting with Oracle AHF Fleet Insig...
Sandesh Rao
 
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
The-Ethical-Hackers-Imperative-Safeguarding-the-Digital-Frontier.pptx
sujalchauhan1305
 
OFFOFFBOX™ – A New Era for African Film | Startup Presentation
ambaicciwalkerbrian
 
AI-Cloud-Business-Management-Platforms-The-Key-to-Efficiency-Growth.pdf
Artjoker Software Development Company
 
Applied-Statistics-Mastering-Data-Driven-Decisions.pptx
parmaryashparmaryash
 
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
The Future of Artificial Intelligence (AI)
Mukul
 
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
How ETL Control Logic Keeps Your Pipelines Safe and Reliable.pdf
Stryv Solutions Pvt. Ltd.
 
Trying to figure out MCP by actually building an app from scratch with open s...
Julien SIMON
 
The Future of AI & Machine Learning.pptx
pritsen4700
 
Using Anchore and DefectDojo to Stand Up Your DevSecOps Function
Anchore
 
The Future of Mobile Is Context-Aware—Are You Ready?
iProgrammer Solutions Private Limited
 
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
Economic Impact of Data Centres to the Malaysian Economy
flintglobalapac
 
Agile Chennai 18-19 July 2025 | Emerging patterns in Agentic AI by Bharani Su...
AgileNetwork
 
Accelerating Oracle Database 23ai Troubleshooting with Oracle AHF Fleet Insig...
Sandesh Rao
 

14 network tools

  • 2. Network Basics • Host – is a computer system on the network. • Server – provides resources to clients via the network. • Client – uses services from servers on the network. • Protocol – a globally defined way for clients and servers to communicate a service • With Linux and Unix systems most tools are basing data transfer on Network transport. The most outstanding example of this is the X Server and Clients. These initialize Network connection to provide a GUI
  • 3. Telnet • telnet is an application that enables users to connect to a remote system • The telnet server simulates a terminal to allow you to connect to and work on a remote system, including: – Operating a session on a remote machine. – Alternating between the remote session and the local session. – Accessing machines that do not run under the Unix environment, and vice versa • Telnet protocol is very simple – it transfers every key typed. For this reason the telnet program is sometimes used to debug problems with servers by emulating protocols manually
  • 4. Ftp • The ftp program is a command line interface to the ftp protocol for file transfer. • ftp uses a set of commands to connect, authenticate and view and transfer files • The ftp server allows access to the file system of the host, under certain limits. Ftp allows to transfer files to and from the remote host. • Many implementations of ftp exists, including the web browsers. • It is much less common today to use the ftp program, but the ftp protocol is in very common use on the internet
  • 5. Wget and curl • In today’s computing world, the internet speaks mainly http. • Besides its use as the html protocol, it is now used as a downloading protocol, besides ftp • Getting files from the internet can be done with a browser • But on a server when you don’t have a GUI, a browser is not available • There is an exception: the lynx text based browser displays can be used in terminal windows • But, if all you want is to download a file when you have a url, all you need is wget or curl, two tools that will act as ftp or http clients and will do all that is necessary to connect, authenticate and deliver the file to your local system
  • 6. SSH- secure connection • SSH is the secured alternative to both trust and telnet • All traffic in ssh is encrypted, so it cannot be eavesdropped • It is very simple to set up a password-less authentication using a key-pair. There is no way for a third party to pose as client
  • 7. SSH- secure connection • Ssh has a set of utilities for various needs: – ‘ssh’ remote connect to a system (open a shell by default, or execute any command using –c) – ‘scp’ copy files between systems in a format similar to cp $ scp fromhost:/frompath tohost:topath – ‘sftp’ ftp like interactive program with enhanced security – SSH tunneling: transfer any protocol over an ssh connection, securing it
  • 8. SSH- secure connection • Linux uses SSH as the main transport for Graphical Display data, in case these are needed on a remote machine. • SSH Tunneling is being used in order to transfer the data, instead of the older method of working directly with the X Server • In order for ssh to support getting the Display data from a remote hosts, it should be invoked with the ‘-X’ flag
  • 9. @ Copyrights InterBit LTD. Networking Subsystem • NIC configuration entity is called an interface. • Interface configuration files are located in: /etc/sysconfig/network-scripts • NIC drivers need to be compiled into kernel or loaded as modules. • Interfaces have names based on their types: – Ethernet – eth0,eth1,eth2…. – PPP – ppp0,ppp1…. – etc..
  • 10. @ Copyrights InterBit LTD. ifconfig • General network interface configuration and debugging utility. • Used to set up network interfaces during boot time and runtime. • Supports multiple address families – ipv4, ipv6
  • 11. @ Copyrights InterBit LTD. ifconfig • Interface specific tuning – txqueue length, MTU, etc.. • Query interface network statistics – packets tx/rx,packet loss,etc… • Configuring eth0 interface using ifconfig can be as easy as: $ ifconfig eth0 10.0.0.1 up • Ifconfig will derive the netmask, broadcast address based on the ip given.
  • 12. @ Copyrights InterBit LTD. ifconfig • Queriying newly set interface eth0: $ ifconfig eth0 eth0 Link encap:Ethernet HWaddr 00:01:02:F3:36:83 inet addr:10.0.0.1 Bcast:10.255.255.255 Mask:255.0.0.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:5 errors:0 dropped:0 overruns:0 frame:0 TX packets:4 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 RX bytes:50 TX bytes:124 Interrupt:20 Base address:0x2280
  • 13. @ Copyrights InterBit LTD. Routing • Routing table is manipulated using /sbin/route. • Setting default gateway: $ /sbin/route add default gw 10.0.0.138 • Setting route to specific network: $ /sbin/route add –net 172.16.0.0 gw 10.0.0.254 • Set a route permanent by either /etc/sysconfig/route or by adding the route command to /etc/rc.d/rc.local • Removing routing entry: $ /sbin/route del –net 172.16.0.0 gw 10.0.0.254
  • 14. @ Copyrights InterBit LTD. Viewing network connections • ‘netstat’ prints network connections, routing table, interface statistics. • Printing routing table: $ netstat –r Kernel IP routing table Destination Gateway Genmask Flags MSS Window Iface 212.150.51.136 * 255.255.255.248 U 40 eth0 default 212.150.51.137 0.0.0.0 UG 40 eth0
  • 15. @ Copyrights InterBit LTD. Viewing network connections • Listing open connections and their state: $ netstat –n Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 32803 212.150.53.141:6881 80.162.21.171:63273 ESTABLISHED tcp 0 0 212.150.53.141:6882 219.93.56.246:2214 ESTABLISHED tcp 0 81 212.150.53.141:4982 81.86.150.228:4891 ESTABLISHED tcp 0 0 212.150.53.141:49525 82.42.56.48:4662 TIME_WAIT • Printing Varios protocol specific statistics: $ netstat –s
  • 16. @ Copyrights InterBit LTD. Persistent Network config • Network startup script uses configuration files to set up networking upon boot. • Network configuration files are located under ‘/etc/sysconfig/’. • ‘/etc/sysconfig/network’ file defines non interface specific network configuration: – NETWORKING=<YES|NO>. – GATEWAY=<default gateway ip>. – GATEWAYDEV=<default gateway interface>.
  • 17. @ Copyrights InterBit LTD. Persistent Network config • Interface specific configuration files located in ‘/etc/sysconfig/network-scripts’. • Each interface has a corresponding config file of the following scheme: ifcfg-<interface>
  • 18. @ Copyrights InterBit LTD. Persistent Network config • Sample /etc/sysconfig/network-scripts/ifcfg-eth0: DEVICE=eth0 BOOTPROTO=none # valid values are dhcp,none,bootp ONBOOT=yes NETWORK=10.0.1.0 NETMASK=255.255.255.0 IPADDR=10.0.1.27 USERCTL=no # can be controlled by non root
  • 19. @ Copyrights InterBit LTD. IP Aliasing • Method of specifying multiple ip addresses for a single NIC is called ip aliasing. • In order to use ip aliasing, a kernel must be compiled with ip aliasing support. • Ip aliasing is configured by specifying an interface of the following form: <first interface on a nic>:’n’ – where n is a number
  • 20. @ Copyrights InterBit LTD. IP Aliasing • Example: $ ifconfig eth0 172.16.3.1 up $ ifconfig eth0:1 172.16.3.10 $ ifconfig –a eth0 Link encap:10Mbps Ethernet HWaddr 00:8E:B8:83:19:20 inet addr:172.16.3.1 Bcast:172.16.3.255 Mask:255.255.255.0 UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1 RX packets:334036 errors:0 dropped:0 overruns:0 TX packets:11605 errors:0 dropped:0 overruns:0 Interrupt:7 Base address:0x378 eth0:1 Link encap:10Mbps Ethernet HWaddr 00:8E:B8:83:19:20 inet addr:172.16.3.10 Bcast:172.16.3.255 Mask:255.255.255.0 UP BROADCAST RUNNING MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 TX packets:0 errors:0 dropped:0 overruns:0
  • 21. @ Copyrights InterBit LTD. IP Aliasing • Defining boot time ip aliased interfaces is done similarly to regular interfaces. • Example: /etc/sysconfig/network-scripts/ifcfg-eth0:1 DEVICE=eth0:1 BOOTPROTO=none ONBOOT=yes NETWORK=172.16.3.0 NETMASK=255.255.255.0 IPADDR=172.16.3.10 USERCTL=no
  • 22. @ Copyrights InterBit LTD. NIC link configuration • Most current NICs and network devices support auto- negotiation of speed and duplex. • ‘/sbin/ethtool’ is used to view, manage NIC auto- negotiation. • Disabling auto-negotiation and forcing 100Mbit Full Duplex mode: $ /sbin/ethtool eth0 –s autoneg off speed 100 duplex full • Use ethtool eth0 to view current link configuration.
  • 23. @ Copyrights InterBit LTD. NIC link configuration # ethtool eth0 Settings for eth0: Supported ports: [ TP MII ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full Supports auto-negotiation: Yes Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full Advertised auto-negotiation: Yes Speed: 10Mb/s Duplex: Half Port: MII PHYAD: 1 Transceiver: internal Auto-negotiation: on Supports Wake-on: g Wake-on: g Current message level: 0x00000007 (7) Link detected: yes
  • 24. @ Copyrights InterBit LTD. Network kernel parameters • Network related tunable parameters located in ‘/proc/sys/net’ • Ip forwarding enabled/disabled by ‘/proc/sys/net/ipv4/ip_forward’ • Interface specific kernel tunables located at: ‘/proc/sys/net/ipv4/conf/<interface>’
  • 25. @ Copyrights InterBit LTD. Network Tracing • tcpdump is a network tracing tool. It connects to a network interface, and print out information about every packet going through this interface • Syntax: tcpdump [options] • Options: – -i interface trace packets on interface – -w file write data to file
  • 26. @ Copyrights InterBit LTD. Network Tracing – -r file get data from file Note: tcpdump output data files are written in PCAP format, which is the same format that is used by tools like ethereal and wireshark

Editor's Notes

  • #3: Discussion - Is working always in ‘network’ mode a good or a bad thing ? Security and Unix Sockets
  • #4: Show telnet example
  • #5: show ftp example, man page
  • #8: Show an example of SSH key authentication and SCP. Discuss SSH Tunneling, security aspects, etc.