Internet Protocol Internetworking Lab 1. Why Internet?

18
Internet Protocol Internetworking Lab 1

Transcript of Internet Protocol Internetworking Lab 1. Why Internet?

Page 1: Internet Protocol Internetworking Lab 1. Why Internet?

Internet Protocol

Internetworking Lab 1

Page 2: Internet Protocol Internetworking Lab 1. Why Internet?

Why Internet?

The Internet

Host 1

Gateway /Router Host 2

N1

N4

N2

N3

Page 3: Internet Protocol Internetworking Lab 1. Why Internet?

Protocols for Inter-network

• TCP/IP protocol suite– TCP /UDP – layer 4 – Transport layer– IP network layer

• Forward packets from network to network

• Unique address which is globally recognized– Why not MAC/Physical addresses

• Routing ( algorithms, decisions, tables )

Page 4: Internet Protocol Internetworking Lab 1. Why Internet?

Internet Protocol - Goals

• Single seamless communication• Physical network details to be hidden from

applications– Hardware details– Software details

• Addressing mechanism to locate the network/machine (independent of MAC/Phy address)

Page 5: Internet Protocol Internetworking Lab 1. Why Internet?

Internet Protocol Goals

• Based on the location of the network – forward the packets

• For this purpose use – routing algorithms and tables

Page 6: Internet Protocol Internetworking Lab 1. Why Internet?

Solution – IP functions

• Provide an addressing mechanism– IP addresses

• IP layer ( network layer) to provide Routing and forwarding mechanisms

• Is not Reliable – No guarantees

• Best Effort Delivery

Page 7: Internet Protocol Internetworking Lab 1. Why Internet?

IP Address

• 32 bits or 4 bytes• Each byte – 255 decimal – FF (hex)• Typical address 129.21.21.3

– Dotted quad, dotted decimal

• Two parts – – Network id – locates the network – used in

routing– Host id – identifies the host in the network

Page 8: Internet Protocol Internetworking Lab 1. Why Internet?

Classes of IP address

• Class A– Network id is in 1st byte, host id in the rest 3

• Class B– Network id is in first two bytes, host id in the last 2

• Class C– Network id is in the first three bytes, host id in the last

byte

• Class D and E – special cases

Page 9: Internet Protocol Internetworking Lab 1. Why Internet?

Classes of IP addresses

Page 10: Internet Protocol Internetworking Lab 1. Why Internet?

Identifying class

CLASS Range of Values

A 0-127

B 128-191

C 192-223

D 224-239

E 240-255

Page 11: Internet Protocol Internetworking Lab 1. Why Internet?

Number of networks and hosts

Address Class

Bits in Prefix

Max # of Networks

Bits in Suffix

Max # of Hosts/net

A 7 128 24 16777216

B 14 16384 16 65536

C 21 2097152 8 256

Page 12: Internet Protocol Internetworking Lab 1. Why Internet?

Specific IP addressesPrefix Suffix Type of Addr Purpose

All-0s All-0s This computer Used during bootstrap

Network All-0s Network Identifies a network

Network All-1s Directed broadcast Broadcast to a specific network

All-1s All-1s Limited broadcast Broadcast to local net

127 Any Loopback Testing

Page 13: Internet Protocol Internetworking Lab 1. Why Internet?

Network Mask

The network mask (subnet mask)where there are 1’s indicates the network IDwhere there are 0’s indicates the host ID

Examplesfor a class A address: 255.0.0.0for a class B address:255.255.0.0for a class C address:255.255.255.0

Page 14: Internet Protocol Internetworking Lab 1. Why Internet?

IP functions

Page 15: Internet Protocol Internetworking Lab 1. Why Internet?

Fragmentation in IP

Network 1 MTU = 1400

Network 2 MTU = 600

Network 3 MTU = 1400

Router Router

Host1 Host2

Page 16: Internet Protocol Internetworking Lab 1. Why Internet?

Fragmentation in IP

• Identification– used to determine which fragments belong to each

other

• Flag– D flag =0– data may be fragmented

– =1 data may not be fragmented

• Fragment offset– indicates where a fragment belongs in the complete

message – measured in octets

Page 17: Internet Protocol Internetworking Lab 1. Why Internet?

Fragmentation field

ID 16bits

FLAGS 3bits

Offset 13 bits

33 000 0 0, 1, 2, ………….1400

33 001 0 0, 1, 2, ………….599

33 001 75 600,601, ………….1199

33 000 150 1200, 1201…….1400

Fragmentation field

Original datagram

Fragmented datagram – fragment 1

Fragmented datagram – fragment 2

Fragmented datagram – fragment 1

Page 18: Internet Protocol Internetworking Lab 1. Why Internet?

IP properties

• Unreliable

• Connectionless - ?

• Best Effort