Download Bits

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
TCP/IP Protocol Stack
Application
Presentation
Application
Session
Transport
Transport
Network
Internet
Data Link
Data Link
Physical
Physical
1
TCP Segment Format
Bit 0
Bit 15 Bit 16
Bit 31
Destination port (16)
Source port (16)
Sequence number (32)
Acknowledgement number (32)
Header
length (4)
Reserved (6) Code bits (6)
Window (16)
Checksum (16)
Urgent (16)
Options (0 or 32 if any)
Data (varies)
2
20
Bytes
Port Numbers
Application
Layer
Transport
Layer
F
T
P
T
E
L
N
E
T
S
M
T
P
D
N
S
T
F
T
P
S
N
M
P
R
I
P
21
23
25
53
69
161
520
UDP
TCP
3
Port
Numbers
TCP Port Numbers
Source
Port
Dest.
Port
…
Telnet Z
Host Z
Host A
SP
DP
1028
23
…
4
Dest. port = 23.
Send packet to my
Telnet
application.
TCP 3 Way Handshake
Host A
1
Host B
Send SYN
(seq=100 ctl=SYN)
SYN received
Send SYN, ACK 2
(seq=300 ack=101 ctl=syn,ack)
SYN received
3
Established
(seq=101 ack=301 ctl=ack)
5
Acknowledgment Numbers
Source
Port
Dest.
Port
Sequence
#
Acknowledgement
#
I just
sent #11.
…
I just got #11,
now I need #12.
Source Dest. Seq. Ack.
1028
23
10
1
Source Dest. Seq. Ack.
23
1028
1
11
Source Dest. Seq. Ack.
1028
23
11
2
Source Dest. Seq. Ack.
23
1028
2
12
6
TCP Windowing
Sender
Window size = 3
Send 1
Receiver
Window size = 3
Send 2
Window size = 3
Send 3
Packet 3 is
ACK 3
Window size = 2 Dropped
Window size = 3
Send 3
Window size = 3
Send 4
ACK 5
Window size = 2
7
UDP Segment Format
Bit
1 0
Bit 15 Bit 16
Bit 31
Destination port (16)
Source port (16)
Length (16)
Checksum (16)
Data (if any)
• No sequence or acknowledgment fields
8
8
Bytes
IP Datagram
Bit
1 0
Version
(4)
Bit 15 Bit 16
Header
Length (4)
Priority & Type
of Service (8)
Total Length (16)
Flags
(3)
Identification (16)
Time to live (8)
Bit 31
Protocol (8)
Fragment offset (13)
Header checksum (16)
Source IP Address (32)
Destination IP Address (32)
Options (0 or 32 if any)
Data (varies if any)
9
20
Bytes
Protocol Field
Transport
Layer
UDP
TCP
6
Internet
Layer
17
Protocol
Numbers
IP
• Determines destination upper-layer
protocol
10
Address Resolution Protocol
I need the
Ethernet
address of
176.16.3.2.
I heard that broadcast.
The message is for me.
Here is my Ethernet
address.
172.16.3.1
172.16.3.2
IP: 172.16.3.2 = ???
IP: 172.16.3.2
Ethernet: 0800.0020.1111
Map IP
Ethernet
Local ARP
11
Address Resolution Protocol
I need the
Ethernet
address of
176.16.3.2.
I heard that broadcast.
The message is for me.
Here is my Ethernet
address.
172.16.3.1
172.16.3.2
IP: 172.16.3.2 = ???
IP: 172.16.3.2
Ethernet: 0800.0020.1111
Map IP
Ethernet
Local ARP
12
Reverse ARP
I heard that
broadcast.
Your IP
address is
172.16.3.25.
What is
my IP
address?
Ethernet: 0800.0020.1111 IP = ???
Ethernet: 0800.0020.1111
IP: 172.16.3.25
• Map Ethernet
13
IP
IP Address Classes
8 bits
8 bits
8 bits
8 bits
Host
Host
Host
Host
Host
• Class A:
Network
• Class B:
Network Network
• Class C:
Network Network Network
• Class D:
Multicast
• Class E:
Research
14
Host
IP Address Classes
Bits:
Class A:
Bits:
Class B:
Bits:
Class C:
Bits:
Class D:
1
8 9
0NNNNNNN
16 17
24 25
Host
Host
32
Host
Range (1-126)
1
8 9
10NNNNNN
16 17
Network
Range (128-191)
1
8 9
110NNNNN
Host
16 17
Network
Range (192-223)
1
8 9
1110MMMM
24 25
Host
24 25
Network
16 17
32
32
Host
24 25
32
Multicast Group Multicast Group Multicast Group
Range (224-239)
15
Available Host Addresses
Network
0
0
...
...
10101100 00010000 00000000 00000000
00000000 00000001
00000000 00000011
N
1
2
3
...
16
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
172
Host
11111111 11111101
11111111 11111110
11111111 11111111
65534
65535
65536
2
2N-2 = 216-2 = 65534
65534
16
Subnet Mask
IP
Address
172
16
0
Network
Default
Subnet
Mask
8-bit
Subnet
Mask
255
0
Host
255
0
0
11111111
11111111
00000000
00000000
Also written as “/16” where 16 represents the number of 1s
in the mask.
Network
Subnet
Host
255
255
17
255
0
Subnet Mask
172
16
2
160
3
10101100
00010000
255.255.255.192 11111111
8
9
172.16.2.128
10101100
11111111
11111111 11000000 Mask 2
00010000
00000010 10000000 Subnet 4
10101100
00010000
00000010 10111111 Broadcast
6
7
172.16.2.160
172.16.2.191
00000010 10100000 Host
172.16.2.129
10101100
00010000
5
00000010 10000001 First
172.16.2.190
10101100
00010000
00000010 10111110 Last
18
1
IP Address Configuration
Switch(config)#ip address ip-address subnet-mask
Switch(config)#ip default-gateway ip-address
Switch IP Address 설정 및 Gateway 설정
Router(config-if)#ip address ip-address subnet-mask
Router IP Address 설정
19
Router Name Server Configuration
DNS Server
Router(config)#ip name-server server-address1
[[server-address2]...[server-address6]]
20
Router Name System
Router(config)#ip domain-lookup
Router(config)#end
Router#pat
Translating ”pat"...domain server (255.255.255.255)
% Unknown command or computer name, or unable to find computer address
Router#config t
Router(config)#no ip domain-lookup
Router(config)#end
Router#pat
Translating ”pat"
% Unknown command or computer name, or unable to find computer address
Router#
DNS enabled by default
21
ISL Encapsulation
Router(config-subif)#encapsulation isl domain
Fast
E0/0
ISL
VLAN 1
10.1.1.2
VLAN 2
10.2.2.2
interface fastethernet 0/0
no ip address
!
interface fastethernet 0/0.1
ip address 10.1.1.1 255.255.255.0
encapsulation isl 1
interface fastethernet 0/0.2
ip address 10.2.2.1 255.255.255.0
encapsulation isl 2
22
3장 문제 풀이
IP
Subnet
161
01010001
37
00100101
2
50
00000010 00110010
11111111
01010001
161
01010001
11111111
00100101
37
00100101
11111111 11110000
00000010 00110000
2
48
00000010 00111111
161
37
23
2
63
3장 문제 풀이
24
3장 문제 풀이
25
3장 문제 풀이
 사설 IP 영역
26
3장 문제 풀이
 사용 가능한 IP 영역
200.1.1.0
200.1.1.64
200.1.1.128
200.1.1.192
200.1.1. 63
200.1.1.127
200.1.1.191
200.1.1.255
27
3장 문제 풀이
28
Related documents