Διαδίκτυα και το Διαδίκτυο ( Internetworking and the Internet )
Internet Protocol Internetworking Lab 1. Why Internet?
-
Upload
hilary-chambers -
Category
Documents
-
view
214 -
download
1
Transcript of Internet Protocol Internetworking Lab 1. Why Internet?
Internet Protocol
Internetworking Lab 1
Why Internet?
The Internet
Host 1
Gateway /Router Host 2
N1
N4
N2
N3
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 )
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)
Internet Protocol Goals
• Based on the location of the network – forward the packets
• For this purpose use – routing algorithms and tables
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
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
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
Classes of IP addresses
Identifying class
CLASS Range of Values
A 0-127
B 128-191
C 192-223
D 224-239
E 240-255
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
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
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
IP functions
Fragmentation in IP
Network 1 MTU = 1400
Network 2 MTU = 600
Network 3 MTU = 1400
Router Router
Host1 Host2
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
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
IP properties
• Unreliable
• Connectionless - ?
• Best Effort