chapter 01 - overview
DESCRIPTION
TRANSCRIPT
Kh
oa
CN
TT
1/10
0P
HẠ
M V
ĂN
TÍN
H09
-200
5
MẠNG MÁY TÍNH NÂNG CAOMẠNG MÁY TÍNH NÂNG CAO
Thời gian học : 30 Tiết
GV: TS Phạm Văn Tính
Khoa CNTT – Đại học Nông Lâm
Email: [email protected]
Kh
oa
CN
TT
Kh
oa
CN
TT
2/10
0P
HẠ
M V
ĂN
TÍN
H09
-200
5
OVERVIEWOVERVIEW
TS, PHẠM VĂN TÍNHTS, PHẠM VĂN TÍNH
MẠNG MÁY TÍNH NÂNG CAOMẠNG MÁY TÍNH NÂNG CAO
Kh
oa
CN
TT
3/10
0P
HẠ
M V
ĂN
TÍN
H09
-200
5
Data networksData networks
• Data networks developed as a result of business applications that were written for microcomputers.
• Businesses needed a solution that would successfully address the following three problems:
– How to avoid duplication of equipment and resources
– How to communicate efficiently
– How to set up and manage a network
Kh
oa
CN
TT
4/10
0P
HẠ
M V
ĂN
TÍN
H09
-200
5
Network topologyNetwork topology
Kh
oa
CN
TT
5/10
0P
HẠ
M V
ĂN
TÍN
H09
-200
5
Logical TopologiesLogical Topologies
Broadcast
Token Passing
Kh
oa
CN
TT
6/10
0P
HẠ
M V
ĂN
TÍN
H09
-200
5
Local-area networks (LANs)Local-area networks (LANs)
Kh
oa
CN
TT
7/10
0P
HẠ
M V
ĂN
TÍN
H09
-200
5
Local-area networks (LANs)Local-area networks (LANs)
• LANs consist of the following components:
– Computers
– Network interface cards
– Peripheral devices
– Networking media
– Network devices
• Some common LAN technologies are:
– Ethernet
– Token Ring
– FDDI
Kh
oa
CN
TT
8/10
0P
HẠ
M V
ĂN
TÍN
H09
-200
5
Wide-area networks (WANs)Wide-area networks (WANs)
Kh
oa
CN
TT
9/10
0P
HẠ
M V
ĂN
TÍN
H09
-200
5
Wide-area networks (WANs)Wide-area networks (WANs)
• WANs interconnect LANs, which then provide access to computers or file servers in other locations.
• Some common WAN technologies are:
– Modems
– Integrated Services Digital Network (ISDN)
– Digital Subscriber Line (DSL)
– Frame Relay
– US (T) and Europe (E) Carrier Series – T1, E1, T3, E3
– Synchronous Optical Network (SONET)
Kh
oa
CN
TT
10/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
OSI layersOSI layers
• Dividing the network into seven layers provides the following advantages: – It breaks network communication into smaller, more
manageable parts.
– It standardizes network components to allow multiple vendor development and support.
– It allows different types of network hardware and software to communicate with each other.
– It prevents changes in one layer from affecting other layers.
– It divides network communication into smaller parts to make learning it easier to understand.
Kh
oa
CN
TT
11/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
TCP/IP modelTCP/IP model
Kh
oa
CN
TT
12/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
TCP/IP modelTCP/IP model
Kh
oa
CN
TT
13/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
Ethernet and the OSI modelEthernet and the OSI model
Kh
oa
CN
TT
14/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
Ethernet and the OSI modelEthernet and the OSI model
Kh
oa
CN
TT
15/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
Ethernet NamingEthernet Naming – MAC address – MAC address
Kh
oa
CN
TT
16/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
Ethernet frame fieldsEthernet frame fields
Start Frame Delimiter : 10101011
Kh
oa
CN
TT
17/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
Transport
Data Link
Physical
Network
Upper Layer Data
Upper Layer DataTCP Header
DataIP Header
DataLLC Header
0101110101001000010
DataMAC Header
Presentation
Application
Session
Segment
Packet
Bits
Frame
PDU
FCS
FCS
Encapsulating DataEncapsulating Data
Kh
oa
CN
TT
18/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
Upper Layer Data
LLC Hdr + IP + TCP + Upper Layer Data
MAC Header
IP + TCP + Upper Layer Data
LLC Header
TCP+ Upper Layer Data
IP Header
Upper Layer Data
TCP Header
0101110101001000010
Transport
Data Link
Physical
Network
Presentation
Application
Session
De - encapsulating DataDe - encapsulating Data
Kh
oa
CN
TT
19/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
• Each segment has its own collision domain
• All segments are in the same broadcast domain
Data Link
OR1 2 3 1 24
Switches and Bridges Operate at Data Link Layer
Kh
oa
CN
TT
20/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
SwitchesSwitchesSwitchesSwitches
• Each segment has its own collision domain
• Broadcasts are forwarded to all segments
Memory
Switch
Kh
oa
CN
TT
21/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
Ethernet SwitchingEthernet Switching
Kh
oa
CN
TT
22/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
Interconnecting Networks with Interconnecting Networks with
TCP/IPTCP/IP
Kh
oa
CN
TT
23/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
•Early protocol suite
•Universal
Introduction to TCP/IPIntroduction to TCP/IPIntroduction to TCP/IPIntroduction to TCP/IP
Host
Internet
TCP/IP
Host
Kh
oa
CN
TT
24/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
TCP/IP Protocol StackTCP/IP Protocol StackTCP/IP Protocol StackTCP/IP Protocol Stack
7
6
5
4
3
2
5
4
3
2
Application
Presentation
Session
Transport
Network
Data Link
Physical1
Application
Transport
Internet
Data Link
Physical1
Kh
oa
CN
TT
25/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
Application Layer OverviewApplication Layer OverviewApplication Layer OverviewApplication Layer Overview
*Used by the router
Application
Transport
Internet
Data Link
Physical
File Transfer- TFTP *- FTP *- NFS
E-Mail- SMTP
Remote Login- Telnet *- rlogin *
Network Management- SNMP *
Name Management- DNS*
File Transfer- TFTP *- FTP *- NFS
E-Mail- SMTP
Remote Login- Telnet *- rlogin *
Network Management- SNMP *
Name Management- DNS*
Kh
oa
CN
TT
26/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
• Distinguishes between upper layer applications
• Establishes end-to-end connectivity between applications
• Defines flow control
• Provides reliable or unreliable services for data transfer
Net
wo
rkIPXIP
Tra
nsp
ort
SPXTCP UDP
Transport Layer FunctionsTransport Layer Functions
Kh
oa
CN
TT
27/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
Transport Layer OverviewTransport Layer OverviewTransport Layer OverviewTransport Layer Overview
Transmission ControlProtocol (TCP)
User Datagram Protocol (UDP)
Transmission ControlProtocol (TCP)
User Datagram Protocol (UDP)
Application
Transport
Internet
Data Link
Physical
Connection-Oriented
Connectionless
Kh
oa
CN
TT
28/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
Synchronize
Acknowledge, Synchronize
Acknowledge
Data Transfer
(Send Segments)
Sender Receiver
Connection EstablishedConnection EstablishedConnection EstablishedConnection Established
Reliable Transport Layer FunctionsReliable Transport Layer Functions
Kh
oa
CN
TT
29/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
Hub Bridge Switch Router
Collision Domains:
1 4 4 4 Broadcast Domains:
1 1 1 4
Network Device DomainsNetwork Device Domains
Kh
oa
CN
TT
30/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
TCP Segment FormatTCP Segment FormatTCP Segment FormatTCP Segment Format
Source port (16) Destination port (16)
Sequence number (32)
Headerlength (4)
Acknowledgement number (32)
Reserved (6) Code bits (6) Window (16)
Checksum (16) Urgent (16)
Options (0 or 32 if any)
Data (varies)
20Bytes
Bit 0 Bit 15 Bit 16 Bit 31
Kh
oa
CN
TT
31/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
Port NumbersPort NumbersPort NumbersPort Numbers
TCP
Port Numbers
FTP
TransportLayer
TELNET
DNS
SNMP
TFTP
SMTP
UDP
ApplicationLayer
2121 2323 2525 5353 6969 161161
RIP
520520
Kh
oa
CN
TT
32/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
TCP Port NumbersTCP Port NumbersTCP Port NumbersTCP Port Numbers
SourcePort
SourcePort
Dest.Port
Dest.Port ……
Host A
10281028 2323 ……
SP DP
Host ZTelnet Z
Dest. port = 23.Send packet to my
Telnet application.
Kh
oa
CN
TT
33/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
Send SYN (seq=100 ctl=SYN)
SYN received
Host A Host B
TCP Three Way TCP Three Way Handshake/Open ConnectionHandshake/Open ConnectionTCP Three Way TCP Three Way Handshake/Open ConnectionHandshake/Open Connection
1
Kh
oa
CN
TT
34/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
Send SYN (seq=100 ctl=SYN)
SYN received
Send SYN, ACK (seq=300 ack=101 ctl=syn,ack)
Host A Host B
SYN received
1
2
TCP Three Way TCP Three Way Handshake/Open ConnectionHandshake/Open ConnectionTCP Three Way TCP Three Way Handshake/Open ConnectionHandshake/Open Connection
Kh
oa
CN
TT
35/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
Send SYN (seq=100 ctl=SYN)
SYN received
Send SYN, ACK (seq=300 ack=101 ctl=syn,ack)
Established(seq=101 ack=301 ctl=ack)
Host A Host B
1
2
3
SYN received
TCP Three Way Handshake/Open TCP Three Way Handshake/Open ConnectionConnectionTCP Three Way Handshake/Open TCP Three Way Handshake/Open ConnectionConnection
Kh
oa
CN
TT
36/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
DenialDenial--ofof--Service AttacksService Attacks
Denial-of-service (DoS) attacks are designed to deny services to legitimate hosts attempting to establish connections. In a DoS attack, the hacker initiates a synchronization but the receiving device replies to a non-existent, unreachable IP address and then is placed in a wait-state while waiting to receive the final ACK from the initiator.
Kh
oa
CN
TT
37/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
TCP Simple AcknowledgmentTCP Simple AcknowledgmentTCP Simple AcknowledgmentTCP Simple Acknowledgment
•Window size = 1
Sender Receiver
Kh
oa
CN
TT
38/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
TCP Simple AcknowledgmentTCP Simple AcknowledgmentTCP Simple AcknowledgmentTCP Simple Acknowledgment
•Window size = 1
Sender Receiver
Send 1Receive 1
Kh
oa
CN
TT
39/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
TCP Simple AcknowledgmentTCP Simple AcknowledgmentTCP Simple AcknowledgmentTCP Simple Acknowledgment
•Window size = 1
Sender Receiver
Send 1Receive 1
Receive ACK 2 Send ACK 2
Kh
oa
CN
TT
40/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
TCP Simple AcknowledgmentTCP Simple AcknowledgmentTCP Simple AcknowledgmentTCP Simple Acknowledgment
•Window size = 1
Sender Receiver
Send 1Receive 1
Receive ACK 2 Send ACK 2
Send 2Receive 2
Kh
oa
CN
TT
41/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
TCP Simple AcknowledgmentTCP Simple AcknowledgmentTCP Simple AcknowledgmentTCP Simple Acknowledgment
•Window size = 1
Sender Receiver
Send 1Receive 1
Receive ACK 2 Send ACK 2
Send 2Receive 2
Receive ACK 3Send ACK 3
Kh
oa
CN
TT
42/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
TCP Simple AcknowledgmentTCP Simple AcknowledgmentTCP Simple AcknowledgmentTCP Simple Acknowledgment
•Window size = 1
Sender Receiver
Send 1Receive 1
Receive ACK 2 Send ACK 2
Send 2Receive 2
Receive ACK 3Send ACK 3
Send 3Receive 3
Kh
oa
CN
TT
43/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
•Window size = 1
Sender Receiver
Send 1Receive 1
Receive ACK 2 Send ACK 2
Send 2Receive 2
Receive ACK 3Send ACK 3
Send 3Receive 3
Receive ACK 4 Send ACK 4
TCP Simple AcknowledgmentTCP Simple AcknowledgmentTCP Simple AcknowledgmentTCP Simple Acknowledgment
Kh
oa
CN
TT
44/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5TCP Sequence and TCP Sequence and Acknowledgment NumbersAcknowledgment NumbersTCP Sequence and TCP Sequence and Acknowledgment NumbersAcknowledgment Numbers
SourcePort
SourcePort
Dest.Port
Dest.Port
……Sequence#
Sequence#
Acknowledgement#
Acknowledgement#
Source Dest. Seq. Ack.
1028 23 10 1
I justsent #10.
Kh
oa
CN
TT
45/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5TCP Sequence and TCP Sequence and Acknowledgment NumbersAcknowledgment Numbers
I just got #10,now I need #11.
SourcePort
SourcePort
Dest.Port
Dest.Port ……
Sequence#
Sequence#
Acknowledgement#
Acknowledgement#
10281028 2323
Source Dest.
10101010
Seq.
11
Ack.
102810282323
Source Dest.
11111111
Seq.
11
Ack.
I justsent #10.
Kh
oa
CN
TT
46/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5TCP Sequence and TCP Sequence and Acknowledgment NumbersAcknowledgment NumbersTCP Sequence and TCP Sequence and Acknowledgment NumbersAcknowledgment Numbers
SourcePort
SourcePort
Dest.Port
Dest.Port ……
Sequence#
Sequence#
Acknowledgement#
Acknowledgement#
10281028 2323
Source Dest.
11111111
Seq.
22
Ack.
10281028 2323
Source Dest.
10101010
Seq.
11
Ack.
102810282323
Source Dest.
11111111
Seq.
11
Ack.
I just got #10,now I need #11.
I justsent #11.
Kh
oa
CN
TT
47/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5TCP Sequence and TCP Sequence and Acknowledgment NumbersAcknowledgment NumbersTCP Sequence and TCP Sequence and Acknowledgment NumbersAcknowledgment Numbers
SourcePort
SourcePort
Dest.Port
Dest.Port ……
Sequence#
Sequence#
Acknowledgement#
Acknowledgement#
10281028 2323
Source Dest.
11111111
Seq.
101101
Ack.
10281028 2323
Source Dest.
10101010
Seq.
100100
Ack.
102810282323
Source Dest.
11111111
Seq.
100100
Ack.
102810282323
Source Dest.
12121212
Seq.
101101
Ack.
I just got #11,now I need #12.
I justsent #11.
Kh
oa
CN
TT
48/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
TCP WindowingTCP WindowingTCP WindowingTCP Windowing
Sender Receiver
Kh
oa
CN
TT
49/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
TCP WindowingTCP WindowingTCP WindowingTCP Windowing
Window size = 3Send 2
Sender ReceiverWindow size = 3Send 1
Window size = 3Send 3
Kh
oa
CN
TT
50/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
Window size = 3Send 2
TCP WindowingTCP WindowingTCP WindowingTCP Windowing
Sender Window size = 3Send 1
Window size = 3Send 3
ACK 3Window size = 2
Packet 3 isDropped
Receiver
Kh
oa
CN
TT
51/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
Window size = 3Send 2
TCP WindowingTCP WindowingTCP WindowingTCP Windowing
Sender Window size = 3Send 1
Window size = 3Send 3
ACK 3Window size = 2
Packet 3 isDropped
Window size = 3Send 4
Window size = 3Send 3
Receiver
Kh
oa
CN
TT
52/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
Window size = 3Send 2
TCP WindowingTCP WindowingTCP WindowingTCP Windowing
Sender Window size = 3Send 1
Window size = 3Send 3
ACK 3Window size = 2
Packet 3 isDropped
Window size = 3Send 4
Window size = 3Send 3
ACK 5Window size = 2
ReceiverWindow size = 3
Kh
oa
CN
TT
53/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
•No sequence or acknowledgment fields
UDP Segment FormatUDP Segment FormatUDP Segment FormatUDP Segment Format
Source port (16) Destination port (16)
Length (16)
Data (if any)
1Bit 0 Bit 15 Bit 16 Bit 31
Checksum (16)
8Bytes
Kh
oa
CN
TT
54/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
Network Layer FunctionsNetwork Layer Functions
• Defines logical source and destination addresses associated with a specific protocol
• Defines paths through network
• Interconnects multiple data links
Net
wo
rk
IP, IPX
Dat
a L
ink
Ph
ysic
al
EIA/TIA-232v.35
Eth
ern
et
Fra
me
Rel
ay
HD
LC
802.2
802.3
Kh
oa
CN
TT
55/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
DataSourceaddress
Destination address
IP Header
172.15.1.1
NodeNetwork
Logical Address
Network Layer End Station Packet
Network Layer FunctionsNetwork Layer Functions
Kh
oa
CN
TT
56/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
Network Layer Functions (cont.)Network Layer Functions (cont.)Network Layer Functions (cont.)Network Layer Functions (cont.)
11111111 11111111 00000000 00000000
10101100 00010000 01111010 11001100
BinaryMask
BinaryAddress
172.16.122.204 255.255.0.0
172 16 122 204
255
Address Mask
255 0 0
Network Host
Kh
oa
CN
TT
57/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
Internet Layer OverviewInternet Layer OverviewInternet Layer OverviewInternet Layer Overview
•OSI network layer corresponds to the TCP/IP internet layer
Internet Protocol (IP)
Internet Control MessageProtocol (ICMP)
Address ResolutionProtocol (ARP)
Reverse AddressResolution Protocol (RARP)
Internet Protocol (IP)
Internet Control MessageProtocol (ICMP)
Address ResolutionProtocol (ARP)
Reverse AddressResolution Protocol (RARP)
Application
Transport
Internet
Data Link
Physical
Kh
oa
CN
TT
58/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
IP DatagramIP DatagramIP DatagramIP Datagram
Version(4)
Destination IP Address (32)
Options (0 or 32 if any)
Data (varies if any)
1Bit 0 Bit 15 Bit 16 Bit 31
HeaderLength (4)
Priority & Type of Service (8) Total Length (16)
Identification (16)Flags
(3) Fragment offset (13)
Time to live (8) Protocol (8) Header checksum (16)
Source IP Address (32)
20Bytes
Kh
oa
CN
TT
59/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
•Determines destination upper-layer protocol
Protocol FieldProtocol FieldProtocol FieldProtocol Field
TransportLayer
InternetLayer
TCP UDP
ProtocolNumbers
IP
176
Kh
oa
CN
TT
60/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5Internet Control Message Internet Control Message ProtocolProtocolInternet Control Message Internet Control Message ProtocolProtocol
Application
Transport
Internet
Data Link
Physical
Destination Unreachable
Echo (Ping)
Other
ICMP1
Kh
oa
CN
TT
61/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
Address Resolution ProtocolAddress Resolution ProtocolAddress Resolution ProtocolAddress Resolution Protocol
172.16.3.1 172.16.3.2
IP: 172.16.3.2 = ???IP: 172.16.3.2 = ???
I need the Ethernet address of 176.16.3.2.
Kh
oa
CN
TT
62/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
Address Resolution ProtocolAddress Resolution ProtocolAddress Resolution ProtocolAddress Resolution Protocol
172.16.3.1 172.16.3.2
IP: 172.16.3.2 = ???IP: 172.16.3.2 = ???
I heard that broadcast. The message is for me. Here is my Ethernet address.
I need the Ethernet address of 176.16.3.2.
Kh
oa
CN
TT
63/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
Address Resolution ProtocolAddress Resolution ProtocolAddress Resolution ProtocolAddress Resolution Protocol
172.16.3.1
IP: 172.16.3.2 Ethernet: 0800.0020.1111 IP: 172.16.3.2 Ethernet: 0800.0020.1111
172.16.3.2
IP: 172.16.3.2 = ???IP: 172.16.3.2 = ???
I heard that broadcast. The message is for me. Here is my Ethernet address.
I need the Ethernet address of 176.16.3.2.
Kh
oa
CN
TT
64/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
Address Resolution ProtocolAddress Resolution ProtocolAddress Resolution ProtocolAddress Resolution Protocol
•Map IP MAC
• Local ARP
172.16.3.1
IP: 172.16.3.2 Ethernet: 0800.0020.1111 IP: 172.16.3.2 Ethernet: 0800.0020.1111
172.16.3.2
IP: 172.16.3.2 = ???IP: 172.16.3.2 = ???
I heard that broadcast. The message is for me. Here is my Ethernet address.
I need the Ethernet address of 176.16.3.2.
Kh
oa
CN
TT
65/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
Reverse ARPReverse ARPReverse ARPReverse ARP
Ethernet: 0800.0020.1111 IP = ???Ethernet: 0800.0020.1111 IP = ???
What is my IP address?
Kh
oa
CN
TT
66/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
Reverse ARPReverse ARPReverse ARPReverse ARP
Ethernet: 0800.0020.1111 IP = ???Ethernet: 0800.0020.1111 IP = ???
What is my IP address?
I heard that broadcast. Your IP address is 172.16.3.25.
Kh
oa
CN
TT
67/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
Reverse ARPReverse ARPReverse ARPReverse ARP
Ethernet: 0800.0020.1111IP: 172.16.3.25
Ethernet: 0800.0020.1111IP: 172.16.3.25
Ethernet: 0800.0020.1111 IP = ???Ethernet: 0800.0020.1111 IP = ???
What is my IP address?
I heard that broadcast. Your IP address is 172.16.3.25.
Kh
oa
CN
TT
68/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
Reverse ARPReverse ARPReverse ARPReverse ARP
• Map MAC IP
Ethernet: 0800.0020.1111IP: 172.16.3.25
Ethernet: 0800.0020.1111IP: 172.16.3.25
Ethernet: 0800.0020.1111 IP = ???Ethernet: 0800.0020.1111 IP = ???
What is my IP address?
I heard that broadcast. Your IP address is 172.16.3.25.
Kh
oa
CN
TT
69/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
– Unique addressing allows communication between end stations
– Path choice is based on destination address
•Location is represented by an address
Introduction to TCP/IP AddressesIntroduction to TCP/IP AddressesIntroduction to TCP/IP AddressesIntroduction to TCP/IP Addresses
172.18.0.2
172.18.0.1
172.17.0.2172.17.0.1
172.16.0.2
172.16.0.1
SADAHDR DATA10.13.0.0 192.168.1.0
10.13.0.1 192.168.1.1
Kh
oa
CN
TT
70/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
IP AddressingIP Addressing
255 255 255 255
DottedDecimal
Maximum
Network Host
32 bits
Kh
oa
CN
TT
71/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
IP AddressingIP AddressingIP AddressingIP Addressing
255 255 255 255
DottedDecimal
Maximum
Network Host
128 64 32 16 8 4 2 1
11111111 11111111 11111111 11111111Binary
32 bits
1 8 9 16 17 24 25 32
128 64 32 16 8 4 2 1
128 64 32 16 8 4 2 1
128 64 32 16 8 4 2 1
Kh
oa
CN
TT
72/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
IP AddressingIP AddressingIP AddressingIP Addressing
255 255 255 255
DottedDecimal
Maximum
Network Host
128 64 32 16 8 4 2 1
11111111 11111111 11111111 11111111
10101100 00010000 01111010 11001100
Binary
32 bits
172 16 122 204ExampleDecimal
ExampleBinary
1 8 9 16 17 24 25 32
128 64 32 16 8 4 2 1
128 64 32 16 8 4 2 1
128 64 32 16 8 4 2 1
Kh
oa
CN
TT
73/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
•Class A:
•Class B:
•Class C:
•Class D: Multicast
•Class E: Research
IP Address ClassesIP Address ClassesIP Address ClassesIP Address Classes
NetworkNetwork HostHost HostHost HostHost
NetworkNetwork NetworkNetwork HostHost HostHost
NetworkNetwork NetworkNetwork NetworkNetwork HostHost
8 bits 8 bits 8 bits 8 bits
Kh
oa
CN
TT
74/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
IP Address ClassesIP Address ClassesIP Address ClassesIP Address Classes
1
Class A:
Bits:
0NNNNNNN0NNNNNNN HostHost HostHost HostHost
8 9 16 17 24 25 32
Range (1-126)
1
Class B:
Bits:
10NNNNNN10NNNNNN NetworkNetwork HostHost HostHost
8 9 16 17 24 25 32
Range (128-191)1
Class C:
Bits:
110NNNNN110NNNNN NetworkNetwork NetworkNetwork HostHost
8 9 16 17 24 25 32
Range (192-223)1
Class D:
Bits:
1110MMMM1110MMMM Multicast GroupMulticast Group Multicast GroupMulticast Group Multicast GroupMulticast Group
8 9 16 17 2425 32
Range (224-239)
Kh
oa
CN
TT
75/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
Host AddressesHost AddressesHost AddressesHost Addresses
172.16.2.2
172.16.3.10
172.16.12.12
10.1.1.1
10.250.8.11
10.180.30.118
E1
172.16 12 12
Network Host
. . Network Interface
172.16.0.0
10.0.0.0
E0
E1
Routing Table
172.16.2.1
10.6.24.2
E0
Kh
oa
CN
TT
76/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
11111111
Determining Available Host AddressesDetermining Available Host AddressesDetermining Available Host AddressesDetermining Available Host Addresses
172 16 0 0
10101100 00010000 00000000 00000000
16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
Network Host
00000000 00000001
11111111 11111111 11111111 11111110
...
... 00000000 00000011
11111101
123
655346553565536-
...
2
65534
N
2N-2 = 216-2 = 65534
Kh
oa
CN
TT
77/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
•Network 172.16.0.0
172.16.0.0
Addressing without SubnetsAddressing without SubnetsAddressing without SubnetsAddressing without Subnets
172.16.0.1 172.16.0.2 172.16.0.3
…...
172.16.255.253 172.16.255.254
Kh
oa
CN
TT
78/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
•Network 172.16.0.0
Addressing with SubnetsAddressing with SubnetsAddressing with SubnetsAddressing with Subnets
172.16.1.0 172.16.2.0
172.16.3.0
172.16.4.0
Kh
oa
CN
TT
79/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
Subnet AddressingSubnet AddressingSubnet AddressingSubnet Addressing
172.16.2.200
172.16.2.2
172.16.2.160
172.16.2.1
172.16.3.5
172.16.3.100
172.16.3.150
E0
172.16
Network
Network Interface
172.16.0.0
172.16.0.0
E0
E1
New Routing Table
2 160
Host
. .
172.16.3.1E1
Kh
oa
CN
TT
80/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
Subnet AddressingSubnet AddressingSubnet AddressingSubnet Addressing
172.16.2.200
172.16.2.2
172.16.2.160
172.16.2.1
172.16.3.5
172.16.3.100
172.16.3.150
172.16.3.1
E0E1
172.16 2 160
Network Host
. . Network Interface
172.16.2.0
172.16.3.0
E0
E1
New Routing Table
Subnet
Kh
oa
CN
TT
81/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
Subnet MaskSubnet MaskSubnet MaskSubnet Mask
172172 1616 00 00
255255 255255 00 00
255255 255255 255255 00
IPAddress
DefaultSubnet
Mask
8-bitSubnet
Mask
Network Host
Network Host
Network Subnet Host
Also written as “/16” where 16 represents the number of 1s in the mask.
Also written as “/24” where 24 represents the number of 1s in the mask.
11111111 11111111 00000000 00000000
Kh
oa
CN
TT
82/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
Decimal Equivalents of Bit PatternsDecimal Equivalents of Bit PatternsDecimal Equivalents of Bit PatternsDecimal Equivalents of Bit Patterns
0 0 0 0 0 0 0 0 = 0
1 0 0 0 0 0 0 0 = 128
1 1 0 0 0 0 0 0 = 192
1 1 1 0 0 0 0 0 = 224
1 1 1 1 0 0 0 0 = 240
1 1 1 1 1 0 0 0 = 248
1 1 1 1 1 1 0 0 = 252
1 1 1 1 1 1 1 0 = 254
1 1 1 1 1 1 1 1 = 255
128 64 32 16 8 4 2 1
Kh
oa
CN
TT
83/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
16
Network Host
172 0 0
10101100
11111111
10101100
00010000
11111111
00010000
00000000
00000000
10100000
00000000
00000000
•Subnets not in use—the default
00000010
Subnet Mask without SubnetsSubnet Mask without SubnetsSubnet Mask without SubnetsSubnet Mask without Subnets
172.16.2.160172.16.2.160
255.255.0.0 255.255.0.0
NetworkNumber
Kh
oa
CN
TT
84/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
•Network number extended by eight bits
Subnet Mask with SubnetsSubnet Mask with SubnetsSubnet Mask with SubnetsSubnet Mask with Subnets
16
Network Host
172.16.2.160172.16.2.160
255.255.255.0 255.255.255.0
172 2 0
10101100
11111111
10101100
00010000
11111111
00010000
11111111
00000010
10100000
00000000
00000000
00000010
Subnet
NetworkNumber
128
192
224
240
248
252
254
255
Kh
oa
CN
TT
85/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
Subnet Mask with Subnets (cont.)Subnet Mask with Subnets (cont.)Subnet Mask with Subnets (cont.)Subnet Mask with Subnets (cont.)
Network Host
172.16.2.160172.16.2.160
255.255.255.192 255.255.255.192
10101100
11111111
10101100
00010000
11111111
00010000
11111111
00000010
10100000
11000000
10000000
00000010
Subnet
•Network number extended by ten bits
16172 2 128
NetworkNumber
128
192
224
240
248
252
254
255
128
192
224
240
248
252
254
255
Kh
oa
CN
TT
86/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
Subnet Mask ExerciseSubnet Mask ExerciseSubnet Mask ExerciseSubnet Mask Exercise
Address Subnet Mask Class Subnet
172.16.2.10
10.6.24.20
10.30.36.12
255.255.255.0
255.255.240.0
255.255.255.0
Kh
oa
CN
TT
87/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
Subnet Mask Exercise AnswersSubnet Mask Exercise AnswersSubnet Mask Exercise AnswersSubnet Mask Exercise Answers
Address Subnet Mask Class Subnet
172.16.2.10
10.6.24.20
10.30.36.12
255.255.255.0
255.255.240.0
255.255.255.0
B
A
A
172.16.2.0
10.6.16.0
10.30.36.0
Kh
oa
CN
TT
88/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
Broadcast AddressesBroadcast AddressesBroadcast AddressesBroadcast Addresses
172.16.1.0
172.16.2.0
172.16.3.0
172.16.4.0
172.16.3.255(Directed broadcast)
255.255.255.255(Local network broadcast)
XX
172.16.255.255(All subnets broadcast)
Kh
oa
CN
TT
89/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
Addressing Summary ExampleAddressing Summary ExampleAddressing Summary ExampleAddressing Summary Example
16172 2 160
10101100 00010000 1010000000000010 Host
Mask
Subnet
Broadcast
Last
First
172.16.2.160
255.255.255.192
4
1
Kh
oa
CN
TT
90/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
Addressing Summary ExampleAddressing Summary ExampleAddressing Summary ExampleAddressing Summary Example
10101100
11111111
00010000
11111111 11111111
10100000
11000000
00000010 Host
Mask
Subnet
Broadcast
Last
First
172.16.2.160
255.255.255.192
1
2
16172 2 160
Kh
oa
CN
TT
91/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
Addressing Summary ExampleAddressing Summary ExampleAddressing Summary ExampleAddressing Summary Example
10101100
11111111
00010000
11111111 11111111
10100000
11000000
00000010 Host
Mask
Subnet
Broadcast
Last
First
172.16.2.160
255.255.255.192
1
2
3
7
16172 2 160
Kh
oa
CN
TT
92/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
Addressing Summary ExampleAddressing Summary ExampleAddressing Summary ExampleAddressing Summary Example
10101100
11111111
00010000
11111111 11111111
10100000
11000000
10000000
00000010 Host
Mask
Subnet
Broadcast
Last
First
172.16.2.160
255.255.255.192
1
2
3
4
16172 2 160
Kh
oa
CN
TT
93/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
Addressing Summary ExampleAddressing Summary ExampleAddressing Summary ExampleAddressing Summary Example
10101100
11111111
00010000
11111111 11111111
10100000
11000000
10000000
00000010
10111111
Host
Mask
Subnet
Broadcast
Last
First
172.16.2.160
255.255.255.192
1
2
3
4
56
16172 2 160
Kh
oa
CN
TT
94/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
Addressing Summary ExampleAddressing Summary ExampleAddressing Summary ExampleAddressing Summary Example
10101100
11111111
00010000
11111111 11111111
10100000
11000000
10000000
00000010
10111111
10000001
Host
Mask
Subnet
Broadcast
Last
First
172.16.2.160
255.255.255.192
1
2
3
4
56
16172 2 160
Kh
oa
CN
TT
95/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
Addressing Summary ExampleAddressing Summary ExampleAddressing Summary ExampleAddressing Summary Example
10101100
11111111
00010000
11111111 11111111
10100000
11000000
10000000
00000010
10111111
10000001
10111110
Host
Mask
Subnet
Broadcast
Last
First
172.16.2.160
255.255.255.192
1
2
3
4
56
7
16172 2 160
Kh
oa
CN
TT
96/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
Addressing Summary ExampleAddressing Summary ExampleAddressing Summary ExampleAddressing Summary Example
10101100
11111111
10101100
00010000
11111111
00010000
11111111
00000010
10100000
11000000
10000000
00000010
10101100 00010000 00000010 10111111
10101100 00010000 00000010 10000001
10101100 00010000 00000010 10111110
Host
Mask
Subnet
Broadcast
Last
First
172.16.2.160
255.255.255.192
1
2
3
4
56
7
8
16172 2 160
Kh
oa
CN
TT
97/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
Addressing Summary ExampleAddressing Summary ExampleAddressing Summary ExampleAddressing Summary Example
10101100
11111111
10101100
00010000
11111111
00010000
11111111
00000010
10100000
11000000
10000000
00000010
10101100 00010000 00000010 10111111
10101100 00010000 00000010 10000001
10101100 00010000 00000010 10111110
Host
Mask
Subnet
Broadcast
Last
First
172.16.2.160
255.255.255.192
172.16.2.128
172.16.2.191
172.16.2.129
172.16.2.190
1
2
3
4
56
7
89
16172 2 160
Kh
oa
CN
TT
98/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5 IP Host Address: 172.16.2.121Subnet Mask: 255.255.255.0
•Subnet Address = 172.16.2.0
•Host Addresses = 172.16.2.1–172.16.2.254
•Broadcast Address = 172.16.2.255
•Eight bits of subnetting
Network Subnet Host
10101100 00010000 00000010 11111111
172.16.2.121:
255.255.255.0:
10101100
11111111
Subnet: 10101100 00010000
00010000
11111111
00000010
00000010
11111111
01111001
00000000
00000000
Class B Subnet ExampleClass B Subnet ExampleClass B Subnet ExampleClass B Subnet Example
Broadcast:
Network
Kh
oa
CN
TT
99/1
00P
HẠ
M V
ĂN
TÍN
H09
-200
5
Subnet PlanningSubnet PlanningSubnet PlanningSubnet Planning
Other subnets
192.168.5.16
192.168.5.32 192.168.5.48
20 subnets
5 hosts per subnet
Class C address:
192.168.5.0
20 subnets
5 hosts per subnet
Class C address:
192.168.5.0
Kh
oa
CN
TT
100/
100
PH
ẠM
VĂ
N T
ÍNH
09-2
005
11111000
IP Host Address: 192.168.5.121Subnet Mask: 255.255.255.248
Network Subnet Host
192.168.5.121: 11000000
11111111
Subnet: 11000000 10101000
10101000
11111111
00000101
00000101
11111111
01111001
01111000
255.255.255.248:
Class C Subnet Planning ExampleClass C Subnet Planning ExampleClass C Subnet Planning ExampleClass C Subnet Planning Example
•Subnet Address = 192.168.5.120
•Host Addresses = 192.168.5.121–192.168.5.126
•Broadcast Address = 192.168.5.127
•Five Bits of Subnetting
Broadcast:
NetworkNetwork
11000000 10101000 00000101 01111111
Kh
oa
CN
TT
101/
100
PH
ẠM
VĂ
N T
ÍNH
09-2
005
Practical Network troubleshootingPractical Network troubleshooting
• Layer 1: HW indicators (LED)
• Layer2 : MAC (ARP)
• Layer3: IP, Default gateway,Routing (IPCONFIG, PING, TRACERT, ROUTE)
• Layer4: PORT (NETSTAT)
• Layer5-7: DNS, PROXY (NSLOOKUP, PING, LAN Setting…)