SlideShare uma empresa Scribd logo
1 de 28
Linux Network Tools ,[object Object],Armando   Reis - PT/DTS
[object Object],[object Object],[object Object],[object Object],What’s it all about? ,[object Object],[object Object],[object Object],[object Object]
The basics - IPv4 ,[object Object],[object Object],[object Object],[object Object]
The basics - IPv6 ,[object Object],[object Object],[object Object],[object Object],[object Object]
The basics - Addreses ,[object Object],[object Object],[object Object],[object Object],[object Object],111110110011111111111000101010010 251.63.248.170 111111111111111111111000000000000 255.255.128.0 111110110011111111111000000000000 251.63.128.0 111110110011111111111111111111111 251.63.255.255
A (very basic) routing intro ,[object Object],[object Object]
Routing intro - II ,[object Object],[object Object],[object Object]
More info? ,[object Object],[object Object],[object Object],[object Object],[object Object]
Basic network tools ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
ifconfig  - Set or show network interface parameters. /sbin/ifconfig eth0 192.168.1.101 netmask 255.255.255.0 broadcast 192.168.1.255  /sbin/ifconfig -a eth0  Link encap:Ethernet  HWaddr  00:1b:fc:90:ce:73   inet addr: 192.168.1.101   Bcast: 192.168.1.255   Mask: 255.255.255.0 inet6 addr:  fe80::21b:fcff:fe90:ce73/64  Scope:Link UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1 RX packets:34379438 errors:0 dropped:6 overruns:0 frame:0 TX packets:32971104 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000  RX bytes:22215926752 (22.2 GB)  TX bytes:23045492526 (23.0 GB) Interrupt:17  lo  Link encap:Local Loopback  inet addr:127.0.0.1  Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING  MTU:16436  Metric:1 RX packets:4096 errors:0 dropped:0 overruns:0 frame:0 TX packets:4096 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0  RX bytes:212814 (212.8 KB)  TX bytes:212814 (212.8 KB)
arp - Manages ‘ethernet’ addresses  ,[object Object],[object Object],[object Object]
ethtool - Manages a NIC’s operating parameters.  ,[object Object],[object Object],[object Object],[object Object],[object Object]
Questions?
ping  - Basic testing ,[object Object],[object Object],[object Object]
route  - Show or manipulate routes. asr@aqua:~$ route -n Kernel IP routing table Destination  Gateway  Genmask  Flags Metric Ref  Use Iface 213.13.144.37  192.168.1.254  255.255.255.255 UGH  0  0  0 eth0 10.135.3.51  0.0.0.0  255.255.255.255 UH  0  0  0 ppp0 10.134.15.0  0.0.0.0  255.255.255.128 U  0  0  0 ppp0 192.168.1.0  0.0.0.0  255.255.255.0  U  0  0  0 eth0 10.135.0.0  0.0.0.0  255.255.0.0  U  0  0  0 ppp0 0.0.0.0  192.168.1.254  0.0.0.0  UG  100  0  0 eth0 asr@aqua:~$ route add -net 172.28.18.0 netmask 255.255.255.0 gw 192.168.1.250 asr@aqua:~$ route add -net 10.134.96.0 netmask 255.255.255.0 dev ppp0
netstat  - Show network status. asr@aqua:~$ netstat -an Active Internet connections (servers and established)Proto Recv-Q Send-Q Local Address  Foreign Address  State  tcp  0  0 0.0.0.0:4130  0.0.0.0:*  LISTEN  tcp  0  0 0.0.0.0:4131  0.0.0.0:*  LISTEN  tcp  0  0 0.0.0.0:4132  0.0.0.0:*  LISTEN  ...  tcp  0  0 0.0.0.0:111  0.0.0.0:*  LISTEN  tcp  0  0 0.0.0.0:22  0.0.0.0:*  LISTEN  tcp  0  0 127.0.0.1:25  0.0.0.0:*  LISTEN  ...  tcp  1  0 192.168.1.101:52242  129.89.61.70:80  CLOSE_WAIT tcp  1  0 192.168.1.101:41412  209.85.229.147:80  CLOSE_WAIT tcp  1  0 192.168.1.101:42311  209.85.229.105:80  CLOSE_WAIT tcp  1  0 192.168.1.101:42834  130.75.116.202:80  CLOSE_WAIT ...tcp  0  0 192.168.1.101:42789  213.13.144.37:1723  ESTABLISHEDtcp  0  0 192.168.1.101:48983  74.125.4.148:80  ESTABLISHEDtcp  0  0 192.168.1.101:41347  209.85.227.102:80  ESTABLISHED Active Internet connections (servers and established)Proto Recv-Q Send-Q Local Address  Foreign Address  State  tcp  0  0 0.0.0.0:4130  0.0.0.0:*  LISTEN  tcp  0  0 0.0.0.0:4131  0.0.0.0:*  LISTEN  tcp  0  0 0.0.0.0:4132  0.0.0.0:*  LISTEN  ...  tcp  0  0 0.0.0.0:111  0.0.0.0:*  LISTEN  tcp  0  0 0.0.0.0:22  0.0.0.0:*  LISTEN  tcp  0  0 127.0.0.1:25  0.0.0.0:*  LISTEN  ...  tcp  1  0 192.168.1.101:52242  129.89.61.70:80  CLOSE_WAIT tcp  1  0 192.168.1.101:41412  209.85.229.147:80  CLOSE_WAIT tcp  1  0 192.168.1.101:42311  209.85.229.105:80  CLOSE_WAIT tcp  1  0 192.168.1.101:42834  130.75.116.202:80  CLOSE_WAIT ...tcp  0  0 192.168.1.101:42789  213.13.144.37:1723  ESTABLISHEDtcp  0  0 192.168.1.101:48983  74.125.4.148:80  ESTABLISHEDtcp  0  0 192.168.1.101:41347  209.85.227.102:80  ESTABLISHED
netstat  - Show more network information. asr@aqua:~$ sudo netstat -antup Active Internet connections (servers and established) ... tcp  0  0 0.0.0.0:111  0.0.0.0:*  LISTEN  2243/portmap  tcp  0  0 0.0.0.0:22  0.0.0.0:*  LISTEN  3335/sshd  tcp  0  0 127.0.0.1:631  0.0.0.0:*  LISTEN  3517/cupsd  tcp  0  0 127.0.0.1:6010  0.0.0.0:*  LISTEN  9217/4  tcp  0  0 192.168.1.101:50874  213.13.144.37:1723  ESTABLISHED 7355/pptp  tcp  0  144 192.168.1.101:22  192.168.1.103:51455  ESTABLISHED 9208/sshdtcp  0  0 192.168.1.101:58729  212.55.154.196:22  ESTABLISHED 7617/ssh  ...tcp6  0  0 :::22  :::*  LISTEN  3335/sshd  udp  0  0 0.0.0.0:514  0.0.0.0:*  2506/syslogd  udp  0  0 0.0.0.0:53528  0.0.0.0:*  2264/rpc.statd  udp  0  0 0.0.0.0:68  0.0.0.0:*  3200/dhclient3  udp  0  0 0.0.0.0:111  0.0.0.0:*  2243/portmap  ...tcp6  0  0 :::22  :::*  LISTEN  3335/sshd  udp  0  0 0.0.0.0:514  0.0.0.0:*  2506/syslogd  udp  0  0 0.0.0.0:53528  0.0.0.0:*  2264/rpc.statd  udp  0  0 0.0.0.0:68  0.0.0.0:*  3200/dhclient3  udp  0  0 0.0.0.0:111  0.0.0.0:*  2243/portmap
traceroute  - Show the route between 2 hosts. ,[object Object],[object Object],[object Object]
Further reading ? ,[object Object],[object Object]
Memorize this :) http://en.wikipedia.org/wiki/File:Tcp_state_diagram_fixed.svg
More networking tools ,[object Object],[object Object],[object Object],[object Object],[object Object]
iptables ,[object Object],[object Object],[object Object]
netcat ,[object Object],[object Object],[object Object]
rinetd ,[object Object],[object Object],[object Object]
tcpdump ,[object Object],[object Object],[object Object]
tcpreplay ,[object Object],[object Object],[object Object]
Questions?
Thank you Armando   Reis - PT/DTS

