+ All Categories
Home > Technology > Basic ip and networking ver 3 kl

Basic ip and networking ver 3 kl

Date post: 19-Jun-2015
Category:
Upload: azhar-ali
View: 382 times
Download: 1 times
Share this document with a friend
Popular Tags:
49
1 1 BASIC IP NETWORKING Kuala Lumpur January 2011 Azhar Ali
Transcript
Page 1: Basic ip and networking ver 3 kl

1 1

BASIC IP NETWORKING

Kuala Lumpur January 2011

Azhar Ali

Page 2: Basic ip and networking ver 3 kl

2 2

TCP/IP FUNDAMENTALS

Page 3: Basic ip and networking ver 3 kl

3 3

• TCP/IP is the first set of protocols

used in Internet • Allows computers to

communicate / share resources across a network

• Work on TCP/IP started in 1970s Funded by US Military

Advanced Research Project Agency

(ARPA)

Network protocols of ARPANET were

upgraded

I N T R O

Page 4: Basic ip and networking ver 3 kl

4 4

TCP/IP technology

TCP/IP and the Internet

Used as a standard To bridge the gap

between non-

compatible platforms

All computers

connected to the

Internet understands

TCP/IP

Page 5: Basic ip and networking ver 3 kl

5 5

In 1978, International

Standards Organization (ISO)

proposed a 7-layer reference

model for network Services

and protocols

Network Layering in TCP/IP 7

6

5

4

3

2

1

Page 6: Basic ip and networking ver 3 kl

6 6

7

6

5

4

3

2

1

• To provide well-defined interfaces between adjacent

layers A change in one layer does not

affect the other layers Interface must remain the same

• Allows a structured development of network

software

Why Layering ?

Page 7: Basic ip and networking ver 3 kl

7 7

The 7-layer OSI Model

OSI Model shows how networking

should work- provides a blueprint for protocols to follow – but it’s

not mandatory

Most protocols do follow OSI model

OSI model can help learn how

networking works, and how to

troubleshoot network problems

Application

Presentation

Session

Transport

Network

Datalink

Physical

7

6

5

4

3

2

1

Page 8: Basic ip and networking ver 3 kl

8 8

The TCP/IP Protocol 4-layer Model

De-facto standard – used for

connection to the Internet and

within most networks

Uses a 4 layer model

Covers most of the popular protocols used daily in network

communications

Application

Transport

Internet

Network

Page 9: Basic ip and networking ver 3 kl

9 9

4 on 7-layer Model

TCP/IP OSI

Page 10: Basic ip and networking ver 3 kl

10 10

7-layer Model Summary OSI Model

Data Unit Layer Function

Host Layers

Data

7 Application Network process to application

6 Presentation Data representation, encryption and

decryption

5 Session Interhost communication

Segments 4 Transport End-to-end connections and

reliability, flow control

Network Layers

Packet 3 Network Path determination and logical

addressing

Frame 2 Data Link Physical addressing

Bit 1 Physical Media, signal and binary

transmission

Page 11: Basic ip and networking ver 3 kl

11 11

• Refers to a family of protocols

• The protocols are built on top of connectionless technology

TCP/IP Protocol Suite

Data sent from one node to another

as a sequence of datagrams Each datagram sent independently The datagrams corresponding to the

same message may follow different routes o Variable delay, arrival order at

destination

Page 12: Basic ip and networking ver 3 kl

12 12

Data Flow in 4-layer Model

Application

Transport

Internet

Network

Application

Transport

Internet

Network

Internet

Network

‘network’

PHYSICAL PHYSICAL

A C

B

Page 13: Basic ip and networking ver 3 kl

13 13

TCP/IP Family Members

FTP TFTP SMTP SNMP DNS USER PROCESS ..

TRANSMISSION CONTROL PROTOCOL

(TCP)

USER DATAGRAM PROTOCOL

(UDP)

INTERNET PROTOCOL (IP) ICMP IGMP ARP RARP

Datalink and Hardware Layer e.g Ethernet

4

3

2

1

Page 14: Basic ip and networking ver 3 kl

14 14

Typical Scenario

User Process

User Process

TCP UDP

IP

Datalink and Hardware Layer e.g Ethernet

4

3

2

1

Page 15: Basic ip and networking ver 3 kl

15 15

4 and 7-layer Model Comparison

Reference : http://www.lex-con.com/protocols/ip.htm

Page 16: Basic ip and networking ver 3 kl

16 16

7-layer Map – TCP/IP

Page 17: Basic ip and networking ver 3 kl

17 17

IP transports datagrams (packets) from the source node to

the destination node Responsible for routing the

packets

Breaks a packet into smaller

packets, if required

