You are on page 1of 201

TCP / IP With WIN 2003

BY
SURATH KASEMBUNSIRI

Start > Run > \\192.168.1.69


User: adminstrator
Password : p@ssw0rd

Go to E-Learning:
copy
in your local computer

Rule 5-4-3 > Design Hub


Hub1

Com1

Hub2

Hub3

Hub4

Com2

Hub5

Com3

Com1 > Com2 OK


Com1 > Com3
100

Rule 2> Design Switch (100 Mb)


1

Switch1

Com1

Com2

Switch3

Switch2

Com3

Switch cascade() 2
Com1 >Com 3 Ok..
Com1 > Com5 Not Ok..

Com4

Switch4
Com5

Com6

Rule 1 Design Switch (1G up)


Trunking

Trunking

100 mb

Switch1
100 mb
com1

.
.

100 mb
com2

Switch2

Switch3

Set Trunk 10
1 > 100 mb
Trunk 10
10 x 100 mb >> 1G

com3

LAN Topologies

Bus
Star
Ring
Tree

Topology

Bus

Topology

Star

Topology

Ring

Topology

Star-Bus

Topology

Star-Star

Topology

Token Passing

T
T

Step

WinNT ,Win98
Cache (nbtstat -c)> Wins > Broadcast >
LMHost > Hosts > DNS > Cannot connect

Win2000,XP,2003
Cache (nbtstat -c)> Host > DNS >
Wins> LMHost > Broadcast > Cannot
connect

C:\WINDOWS\system32\drivers\etc

Domain

DC (Domain controller)
Active Directory

work group
set > set AD

Work Group

Default
Work group
client (100 up)
admin add
user set policy..(start
>run > gpedit.msc)
Concept ...

RRAS

Company

modem
modem
RRAS
.
Server
.
modem

Telecom
System

modem
Hacker Home
(
)

VPN (Virtual Private Network)


Public IP
Company

VPN
Server

Telecom
System

Public IP
modem
Hacker Home
(
)

NAT (Network Address Translation)


Internet

Local
NAT

202.44.33.1120

Private IP
10.Xxx
172.16-32.x.x
192.168.x.x

Private

Public

192.168.1.12

203.44.33.11

192.168.1.15

203.44.33.12

PAT (Port Address Translation)


Internet

Local
PAT

202.44.33.11

Private IP
10.Xxx
172.16-32.x.x
192.168.x.x

Private

Public

port

192.168.1.12

203.44.33.11

5240

192.168.1.15

203.44.33.12

1067

OSI Model
Application

Encapsulation

Presentation

, ASCII, Unicode,

Session

Session Simplex,
Half duplex, Full Duplex

Transport

Ack

Network

Router

Data Link

0,1
Ethernet, Token Ring, ATM 2
Mac, Logical Link layer

Physical

OSI Model vs TCP/IP Suite


OSI Model

TCP/IP Suite

Application
Presentation

Application

Session
Transport

Transport

Network

Internet

DataLink
Physical

Network Interface

TCP/IP Suite

FTP, Telnet, etc.


NetBIOS
Socket

Application
TCP

Transport
Internet

UDP

ICMP, IGMP

IP
ARP

Network Interface
Ethernet, Token Ring, etc

Application

Transport

Internet

Network
Interface

File
Transfer

E-mail

Terminal
Emulator

File
Transfer

Client/
Server

Network
Management

Application

FTP
STD0010
/
RFC 959

SMTP
STD0010
/
RFC 2821

Telnet
STD0008
/
RFC 854

TFTP
STD0033
RFC 1350

NFS
RFC
3010
2057
SMB

SNMP
RFC 1157

Presentation

Transmission Control Protocol


(TCP)
STD0007 RFC 793
ICMP/IGMP
RFC792/RFC3376

User Datagram Protocol


(UDP)
STD0006 RFC 768

IP
STD0005 RFC0791
(Updated by
RFC2474)

ARP/RARP
RFC 826/903

Session

Transport

Network

Network Interface Card (NIC)


Ethernet, Token Ring, ARCNET, MAN and WAN
(RFC 894, RFC 1042, RFC 1201 and others)

DataLink

Transmission Media

Physical

Network Interface Layer


Application

Transport

Internet

Network Interface




UTP,
LAN WAN

Internet Layer
Application


ARP, IP,
ICMP
-ARP Address Resolution
Protocols
-IP Internet Protocol
-ICMP Internet Control Message
Protocol

Transport
ICMP
IP
ARP

Network Interface

Transport Layer
Application

TCP

UDP

Internet

Network Interface

TCP UDP
-TCP Transmission Control
Protocol
-UDP User Datagram Protocol

Application Layer
Application

