Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 12

Компјутерски Мрежи Аудиториски вежби

6 E-mail Services and SMTP/POP Protocols

E-mail, е нај популарниот мрежен сервис, тој допринесе до револуција во начинот на


комуникација на луѓето со својата едноставност и брзина. За да работи на компјутер или друг
краен уред, e-mail-от има потреба од неколку апликации и сервиси. Пример за Application layer
protocols се Post Office Protocol (POP) и Simple Mail Transfer Protocol (SMTP), прикажани на
долната слика. Со HTTP, овие протоколи го дефинираат client/server processes.
Кога луѓето креираат e-mail порака, обично користат апликација наречена Mail User
Agent (MUA), или e-mail client. MUA овозможува пораките да бидат пратени и ги поставува
примените пораки во клиентското сандаче, тоа се два различни процеса.
Со цел за добивање на e-mail пораки од e-mail сервер, e-mail клиентот може да користи
POP. Праќањето на e-mail без разлика дали е клиент или сервер се користи формат на пораката
и командни стрингови дефинирани од SMTP протоколот. Обично e-mail клиентите
обезбедуваат функционалност на два протоколи со една апликација.

Слика 1. Клиентите праќаат e-mail на серверот со користење на SMTP а примаат со POP3

E-mail Server Processes - MTA and MDA

E-mail серверот оперира со два одделни процеси:

 Mail Transfer Agent (MTA)


 Mail Delivery Agent (MDA)

Mail Transfer Agent (MTA) процесот се користи за forward e-mail. Како што е
прикажана на сликата, MTA прима пораки од MUA или од друг MTA на друг e-mail
server. Врз основа на хедерот на пораката, се определува како пораката да биде
forwarded за да ја достигне дестинацијата. Ако mail-от е адресиран до корисник на кој
сандачето му е на локалниот сервер, mail-от се предава со MDA. Ако mail-от е за
корисник кој не е во локалниот сервер, MTA го насочува e-mail-от до MTA на
соодветниот сервер.

1
Компјутерски мрежи Одбрани задачи

Слика 2. Mail Transfer Agent (MTA) процесот се справува со комуникацијата меѓу серверите

На сликата гледаме дека Mail Delivery Agent (MDA) прифаќа дел на e-mail од
Mail Transfer Agent (MTA) и врши реална испорака. MDA ги прифаќа сите inbound mail
од MTA и ја ги распределува во соодветните сандачиња на корисниците. MDA исто
така може да реши прашања со конечна испорака, како што се virus scanning, spam
filtering и return-receipt handling. Повеќето e-mail комуникации користат MUA, MTA и
MDA апликации. Сепак постојат и други алтернативи за испорака на e-mail.
Клиентот може да биде поврзан со корпоративен e-mail систем, како што е
IBM's Lotus Notes, Novell's Groupwise, или Microsoft's Exchange. Овие системи често
имаат сопствен внатрешен e-mail формат, и нивните клиенти типично комуницираат со
e-mail серверот со користење на комерцијален протокол.
Серверот испраќа или прима e-mail преку интернет преку product's Internet mail
gateway, кој ги врши reformatting. На пример, ако две лица кој работат во иста
компанија разменуваат електронска пошта еден со друг со користење на комерцијален
протокол, нивните пораки може да останат комплетно во рамките а корпоративниот e-
mail систем.
Друга алтернатива е, компјутери кој немаат MUA се уште може да се поврзат со
mail service на web browser со цел да добијат и испратат порака на овој начин. Некој
компјутери може да работат со сопствен MTA и управуваат inter-domain e-mail.

Слика 3. Mail Delivery Agent (MDA) се справува со праќањето на e-mail меѓу серверот и
клиентите

2
Компјутерски мрежи Одбрани задачи

Како што споменавме претходно, e-mail може да користи протокол, POP и