Mais conteúdo relacionado

Mais procurados

Lab 9 instructions
Lab 9 instructionsLab 9 instructions
Lab 9 instructions
trayyoo
 
Ccna 2 chapter 11 v4.0 answers 2011
Ccna 2 chapter 11 v4.0 answers 2011Ccna 2 chapter 11 v4.0 answers 2011
Ccna 2 chapter 11 v4.0 answers 2011
Dân Chơi
 

Mais procurados (18)

Linux network tools (Maarten Blomme)
Linux network tools (Maarten Blomme)Linux network tools (Maarten Blomme)
Linux network tools (Maarten Blomme)
 
Networking Tutorial Goes to Basic PPP Configuration
Networking Tutorial Goes to Basic PPP ConfigurationNetworking Tutorial Goes to Basic PPP Configuration
Networking Tutorial Goes to Basic PPP Configuration
 
Lab 9 instructions
Lab 9 instructionsLab 9 instructions
Lab 9 instructions
 
Linux router
Linux routerLinux router
Linux router
 
Vyos clustering ipsec
Vyos clustering ipsecVyos clustering ipsec
Vyos clustering ipsec
 
CCNA Lab Guide
CCNA Lab GuideCCNA Lab Guide
CCNA Lab Guide
 
Student packet tracer manual v1.1
Student packet tracer manual v1.1Student packet tracer manual v1.1
Student packet tracer manual v1.1
 
