Oct 30, Nov 1, 3

 

Internet Protocols

 

- Layering used with TCP/IP

 

 

- This layering represents the Internet more closer than the ISO-7 layer model

- Physical layer- basic network hardware

- Network Interface - media access (MAC) format and addressing

- Internet Layer - facilitates to send packets across the Internet using multiple routers

- Transport Layer - transport of data from one application to another

- Application Layer- user program

 

Layering principle - Software implementing layer N at the destination receives exactly the message sent by software implementing layer N at the source. 

 

 

Internet Protocols

- Layer 3:

- IP addressing:

Important: An IP address identifies a connection between a computer and a network. A computer with multiple network connections (e.g. routers must be assigned one IP address for each connection).

 

 

 

>host cisco1  - gives all IP addresses of cisco1

>ypcat hosts  - gives all IP addresses used in CS department

>ypcat hosts  | grep cisco1 - all IP addresses cisco1

>ypcat hosts | grep 128.10.3

 

- IP address:

- A global authority assigns a unique prefix for a network

- A local administrator assigns a unique for the host

 

 

- Classes of addresses

- Dotted decimal notation:

- What class is the address 129.52.6.0 ?

- What class is the address 128.10.2.3 ?

- What class is the address 192.5.48.3 ?

- What class is the address 10.2.0.32 ?

Class A addresses are for large networks.

Class B addresses are for medium networks.

Class C are for small networks.

 

For each class we can represent the net portion as 1's and the host portion as 0's. This is called network mask.

 

Class Network Mask
A 255.0.0.0
B 255.255.0.0
C 255.255.255.0

 

The net # = IPaddress & Network mask

10.2.0.32 & 255.0.0.0 = 10.0.0.0

 

Net # Host # Meaning When to use
all 0's all 0's this host bootstraping (IP address is not available)
net # all 0's network # when you refer to a network
net # all 1's directed broadcast applications that need broadcast
all 1's all 1's broadcast in all attached networks (limited broadcast) apps. that need broadcast
127 any loopback the same computer

 

 

IP Packets

- IP runs on heterogeneous networks

- A router that connects two networks with different kind of hardware cannot copy the packet as it is and place it in the other network.

 

- IP packets were created to run on basically any kind of network hardware.

- A router will copy only the IP packet and place it in a new hardware frame when routing. The old frame is discarded.

- There is an RFC for almost every network hardware that tells you how to implement IP on that hardware - IP on Ethernet, token ring, serial line, ATM.

 

 

H. LEN - header length

Serv. -  priority

IP source, ID, offset - fragmentation reassembly 

max length IP packet = 64 K bytes

max Ethernet packet = 1500

MTU - maximum transfer unit

 

- IP packets may need to be fragmented if the packet is longer than the MTU

- Routers may need to fragment IP packets. ID and offset are used for reassembly.

- Reassembly is done at the destination. This is because packets may follow different paths and it would be impossible to do reassembly in the routers. 

- Time to leave - time the packet has been in the Internet (including routers). Max is 255 sec. After 255 secs. the packet is discarded. By default a router will decrement the TTL field by one when the packet is routed. This prevents the possibility of a packet circulating forever due to a routing loop.

- ID needs to be recycled after 64K packets. The TTL sets a limit of when an old ID is still valid.

- IP options - optional , used for recording a route

 

IP Routing

- Internet is made of hosts, networks, and routers.

- Routers - a piece of hardware or computer that performs IP routing.