SMTP. POP и POP3 (Post Office Protocol, version 3) се inbound mail протокол за
испорака и се типични client/server protocols. Тие ги испорачуваат e-mail-от од e-mail
server до клиентот (MUA). MDA слуша за клиенти кога се поврзуваат со сервер.
Откако е воспоставена конекција, серверот може да го испорача e-mail-от на клиентот.
Simple Mail Transfer Protocol (SMTP), од друга страна, регулира трансферот на
outbound e-mail од клиентот кој испраќа до e-mail server (MDA), како и транспортот на
e-mail помеѓу e-mail servers (MTA). SMTP овозможува e-mail да биде транспортиран
преку мрежата помеѓу различни типови на сервери и клиентски софтвер и осигурува
размената на e-mail преку интернет да е возможно.
Форматот на SMTP протоколот користи цврсто множество од команди и
одговори. Овие команди подржуваат процедури користени во SMTP, како што се
session initiation, mail transaction, forwarding mail, verifying mailbox names, expanding
mailing lists, opening and closing exchanges.

Некој од командите наведени во SMTP протоколот се:


 HELO - identifies the SMTP client process to the SMTP server process
 EHLO - Is a newer version of HELO, which includes services extensions
 MAIL FROM - Identifies the sender
 RCPT TO - Identifies the recipient
 DATA - Identifies the body of the message

Слика 4. SMTP/POP3

3
Компјутерски мрежи Одбрани задачи

Работа со апликациското ниво: DHCP, DNS, HTTP, HTTPS, Email

Слика 5. Пример како треба да ви изгледа топологијата

Задача 1: Подготовка на мрежата.

Чекор 1: Поврзете ја мрежата во Cisco Packet Tracer слично како и на слика 5

Чекор 1. Стартувајте го Packet Tracer во Realtime mode.

 Options -> Preferences


o Enable “Show Link Lights”
o Disable “Hide Device Label”

Задача 2. Додадете ги серверите

Чекор 1. Конфигурација на DHCP Server

Global Settings:
 Change the Display Name to “DHCP Server”
 Set the Gateway to 172.16.0.1
FastEthernet:
 Set the IP address to 172.16.0.10
 Set the Subnet Mask to 255.255.0.0
HTTP:
 Set HTTP Service and HTTPS Service to Off
DHCP:
 Set the Default Gateway to 172.16.0.1
 Set the DNS Server to 172.16.0.11
 Set the Start IP Address to 172.16.0.100

4
Компјутерски мрежи Одбрани задачи

DNS:
 Set the Service to Off
Email:
 Set the SMTP Service and POP3 Service to Off

Чекор 2. Configuring the DNS Server

Global Settings:
 Change the Display Name to “DNS Server”
 Set the Gateway to 172.16.0.1
FastEthernet:
 Set the IP address to 172.16.0.11
 Set the Subnet Mask to 255.255.0.0
HTTP:
 Set HTTP Service and HTTPS Service to Off
DHCP:
 Set the Service to Off
DNS:
 Entering the www.cabrillo.edu Domain Name
 Enter for the Domain Name www.mapua.edu
 Enter for IP Address 172.16.0.20
 Click Add
 Entering the www.internal.com Domain Name
 Enter for the Domain Name www.internal.com
 Enter for IP Address 172.16.0.30
 Click Add
 Entering the www.internal.com Domain Name
 Enter for the Domain Name mail.mapua.edu
 Enter for IP Address 172.16.0.40
 Click Add
Email:
 Set the SMTP Service and POP3 Service to Off

Чекор 3. Configuring the www.mapua.edu Web Server

Global Settings:
 Change the Display Name to “Web Server: www.mapua.edu”
 Set the Gateway to 172.16.0.1
FastEthernet:
 Set the IP address to 172.16.0.20
 Set the Subnet Mask to 255.255.0.0
DHCP:
 Set the Service to Off
DNS:
 Set the Service to Off
HTTP

5
Компјутерски мрежи Одбрани задачи

 Set the both the HTTP and HTTPS Service to On


 Change the sentence, “<hr> Welcome to Cisco Packet Tracer. Opening doors
to new opportunities. Mind Wide Open.” to “<hr> Welcome to Mapua
Institute’s of Technology’s public web page!” You may add other information
as well.
Email:
 Set the SMTP Service and POP3 Service to Off

Чекор 4. Configuring the www.internal.com Web Server

Global Settings:
 Change the Display Name to “Web Server: www.internal.com”
 Set the Gateway to 172.16.0.1
FastEthernet:
 Set the IP address to 172.16.0.30
 Set the Subnet Mask to 255.255.0.0
DHCP:
 Set the Service to Off