Transport
Internet

Network Interface



TCP/IP

Sender
Application

Transport

Internet

Header

Header
Trailer

Network Interface
Header

Data Transmission
Application

Transport
Internet

Network Interface

Application

Transport

Internet

Network Interface

Receiver
Application

Transport

Internet

Network Interface

Network Interface
Application

Transport

4
Internet

Network Interface

FCS (Frame Check Sequence)


Data

8
Preamble

Dest Add. Source Add. Length

MAC Address
XXXXXX XXXXXX
IEEE Assigned Vendor Assigned

0001AB6 1532FBA

MAC Address
(Media Access Control)

48 Bits
12
6
IEEE Assign

6
Vendor Assign

2(48)=281,474,976,710,656

Frame Check Sequence


Sender

Application

Transport
Internet

FCS=3ACD

Network Interface

Application

Receiver
Transport
Internet

FCS= 3ACD
()

Network Interface

FCS=3ACD
()

Frame Check Sequence


Sender

Application

Transport
Internet

FCS=3ACD

Network Interface

Application

Receiver
Transport

Reject

FCS= A534
()

Internet

Network Interface

FCS=3ACD
()

Internet Layer
Application

Transport
ICMP

IP
ARP

Network Interface

Header

ARP (Address Resolution Protocol)


Application


IP Address MAC Address
ARP
Cache

Transport

ARP Cache
IP
ARP

MAC Address

172.16.0.109
Application
Application
Application
Transport
Application
Transport
Transport
Internet
Transport
Internet

Application

Transport

Internet
Network Interface

172.16.0.101
0100AB4352FE1

Internet
Network Interface
Internet
Network Interface
Network Interface
Network Interface

IP: 172.16.0.109
MAC: 000000 000000
( FFFFFF FFFFFF)

172.16.0.109
0100AB4342345

172.16.0.109
-
Application

ARP Cache

Transport
Internet
Network Interface

172.16.0.101
0100AB4352FE1

Application
Application
Application
Transport
Application
Transport
Transport
Internet
Transport
Internet
Internet
Network Interface
Internet
Network Interface
Network Interface
Network Interface

IP: 172.16.0.109
MAC: 0100AB4342345

IP Address MAC Address

ARP Cache

172.16.0.109
0100AB4342345

ARP Cache
172.16.0.102 0100AB4352FF3
172.16.0.109 0100AB4342345
172.16.0.103 0100AB4344335

Reverse ARP (RARP)


IP Address IP
Application

Application

Transport

Transport

Internet
Network Interface

0.0.0.0

Internet

0100AB4352FE1

MAC: 0100AB4352FE1
IP: 0.0.0.0

Network Interface

172.16.0.11
0100AB88888F

Reverse ARP (RARP)


172.16.0.110
Application

Application

Transport

Transport

Internet
Network Interface

0.0.0.0

Internet

0100AB4352FE1

Network Interface

MAC: 0100AB4352FE1
IP: 172.16.0.110
0.0.0.0

MAC Address IP Address

172.16.0.11
0100AB88888F

IP (Internet Protocol)
Application

Transport

IP
IP Header

Network Interface

IP Header
Bit 0
Version
(4)

Bit 15 16
Header
Length

Priority & Type


of Service

Identification (16)
Time To Live (8)

Bit 31

Protocol (8)

Total Length (16)


Flags
(3)

Fragment Offset (13)


Header Checksum (16)

Source IP Address (32)


Destination IP Address (32)
IP Options (0 or 32)
Data (Varies If Any)

20
Bytes

ICMP (Internet Control Message Protocol)


Application

Transport
ICMP

IP
ARP

MAC Address


-Destination Unreachable
-Timeout
-Redirect
-Parameter Problem
-Echo, Echo reply, Timestamp, Time
stamp reply, Information request,
Address request, Address reply

ICMP Header
Bit 0

Bit 15 16

Type

Code

Identifier

Bit 31

Checksum

Sequence Number

Address Mask

12
Bytes

Protocol
Application

UDP

TCP
6

17

ICMP

IP
1

ARP

MAC Address

IP
Header
IP
-IP
0
-ICMP 1
-TCP
6
-UDP 17

Header Checksum
Reject
Application

Transport

Application

Checksum=2A

Internet

172.16.0.101

Transport

Internet

192.168.1.15
Network Interface

FCS

Network Interface

Checksum=1B

FCS

Transport
Application

UDP

TCP

ICMP
IP

ARP

MAC Address

Header

Port Number
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

20/
21

23

25

53

69

161

520

TCP

UDP

TCP (Transmission Control Protocol)


Application

TCP

TCP Header

ICMP
IP

ARP

MAC Address

TCP Header
Bit 15 16