PBR-LB - Direct Server Return Load Balancing using Policy Based Routing (MEMO)
PBR-LB - Direct Server Return Load Balancing using Policy Based Routing (MEMO)PBR-LB - Direct Server Return Load Balancing using Policy Based Routing (MEMO)
PBR-LB - Direct Server Return Load Balancing using Policy Based Routing (MEMO)
 
Practice Lab CSC
Practice Lab CSCPractice Lab CSC
Practice Lab CSC
 
Ccna 2 chapter 11 v4.0 answers 2011
Ccna 2 chapter 11 v4.0 answers 2011Ccna 2 chapter 11 v4.0 answers 2011
Ccna 2 chapter 11 v4.0 answers 2011
 
How to use mmdvm host wif main board
How to use mmdvm host wif main boardHow to use mmdvm host wif main board
How to use mmdvm host wif main board
 
CCNP Lab Guide CCIE University
CCNP Lab Guide CCIE UniversityCCNP Lab Guide CCIE University
CCNP Lab Guide CCIE University
 
Configuring GRE Tunnel Through a Cisco ASA Firewall
Configuring GRE Tunnel Through a Cisco ASA FirewallConfiguring GRE Tunnel Through a Cisco ASA Firewall
Configuring GRE Tunnel Through a Cisco ASA Firewall
 
OSPF Authentication
OSPF Authentication OSPF Authentication
OSPF Authentication
 
Eincop Netwax Lab: Site 2 Site VPN with Routing Protocols
Eincop Netwax Lab: Site 2 Site VPN with Routing ProtocolsEincop Netwax Lab: Site 2 Site VPN with Routing Protocols
Eincop Netwax Lab: Site 2 Site VPN with Routing Protocols
 
Ha systems-with-heartbeatv2
Ha systems-with-heartbeatv2Ha systems-with-heartbeatv2
Ha systems-with-heartbeatv2
 
CCNA - Routing & Switching Commands
CCNA - Routing & Switching CommandsCCNA - Routing & Switching Commands
CCNA - Routing & Switching Commands
 
Policy Based Routing
Policy Based RoutingPolicy Based Routing
Policy Based Routing
 

Destaque

Configuration dns sous linux
Configuration  dns sous linuxConfiguration  dns sous linux
Configuration dns sous linux
Balamine Gassama
 
Networking in Gnu/Linux
Networking in Gnu/LinuxNetworking in Gnu/Linux
Networking in Gnu/Linux
Ahmed Mekkawy
 

Destaque (13)

Linux networking commands short
Linux networking commands shortLinux networking commands short
Linux networking commands short
 
Linux networking commands
Linux networking commandsLinux networking commands
Linux networking commands
 
Linux networking
Linux networkingLinux networking
Linux networking
 
Configuration dns sous linux
Configuration  dns sous linuxConfiguration  dns sous linux
Configuration dns sous linux
 
Networking in Gnu/Linux
Networking in Gnu/LinuxNetworking in Gnu/Linux
Networking in Gnu/Linux
 
Introduction to tcp ip linux networking
Introduction to tcp ip   linux networkingIntroduction to tcp ip   linux networking
Introduction to tcp ip linux networking
 
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)
 
Chapter09 -- networking with unix and linux
Chapter09  -- networking with unix and linuxChapter09  -- networking with unix and linux
Chapter09 -- networking with unix and linux
 
An Overview of Linux Networking Options
An Overview of Linux Networking OptionsAn Overview of Linux Networking Options
An Overview of Linux Networking Options
 
The TCP/IP Stack in the Linux Kernel
The TCP/IP Stack in the Linux KernelThe TCP/IP Stack in the Linux Kernel
The TCP/IP Stack in the Linux Kernel
 