DNS:
 Set the Service to Off
HTTP:
 Change the sentence, “<hr> Welcome to Cisco Packet Tracer. Opening doors
to new opportunities. Mind Wide Open.” to “<hr> This is the corporate
internal network!” You may add other information as well.

Чекор 5. Configuring the mail.mapua.edu Email Server

Global Settings:
 Change the Display Name to “Email Server: mail.mapua.edu”
 Set the Gateway to 172.16.0.1
FastEthernet:
 Set the IP address to 172.16.0.40
 Set the Subnet Mask to 255.255.0.0
DHCP:
 Set the Service to Off
DNS:
 Set the Service to Off
HTTP:
 Set HTTP Service and HTTPS Service to Off
Email:
 Set SMTP and POP3 Service to On.
 Set the domain name to mail.mapua.edu
 Setup three user accounts as follows:

Users Password
user1 user1

6
Компјутерски мрежи Одбрани задачи

user2 user2
user3 user3

Чекор 6. Configure Two Client Computers using DHCP

Add two client computers PC0 and PC1.

Global Settings:
 Change the Display Names to “PC0 Dynamic 1” and to “PC1 Dynamic 2”
respectively
 Set the Gateway/DNS to DHCP
FastEthernet:
 Set the IP Configuration to DHCP

Чекор 7. Configure One Client Computers using Static IP Addressing

Add one client computers.

Global Settings:
 Change the Display Name to “PC2 Static”
 Set the Gateway/DNS to Static
 Set Gateway to 172.16.0.1
 Set the DNS Server to 172.16.0.11
FastEthernet:
 Be sure the configuration is set to Static
 Set the IP address to 172.16.0.90
 Set the Subnet Mask to 255.255.0.0

Чекор 8. Configure Email Configuration for Clients

Слика 6. Конфигурација на e-mail клиентот на PC0

7
Компјутерски мрежи Одбрани задачи

Слика 7. Конфигурација на e-mail клиентот на PC1

Слика 8. Конфигурација на e-mail клиентот на PC2

Напомена: можно е да ви дава грешка за автентификација во Incoming/Outgoing Mail


Server поставете ја адресата на Mail Server 172.16.0.40

Чекор 9. Adding switches

 Add two switches.


 Connect the servers to one switch using a straight-through cable.
 Connect the client computers to the other switch using a straight-through cable.
 Interconnect the two switches using a crossover cable.

9. Verify connectivity

 Ping (ICMP)
o From a client computer use the Desktop Command prompt to ping the other
client computers and the servers.
o Example: From the Dynamic 1 client, C> ping 172.16.0.20
o The first one or two pings may fail, but you should receive a reply on the later
pings. This is due to the ping timing out while the ARP process takes place.

8
Компјутерски мрежи Одбрани задачи

 Web Browser (HTTP)


o On the client computers use the Desktop Web Browser, enter the URLs of the
Web Servers www.cabrillo.edu and www.internal.com.
o You should see the web pages that you created on these servers.
 Email (SMTP)
o From client computer (Dynamic 1), compose an email (from Desktop tab) to
another client computer (Static). To: user3@mail.mapua.edu
o Upon sending the email, check if email was received by Static PC by clicking
the email icon (Desktop tab), and clicking the Receive button after.

Чекор 10. Using Simulation Mode

Click on Simulation.

Note: To reset a simulation, click on “Reset Simulation”

Click on Edit Filters

 Choose Show All/None so that all the boxes (protocols) are unchecked.
 Select (check) the following protocols: DHCP, ICMP, HTTP, DNS, HTTPS,
SMTP
Web Browser (HTTP)
 On the client computers use the Desktop Web Browser, enter the URLs of the
Web Servers http://www.mapua.edu or http://www.internal.com.
 Click on Auto Capture/Play (automatically forwards the packets) or Capture
Forward (must keep clicking to advance the packets)
DHCP
 Reset the simulation by clicking on “Reset Simulation”
 To view DHCP, on one of the “Dynamic “client computers using DHCP go to
the Desktop Command prompt.
 To have the client computer ask for new IP address and other information
from the DHCP server, enter the command: C> ipconfig /renew
Email
 Reset the simulation by clicking on “Reset Simulation”
 To view email, click on one of the client computers sending email to another