Bit 0
Source Port (16)

Bit 31
Destination Port (16)

Sequence Number (32)


Acknowledgment Number (32)
HL
(4)

Reserved
(6)

Code Bits
(6)

Checksum (16)

Window (16)
Urgent (16)

Options (0 or 32)
Data (varies)

20 Bytes

Connection Oriented (TCP)



- Three-way Handshake
- Acknowledgement
- Windows (Flow Control)

- Port ,
- Segment (Sequence No.)
- (Acknowledge No.)
- Window
- Checksum
-

Application

Application

Transport

Transport

Internet

Internet

Network Interface

Network Interface

Three-way Handshake
1

SYN
(seq=100 cb=S)

SYN
2
SYN, ACK
(seq=300, ack=101 cb=S,A)

(seq=101 ack=301 cb=A)


Application

Application

Transport

Transport

Internet

Network Interface

Seq= Sequence Number


Ack= Acknowledgement Number
cb= Code bits (S=SYN,A=ACK)

Internet
Network Interface

TCP Connection (Acknowledgement)


Source
Port

1033

1033

80

80

100

101

Dest.
Port

Seq. #

301
1
80

1033

300
301

101

80

1033

302

102

302

Application

Transport

Ack. #

Application

Window Size = 1

Transport

Internet

Internet

Network Interface

Network Interface

Flow Control (Window)


Window Size = 3
Send 1
Window Size = 3
Send 2
Window Size = 3
Send 3
ACK 3
Window Size=2
Window Size = 3
Send 3
Window Size = 3
Send 4

ACK 5
Window Size=2

Application

Application

Transport

Transport

Internet

Internet

Network Interface

Network Interface

UDP (User Datagram Protocol)


Application

UDP

ICMP
IP
ARP

MAC Address

UDP Header

UDP Header

Bit 15 16

Bit 0

Bit 31

Source Port (16)

Destination Port (16)

Length (16)

Checksum (16)
Data (varies)

8 Bytes

Connectionless (UDP)

- Port ,
- Checksum
-

Application

Application

Transport

Transport

Internet

Internet

Network Interface

Network Interface

UDP Connection
Source
Port

Dest.
Port

Check
sum

Data

Checksum
AC
1033
138

138
80

100
AC

Data
1

138

138

AC

Application

Application

Transport

Transport

Internet

Internet

Network Interface

Network Interface

Data

Application
FTP

HTTP Etc.
Winsock

NetBIOS
/DS

UDP

TCP

ICMP
IP
ARP

MAC Address

Internet


60

Internet

>> IP


http://www.iab.org

Internet Activity Board


RFC

IAB
Research Task Force

IRTF

IRSGIRSGIRSG IRSG
Research Steering Group

Engineering Task Force

IETF

IESG IESGIESG IESG


Engineer Steering Group


www.iana.org
Whois > IP address
Name space

AFNIC

APNIC

Internet Assign Number Authority


IANA

ARIN
199.xx

Japan Thai
202.xx

203.xx

Sing

RIPE

201.xx

LACNIC


www.icann.org
Whois : Name space
www.internic.net

ICANN

Internic
GTLD

CCTLD

Registrar

.th

www.thnic.net
.com

.net

.gov

.jp

IP Address ?

17

18

202.128.202.

19

Network IDs
172.16.0.0

172.18.0.0

192.168.2.0

192.168.3.0

192.168.1.0
172.17.0.0

10.0.0.0

Host Addresses
172.16.1.101

172.16.2.201

172.16.3.151

Network ID
172.16.0.0

10.100.1.101

172.16.0.1

10.0.0.1

10.200.2.201

10.150.3.301

Network ID
10.0.0.0

IP Addressing
32 bits
Dotted
Decimal
Maximum

Network

255

255

Host

255

255

IP Addressing
32 bits
Dotted
Decimal

Network

16 17

255
24 25

32

11111111 11111111

11111111 11111111
128
64
32
16
8
4
2
1
128
64
32
16
8
4
2
1

8 9

255

128
64
32
16
8
4
2
1
128
64
32
16
8
4
2
1

Binary

255

255

Maximum

Host

IP Addressing
32 bits
Dotted
Decimal

Network

16 17

255
24 25

32

11111111 11111111

11111111 11111111
128
64
32
16
8
4
2
1
128
64
32
16
8
4
2
1

8 9

255

128
64
32
16
8
4
2
1
128
64
32
16
8
4
2
1

Binary

255

255

Maximum

Host

Example
172
16
122
204
Decimal
Example 10101100 00010000 01111010 11001100
Binary

IP Address 255?
2 32

IP Address

10000010100000001100101011111111
4 4

10000010 10000000 11001010 11111111


