You are on page 1of 12

.

2015-16

9
SMTP, DHCP
SMTP DHCP,
,
Wireshark. Capture ,
.
(Display), Analyze, ()
,
, () ,
, Capture,
,
. : Clear
( !). ,
Wireshark Edit Preferences
Name Resolution, Resolve MAC address Resolve transport
names OK.
,
(
). LDAP,
labuser.
,
Alt+Ctrl+Del.
,
.

1. SMTP
Simple Mail Transfer Protocol (SMTP)
.
RFC821 RFC1123. , Enhanced SMTP
(ESMTP) RFC 2821.
SMTP
. ()
( ) .
(
- email) SMTP
(outgoing mail server).
SMTP -.
SMTP SMTP
SMTP
(relay servers). ( )
, , POP3
IMAP, (incoming mail server).
( Mozilla Thunderbird, Microsoft Outlook ..)
-1-

. 2015-16

.
1 SMTP POP3 ( IMAP)
, , .
SMTP ASCII 7 bit
( )
. Multipurpose Internet Mail
Extensions (MIME) ASCII ,
SMTP 8 bit.
ESMTP
.
(C)
SMTP (S) .
S:
C:
S:
C:
S:
C:
S:
C:
S:
C:
C:
C:
C:
C:
C:
C:
S:
C:
S:

220 www.mailserver.com Your SMTP Post


HELO mydomain.gr
250 Hello mydomain.gr
MAIL FROM:<sender>
250 Ok
RCPT TO:<friend@example.com>
250 Ok
DATA
354 End data with <CR><LF>.<CR><LF>
Subject: test message
From: sender@mydomain.gr
To: friend@example.com
This is a test.
Do not reply.
.
250 Ok: queued as 123456789
QUIT
221 Bye


. HELO SMTP
. ESMTP EHLO (Extended
HELLO) HELO (Hello RFC 821).
MAIL
. RCPT
. DATA
. , QUIT
. SMTP
http://www.networksorcery.com/enp/protocol/smtp.htm
RFC.
SMTP , ,
SMTP
TELNET. ,
. <Enter>.
1

.
-2-

. 2015-16

2.
SMTP .
telnet smtp.ntua.gr 25
HELP
HELO cn.ntua.gr
EHLO cn.ntua.gr
HELP EHLO
QUIT
1.1

telnet; [: telnet /?]

SMTP,
.
1.2
1.3
1.4
1.5
1.6
1.7
1.8

1.9

SMTP
;
(Response code) ; [:
.]
ELP SMTP;

.
HELO ELO SMTP;
HELO
EHLO SMTP;
ELO
SMTP; [: HELP
.]
smtp.ntua.gr ESMTP.
;

.
<Enter>. :

< >.
.
telnet smtp.ntua.gr 25
HELO example.com
MAIL FROM:<a_guru@of.net>
RCPT TO:<stathissykas@yahoo.com>
DATA
Subject:Test Message
Testing
1
2
3
.
QUIT

<Backspace> ,
.
-3-

. 2015-16

<Your_email_address> ..
<elxxxxx@mail.ntua.gr>3.
https://my.ntua.gr .
1.10
DATA SMTP;
1.11 QUIT
SMTP ;
1.12
;
1.13 ;
1.14 ;
1.15
1.12; [:
4.]
1.16 example.com;
1.17
RCPT;
Wireshark
SMTP .
IP
. .
<Enter>.
telnet smtp.ntua.gr 25
QUIT
,
SMTP :
1.18
1.19
1.20
1.21
1.22
1.23
1.24
1.25

;
;
SMTP;
( )
.
SMTP;
TCP QUIT ;

QUIT SMTP;
SMTP TCP;

mail.ntua.gr
web
. (.. Gmail
Yahoo) .
4
MyNTUA Display Headers Full Headers .
Yahoo! Mail, More, View Full Header.
Gmail, , Show
Original.
-4-

. 2015-16

2. DHCP
Dynamic Host Control Protocol (DHCP) RFC 2131,
TCP/IP.

IP .
.

. ,
, IP.
(
). , Reverse Address Resolution Protocol (RARP),
(RFC 903). IP
TCP/IP.
, BOOTstrap Protocol (BOOTP),
( )
IP
(RFC951). BOOTP
(BOOTP extension mechanism) .
BOOTP DHCP.
BOOTP DHCP. DHCP
IP .
IP
. DHCP
.
, DHCP .
(DHCP Discover) DHCP. DHCP
, (DHCP Offer)
IP. (DHCP Request)
IP .
(DHCP ACK)
IP. IP
(lease time). ,
. , (DHCP Release) .
, DHCP , ,
. DHCP 3
:
( IP )
( IP)
( MAC )

ipconfig /all.
2.1. IP, -
IP DHCP .
Wireshark (
) DHCP
/ IP .
-5-

. 2015-16

iprelease5
. iprenew6
.
iprenew .
iprenew,
Wireshark.
2.2. DHCP.
; [: DHCP
BOOTP.]
2.3. BOOTP
BOOTP ;
2.4. BOOTP;
2.5. DHCP (iprelease),
( iprenew) ( iprenew) ;
[: DHCP Info
Wireshark.]
2.6. DHCP ;
2.7. MAC IP
;
2.8. DHCP,
(option)
(DHCP Message Type). byte; [:
http://www.networksorcery.com/enp/protocol/bootp/options.htm
.]
2.9. DHCP , (value)
2.8; [:
Wireshark
DHCP.]
, IP ,
DHCP Discover/Offer/Request/ACK
DHCP.
2.10. MAC
DHCP Discover/Offer/Request/ACK
DHCP.
2.11. IP
.
2.12. .
2.13. (well-known ports)