Unreliable service o A packet may be lost in transit o Packets may arrive out of order o Duplicate packets may be

generated

What does IP do?

Page 18: Basic ip and networking ver 3 kl

18 18

• TCP provides a connection-oriented, reliable service for

sending messages Split a message into packets

Reassemble packets at

destination

Resend packets that were

lost in transit

• Interface with IP Each packet forwarded to IP

for delivery Error control is done by TCP

What does TCP do?

Page 19: Basic ip and networking ver 3 kl

19 19

• UDP provides a

connectionless, unreliable

service for sending datagrams

(packets) Messages small enough to fit in

a packet (e.g., DNS query)

Simpler (and faster) than TCP

Never split data into multiple

packets

Does not care about error

control

• Interface with IP Each UDP packet send to IP for

delivery

What does UDP do?

Page 20: Basic ip and networking ver 3 kl

20 20

Addresses in TCP/IP

User Process

User Process

TCP UDP

IP

Datalink and Hardware Layer e.g Ethernet

4

3

2

1

Internet

Address (32

bits)

Port Address

(16 bits)

Physical

Address (48

bits)

Page 21: Basic ip and networking ver 3 kl

21 21

Encapsulation Basic concept As data flows down

the protocol

hierarchy, headers (and trailers) get

appended to it

As data moves up the hierarchy, headers

(and trailers) get

stripped off

Page 22: Basic ip and networking ver 3 kl

22 22

TFTP over Ethernet

TFTP client

UDP

IP

Ethernet

TFTP server

UDP

IP

Ethernet

Page 23: Basic ip and networking ver 3 kl

23 23

Encapsulation in TFTP

Data

Data

Data

Data

Data

H-TFTP

H-TFTP

H-TFTP

H-TFTP

H-UDP

H-UDP

H-UDP

H-IP

H-IP H-ETH T-ETH

TFTP message

UDP segment

IP packet

Ethernet frame

14 20 8 4 200 4 H – Header T – Trailer

Page 24: Basic ip and networking ver 3 kl

24 24

DATAGRAM

Page 25: Basic ip and networking ver 3 kl

25 25

• IP layer provides a

connectionless, unreliable delivery system for packets …………..….. mentioned before

• Each packet is independent of one another IP layer need not maintain

any history Each IP packet must contain

the source and destination addresses

The IP

Layer

Page 26: Basic ip and networking ver 3 kl

26 26

• IP layer does not guarantee delivery of packets

• IP layer encapsulation Receives a data chunk from

the higher layer (TCP or UDP)

Prepends a header of

minimum 20 bytes o Containing relevant information

for handling routing and flow control

The IP Layer (contd)

Page 27: Basic ip and networking ver 3 kl

27 27

Format of IP Datagram H

ead

er

VER HLEN Service type Total Length

Identification Flags Fragment Offset

Time to Live Protocol Header Checksum

Source IP Address

Destination IP Address

Options

DATA

0 4 8 15 16 31

Page 28: Basic ip and networking ver 3 kl

28 28

IP Header Fields

Fields No of bits

Remarks

VER 4 Version of the IP protocol in use (typically 4)

HLEN 4 • Length of the header, expressed as the number

of 32-bit words

• Minimum size is 5, and maximum 15

Total Length 16 • Length in bytes of the datagram, including

headers

• Maximum datagram size : 2 = 65536 bytes

Service Type 8 • Allow packet to be assigned a priority

• Router can use this field to route packets

• Not universally used

Time to Live 8 • Prevents a packet from travelling in a loop

• Senders sets a value, that is decremented at

each hop. If it reaches zero, packet is discarded

Protocol 8 Identifies the higher layer protocol being used

16

Page 29: Basic ip and networking ver 3 kl

29 29

IP Header Fields (contd)

Fields No of bits

Remarks

Source IP

address

32 Internet address of the sender

Destination IP

address

32 Internet address of the destination

Identification,

Flags, Fragment

Offset

32 Used for handling fragmentation

Options var • Can be given provided router supports

• Source routing, for example

Header Checksum

16 •Covers only the IP header •A mismatch in checksum causes the datagram to be discarded

Page 30: Basic ip and networking ver 3 kl

30 30

Page 31: Basic ip and networking ver 3 kl

31 31

1. How many bits are there in the IP address?

2. How many bits are there in the Ethernet address?

3. What does the Ethernet address signify?

4. What does the IP address signify?

5. What does the port number signify?

Page 32: Basic ip and networking ver 3 kl

32 32

6. What the various layers in the

simplified TCP/IP protocol stack

corresponds to with respect to

the OSI 7-layer model?

7. Why is the transport layer called end-to-end or host-to-host layer?