7 6 5 4 3 2 1 0

22222222

128+64+32+16+8+4+2+1
255

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

Host

Classes

Class
Class A,B,C
Web Online
Class D
,
website class
Router block
broadcast IP class
A,B,C

Host Addresses
172.16.2.2

10.1.1.1
10.6.24.2
E1

172.16.3.10

E0
172.16.2.1

10.250.8.11

172.16.12.12

172.16
Network

12 . 12
Host

10.180.30.118

Routing Table
Network
Interface
172.16.0.0

E0

10.0.0.0

E1

Determining Available Host


Addresses
Network

...

...

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

IP Address Classes Exercise


Address
10.2.1.1
128.63.2.100
201.222.5.64

192.6.141.2
130.113.64.16
256.241.201.10

Class

Network

Host

IP Address Classes Exercise


Answers
Address

Class

10.2.1.1

10.0.0.0

0.2.1.1

128.63.2.100

128.63.0.0

0.0.2.100

201.222.5.64

201.222.5.0

0.0.0.64

192.6.141.2

192.6.141.0

0.0.0.2

130.113.64.16

130.113.0.0

0.0.64.16

256.241.201.10

Nonexistent

Network

Host

Addressing without Subnets

172.16.0.1 172.16.0.2 172.16.0.3

172.16.255.253 172.16.255.254
...

172.16.0.0

Network 172.16.0.0

Class Subnet Mask

Class A 1-126 default subnet


Mask > 255.0.0.0
Class B default subnet Mask
> 255.255.0.0
Class C default subnet Mask
> 255.255.255.0

Addressing with Subnets

172.16.3.0

172.16.4.0

172.16.1.0

172.16.2.0

Network 172.16.0.0

Subnet Addressing
172.16.2.200

172.16.3.5
172.16.3.1
E1

172.16.2.2

E0
172.16.2.1

172.16.3.100

172.16.2.160

172.16
Network

172.16.3.150

2 . 160

New Routing Table


Network
Interface

Host

172.16.0.0

E0

172.16.0.0

E1

Subnet Addressing
172.16.2.200

172.16.3.5
172.16.3.1
E1
E0
172.16.2.1

172.16.2.2

172.16.3.100

172.16.2.160

172.16
Network

172.16.3.150

160

Subnet Host

New Routing Table


Network
Interface
172.16.2.0

E0

172.16.3.0

E1

Network subnet mask

172.16.0.0/16

Network ID=
172.16.0.0
Host

172.16.0.1172.16.255.254

Network ID
Router

Situation 1 SW Hub

172.16.0.0/16

Network ID=
172.16.0.0
Host

172.16.0.1172.16.255.254
SW, Hub

R (172.16.0.1-254)

IT (172.16.1.1-254)

Situation 2
Router
172.16.0.0/16

Default HR
IT
assign
subnet
255.255.0.0 > 255.255.255.0
HR 172.16.0.0/24 >
NW>172.16.0.0

Router

HR (172.16.0.1-254)

IT 172.16.1.0/24 >
NW>172.16.1.0

IT (172.16.1.1-254)

Subnet Mask
Network
IP
Address

172

Host

16

Network

Default
Subnet
Mask

8-bit
Subnet
Mask

255

0
Host

255

11111111
11111111
00000000
00000000
Also written as /16 where 16 represents the number of 1s
in the mask.
Network
Subnet
Host

255

255

255

Also written as /24 where 24 represents the number of 1s


in the mask.

Decimal Equivalents of Bit


Patterns
128 64

32

16

128

192

224

240

248

252

254

255

Subnet Mask without Subnets


Network

Host

172.16.2.160

10101100

00010000

00000010

10100000

255.255.0.0

11111111

11111111

00000000

00000000

10101100

00010000

00000000

00000000

172

16

Network
Number

Subnets not in usethe default

Subnet Mask with Subnets


Network
172.16.2.160

Host

10101100

00010000

00000010

10100000

11111111

11111111

11111111

00000000

10101100

00010000

00000010

00000000

172

16

128
192
224
240
248
252
254
255

255.255.255.0

Subnet

Network
Number

Network number extended by eight


bits

Subnet Mask with Subnets


(cont.)

255.255.255.192

Network
Number

Host

10101100

00010000

00000010

10100000

11111111

11111111

11111111

11000000

10101100

00010000

00000010

10000000
128
192
224
240
248
252
254
255

172.16.2.160

Subnet

128
192
224
240
248
252
254
255

Network

172

16

128

Network number extended by ten bits

Subnet Mask Exercise

Address

Subnet Mask

172.16.2.10

255.255.255.0

10.6.24.20

255.255.240.0

10.30.36.12