DHCP;
[:

http://en.wikipedia.org/wiki/Well_known_ports.]
2.14. IP DHCP Discover;
2.15. ,
0.0.0.0 IP .
2.16. IP DHCP
DHCP Offer ;
2.17. MAC DHCP Offer
;
5

ipconfig /release, , , labuser


.
6
ipconfig /renew.
-6-

. 2015-16

2.18. IP DHCP DHCP


Offer ;
2.19. IP DHCP
DHCP Request ;
2.20. IP DHCP Request
DHCP ;
2.21. IP DHCP ACK
;
2.22. IP
2.1; .
2.23. IP; [:
lease time DHCP Offer.]
IP, DHCP
.
DHCP Discover , (option) Parameter Request
List .
2.24. (option) Parameter Request List.
2.25. , ,
(.. 15 Domain Name To DNS

).
[:

http://www.iana.org/assignments/bootp-dhcp-parameters.]
2.26. DHCP Discover
DHCP DHCP Offer; [:

Show Packet in New Window.]
IP,
( ) .
2.27. DHCP
ARP. ;
2.28. ARP Request
DHCP ACK;
2.29. , ARP Request ;
2.30. (, IP)
MAC;
2.31. ARP [: gratuitous
ARP google.];
iprenew,
IP (
iprenew).
2.32. DHCP iprenew;
2.33. DHCP Request
iprenew,
; [:
Wireshark.]
2.34. BOOTP
;
2.35. DHCP Request iprenew,
IP ;
2.19;
-7-

. 2015-16

2.36. DHCP ACK iprenew,


IP DHCP;
2.21;
2.37. DHCP ACK
iprenew, ;
Transaction ID DHCP
Wireshark.
2.38. o DHCP
iprelease;
2.39. DHCP
iprenew;
2.40. DHCP
iprenew;
2.41. Transaction ID;

-8-

PC:

:
IP:

. 2015-16

:
.

MAC:

9
SMTP, DHCP

. .

1
1.1 ..........................................................................................................................................................
................................................................................................................................................................
1.2 ..........................................................................................................................................................
................................................................................................................................................................
1.3 ..........................................................................................................................................................
................................................................................................................................................................
1.4 ..........................................................................................................................................................
1.5 ..........................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
1.6 ..........................................................................................................................................................
1.7 ..........................................................................................................................................................
................................................................................................................................................................
1.8 ..........................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
1.9 ..........................................................................................................................................................
................................................................................................................................................................
1.10 ........................................................................................................................................
................................................................................................................................................................
1.11 ........................................................................................................................................
................................................................................................................................................................
1.12 ........................................................................................................................................
................................................................................................................................................................
1.13 ........................................................................................................................................
1.14 ........................................................................................................................................
1.15 ........................................................................................................................................
-i-

. 2015-16

1.16 ........................................................................................................................................
1.17 ........................................................................................................................................
1.18 ........................................................................................................................................
1.19 ........................................................................................................................................
1.20 ........................................................................................................................................
1.21 ........................................................................................................................................
1.22 ........................................................................................................................................
1.23 ........................................................................................................................................
1.24 ........................................................................................................................................
................................................................................................................................................................
1.25 ........................................................................................................................................

2
2.1 ..........................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
2.2 ..........................................................................................................................................................
2.3 ..........................................................................................................................................................
................................................................................................................................................................
2.4 ..........................................................................................................................................................
2.5 ..........................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
2.6 ..........................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
2.7 ..........................................................................................................................................................
................................................................................................................................................................
2.8 ..........................................................................................................................................................
................................................................................................................................................................
2.9 ..........................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
-ii-

. 2015-16

2.10 ........................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
2.11 ........................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
2.12 ........................................................................................................................................
................................................................................................................................................................
2.13 ........................................................................................................................................
................................................................................................................................................................
2.14 ........................................................................................................................................
................................................................................................................................................................
2.15 ........................................................................................................................................
................................................................................................................................................................
2.16 ........................................................................................................................................
................................................................................................................................................................
2.17 ........................................................................................................................................
................................................................................................................................................................
2.18 ........................................................................................................................................
................................................................................................................................................................
2.19 ........................................................................................................................................
................................................................................................................................................................
2.20 ........................................................................................................................................
................................................................................................................................................................
2.21 ........................................................................................................................................
................................................................................................................................................................
2.22 ........................................................................................................................................
2.23 ........................................................................................................................................
2.24 ........................................................................................................................................
2.25 ........................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
2.26 ........................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
-iii-

. 2015-16

2.27 ........................................................................................................................................
2.28 ........................................................................................................................................
2.29 ........................................................................................................................................
2.30 ........................................................................................................................................
2.31 ........................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
2.32 ........................................................................................................................................
................................................................................................................................................................
2.33 ........................................................................................................................................
................................................................................................................................................................
2.34 ........................................................................................................................................
2.35 ........................................................................................................................................
................................................................................................................................................................
2.36 ........................................................................................................................................
................................................................................................................................................................
2.37 ........................................................................................................................................
2.38 ........................................................................................................................................
2.39 ........................................................................................................................................
2.40 ........................................................................................................................................
2.41 ........................................................................................................................................
................................................................................................................................................................

-iv-

You might also like