Oct 30, Nov 1, 3
- 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.
- Layer 3:
Defines the Internet addressing
- IP addressing:
32 bits - 2^32 possible addresses = 4 billion
independent of hardware addressing
unique value for each host
one IP address belongs to only one host
some hosts (routers) may have more than one IP address
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:
Divided in two parts
Prefix - identifies the network
Suffix - identifies the host
- A global authority assigns a unique prefix for a network
- A local administrator assigns a unique for the host
- Classes of addresses
7 bits for the network = 128 networks
24 bits for the host = 16 M. hosts
2^14 networks = 16 000 networks
2^16 hosts = 64 000 hosts
21 bits for the network
8 bits for the hosts = 256 hosts
- Dotted decimal notation:
shorthand for IP address
each object is represented by decimal and separated by dots
IP address d.d.d.d - each digit is in the range 0 - 255
This is not the same as DNS (Domain Name Service) like mentor.cc.purdue.edu
- What class is the address 18.104.22.168 ?
129 - represents 1000 0001 in binary
it is Class B
Net # = 22.214.171.124
Host # = 6.0
- What class is the address 126.96.36.199 ?
129 - represents 1000 0000 in binary
it is Class B
Net # = 188.8.131.52
Host # = 2.3
- What class is the address 184.108.40.206 ?
192 - represents 1100 0000 in binary
it is Class C
Net # = 220.127.116.11
Host # = 3
- What class is the address 10.2.0.32 ?
10 - represents 0000 1010 in binary
it is Class A
Net # = 10.0.0.0
Host # = 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.
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 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
- Internet is made of hosts, networks, and routers.
- Routers - a piece of hardware or computer that performs IP routing.
Computer with a specialized software - UNIX BSD (Berkeley Standard Distribution) includes a program called "routed' that is the router that can be run to use a host as a router. The host needs to have more than one network interface - two connected networks. Routed was substituted by "gated" (www.gated.org)