255.255.255.0

Class

Network
Number

Subnet Mask Exercise Answers

Address

Subnet Mask

Class

Network
Number

172.16.2.10

255.255.255.0

172.16.2.0

10.6.24.20

255.255.240.0

10.6.16.0

10.30.36.12

255.255.255.0

10.30.36.0

Addressing Summary Example

172.16.2.160
255.255.255.192

172

16

10101100

00010000

160

00000010 10100000 Host

Mask
Network
4
Number
Broadcast
First
Last

Addressing Summary Example

172.16.2.160
255.255.255.192

172

16

10101100

00010000

11111111

11111111

160

00000010 10100000 Host

11111111 11000000 Mask 2


Network
Number
Broadcast
First
Last

Addressing Summary Example


172

16

160
3

172.16.2.160
255.255.255.192

10101100

00010000

11111111

11111111

00000010 10100000 Host

11111111 11000000 Mask 2


Network
Number
Broadcast
First
Last

Addressing Summary Example


172

16

160
3

172.16.2.160
255.255.255.192

10101100

00010000

11111111

11111111

00000010 10100000 Host

11111111 11000000 Mask 2


Network

10000000 Number 4
Broadcast
First
Last

Addressing Summary Example


172

16

160
3

172.16.2.160
255.255.255.192

10101100

00010000

11111111

11111111

00000010 10100000 Host

11111111 11000000 Mask 2


Network

10000000 Number 4

10111111 Broadcast
5
First
Last

Addressing Summary Example


172

16

160
3

172.16.2.160
255.255.255.192

10101100

00010000

11111111

11111111

00000010 10100000 Host

11111111 11000000 Mask 2


Network

10000000 Number 4

10111111 Broadcast
5
10000001 First
Last

Addressing Summary Example


172

16

160
3

172.16.2.160
255.255.255.192

10101100

00010000

11111111

11111111

00000010 10100000 Host

11111111 11000000 Mask 2


Network

10000000 Number 4

10111111 Broadcast
5
10000001 First

10111110 Last

Addressing Summary Example


172

16

160
3

172.16.2.160
255.255.255.192

10101100

00010000

11111111

11111111

11111111 11000000 Mask 2

10101100

00010000

00000010 10000000 Number 4

10101100

00010000

00000010 10111111 Broadcast

10101100

00010000

5
00000010 10000001 First

10101100

00010000

00000010 10111110 Last

00000010 10100000 Host

Network

Addressing Summary Example


172

16

160
3

10101100

00010000

255.255.255.192 11111111
8
9
172.16.2.128
10101100

11111111

11111111 11000000 Mask 2

00010000

00000010 10000000 Number 4

10101100

00010000

00000010 10111111 Broadcast


6
7

172.16.2.160

172.16.2.191

00000010 10100000 Host

Network

172.16.2.129

10101100

00010000

5
00000010 10000001 First

172.16.2.190

10101100

00010000

00000010 10111110 Last

Class B Subnet Example


IP Host Address: 172.16.2.121
Subnet Mask: 255.255.255.0
Network

Network

Subnet

Host

172.16.2.121: 10101100

00010000

00000010

01111001

255.255.255.0: 11111111

11111111

11111111

00000000

Subnet: 10101100

00010000

00000010

00000000

Broadcast: 10101100

00010000

00000010

11111111

Network Number = 172.16.2.0


Host Addresses = 172.16.2.1172.16.2.254
Broadcast Address = 172.16.2.255
Eight bits of subnetting

Class C Subnet Planning


Example
IP Host Address: 192.168.5.121
Subnet Mask: 255.255.255.248
Network

Network

Network Subnet Host

192.168.5.121: 11000000

10101000

00000101

01111001

255.255.255.248: 11111111

11111111

11111111

11111000

Subnet: 11000000
Broadcast: 11000000

10101000

00000101

01111000

10101000

00000101

01111111

Network Number = 192.168.5.120


Host Addresses = 192.168.5.121192.168.5.126
Broadcast Address = 192.168.5.127
Five Bits of Subnetting

Broadcast Addresses Exercise

Address

Subnet Mask

201.222.10.60

255.255.255.248

15.16.193.6

255.255.248.0

128.16.32.13

255.255.255.252

153.50.6.27

255.255.255.128

Class

Subnet

Broadcast

Broadcast Addresses Exercise


Answers
Address

Subnet Mask

Class

Network
Number

Broadcast

201.222.10.60 255.255.255.248

201.222.10.56

201.222.10.63

15.16.193.6

255.255.248.0

15.16.192.0

15.16.199.255

128.16.32.13

255.255.255.252

128.16.32.12

128.16.32.15

153.50.6.27

255.255.255.128