LinuxCon 2015 Linux Kernel Networking Walkthrough
LinuxCon 2015 Linux Kernel Networking WalkthroughLinuxCon 2015 Linux Kernel Networking Walkthrough
LinuxCon 2015 Linux Kernel Networking Walkthrough
 
Linux Networking Commands
Linux Networking CommandsLinux Networking Commands
Linux Networking Commands
 
Linux Networking Explained
Linux Networking ExplainedLinux Networking Explained
Linux Networking Explained
 

Semelhante a Linux networking

Tri aoi training-supplementary_2011.01
Tri aoi training-supplementary_2011.01Tri aoi training-supplementary_2011.01
Tri aoi training-supplementary_2011.01
Ralph Nguyen
 

Semelhante a Linux networking (20)

Linux 系統管理與安全:進階系統管理系統防駭與資訊安全
Linux 系統管理與安全:進階系統管理系統防駭與資訊安全Linux 系統管理與安全:進階系統管理系統防駭與資訊安全
Linux 系統管理與安全:進階系統管理系統防駭與資訊安全
 
Unix 4 en
Unix 4 enUnix 4 en
Unix 4 en
 
Handy Networking Tools and How to Use Them
Handy Networking Tools and How to Use ThemHandy Networking Tools and How to Use Them
Handy Networking Tools and How to Use Them
 
Debugging linux issues with eBPF
Debugging linux issues with eBPFDebugging linux issues with eBPF
Debugging linux issues with eBPF
 
Lab telematicos
Lab telematicosLab telematicos
Lab telematicos
 
Analysis of Compromised Linux Server
Analysis of Compromised Linux ServerAnalysis of Compromised Linux Server
Analysis of Compromised Linux Server
 
Quic illustrated
Quic illustratedQuic illustrated
Quic illustrated
 
AWS re:Invent 2016: Making Every Packet Count (NET404)
AWS re:Invent 2016: Making Every Packet Count (NET404)AWS re:Invent 2016: Making Every Packet Count (NET404)
AWS re:Invent 2016: Making Every Packet Count (NET404)
 
(NET404) Making Every Packet Count
(NET404) Making Every Packet Count(NET404) Making Every Packet Count
(NET404) Making Every Packet Count
 
Day2
Day2Day2
Day2
 
Debugging Ruby
Debugging RubyDebugging Ruby
Debugging Ruby
 
Tri aoi training-supplementary_2011.01
Tri aoi training-supplementary_2011.01Tri aoi training-supplementary_2011.01
Tri aoi training-supplementary_2011.01
 
[오픈소스컨설팅] Linux Network Troubleshooting
[오픈소스컨설팅] Linux Network Troubleshooting[오픈소스컨설팅] Linux Network Troubleshooting
[오픈소스컨설팅] Linux Network Troubleshooting
 
Network commands
Network commandsNetwork commands
Network commands
 
VYATTAによるマルチパスVPN接続手法
VYATTAによるマルチパスVPN接続手法VYATTAによるマルチパスVPN接続手法
VYATTAによるマルチパスVPN接続手法
 
CCIE Lab - IGP Routing
CCIE Lab -  IGP Routing  CCIE Lab -  IGP Routing
CCIE Lab - IGP Routing
 
Packet Card Knowledge Transferfinal
Packet Card Knowledge TransferfinalPacket Card Knowledge Transferfinal
Packet Card Knowledge Transferfinal
 
OSTU - Sake Blok on Packet Capturing with Tshark
OSTU - Sake Blok on Packet Capturing with TsharkOSTU - Sake Blok on Packet Capturing with Tshark
OSTU - Sake Blok on Packet Capturing with Tshark
 
Open stack advanced_part
Open stack advanced_partOpen stack advanced_part
Open stack advanced_part
 
LF_OVS_17_OVS-DPDK Installation and Gotchas
LF_OVS_17_OVS-DPDK Installation and GotchasLF_OVS_17_OVS-DPDK Installation and Gotchas
LF_OVS_17_OVS-DPDK Installation and Gotchas
 

Último

Último (20)

HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 