8. IP is unreliable, and TCP uses IP.

How does TCP provide reliable service to the application layer?

9. List two common applications that

use UDP.

Page 33: Basic ip and networking ver 3 kl

33 33

10. Why is the IP protocol considered

unreliable?

11. What does TCP do if the

message to be sent is larger than

what a single datagram can

handle?

12. What is the purpose of the ‘Time to Live’ field in the IP header?

13. What is the maximum size of

data that can be accommodated

in an IP datagram?

Page 34: Basic ip and networking ver 3 kl

34 34

Basic IP Addressing

• Each host connected to the

Internet is identified by a

unique IP address

• An IP address is a 32 bit quantity Expressed as dotted-

decimal notation w.x.y.z,

where dots are used to

separate each of the four octets of the address

Consists of two logical parts:

o A network number

o A host number • The partition defines the IP

address classes

Page 35: Basic ip and networking ver 3 kl

35 35

Dotted Decimal Notation (w.x.y.z)

66.134.48.126 01000010.10001000.00110000.01111110

32 bits

An IP address for an Internet

site would look

like this

Page 36: Basic ip and networking ver 3 kl

36 36

Hierarchical Addressing

A computer on the Internet

is addressed using two

method: The network number o Assigned and managed by

central authority

The host number o Assigned and managed by

local network administrator

When routing a packet to the

Destination, only

the network number is

looked at

Page 37: Basic ip and networking ver 3 kl

37 37

IP Address Classes

There are five defined IP Address Classes

Class A, B, C, D and E (reserved) identified by the

first few bits in the IP address

There are also exists some

special-purpose IP addresses

Page 38: Basic ip and networking ver 3 kl

38 38

IP Address Classes

The class-based addressing is

also known as the classful model Different network classes

represent different network-to-hosts ratio

Lend themselves to different network configurations

Page 39: Basic ip and networking ver 3 kl

39 39

IP Address Classes

Class Network Address

A 10.0.0.0 through 10.255.255.255

B 172.16.0.0 through 172.31.255.255

C 192.168.0.0 through 192.168.255.255

Class First Bits

First Byte Values

Network ID Bits

Host ID Bits

Number of Networks

Number of Hosts

A 0 1 - 126 7 24 126 16,777,214

B 10 128 -191 14 16 16,384 65,534

C 110 192 - 223 21 8 2,097,152 254

Private IP Address Range – Special purpose

Page 40: Basic ip and networking ver 3 kl

40 40

IP Subnetting

• Subset of a class A, B or

C network

• Introduce third level of

hierarchy A network portion

A subnet portion

A host portion

• Uses network masks

Page 41: Basic ip and networking ver 3 kl

41 41

Network Masks

Network mask 255.0.0.0 is applied to a

class A network 10.0.0.0

11111111 00000000 00000000 00000000

In binary, the mask is a series of contiguous 1’s followed by a series

of contiguous 0’s

Network Host

Page 42: Basic ip and networking ver 3 kl

42 42

Network Masks

• Class A network 10.5.0.20

00001010 00000101 00000000 00010100

11111111 11111111 00000000 00000000

10.5.0.20

255.255.0.0

IP Address

Mask

Network Host Subnet

Page 43: Basic ip and networking ver 3 kl

43 43

Network Masks

e.g Network mask of 255.255.255.0

Subnet 255.255.255.X

X X (in

binary) No. of

Subnets No. of Hosts

128 1000 0000 2 128

192 1100 0000 4 64

224 1110 0000 8 32

240 1111 0000 16 16

248 1111 1000 32 8

252 1111 1100 64 4

Page 44: Basic ip and networking ver 3 kl

44 44

Running out of IP addresses

• Growing demand for IP addresses Severe strain on the classful model

Due to wastage of address space

• Measure taken Creative allocation of IP addresses

Classless Inter-Domain Routing

(CIDR) o e.g 144.16.192.57/18

Private IP addresses, and Network

Address Translation (NAT)

IP v6

Page 45: Basic ip and networking ver 3 kl

45 45

Page 46: Basic ip and networking ver 3 kl

46 46

1. Change the following IP address

from binary notation to dotted decimal notation 11000100

10001111 00110000 10000001

2. Find the error if any in the following

IP address: 144.15.256.7

3. Find the class of the following IP

address: 227.15.75.111?

4. Given the network address

135.75.0.0, find the class, the network id, and the range of the addresses

5. What do the following IP address signify: 144.16.255.255

Page 47: Basic ip and networking ver 3 kl

47 47

BASIC

NETWORK

Page 48: Basic ip and networking ver 3 kl

48 48

Common Component in IP Network

Page 49: Basic ip and networking ver 3 kl

49 49


Recommended