153.50.6.0

153.50.6.127

Lab1 Test IP and Subnet


SW1

Com1

Com2

1. com1
IP> 192.168.x.2
subnet mask > 255.255.255.192
com2
IP> 192.168.x.126
subnet mask > 255.255.255.0
2. com1 ping com2
what is message? >>
3. com2 ping com1
what is message? >>
4. Network ID of Com1? >>
5. Network ID of Com2? >>

Summary Lab1 Test IP and Subnet


Case Com1 ping Com2
1. com1 IP Com2 and
subnet mask com1
NW2 > 192.168.x.64
message > destination host unreachable..

SW1

Com1

Com2

192.168.x.2
255.255.255.192
NW= 192.168.x.0

Case Com2 ping Com1


1.com2 IP Com1 and
subnet mask com2
NW2 > 192.168.x.0
com2 com1 com1
message Request time out

192.168.x.126
255.255.255.0
NW= 192.168.x.0

Lab2 Test IP and Subnet


1. com1
IP> 192.168.x.254
subnet mask > 255.255.255.0

SW1

Com1

Com2

com2
IP> 192.168.x.250
subnet mask > 255.255.255.224
2. com1 ping com2
what is message? >>
3. com2 ping com1
what is message? >>
4. Network ID of Com1? >>
5. Network ID of Com2? >>

Summary Lab2 Test IP and Subnet


Case Com1 ping Com2
1. com1 IP Com2 and
subnet mask com1
NW2 > 192.168.x.0
message > Reply from

SW1

Com1

Com2

192.168.x.254
255.255.255.0
NW= 192.168.x.0

Case Com2 ping Com1


1.com2 IP Com1 and
subnet mask com2
NW2 > 192.168.x.224
com2 com1 com1
message Reply from..

192.168.x.250
255.255.255.224.
NW= 192.168.x.224

Private IP Address

Class A (1-126) (255.0.0.0) (/8)


Private 10.0.0.0/8

Class B (128-191) (255.255.0.0) (/16)


Private (172.16.0.0/16 172.31.0.0/16)

Class C (192-223) (255.255.255.0) (/24)


Private (192.168.0.0/24 192.168.255.255/24)

Special Private IP (DHCP Client >> APIPA)


169.254.0.0/16

Case Study

IP 172.16.0.1-254

default subnet > 255.255.0.0


Network ID > 172.16.0.0 (1 network)
Host > 172.16.0.1-254 (254 host)
172.16.0.1-254

Case Study (Cont.)


Network ID > 172.16.0.0 (1 network)
Host > 172.16.0.1-254 (254 host)
Network 1
subnet
2 network
Default subnet : 255.255.0.0

subnet : 255.255.?.?

IP Address
Network Subnetting
nnnnnnnn.nnnnnnnn.hhhhhhhh.hhhhhhh
nnnnnnnn.nnnnnnnn.ssshhhhh.hhhhhhh

Network SuperNetting / CIDR


(Classless Inter-Domain Routing)
nnnnnnnn.nnnnnnnn.hhhhhhhh.hhhhhhh
nnnnnnnn.nnnnnsss.hhhhhhhh.hhhhhhh

Subnet Mask
Host Subnet Mask

Subnet Mask Class A 255.0.0.0


25 32
(2,4,8,16,32,64,128)
32 > 11111 Subnet Mask
11111000
(128,192,224,240,248,252,254,255)
( < 240(1111)+?? > )
Subnet mask 256-8 > 248

Network

