1 / 15

Week 12

Week 12. Workbook 10: Network applications. Chapter 1: An Introduction to TCP/IP Networking. Linux sets up a “conversation” between a local process and a remote server, called a TCP/IP socket .

yvonne
Download Presentation

Week 12

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Week 12 Workbook 10: Network applications

  2. Chapter 1: An Introduction to TCP/IP Networking • Linux sets up a “conversation” between a local process and a remote server, called a TCP/IP socket. • Like everything else in Linux, a socket is treated as a file which can be written to and read from. • A program uses the same system functions to communicate with a socket as with an ordinary file. The details of how the communication is done are handled at a much lower level.

  3. TCP/IP, cont’d • An application such as a web browser can hold many conversations at once with different (or the same) servers. • Different conversations are identified by different IP addresses and/or port numbers. • In HTTP, a server always receives data on port 80. each separate client conversation, however, has a unique randomly-generated port number which the server uses to send data to that client.

  4. TCP/IP: port numbers • Different protocols use unique port numbers. • Ports less than 1024 are called privileged ports, and are handled especially by the kernel. This helps to ensure that, for example, all HTTP traffic (port 80) is managed by the kernel and not some “rogue” malware.

  5. TCP/IP hints for exercise • Find your ip address like this: hostname –I • Find the listening ports this way: Netstat –tuna | grep “LISTEN”

  6. Chapters 2 and 3: printing • Skip these. 

  7. Chapter 4: Email Overview • Internet email is handled by two applications: • Mail Transfer Agent (MTA). • A “push” protocol; sends email via SMTP (port 25). • Sends mail via MTA’s on different servers through the Internet, much like a network of post offices. • Mail User Agent (MUA). • A “pull” protocol; receives email via POP (port 110) or IMAP (port 143). • Receives email from MTA; delivers to final recipient on request.

  8. The Linux mail application • The mail command line application has been around since early Unix days. • It provides a basic email service without the frills, bells and whistles or the massive overhead of a GUI. • Geeks thrive on stuff like this. 

  9. Chapter 5: • Where is it??? 

  10. Chapter 6: Network Diagnostic Applications • /sbin/ifconfig displays local IP configuration. • ping confirms low level network connectivity between hosts. • host makes direct DNS queries. • The netstat -tuna command lists currently active network services and connections. • /sbin/traceroute can diagnose routing problems.

  11. Chapter 7:Terminal-Based Web and FTP Clients • The Elinks terminal HTTP client, invoked as the command links, can be used to browse web pages from a non graphical environment. • The curl application is a non-interactive multi-protocol client (including HTTP, HTTPS, and FTP) which can be used to transfer files in batch mode. • The wget application is a non-interactive multi-protocol client (including HTTP, HTTPS, and FTP) which can be used to recursively transfer web pages, recursing through all pages the web page references.

  12. Chapter 8: Remote Shell Commands • A remote shell allows you to log into another machine and run commands on the command line. • Requires a remote shell server to be running on the other machine. • Original application: rsh. Not secure, because data is not encrypted. • ssh uses a public key encryption technique.

  13. Public/private key encryption • Two related keys (very large numbers). • One is public and can be distributed to anyone. • The other is private, and not shared with anyone. • Key pairs can be generated with the ssh-keygen command.

  14. Public key encryption • To transfer data, you combine the receiver’s public and the sender’s private keys to encrypt the data. This can only be decrypted using the receiver’s private key. • This is illustrated at left by using colours instead of numbers. Reference: http://en.wikipedia.org/wiki/Diffie%E2%80%93Hellman_key_exchange

  15. Conclusion • Linux, as usual, implements international network standards using a suite of command-line utilities. • Though many of these have had GUI applications added as a front end, typically administrators use the command line for its versatility.

More Related