Section 2: Networking Flashcards
(125 cards)
2.1 - Ports and Protocols - Introduction to IP
Series of moving vans
- Efficiently move large amounts of data: Use a shipping truck
- The network topology is the road: Ethernet, DSL, cable system
- The truck is the Internet Protocol (IP): We’ve designed the roads for this truck
- The boxes hold your data: Boxes of TCP and UDP
- Inside the boxes are more things: Applicaton Information
2.1 - Ports and Protocols - Introduction to IP
TCP and UDP
- Transported inside of IP: Encapsulated by the IP protocol
- Two ways to move data from place to place: Different features for different applications
- OSI Layer 4: The transport layer
- Multiplexing: Use many different applications at the same time. TCP and UDP.
2.1 - Ports and Protocols - Introduction to IP
TCP - Transmission Control Protocol
- Connection-oriented: A formal connection setup and close
- “Reliable” Delivery: Recovery from errors. Can manage out-of-order messages or retransmissions
- Flow control: The receiver can manage how much data is sent.
2.1 - Ports and Protocols - Introduction to IP
UDP - User Datagram Protocol
- Connectionless: No formal open or close to the connection
- “Unreliable” delivery: No error recovery. No reodering of data transmissions.
- No flow control: Sender determines the amount of data transmitted. One-way communication
2.1 - Ports and Protocols - Introduction to IP
Why would you ever use UDP?
- Real-time communication: There’s no way to stop and resend the data. Time doesn’t stop for your network.
- Connectionless protocolas: DHCP (Dynamic Host Configuration Protocol) and TFTP (Trivial File Transfer Protocol)
- The data might not get through: The application keeps track and decided what to do. It might do anything.
- UDP is fast.
2.1 - Ports and Protocols - Introduction to IP
Communication using TCP
- Connection-oriented protocols prefer a “return receipt”: HTTPS (Hypertext Transfer Protocol Secure) and SSH (Secure Shell).
- The application doesn’t worry about out of order frames or missing data. TCP handles all of the communication overhead. The application has one job.
2.1 - Ports and Protocols - Introduction to IP
Speedy delivery
- The IP delivery truck delivers from one (IP) address to another (IP) address: Every house has an address, every computer has an IP address.
- Boxes arrive at the house / IP address: Where do the boxes go? Each box has a room name.
- Port is written on the outside of the box: Drop the box into the right room.
- Port 80: web server unencrypted data (HTTP)
- Port 443: web server encrypted data (HTTPS)
- Port 25: mail server
- Port 123: time server.
2.1 - Ports and Protocols - Introduction to IP
Lots of ports
- IPv4 sockets: Server IP address, protocol, server application port number. Client IP address, protocol, client port number.
- Non-ephemeral ports: Permanent port numbers. Ports 0 through 1023. Usually on a server or service.
- Ephemeral ports: Temporary ports. Ports 1024 through 65,535. Determined in real-time by the client.
2.1 - Ports and Protocols - Introduction to IP
Port Numbers
- TCP and UDP ports can be any numer between 0 through 65,535.
- Most servers (services) use non-ephemeral port numbers. This isn’t always the case. It’s just a number.
- Port numbers are for communication, not security.
- Service port numbers need to be well known.
- TCP port numbers aren’t same as UDP port numbers. TCP 80 is not the same as UDP 80.
2.1 - Ports and Protocols - Introduction to IP
Ports on the network
Web server - TCP/80
VoIP server - UDP/5004
Email server - TCP/143
2.1 - Ports and Protocols - Common Network Ports
Port Numbers
- Well-known port number: Client and server need to match
- Important for firewall rules: Port-based security
- A bit of rote memorization: Becomes second nature after a while.
- Make sure you know port number, protocol and how the protocol is used .
2.1 - Ports and Protocols - Common Network Ports
FTP - File Transfer Protocol
- tcp/20 (active mode data), tcp/21(control): Transfers files between systems.
- Authenticates with a username and password. Some systems use a generic/anonymous login
- Full-featured functionality: List, add, delete, etc.
2.1 - Ports and Protocols - Common Network Ports
SSH - Secure Shell
- Encrypted communication link - tcp/22
- Looks and acts the same as Telnet.
2.1 - Ports and Protocols - Common Network Ports
Telnet
- Telnet -Telecommunication Network: tcp/23
- Loging to devices remotely: console access
- In-the-clear communication (unencrypted): Not the best choice for production systems.
2.1 - Ports and Protocols - Common Network Ports
SMTP: Simple Mail Transfer Protocol
- SMTP (Simple Mail Transfer Protocol): Server to server email transfer. tcp/25
- Also used to send email from a device to a mail server. Commonly configured on mobile devices and email.
- Other protocols are used for clients to receive email. - IMAP, POP3
2.1 - Ports and Protocols - Common Network Ports
DNS - Domain Name System
- Converts names to IP addresses - udp/53: www.professormesser.com = 162.159.246.164
- These are very crictical resources. Usually multiple DNS servers are in production.
2.1 - Ports and Protocols - Common Network Ports
DHCP - Dynamic Host Configuration Protocol
- Automated configuration of IP address, subnet mask and other options: udp/67, udp/68. Requires a DHCP server. Server, appliance, integrated into a SOHO router etc.
- Dynamic / pooled: IP addresses are assigned in real-time from a pool. Each system is given a lease and must renew at set intervals.
- DHCP reservation: Addresses are assigned by MAC address in the DHCP server. Manage address from onle location.
2.1 - Ports and Protocols - Common Network Ports
HTTP and HTTPS
- Hypertext Transfer Protocol: Communication in the browser. And by other applications.
- In the clear or encrypted: Suppoted by nealy all web servers and clients.
- HTTP: tcp/80. Hypertext Transfer Protocol. Web server communication.
- HTTPS: tcp/443 Hypetext Transfer Protocol Secure. Web server communication with encryption.
2.1 - Ports and Protocols - Common Network Ports
POP3 / IMAP
- Receive emails from server: Authenticate and transfer.
- POP3 - Post Office Protocol version 3. tcp/110. Basic mail transfer functionality. Receive message for one email.
- IMAP4 - Internet Message Access Protocess v4. tcp/143. Includes management of email inbox from multiple clients.
2.1 - Ports and Protocols - Common Network Ports
SMB - Server Message Block
- Protocol used by Microsoft Windows: File sharing, printer sharing. Also called CIFS (Common Internet File System)
- Using NetBIOS over TCP/IP (Network Basic Input/Output System): udp/137 - NetBIO name services (nbname). udp/139 - NETBIO session service (nbsession)
- Direct over tcp/445 (NetBIOS-less): Direct SMB communication over TCP without NetBIOS transport.
2.1 - Ports and Protocols - Common Network Ports
SMNP - Simple Network Management Protocol
- Gather statistics from network devices: Queries - udp/161. Traps - udp/162
- v1 - The original: Structured tables. In-the-clear.
- v2 - A good step ahead: Data type enhancements. Bulk transfers. Still in-the-clear.
- v3 - A secure standard: Message integrity. Authentication. Encryption.
2.1 - Ports and Protocols - Common Network Ports
LDAP
- LDAP (Lightweight Directory Access Protocol): tcp/389
- Store and retrieve information in a network directory. Commonlu used in Microsoft Active Directory.
2.1 - Ports and Protocols - Common Network Ports
RDP - Remote Desktop Protocol
- Share a desktop from a remote location over tcp/3389
- Remote Desktop Services on many Windows versions
- Can connect to an entire desktop or just an application
- Clients for Windows, macOS, Linux, Unix, iPhone, Android, and others.
2.2 Network Devices
Network devices
- Many different devices and components: All have different roles.
- Some of these functions are combined together: Wirelss router/switch/firewall
- Compare different devices: Understand when they should be used