client computer.
 Click on Auto Capture/Play (automatically forwards the packets) or Capture
Forward (must keep clicking to advance the packets)
Questions:

1. With the activity conducted, briefly describe the function of the following application
layer protocols:
a. HTTP
_____________________________________________________________________
_____________________________________________________________________

b. HTTPS

9
Компјутерски мрежи Одбрани задачи

_____________________________________________________________________
_____________________________________________________________________

c. DHCP
_____________________________________________________________________
_____________________________________________________________________

d. DNS
_____________________________________________________________________
_____________________________________________________________________

e. SMTP
_____________________________________________________________________
_____________________________________________________________________

2. Under Simulation mode, click Dynamic 1, then Command Prompt (on Desktop tab),
then execute ipconfig /release, then ipconfig /renew. Click Auto Capture/Play
(automatically forwards the packets) or Capture Forward (must keep clicking to
advance the packets) until Packet Tracer finishes simulation (or reach Buffer Full
Status). On the simulation panel, look for the frame DHCP 172.16.0.10/16 (Last
Device column) and Switch1 (At Device column). Click the Info square-colored area
on the Info column. Click Outbound PDU details at the PDU information.

Answer
Preamble
Source MAC address
Destination MAC address
Type field value
Source IP address
Destination IP address

a. A connection-oriented communication is where the sender and receiver must


prearrange for communications to occur, otherwise communications fails.
Connectionless services do not prearrange for communications to occur.
Connection-oriented services use TCP as its transport layer protocol whereas
connectionless services use UDP. Is DHCP a connection-oriented service or a
connectionless service? Is DHCP running TCP or UDP services? What is the
source port used by DHCP servers?
_______________________________________________________________
_______________________________________________________________

b. From the five application protocols under study, identify the three protocols
using TCP services.
_______________________________________________________________
_______________________________________________________________

3. Under Simulation mode, click Dynamic 2, then Command Prompt (on Desktop tab),
then type the URL http://www.internal.com on the web browser. Similarly, do the

10
Компјутерски мрежи Одбрани задачи

same for Static PC, typing in https://www.internal.com. Click Auto Capture/Play


(automatically forwards the packets) or Capture Forward (must keep clicking to
advance the packets) until Packet Tracer finishes simulation (or reach Buffer Full
Status).

a. Before the interaction of the clients using HTTP and HTTPS, what protocol
was used first?
_______________________________________________________________
_______________________________________________________________

b. What is the source port used by HTTP servers? HTTPS servers?


_______________________________________________________________
_______________________________________________________________

c. Look at any PDU information containing an HTTP frame and another PDU
information containing HTTPS frame. Look at the difference between the data
stored via HTTP with that of HTTPS.
_______________________________________________________________
_______________________________________________________________

4. Under Simulation mode, click Dynamic 1, then send email on one of the other client
computers. Click Auto Capture/Play (automatically forwards the packets) or
Capture Forward (must keep clicking to advance the packets) until Packet Tracer
finishes simulation (or reach Buffer Full Status).

a. Before the interaction of the clients using SMTP, what protocol was used
first?
_______________________________________________________________
_______________________________________________________________

b. What is the source port used by servers running SMTP?


_______________________________________________________________
_______________________________________________________________

5. By identifying the protocols serviced by TCP and UDP, identify three fields present in
TCP that are not found in UDP.
_____________________________________________________________________
_____________________________________________________________________

6. Perform a ping from Dynamic 1 to Dynamic 2 under Simulation mode.


Note: Before doing a ping, type in arp –d at the command prompt of Dynamic 1 and
execute arp –a after. Internet address and Physical address must be empty after typing
arp -a

a. Before the interaction of the clients with ping, what protocol was used first?
_______________________________________________________________

b. Execute arp –a after the successful ping. Write down the internet address and
physical address on Dynamic 1.

11
Компјутерски мрежи Одбрани задачи

_______________________________________________________________
_______________________________________________________________

c. Analyze the first ICMP frame and complete the table below.

Answer
Source IP Address
Destination IP Address
ICMP Type value
ICMP Code value
Source Ethernet Address
Destination Ethernet Address
Internet Protocol version
Time to Live (TTL) value

12

You might also like