2 Network > 2 > 256/2=128 (


> 256-128 = 128 Subnet mask
10 Network > 16 > 256/16=16 >
256-16 = 240 Subnet mask
129 Subnet
65 > 128 > 256/128=2 > 256-2=
254
48 > 64 > 256/64=4 > 256-4=252

Host

400 (256 Octet


4)
512 > 512/256=2 > 256-2 =
254 255.255.254.0
4000 > 4000/256
16 > 256-16 = 240.0
1000 > 1000/256 4 >
256-4 =252.0

Network Monitor

Tracert ip

Visual Route

Ping

1. Ping 127.0.0.1 > check work



2. Ping (Network ID )
3. Ping Gateway (check
)
4. Ping website public
(www.yahoo.com)
work

Ping Paremeter

Telnet simple TCP/IP


Service
Service > day time

DNS
Domain name service >

website URL
www.yahoo.com
IP

DNS Record

Record.domain.zone

Com1

Yahoo

Mail

Sanook

www

egat

.Com
.net
.org
.co.th

DNS (Client)

ipconfig /displaydns cache


DNS client
Ipconfig /flushdns
client

cache

Forwarder
Hello.com

DNS2

3
DNS1

Client

www.hello.com

Secondary Zone
Reload from master

Hello.com

DNS2

Hello.com
DNS1

Client

www.hello.com

Stub Zone

Load only
detail of

Reload from master

Hello.com
DNS1

Client

Hello.com

DNS2

www.hello.com

Situation 1
Bang
kok

surath.com

Demo.com

CL1

Chiangmai

CL1000

site bangkok (1000 )


solve name surath.com
Forwader.

Situation 2
Bang
kok
100M

Chiangmai

100M
surath.com

Demo.com

CL1

2M

CL1000

site bangkok (1000 )


solve name surath.com
Secondary zone

Situation 3
Bang
kok
100M

Chiangmai

100M
surath.com

Demo.com

CL1

2M

CL1000

site bangkok (1000 ) solve name


surath.com admin surath.com server
(ns) ()
Stub Zone zone update

Concept sent Mail (Local)


1

Surath.com

POP3/SMTP
Server

com1

com2

admin

user1

Concept sent Mail (different domain


name)
Mail server
Prayoth.com Prayoth.com
(MX Record)

Surath.com

POP3/SMTP
Server
2
1

DNS1

com1

admin

DNS2

POP3/SMTP
Server
7
com2
user1

Reverse Lookup Zone

IP
Security Fake mail
hacker mail
check
IP ..

DNS Data

Default
c:\windows\system32\dns

Cache DnS

2
client > cmd > ipconfig /displaydns
server > DNS > view > advanced

DNS workgroup

DNS

Primary zone
Secondary zone
Stub Zone
Forwarder
Root Hint
Cache Server

DNS Domain
Active Directory Integreted

Demo.com
Demo.com
DC1,DNS1

Zone DNS data


replicate

Demo.com
DC2,DNS2

Demo.com
DC3,DNS3

Active Directory Integreted


replicate DNS Forest
replicate DC Forest
replicate DC domain
replicate active directory
partition

Primary DNS Suffix

solve name DNS Client


Ping

com1

Result
ping com1.surath.com

ping com1.com

solve name DNS Client (cont)


Ping

com1

Result
ping com1.prayoth.com

ping com1.hello.com

Ping com1.egat.co.th

update record set DNS


client

Yahoo.com

address

register
DNS

connection

register

suffix
Register
DNS

DNS
Proxy.egat.co.th 10.20.222.36
Proxy.egat.co.th 202.10.10.100

Proxy Server

10.20.222.36
Internal

202.10.10.100
Public

proxy: proxy.egat.co.th
CLient1


Proxy server register
DNS Internal

Lab Delegate DNS


Root Server(1)

.ORG (1)

demo.org(1)

.NET (1)

demo.net(1)

DNS

.COM (1)

demo.com(1)

Point Root server


Root server

.
Root

. com

. org

. net

. th
. AC.TH

Yahoo.COM
KU.AC.TH

GLOBAL DNS METHOD

DNS Server Properties


set
DNS
(Default
)

SOA of Zone
set refresh,
Retry expire
load
secondary zone
set TTL(Total
Time to live) DNS
cache record zone
(default=1
)

Set IP
2
1. (Manual)
1.1 set local area connection
1.2 set command (netsh)
Netsh interface ip set address local
static 192.168.1.2 255.255.255.0
192.168.1.1 1
Netsh interface ip set dns local static
192.168.1.1
2. (DHCP )

DHCP

IP

Overview DHCP
10.20.
93.1

10.20.93.7
10.20.93.0

10.20.
94.1

DHCP
Server
Scope1 10.20.93.0
Scope2 10.20.94.0

10.20.94.0

Router block
Broadcast client request
IP broadcast
NW=10.20.94.0 Rourter block
How to do???

Overview DHCP cont.


10.20.
93.1

10.20.93.7

10.20.93.0
DHCP
Server
Scope1 10.20.93.0
Scope2 10.20.94.0

10.20.
94.1

10.20.94.0

>> 2
1. Router BootP
2. NW server
DHCP Relay agent.

Case Allow BootP (Set at Router)


10.20.
93.1

10.20.93.7
10.20.93.0
DHCP
Server
Scope1 10.20.93.0
Scope2 10.20.94.0

10.20.
94.1

10.20.94.0

Case Use DHCP Relay Agent


10.20.
93.1

10.20.93.7
10.20.93.0
DHCP
Server
Scope1 10.20.93.0
Scope2 10.20.94.0

10.20.
94.1

10.20.94.0

DHCP Relay Agent

Case Use DHCP Relay Agent Cont


10.20.
93.1

10.20.93.7
10.20.93.0
DHCP
Server
Scope1 10.20.93.0
Scope2 10.20.94.0

3
2

CL1

10.20.
94.1

DHCP
Relay Agent
1 broadcast
10.20.94.0
4

Overview DHCP Option


Remark..
1. Option
2. set option
option ...
3. Option

Server Option
Reserv Option
Scope3 Option

Scope 1 Option

Scope2 Option

Super Scope

scope

Backup DHCP

Go to
c:\windows\system32\dchp\backup

compact DB DHCP

jetpack

Start > cmd


Cd c:\windows\system32\dchcp
Jetpack dhcp.mdb temp temp1

Start, Stop DHCP Service

Net start dhcpserver > start service


Net stop dhcpserver > stop service

Dynamic update Record DNS


Set update DNS
IP
Set clear A PTR Record
IP
Set update DNS
IP ( windows )

Package of DHCP ()
Discover
Offer

CL1

Request
Ack

Server

Package of DHCP ()
Request

CL1

Ack

Server

Log DHCP Server

Log

C:\windows\system32\DHCP\

IP

Command
ipconfig /release
>>>
ipconfig /renew
>>> ,
Graphic

VMWare

VMWare

Host >
Guest >

Key Control
Ctrl +Alt + Insert Ctrl +Alt +Del
Ctrl +Alt + Enter > ,
Ctrl +Alt > mouse VMware

Routing Table

Router

Routing Table (Cont)

Router
disable function
add routing table

check routing table

check >. Route print

Nw
GW


(NW )

Broadcast

Local Loop
back

Router

192.168.1.0/24 192.168.1.70
192.168.1.69
Host

202.44.33.0/24

202.44.33.71

202.44.33.72

Server2

Router windows 2003


Start > program > administrative tools >
Routing and Remote access

Config service

Routing Table

Router
Router set Dynamic
Routing
Router set
Static Routing add routing
table

Dynamic Routing

2
1. RIP
-
- 15 hop
-
2. OSPF
-
- Link State Database (
)

Routing Protocol

NAT

IP (Private)
Public IP
Remark : Function
Router Private
IP > Public IP

NAT (Network Address Translation)


Internet

Local
NAT

202.44.33.1120

Private IP
10.Xxx
172.16-32.x.x
192.168.x.x

Private

Public

192.168.1.12

203.44.33.11

192.168.1.15

203.44.33.12

Demand Dial Routing


Telecom
modem
RRAS

Site Bangkok
CL1

modem
RRAS
Site Chiengmai

CL2
I want to
Contact to Site
Chiengmai


Sever Demand
dial Routing ()
VPN

RRAS

Company

modem
modem
RRAS
.
Server
.
modem

Telecom
System

modem
Hacker Home
(
)

XP

ICS
Internt

SW, Hub

modem

XP

Set enable ICS


Fix IP >
192.168.0.1
Subnet, gateway

XP

XP

set IP
DHCP

Radius Server
Others..

windows

CISCO

Radius Server

Windows

US Robotic

windows
Cisco
Radius Server
>> microsoft
IAS (Internet Authentication Service)

VPN (Virtual Private Network)


Private IP

Company

Public IP
VPN
Server

Internet
System

Public IP
modem
Hacker Home
(
)

VPN

PPTP > Default VPN


TCP Hacker
IP

L2TP/IPsec > VPN


IP Hacker

IPSec

Lan
Hacker
set (Lan)
IPSec

IPSec
set set policy

IP Security (IPSec)

Layer IP (Internet Layer)


Application (FTP,HTTP,SMTP..)
Transport (TCP,UDP)
IPSec

Internet (ICMP, IP, ARP)


Network Interface

IP Sec
authentication 3
1. windows authen >>> Kerberos v.5
domain
2. CA >>>
3. Presharekey >> set
work

IP Security (IPSec)

Authentication
AH (Authentication Header)
MD5, SHA1

Encryption
DES, 3DES
ESP (Encapsulation Security Payload)

Key Management
IKE (Internet Key Exchange)

set IPsec domain

set policy domain


set > active directory users and
computer
> default domain policy > computer
setting > security setting > ip sec policies
> create ip sec
Remark >>> Kerberos
set domain controller
IPSec Presharekey

set VPN L2TP


set

VPN server
IPSEc
2

Good Password

3 4
1. a,b,c,.,z
2. A,B,C,
3. 0,1,2,3
4. !,@,#,$.%....
p@ssw0rd
Remark 7

NTLM
Workgroup

share

Server
CL1

authentication
Windows
resource share authenti
cation

Kerberos
Domain

share
2

AD

DC

1
Login
2

User Ticket

CLient1

Service Ticket
Server

check
Ticket
Use DC
User

Contact

Mail to
surath@itcompanion.co.th

www.itcompanion.co.th

You might also like