Linux networking

  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10. ifconfig - Set or show network interface parameters. /sbin/ifconfig eth0 192.168.1.101 netmask 255.255.255.0 broadcast 192.168.1.255 /sbin/ifconfig -a eth0 Link encap:Ethernet HWaddr 00:1b:fc:90:ce:73 inet addr: 192.168.1.101 Bcast: 192.168.1.255 Mask: 255.255.255.0 inet6 addr: fe80::21b:fcff:fe90:ce73/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:34379438 errors:0 dropped:6 overruns:0 frame:0 TX packets:32971104 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:22215926752 (22.2 GB) TX bytes:23045492526 (23.0 GB) Interrupt:17 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:4096 errors:0 dropped:0 overruns:0 frame:0 TX packets:4096 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:212814 (212.8 KB) TX bytes:212814 (212.8 KB)
  • 11.
  • 12.
  • 14.
  • 15. route - Show or manipulate routes. asr@aqua:~$ route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 213.13.144.37 192.168.1.254 255.255.255.255 UGH 0 0 0 eth0 10.135.3.51 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0 10.134.15.0 0.0.0.0 255.255.255.128 U 0 0 0 ppp0 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 10.135.0.0 0.0.0.0 255.255.0.0 U 0 0 0 ppp0 0.0.0.0 192.168.1.254 0.0.0.0 UG 100 0 0 eth0 asr@aqua:~$ route add -net 172.28.18.0 netmask 255.255.255.0 gw 192.168.1.250 asr@aqua:~$ route add -net 10.134.96.0 netmask 255.255.255.0 dev ppp0
  • 16. netstat - Show network status. asr@aqua:~$ netstat -an Active Internet connections (servers and established)Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 0.0.0.0:4130 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:4131 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:4132 0.0.0.0:* LISTEN ... tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN ... tcp 1 0 192.168.1.101:52242 129.89.61.70:80 CLOSE_WAIT tcp 1 0 192.168.1.101:41412 209.85.229.147:80 CLOSE_WAIT tcp 1 0 192.168.1.101:42311 209.85.229.105:80 CLOSE_WAIT tcp 1 0 192.168.1.101:42834 130.75.116.202:80 CLOSE_WAIT ...tcp 0 0 192.168.1.101:42789 213.13.144.37:1723 ESTABLISHEDtcp 0 0 192.168.1.101:48983 74.125.4.148:80 ESTABLISHEDtcp 0 0 192.168.1.101:41347 209.85.227.102:80 ESTABLISHED Active Internet connections (servers and established)Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 0.0.0.0:4130 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:4131 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:4132 0.0.0.0:* LISTEN ... tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN ... tcp 1 0 192.168.1.101:52242 129.89.61.70:80 CLOSE_WAIT tcp 1 0 192.168.1.101:41412 209.85.229.147:80 CLOSE_WAIT tcp 1 0 192.168.1.101:42311 209.85.229.105:80 CLOSE_WAIT tcp 1 0 192.168.1.101:42834 130.75.116.202:80 CLOSE_WAIT ...tcp 0 0 192.168.1.101:42789 213.13.144.37:1723 ESTABLISHEDtcp 0 0 192.168.1.101:48983 74.125.4.148:80 ESTABLISHEDtcp 0 0 192.168.1.101:41347 209.85.227.102:80 ESTABLISHED
  • 17. netstat - Show more network information. asr@aqua:~$ sudo netstat -antup Active Internet connections (servers and established) ... tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 2243/portmap tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 3335/sshd tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 3517/cupsd tcp 0 0 127.0.0.1:6010 0.0.0.0:* LISTEN 9217/4 tcp 0 0 192.168.1.101:50874 213.13.144.37:1723 ESTABLISHED 7355/pptp tcp 0 144 192.168.1.101:22 192.168.1.103:51455 ESTABLISHED 9208/sshdtcp 0 0 192.168.1.101:58729 212.55.154.196:22 ESTABLISHED 7617/ssh ...tcp6 0 0 :::22 :::* LISTEN 3335/sshd udp 0 0 0.0.0.0:514 0.0.0.0:* 2506/syslogd udp 0 0 0.0.0.0:53528 0.0.0.0:* 2264/rpc.statd udp 0 0 0.0.0.0:68 0.0.0.0:* 3200/dhclient3 udp 0 0 0.0.0.0:111 0.0.0.0:* 2243/portmap ...tcp6 0 0 :::22 :::* LISTEN 3335/sshd udp 0 0 0.0.0.0:514 0.0.0.0:* 2506/syslogd udp 0 0 0.0.0.0:53528 0.0.0.0:* 2264/rpc.statd udp 0 0 0.0.0.0:68 0.0.0.0:* 3200/dhclient3 udp 0 0 0.0.0.0:111 0.0.0.0:* 2243/portmap
  • 18.
  • 19.
  • 20. Memorize this :) http://en.wikipedia.org/wiki/File:Tcp_state_diagram_fixed.svg
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 28. Thank you Armando Reis - PT/DTS