ip address and mac address
TRANSCRIPT
-
8/16/2019 IP Address and MAC Address
1/21
The complete picture
Linux Network Management
-
8/16/2019 IP Address and MAC Address
2/21
End to End Connection
• Being able to describe the end to endconnection sequence is a useful thing
• er! popular question on technicalinter"iews
• #suall! necessar! in troubleshooting $ %f !ou don&t know how it should work' !ou
won&t recogni(e problems when !ou seethem
-
8/16/2019 IP Address and MAC Address
3/21
)TT* Connection
)ow do we google++
-
8/16/2019 IP Address and MAC Address
4/21
-
8/16/2019 IP Address and MAC Address
5/21
,hat do we ha"e+++
• - name for the destination 1 google2com• 3ur own source %* address• 3ur own M-C address• 3ur own gatewa! %* address
• 3ur own 0N4 ser"er %* address• ,ell1known port addresses 5/etc/ser"ices6• 3ur own subnet mask
-
8/16/2019 IP Address and MAC Address
6/21
-7* E8C)-N.E
what's your MAC?
00:C3:04:22:17:0A
-
8/16/2019 IP Address and MAC Address
7/21
4tep 9 1 .et the router M-C
,e need to get the %* address of the name google2com
,e will get that from the 0N4 ser"er 5%* in resol"2conf64ince the %* address of the 0N4 ser"er is probabl! notlocal we need to send the 0N4 request to the router
:or that we need the M-C address of the router
Packet 1 Broadcast ARP request torouter port IP
-
8/16/2019 IP Address and MAC Address
8/21
4tep ; 1 -7* response
-ssuming the router port is up we will get an -7*response with the M-C of the router port
%: T)E7E %4 - *73BLEM ,E ,%LL 4EE - T7-CE,%T) 7E*E-TE0 -7* 7E
-
8/16/2019 IP Address and MAC Address
9/21
0N4 L33=#*
who is google.com?
216.239. 1.100 DNS SERVER
-
8/16/2019 IP Address and MAC Address
10/21
4tep > 1 0N4 7equest for
.oogle2com
Packet 3 DNS Query to DNS Ser er !inreso" #conf$ for %oo%"e#com
3ur 4ource %* and 4ource M-C
7andoml! generated 4ource *ort
0estination M-C is router port
0estination %* is the 0N4 ser"er
,ell known #0* 0N4 *ort ?>
-
8/16/2019 IP Address and MAC Address
11/21
4tep @ 1 0N4 7esponse
Packet & DNS Response from DNSSer er 'it( IP of %oo%"e#com
0estination %* and 0estination M-C to us
#0* 0estination *ort same as 4ource in request
4ource M-C is router port4ource %* is the 0N4 ser"er
4ource #0* 0N4 *ort ?>
-
8/16/2019 IP Address and MAC Address
12/21
TC* 4AN14AN/-C=1-C=
!"#
!"#$AC%
AC% WEB SERVER
-
8/16/2019 IP Address and MAC Address
13/21
4tep ? 1 TC* 4AN
Packet ) *+P S,N to -**P Ser er
4ource M-C and %* from us
7andom TC* port
0estination M-C is router port0estination %* is the )TT* 4er"er
0estination )TT* *ort
-
8/16/2019 IP Address and MAC Address
14/21
4tep D 1 TC* 4AN/-C=
Packet . *+P S,N/A+0 from -**PSer er
0estination M-C and %* is to us
4ame TC* port we used in 4AN
4ource M-C is router port4ource %* is the )TT* 4er"er
4ource )TT* *ort
-
8/16/2019 IP Address and MAC Address
15/21
4tep 1 TC* -C=
Packet *+P A+0 to -**P Ser er
4ource M-C and %* from us
4ame TC* port
0estination M-C is router port0estination %* is the )TT* 4er"er
0estination )TT* *ort
-
8/16/2019 IP Address and MAC Address
16/21
)TT* .ET 1 TC* -C=
& ( )*
C( AC%
WEB SERVER
-
8/16/2019 IP Address and MAC Address
17/21
4tep 1 )TT* .ET
Packet -**P 4* to -**P Ser er
4ource M-C and %* from us
4ame TC* port
0estination M-C is router port0estination %* is the )TT* 4er"er
0estination )TT* *ort
%t&s possible to ha"e the .ET with the -C= flag set
5*igg!1back -C=6
-
8/16/2019 IP Address and MAC Address
18/21
4tep F 1 TC* -C=
Packet 5 *+P A+0 from -**P Ser er
0estination M-C and %* is to us
4ame TC* port we used in 4AN
4ource M-C is router port4ource %* is the )TT* 4er"er
4ource )TT* *ort
-
8/16/2019 IP Address and MAC Address
19/21
)TT* 7E4*3N4E 1 TC* -C=
& ( +*!(,#!*
C( AC% WEB SERVER
-
8/16/2019 IP Address and MAC Address
20/21
4tep 9 1 )TT* 7E4*3N4E
Packet 16 -**P R4SP7NS4 from -**PSer er
0estination M-C and %* from us
4ame TC* port 5remember 1 socket pair defines TC*connection6
4ource M-C is router port
4ource %* is the )TT* 4er"er
0estination )TT* *ort
-
8/16/2019 IP Address and MAC Address
21/21
4tep 99 1 TC* -C=
Packet 11 *+P A+0 to -**P Ser er
4ource M-C and %* is from us
4ame TC* ports
0estination M-C is router port0estination %* is the )TT* 4er"er
4ource )TT* *ort