π Lecture 23 β Learning Ethernet addresses
π Overview: This lecture explains how Ethernet switches dynamically learn MAC addresses to build their forwarding tables. It covers the fundamental processes of learning, flooding, and filtering that allow switches to intelligently forward frames without manual configuration.
ποΈ Topics Covered
The lecture covers how switches dynamically learn MAC addresses by examining source addresses in incoming frames, the mechanism of flooding for unknown destinations, the difference between forwarding and filtering decisions, the concept of broadcast addresses, and how switches handle broadcast frames by flooding them to all ports.
π Lecture Summary
Learning Ethernet addresses
A switch maintains a switching table or Media Access Control (MAC) address table to make forwarding decisions. When a switch first powers up, the MAC address table is empty. Switches dynamically learn MAC addresses and corresponding ports through a process called learning. Whenever a NIC sends an Ethernet frame, the NIC places its own MAC address as the source MAC address, and the switch learns the sender's MAC address by examining this source address.
π Definition β Learning: The process by which a switch dynamically discovers MAC addresses and their associated ports by examining the source MAC address of incoming Ethernet frames.
Forwarding, Filtering, and Flooding
When a switch receives a frame, it makes a forwarding decision by comparing the destination MAC address with the MAC address table, sending the frame out on one port. Conversely, by not sending the frame out on other ports, the switch makes a filtering decision, preventing the frame from exiting those ports. For frames sent before the switch has learned the MAC address table, the switch performs flooding.
π Definition β Flooding: When a switch receives a frame whose destination address is not in the MAC address table, the switch forwards the frame out on all ports except the one over which the frame was received.
π Example: In Figure 23.1, when a switch receives a frame with an unknown destination, it floods the frame to all ports (except the incoming port). Barney, Wilma, and Betty all receive a copy. When Barney replies, the switch enters Barney's MAC address in the table, so future frames sent to Barney will be forwarded correctly.
π‘ Why this matters: Flooding ensures that frames reach their destination even when the switch has not yet learned the destination's MAC address. This is essential for initial network communication.
Broadcast Addresses
An Ethernet or MAC address represents an individual NIC attached to a LAN, known as unicast MAC addresses. When a computer wants to forward a frame to all devices on the LAN, Ethernet defines a special MAC address called the broadcast address. The value is FFFF.FFFF.FFFF.
π Definition β Broadcast address: A special Ethernet MAC address (FFFF.FFFF.FFFF) used to send frames to all devices on a local area network.
π Example: In Figure 23.2, when a computer sends a frame with the broadcast address FFFF.FFFF.FFFF, the switch floods the broadcast frame to all ports, ensuring every device on the LAN receives the frame.
β Key Takeaways
The switch learns MAC addresses dynamically by examining the source MAC address of each incoming frame. When a destination MAC address is unknown, the switch uses flooding to send the frame out on all ports except the receiving port. This flooding mechanism allows the switch to learn the correct port when the destination device responds. The broadcast address (FFFF.FFFF.FFFF) is used to send frames to all devices on the LAN, and switches always flood broadcast frames. The combination of learning, forwarding, filtering, and flooding allows Ethernet switches to operate efficiently without manual configuration.
π§ Quick Revision Questions
- What happens to a frame when a switch receives it and the destination MAC address is not found in the MAC address table?
- How does a switch initially learn the MAC addresses connected to its ports?
- What is the difference between forwarding and filtering decisions made by an Ethernet switch?
- What is the Ethernet broadcast address, and how does a switch handle broadcast frames?
- In the scenario described in Lecture 23, why does Barney receive a copy of the flooded frame, and how does this lead to the switch learning Barney's MAC address?
π Lecture 24 β Ethernet Network Speeds
π Overview: This lecture covers the evolution of Ethernet speeds from the original 10 Mbps standard through Fast Ethernet, Gigabit Ethernet, and 10 Gigabit Ethernet. It explains how different speeds maintain compatibility through common headers and forwarding logic, and introduces key concepts like auto-negotiation for mixed-speed networks.
ποΈ Topics Covered
The lecture traces the IEEE working groups that defined each Ethernet speed standard (802.3u for Fast Ethernet, 802.3z and 802.3ab for Gigabit Ethernet, 802.3ae for 10 Gigabit Ethernet), explains how higher speeds require better cabling while keeping the same MAC frame structure, covers optical versus copper cabling trade-offs, and concludes with how switches support multiple speeds through auto-negotiation between NICs and switch ports.
π Lecture Summary
Ethernet Speed Evolution
The original IEEE Ethernet standard used a 10-Mbps transmission rate where bits cross wires at 10 million bits per second. The first major speed enhancement came from IEEE working group 802.3u, creating Fast Ethernet (FE) at 100 Mbps. The IEEE deliberately kept Fast Ethernet identical to original Ethernet in every way except bit encoding and speed β same headers, trailers, CSMA/CD logic, and 6-byte MAC addresses. This backward compatibility meant vendors needed only small changes to existing products, enabling rapid market acceptance. The original 10 Mbps twisted pair Ethernet was called 10BaseT, while Fast Ethernet was called 100BaseT.
Gigabit and 10 Gigabit Ethernet
Working groups 802.3z and 802.3ab created Gigabit Ethernet (GigE) at 1000 Mbps (1 Gbps). The only difference between Gigabit Ethernet and Fast Ethernet is speed, requiring better cabling to support higher rates while keeping everything else identical. The 802.3z working group defined GigE over optical cable (glass fiber transmitting light instead of electricity), while 802.3ab defined GigE over copper cabling. Optical cabling offers higher speeds, longer distances, fewer errors, and better security β but at higher cost than copper. 10 Gigabit Ethernet (10 GigE) was defined by IEEE working group 802.3ae.
π Definition β Auto-negotiation: An IEEE standard that allows the switch and NIC on either end of the cable to automatically negotiate to determine the speed (and whether to use full duplex or half duplex). Both devices must support multiple speeds and auto-negotiation logic.
Supporting Multiple Speeds
Because all advanced Ethernet forms use the same header, switch forwarding and learning logic does not change based on speed. A switch can have ports operating at different speeds simultaneously β some 10 Mbps, some 100 Mbps, some 1 Gbps β and they all work together using identical frame forwarding rules. The challenge is that fixed-speed ports don't provide an easy migration path.
π Example: A building floor has users with both 10 Mbps NICs and 100 Mbps Fast Ethernet NICs. You buy a 24-port switch with 12 10-Mbps ports and 12 100-Mbps ports. Fred uses a 10-Mbps NIC connected to a 10-Mbps port; Wilma uses a 100-Mbps NIC connected to a 100-Mbps port. If all Fast Ethernet ports are occupied, you cannot add another 100-Mbps NIC without replacing the switch.
π‘ Why this matters: Auto-negotiation solves this problem by allowing a single switch port (e.g., a 10/100 autosensing port) to automatically detect and match the speed of whatever NIC is connected. The negotiation works like a simple conversation: "I want to use 100 Mbps" β "Okay, me too. Let's do it."
β Key Takeaways
Ethernet speeds have evolved from 10 Mbps (10BaseT) through 100 Mbps Fast Ethernet (100BaseT), 1000 Mbps Gigabit Ethernet (GigE over optical via 802.3z and copper via 802.3ab), to 10 Gbps (10 GigE via 802.3ae) β all while maintaining identical frame headers, MAC addresses, and switch forwarding logic. Higher speeds require better cabling (optical for maximum performance, copper for cost savings) but preserve full backward compatibility in frame structure. Auto-negotiation is essential for mixed-speed environments, allowing NICs and switches to automatically agree on the highest mutually supported speed and duplex setting. The key exam point is that speed upgrades only change bit encoding and physical layer requirements β not the fundamental Ethernet frame format or CSMA/CD logic.
π§ Quick Revision Questions
- What IEEE working group defined Fast Ethernet, and what speed does it operate at?
- What are the two IEEE working groups that defined Gigabit Ethernet, and what cabling types did each specify?
- Why can switches support multiple Ethernet speeds simultaneously without changing their forwarding logic?
- How does auto-negotiation work between a switch port and a NIC, and what two parameters does it negotiate?
- What are the four main advantages of optical cabling over copper cabling for high-speed Ethernet?
π Lecture 25 β Multiple Physical LANs
π Overview: This lecture explains how physical LANs and multiple physical LANs handle broadcasts. It covers broadcast domains, how hubs and switches process broadcast frames, and why multiple switches are needed to create separate LANs for security purposes. The lecture demonstrates that broadcasts and unicasts do not cross between physically separate LANs.
ποΈ Topics Covered
The lecture begins by explaining how hubs and switches both handle broadcast frames identically by forwarding them out all ports except the incoming port. It defines broadcast domains and shows three examples of single broadcast domains created by hubs and switches. The lecture then introduces a scenario requiring separate LANs for security, demonstrating that two switches must be used to create multiple physical LANs, and explains that broadcasts and unicasts cannot travel between physically unconnected switches.
π Lecture Summary
Broadcast Handling by Hubs and Switches
Hubs and switches behave differently in general, but process broadcast frames identically. A broadcast frame is an Ethernet frame that has a destination MAC address field set to FFFF.FFFF.FFFF. When a switch receives a broadcast frame, it forwards the frame out on all ports except to the incoming port. A hub works in the same fashion for all frames including broadcasts.
π Definition β Broadcast domain: a group of devices for which a broadcast frame sent by one device is received by all other devices in the same group.
π Key Rule: Hubs and switches both forward broadcasts out all ports except the incoming port β every device connected to the same hub or switch (or interconnected hubs and switches) receives every broadcast.
π Example β Three broadcast domain scenarios:
- A single hub creates a single broadcast domain
- A single switch also creates a single broadcast domain
- A hub and a switch, connected together, also create a single broadcast domain
π‘ Why this matters: All devices in a single broadcast domain receive all broadcasts, which can create security and performance issues β especially as networks grow.
The Need for Multiple Physical LANs
A LAN consists of the devices inside a single broadcast domain. In a small network scenario, your boss requires that "Fred and Barney" be on a different LAN than "Betty and Wilma" because the boys work with super-secret projects and security requirements cannot be met if Betty and Wilma are on the same LAN.
π Definition β Multiple physical LANs: separate broadcast domains created by using physically unconnected switches.
π Example β To put Betty and Wilma on a different LAN than Fred and Barney, you must use two switches that are not physically connected to each other. The top switch connects Fred and Barney; the bottom switch connects Betty and Wilma.
Broadcast and Unicast Isolation Between Physical LANs
Both broadcast frames and unicast frames from the top LAN cannot be forwarded to the bottom LAN as there is no physical cable connecting the two switches.
π Key Properties of Multiple Physical LANs:
- Each LAN has an independent MAC address table as compared to the other LANs
- Broadcasts originating in one LAN are flooded inside that LAN only
- Broadcasts originating in one LAN are not forwarded into the other LANs
- Unicasts originating in one LAN are not forwarded into the other LANs
π Example β If Fred sends a broadcast frame on the top LAN, only Barney receives it β Betty and Wilma on the bottom LAN never see that broadcast. Similarly, if Fred sends a unicast frame to Barney, that frame stays within the top LAN and never reaches the bottom LAN.
π‘ Why this matters: Physical separation of switches provides security by ensuring that traffic (both broadcast and unicast) from one group cannot leak into another group's network.
β Key Takeaways
The most critical points from this lecture are: (1) Broadcast frames have destination MAC address FFFF.FFFF.FFFF and are forwarded by both hubs and switches out all ports except the incoming port. (2) A broadcast domain is the group of devices that all receive each other's broadcasts β a single hub, a single switch, or a hub and switch connected together each form one broadcast domain. (3) A LAN equals a single broadcast domain. (4) To create separate LANs for security, you must use physically unconnected switches β broadcasts and unicasts cannot travel between them. (5) Each physical LAN maintains its own independent MAC address table.
π§ Quick Revision Questions
- What is the destination MAC address in a broadcast Ethernet frame?
- When a switch receives a broadcast frame, which ports does it forward the frame to?
- What is a broadcast domain?
- How would you create two separate physical LANs so that broadcasts from one group cannot reach another group?
- Can a unicast frame originating in one physical LAN be forwarded into a different physical LAN if the switches are not connected by a cable?
π Lecture 26 β Introduction to Virtual LANs
π Overview: This lecture introduces Virtual LANs (VLANs), explaining how they create multiple broadcast domains using a single physical switch. Understanding VLANs is critical for network segmentation, improving security, and reducing costs by eliminating the need for additional switch hardware.
ποΈ Topics Covered
The lecture explains the concept of a physical LAN as a broadcast domain, introduces VLANs as a cost-effective alternative to multiple physical switches, describes how switches create multiple broadcast domains using subsets of physical ports, and illustrates how broadcasts and unicasts are isolated within each VLAN, with switches maintaining separate MAC address tables per VLAN.
π Lecture Summary
What is a Physical LAN?
A physical LAN, also known as a broadcast domain, is the group of devices for which a broadcast frame sent by one device is received by all other devices in the group. To create multiple separate LANs, multiple physical LAN switches were traditionally required, which is expensive.
π Definition β Physical LAN (Broadcast Domain): The set of devices that will receive a broadcast frame originated by any device within that group.
Introduction to Virtual LANs (VLANs)
VLANs allow you to create multiple LANs without requiring extra switch hardware. A Virtual LAN is a broadcast domain created by a switch using a subset of the physical ports on that switch. LAN switch vendors include a feature that allows you to create multiple broadcast domains in a single switch. A network engineer can configure some physical ports of a switch as if they are in one VLAN (one broadcast domain) and configure other ports to be in a different VLAN (a different broadcast domain).
π Definition β VLAN (Virtual LAN): A broadcast domain created by a switch using a subset of its physical ports.
π Concept: One physical switch β Multiple logical broadcast domains (VLANs) β No need for additional physical switches.
π Example: A single switch with ports 1-2 configured as VLAN 10, and ports 3-4 configured as VLAN 20. Broadcasts from a device in VLAN 10 are only received by devices in VLAN 10, and not by devices in VLAN 20. This behaves exactly like having two separate physical switches.
π‘ Why this matters: VLANs drastically reduce hardware costs and simplify network management by allowing logical segmentation of a network from a single device.
VLAN Behavior: Broadcast and Unicast Isolation
This network behaves just like it would with two physical switches. However, you get the advantage of not having to buy another switch. The switch does learn all MAC addresses from ports across all VLANs, but the switch does not forward broadcasts or unicasts from one VLAN to the other. The switch keeps a separate address table for each VLAN.
π Definition β VLAN Isolation: A switch does not forward broadcasts or unicasts from one VLAN to another; each VLAN is a separate broadcast domain.
π Principle: Switch maintains a separate MAC address table per VLAN.
π Example: In Figure 26.1, two VLANs are shown. A broadcast from a device in VLAN A will only reach other devices in VLAN A. The switch learns the MAC addresses of devices in VLAN A into one table, and the MAC addresses of devices in VLAN B into a separate table. Unicast frames are forwarded based on the correct VLAN-specific table, preventing data leakage between VLANs.
β Key Takeaways
- A physical LAN is a broadcast domain; VLANs create multiple broadcast domains on a single switch. 2. VLANs save money by eliminating the need for multiple physical switches to create separate networks. 3. A switch maintains a separate MAC address table for each VLAN, ensuring traffic isolation. 4. Broadcasts and unicasts are not forwarded between VLANs, providing security and traffic segregation. 5. VLANs are configured by assigning physical ports to specific VLAN IDs.
π§ Quick Revision Questions
- What is a physical LAN, and what is its defining characteristic regarding broadcasts?
- How does a VLAN allow you to create multiple LANs without buying extra switch hardware?
- Does a single switch learn MAC addresses from multiple VLANs, and does it forward traffic between them?
- What data structure does a switch maintain separately for each VLAN?
- In Figure 26.1, if a device in VLAN 10 sends a broadcast, will a device in VLAN 20 receive that broadcast?
π Lecture 27 β Packing VLANβs frames in a Trunk
π Overview: This lecture explains why VLAN trunking becomes necessary when multiple switches connect devices from different VLANs. It covers how switches forward frames between VLANs across trunk links, and how extra headers solve the problem of identifying which VLAN a frame belongs to when it arrives at a receiving switch.
ποΈ Topics Covered
The lecture begins by recapping that without VLANs, switches can forward frames between multiple switches using their own address tables. Then it introduces the concept of a trunk β the Ethernet cable segment connecting two switches. The main focus is on VLAN trunking: when VLANs are added, a receiving switch must know which VLAN's MAC address table to use. The solution involves adding an extra header to frames before sending them over the trunk, identifying the VLAN, so the receiving switch knows which address table to consult.
π Lecture Summary
Recap: Forwarding Between Two Switches Without VLANs
The lecture starts by revisiting a scenario where 4 PCs (Fred, Betty, Barney, Wilma) are connected via two switches, with two PCs per switch. When a frame is sent between switches, each switch uses its own address table to decide where to forward the frame. The Ethernet cable segment between the two switches is called a trunk. This basic switching logic works fine when no VLANs are involved β each switch independently learns MAC addresses and forwards frames accordingly.
The Problem: Adding VLANs Creates Confusion
When VLANs are introduced β for example, Fred and Barney on VLAN1, Wilma and Betty on VLAN2 β frames must cross the trunk between switches. However, when a switch receives a frame over that trunk, it does not know which VLAN's MAC address table to use. As shown in Figure 27.2, Switch2 faces a dilemma: should it look in the VLAN1 address table or the VLAN2 address table? Without additional information, the switch cannot correctly process the frame.
π Definition β VLAN Trunking: A mechanism used by switches to identify which VLAN a frame belongs to when transmitted over a trunk link between switches.
The Solution: Adding an Extra Header
To solve the problem, switches use VLAN trunking. Before sending a frame over the Ethernet trunk cable to the other switch, the sending switch adds another header to the frame. This extra header identifies the frame as belonging to a specific VLAN (e.g., VLAN1). When the receiving switch sees this extra header on frames arriving over the trunk port (e.g., Fa24), it knows exactly which MAC address table to use for forwarding. The receiving switch expects all frames coming in over that trunk port to have this extra header, so it can now process the frame correctly.
π Example: Switch1 wants to send a frame from Fred (VLAN1) to Barney (also VLAN1, on the other switch). Before sending the frame over the trunk, Switch1 adds an extra header labeling the frame as "VLAN1." When Switch2 receives this frame over port Fa24, it sees the extra header and knows to use its VLAN1 address table for forwarding, correctly delivering the frame to Barney.
π‘ Why this matters: Without VLAN trunking, switches would have no way of knowing which VLAN a frame belongs to when it arrives over a trunk link, causing frames to be misdirected or dropped. This mechanism is essential for maintaining VLAN isolation across multiple switches.
β Key Takeaways
VLAN trunking is essential when connecting multiple switches that carry multiple VLANs. The trunk is the Ethernet cable between switches, and without an identifier, a receiving switch cannot determine which MAC address table to use. The solution is to add an extra header to frames before transmission over the trunk, labeling them with their VLAN number. This allows the receiving switch to correctly process each frame using the appropriate VLAN's MAC address table. Understanding this mechanism is critical for designing scalable and isolated VLAN networks across multiple switches.
π§ Quick Revision Questions
- What is a trunk in the context of connecting multiple switches?
- Why does a switch face a dilemma when receiving a frame over a trunk if VLANs are configured?
- What is the purpose of the extra header added by VLAN trunking?
- How does the receiving switch know which MAC address table to use for a frame arriving over a trunk port?
- In the example given, which VLAN's frames would be labeled with an extra header before being sent over the trunk?
π Lecture 28 β Email: A Network Application
π Overview: This lecture explains how email works as a network application by drawing an analogy to the postal service. It covers the roles of email servers, the process of sending and receiving email, and the structure of email addresses. Understanding email as a network application is essential for grasping how application-layer protocols enable communication over the internet.
ποΈ Topics Covered
The lecture begins by comparing email to the postal service, using the analogy of a postal worker picking up and dropping off mail. It then explains how email works without paper, detailing the roles of email servers and how they forward messages. Finally, it discusses email address structure and the roles of ISPs and corporate networks in email delivery.
π Lecture Summary
Email: A Network Application
Email allows you to send text messages electronically, similar to sending a paper letter through the postal service. You type text, add the recipient's email address, and send the message. Sending an email is like giving it to the postal service, which delivers it so that your friend can check and receive it later. Each email includes the text, the recipient's address, and your own email address for replies. Email also enables sending messages to multiple recipients at once.
When you create and send an email, your PC does not send it directly to your friend's PC. Instead, you send the message to your email server, which is the equivalent of dropping off a letter at the local post office. Your email server then sends the email to your friend's email server, similar to how the postal service delivers a paper letter to the post office near your friend. Finally, your friend checks his email and retrieves the message from his local email server, which is like retrieving paper mail from a PO box.
π Definition β Email Server: A computer that stores and forwards email messages, analogous to a post office that handles mail delivery. π Example: If you send an email from home using an ISP, your PC sends it to your ISP's email server, which forwards it to your friend's ISP's email server. Your friend later retrieves it from that server.
Internet service providers (ISPs) typically have one or more email servers. If you connect to an ISP from home, you use that ISP's email servers to drop off and pick up email. In a corporate enterprise network, you typically use your company's email servers for the same purpose.
π Definition β ISP (Internet Service Provider): A company that provides internet access and often offers email server services for its customers. π Example: A home user connects to Comcast (an ISP) and uses Comcast's email servers to send and receive email.
Email Addresses
Email addresses have two parts: the name of the email user and the name of the email server (domain). For example, in the address "user@example.com," "user" is the local part (the mailbox name), and "example.com" is the domain name of the email server.
π Definition β Email Address: An identifier for a recipient, consisting of a local part (username) and a domain part (server name), separated by the "@" symbol. π Example: In "john.doe@gmail.com," "john.doe" is the user's mailbox name, and "gmail.com" is the email server's domain.
β Key Takeaways
Email functions as a store-and-forward network application where messages are sent from a client to a local email server, then forwarded to the recipient's email server, and finally retrieved by the recipient. This process mirrors the postal service's delivery chain, with email servers acting as post offices. Understanding email addresses (user@domain) is crucial for proper message routing. The distinction between ISPs and corporate networks highlights how email infrastructure is managed differently for home users versus enterprise users. Email supports multiple recipients, making it a versatile communication tool.
π§ Quick Revision Questions
- What is the role of an email server in sending an email?
- How is sending an email similar to sending a paper letter through the postal service?
- What are the two parts of an email address, and what does each represent?
- Why does your PC not send an email directly to your friend's PC?
- How do ISPs and corporate networks differ in providing email services?
π Lecture 29 β TCP/IP Email Standards: SMTP, POP3
π Overview: This lecture explains the fundamental TCP/IP email standards used for sending and receiving emails across the internet. It covers the Internet Message Format (IMF), Simple Mail Transport Protocol (SMTP), and Post Office Protocol Version 3 (POP3), demonstrating how email clients and servers work together to deliver messages reliably.
ποΈ Topics Covered
This lecture covers the three main components of TCP/IP email standards: Internet Message Format (RFC 2822) which defines email headers, Simple Mail Transport Protocol (SMTP) which handles transmitting and receiving emails between servers, and Post Office Protocol Version 3 (POP3) which allows clients to retrieve emails from servers. It also explains the role of email client software and how SMTP commands like EHLO, Mail, and RCPT manage the email forwarding process.
π Lecture Summary
Internet Message Format, SMTP, and POP3
The TCP/IP E-mail standard consists of three main components. Internet Message Format (IMF) is described in RFC 2822 and defines the headers used to encapsulate the e-mail text, sender and receiver e-mail addresses. Simple Mail Transport Protocol (SMTP) is defined in RFC 2821 and provides details about protocols for transmitting and receiving e-mails. Post Office Protocol Version 3 (POP3) is defined in RFC 1939 and provides information about protocols for a client to retrieve e-mail from a server.
π Definition β Internet Message Format (IMF): An RFC 2822 standard that describes headers used to encapsulate e-mail text, sender, and receiver e-mail addresses.
π Definition β Simple Mail Transport Protocol (SMTP): An RFC 2821 standard that provides details about protocols for transmitting and receiving e-mails.
π Definition β Post Office Protocol Version 3 (POP3): An RFC 1939 standard that provides information about protocols for a client to retrieve e-mail from a server.
Email Client Software
An Email Client software is a user interface that accepts text typed from the keyboard, understands what a user clicks on the screen, stores e-mails on the computer hard disk, and so on. E-mail TCP/IP protocols are implemented in the e-mail client software so that it can use the network. The e-mail client application is not the same thing as the application layer protocol.
π‘ Why this matters: Understanding that the email client application and the application layer protocol are distinct is crucial for troubleshooting network issues and comprehending how email systems are layered.
Email Headers and SMTP Commands
An e-mail client sends not only the text of the e-mail message, but also a header. The header contains several fields, such as the recipient's and sender's e-mail addresses. All the clients and servers know where to find all the information needed to forward the e-mail correctly. E-mail clients and servers use SMTP protocols to manage the process of sending and receiving e-mail. SMTP defines messages so that the e-mail clients and servers can manage the e-mail forwarding process.
π Definition β EHLO (Extended Hello) command: An SMTP command that identifies the client.
π Definition β Mail command: An SMTP command that tells the server that the client wants to either send or receive e-mail.
π Definition β RCPT command: An SMTP command that identifies the recipient of the e-mail.
π Example: The SMTP communication process works as follows: The client first sends the EHLO command to identify itself. The server replies. Next, the client sends the Mail command to indicate it wants to send an e-mail. The server acknowledges. Then, the client sends the RCPT command to identify the recipient. After the server replies with an acknowledgement (ACK) message to each of these first three commands, the e-mail can be transmitted.
β Key Takeaways
The three essential TCP/IP email standards are Internet Message Format (RFC 2822) for headers, SMTP (RFC 2821) for transmitting/receiving emails between servers, and POP3 (RFC 1939) for clients to retrieve emails from servers. Email clients use SMTP commands EHLO (identify client), Mail (indicate send/receive intention), and RCPT (identify recipient) to manage the email forwarding process. The email client application is distinct from the application layer protocol it uses. Email headers defined by RFC 2822 contain critical fields like sender and recipient addresses that all clients and servers understand for correct forwarding. SMTP requires acknowledgement (ACK) from the server after each of the first three commands before email transmission can begin.
π§ Quick Revision Questions
- What are the three main TCP/IP email standards and their corresponding RFC numbers?
- What is the difference between an email client application and the application layer protocol it uses?
- What is the purpose of the EHLO, Mail, and RCPT commands in SMTP?
- What does the Internet Message Format (RFC 2822) define, and what information does an email header contain?
- When does SMTP allow the actual email transmission to begin?
π Lecture 30 β File Transfer Protocol (FTP)
π Overview: This lecture introduces the File Transfer Protocol (FTP), which is an application-layer protocol used to transfer files between a client and a server over a network. It explains how FTP works, including authentication and data transfer, using a warehouse analogy to simplify the concept. Understanding FTP is essential for grasping how files are stored and retrieved in networked environments.
ποΈ Topics Covered
The lecture explains the working of the File Transfer Protocol (FTP) using a warehouse analogy, detailing how files are stored and retrieved from an FTP server. It covers the key processes of authentication (using USER and PASS commands) and data transfer (using PUT and GET commands). The lecture also notes that FTP is defined in RFC 959 and uses separate TCP connections for control messages and actual file transfers.
π Lecture Summary
File Transfer Protocol (FTP)
The File Transfer Protocol (FTP) works by putting files on an FTP server and getting them off it. This is analogous to a company leasing a warehouse to store goods: people who need something can go get it when needed. For the system to be useful, there must be a mechanism to find items and keep track of inventory. FTP uses client software on the end user's computer and implements application-layer protocols. The FTP client must connect to a server and identify itself to perform any useful action. The FTP server software runs on a physical server.
π Definition β FTP (File Transfer Protocol): A standard network protocol used to transfer files from one host to another over a TCP-based network, such as the Internet. It uses a client-server model.
Example: Authentication and Data Transfer
The lecture provides a sequence of steps for storing and retrieving files on an FTP server.
Authentication (Identifying the user):
- The FTP client uses the FTP USER command to provide the username to the FTP server.
- The FTP client uses the FTP PASS command to supply the password to the server.
Data Transfer (Putting a file on the server):
3. If authenticated, the FTP client uses the PUT command to inform the server that the file's name is file1 and will be available in upcoming messages.
4. The client sends the actual contents of the file.
Data Transfer (Getting a file from the server):
To retrieve a file, the client follows the same connection and authentication sequence. Instead of issuing a PUT command, the client issues a GET command, which refers to copying a file from the server to the client.
π Definition β PUT: An FTP command used to copy a file from the client to the server. π Definition β GET: An FTP command used to copy a file from the server to the client.
π Example: Keith wants to store file1 on the FTP server. He uses his client to send a USER command with his username and a PASS command with his password. After authentication, he sends a PUT command identifying file1 as the target, followed by the file's contents. Later, Conner wants to retrieve file1. He authenticates using USER and PASS, then sends a GET command for file1, and the server sends the file's contents to his client.
Additional Key Points
FTP is defined in RFC 959. A critical design feature of FTP is that it uses a different underlying TCP connection for the control messages (like USER, PASS, PUT, GET) versus the actual file transfer. This means FTP uses two separate channels for communication.
π‘ Why this matters: Using separate control and data connections allows FTP to handle interruptions and large file transfers more robustly. The control connection stays open for commands, while a new data connection can be created for each file transfer.
β Key Takeaways
FTP is an application-layer protocol for transferring files between a client and a server, operating through a standard authentication process using USER and PASS commands. Once authenticated, clients can PUT files onto the server and GET files from the server. A fundamental design principle of FTP, defined in RFC 959, is its use of two separate TCP connections: one for control messages and one for the actual data transfer.
π§ Quick Revision Questions
- What is the purpose of the
USERandPASScommands in the FTP authentication process? - What is the difference between the
PUTandGETcommands in FTP? - How does FTP use TCP connections differently from the example of SMTP or POP3?
- Why is a clear "documentation" or indexing system important for a functional FTP server, as illustrated by the warehouse analogy?
- According to the lecture, what is the name of the RFC that defines the File Transfer Protocol?
π Lecture 31 β World Wide Web and HTTP Protocol
π Overview: This lecture explains how the World Wide Web functions, focusing on the interaction between web browsers (clients) and web servers. It covers the HTTP protocol, URLs, HTML files, and the step-by-step process of loading a web page, which is fundamental to understanding how the internet delivers content to users.
ποΈ Topics Covered
The lecture begins by explaining how a website is built and stocked with content on a web server, using FredsCo as an example. It then defines the URL and HTTP protocol, including the GET command. The role of HTML as a markup language for describing web page content is introduced, followed by a detailed multi-step example of how a browser loads a webpage by downloading multiple objects.
π Lecture Summary
Building and Stocking the New Retail Store, AKA New Website
The end user PC runs a web browser (also called a web client), but content must first be created and placed on a web server. Content consists of individual web pages, and a collection of these is called a website. For example, FredsCo installs web server software on a computer, puts created files (content) onto it, and makes it accessible via http://www.fredsco.com. When a customer named Conner opens his browser and connects to that URL, the web server receives Conner's request and sends the web page back to him.
π Definition β Web Server: A computer with installed web server software that stores website files and responds to client requests by sending web pages.
Rules for WWW
When Conner types http://www.fredsco.com in his browser, the web page loads. This string is called a uniform resource locator (URL). A URL identifies the protocol in use and the name of the server. HTTP stands for Hypertext Transfer Protocol and is the TCP/IP protocol used to send web page contents from the web server to the web browser. The HTTP command GET requests the web server to send the server's default web page to the browser. When a website is developed, one web page is defined as the default. The server looks in its configuration, finds the file name of the home page, and sends the contents of a file called home.html back to the browser using HTTP.
π‘ Why this matters: Understanding HTTP and GET is essential because they are the foundation of all web communicationβevery time you visit a website, your browser uses these same protocols and commands.
π Definition β URL (Uniform Resource Locator): A string that identifies the protocol in use and the name of the server, used to locate web resources.
π Formula: URL = protocol://server-name β Identifies which protocol (e.g., HTTP) to use and which server to connect to.
π Example: http://www.fredsco.com β The protocol is HTTP, and the server name is www.fredsco.com.
HTML Files and Objects
An .HTML file contains text that conforms to a specification called Hypertext Markup Language (HTML). HTML was the first language used to describe the contents of a web page. HTML tells the browser what to put in the browser window, what color to make it, what size, and so onβbut it does NOT define anything about how to send and receive data. When a web page gets loaded, some parts show up right away while the rest fills in slowly. A lot of files (called objects) get transferred between a web client and server. The first individual file (known as object) downloaded by HTTP is an HTML file. HTML files include text that goes on the web page, formatting instructions, plus instructions to download other objects.
π Definition β HTML (Hypertext Markup Language): A specification used to describe the contents of a web page, including text, formatting, color, size, and instructions to download other objects.
π Definition β Object: An individual file transferred between a web client and server; the first object downloaded is the HTML file.
An Example
Assume Conner types Fredsco's URL in his browser:
- Conner's browser gets the HTML file using HTTP.
- Conner's browser reads the file, displaying things on the screen as a result.
- When Conner's browser reads the file, it might have instructions that require Conner to download other objects. If so, it uses HTTP to get those objects.
- Conner's browser reads the contents of the new objects, displaying them on the screen.
- Steps 3 and 4 are repeated until all objects are downloaded.
π Example: For http://www.fredsco.com:
- Step 1: Browser uses HTTP GET to request
home.htmlfrom the server. - Step 2: Browser reads
home.htmland displays text/formatting. - Step 3:
home.htmlcontains instructions to download an image filelogo.jpg. - Step 4: Browser uses HTTP to get
logo.jpgand displays it. - Step 5: The process continues until all objects (text, images, videos, etc.) are loaded.
β Key Takeaways
The World Wide Web relies on client-server architecture where web browsers (clients) send HTTP requests to web servers, which respond with HTML files and other objects. The URL identifies the protocol (HTTP) and server name, while the HTTP GET command retrieves the default web page. HTML files are the first objects downloaded and contain both content and instructions for fetching additional objects. The loading process is iterativeβthe browser repeatedly downloads and displays objects until the entire page is complete. Understanding these fundamental concepts is crucial for grasping how all web browsing works.
π§ Quick Revision Questions
- What does URL stand for, and what two pieces of information does a URL identify?
- What is the purpose of the HTTP GET command?
- What is the first object downloaded when a web page is loaded, and what does it contain?
- In the five-step example, what happens in steps 3-5 after the HTML file is received?
- What does HTML define about a web page, and what does it NOT define?
π Lecture 32 β Main Features of TCP
π Overview: This lecture covers the core features of the Transmission Control Protocol (TCP), including its mechanisms for reliable data delivery, error recovery, segmentation, and multiplexing via port numbers. Understanding these features is essential for grasping how TCP ensures dependable communication between applications over the Internet.
ποΈ Topics Covered
The lecture begins by outlining the high-level features of TCP: ensuring delivery through error recovery, breaking large shipments into manageable sizes using segmentation, directing data to the correct application using port numbers, and simplifying application development. It then explains the TCP header format, focusing on sequence numbers and acknowledgment numbers for error recovery, and illustrates the forward acknowledgment process with examples of error-free and error-prone data transmission.
π Lecture Summary
31.6 Transferring All the Files That Make Up a Web Page
This section illustrates how a web page composed of multiple files (e.g., HTML, images) is transferred using TCP. Each file is sent as a separate TCP connection, ensuring that all components arrive reliably at the destination.
Main Features of TCP
The high points of TCP include ensuring delivery through error recovery, breaking large shipments into manageable sizes using segmentation, getting the data to the right individual program (not just the right computer) by using port numbers, and simplifying the creation of applications by hiding the details of data delivery from the application. When a sender (e.g., Wilma's computer) sends three TCP segments to a receiver (e.g., Fred), the sender numbers the segments so that if a receiver does not receive a segment or receives one with an error, it can request the sender to send again.
π Definition β TCP Segment: The unit of data passed by TCP to the network layer, consisting of a TCP header followed by application data.
π Procedure: Sequential numbering of segments β Enables the receiver to detect missing or corrupted segments and request retransmission.
π Example: Wilma sends three TCP segments numbered 1, 2, and 3 to Fred. If segment 2 is lost or corrupted, Fred can request Wilma to resend segment 2.
Assuring Data Delivery
Figure 32.1 conceptually illustrates how TCP assures data delivery: the sender numbers the segments, and the receiver sends acknowledgments. If an acknowledgment is not received for a particular segment (or an error is indicated), the sender retransmits that segment.
π‘ Why this matters: This reliable delivery mechanism is what makes TCP suitable for applications like web browsing, email, and file transfer, where data integrity is critical.
The Format of the Shipping Label: TCP Headers
The TCP header contains several important fields. For error recovery, TCP uses the sequence number and acknowledgment number fields. The sequence number identifies the segment, and the acknowledgment number is used when an error occurs. The ACK field indicates that this number is the number of the next segment the receiver expects to receive. This procedure is called forward acknowledgment.
π Definition β Forward Acknowledgment: A method where the acknowledgment number specifies the next expected sequence number, rather than confirming receipt of a specific segment.
π Example: In Figure 32.3 (Delivery Confirmation, No Errors), Wilma sends segments 1, 2, and 3. Fred sends acknowledgments: after receiving segment 1, he sends ACK with acknowledgment number 2; after segment 2, he sends ACK with number 3; after segment 3, he sends ACK with number 4.
TCP Error-Recovery Process
Assume while Wilma sent three segments, segment number 2 has some errors (as shown in Figure 32.4). In this case, Fred detects the error in segment 2. Using forward acknowledgment, he sends an acknowledgment with the number of the next expected segment (which is still 2, since segment 2 was not successfully received). When Wilma receives this acknowledgment, she knows that segment 2 was not delivered correctly and resends it.
π Example: Wilma sends segments 1, 2, and 3. Fred receives segment 1 (ACK: expect 2), then receives corrupted segment 2 (ACK: still expect 2, because segment 2 is not usable), and then receives segment 3 (ACK: still expect 2, because segment 2 is missing). Wilma sees repeated ACKs for segment 2 and retransmits segment 2. After receiving the retransmitted segment 2, Fred sends ACK with acknowledgment number 4.
β Key Takeaways
TCP's core featuresβreliable delivery through error recovery, segmentation, port-based demultiplexing, and application transparencyβare fundamental to its role as the primary transport protocol on the Internet. The error-recovery process relies on sequence numbers to identify segments and forward acknowledgment, where the acknowledgment number indicates the next expected segment. The TCP header's sequence number and acknowledgment number fields are the key mechanism for detecting and recovering from lost or corrupted segments. Understanding these mechanisms is critical for analyzing network performance and troubleshooting connectivity issues.
π§ Quick Revision Questions
- What are the four main features of TCP highlighted in this lecture?
- What is the purpose of the sequence number in a TCP segment?
- Explain how forward acknowledgment works in error-free transmission.
- How does TCP recover from a corrupted segment, using the example of Wilma sending three segments where segment 2 is corrupted?
- What does the ACK field in a TCP header indicate about the acknowledgment number?