IP Internet Protocol the network level protocol in

  • Slides: 12
Download presentation
 • IP (Internet Protocol) – the network level protocol in the Internet. –

• IP (Internet Protocol) – the network level protocol in the Internet. – Philosophy – minimum functionality in IP, smartness at the end system. – What does IP do? • Addressing and fragementation (Internetworking). • Routing provided by other protocols – What IP does not do: • congestion control • error control • resource management (under extensive development recently)

– IP Service • an unreliable, best-effort, connectionless packet delivery service. – Addressing •

– IP Service • an unreliable, best-effort, connectionless packet delivery service. – Addressing • ip address: 4 bytes, xxx • example: ip address for diablo 128. 186. 120. 2 • logically <type, network number, host number> • Five types (classes) A, B, C, D, E. class A 0 7 bits network number 24 bits host number class B 10 class C 110 class D 1110 class E 11110 14 bits network number 16 bits host number 21 bits network number 8 bits host number 28 bits multicast address reserved

 • IP address for a computer in a class A network: – 1.

• IP address for a computer in a class A network: – 1. 0. 0. 0 to 127. 255 • How many class A, B, C networks around? • How many computers can a class A network have at most? • Usually all machines in the same organization have the same network number obtained from NIC (Network Information Center). • special addresses: – 0. 0 this host – network number = 0, hostnumber a host on this network – 255 broadcast on local network – network number, hostnumber = 11111 broadcast on remote network – 127. 0. 0. 1, loopback

 • Subnets – Written as 12. 34. 56. 78 255. 0 or 12.

• Subnets – Written as 12. 34. 56. 78 255. 0 or 12. 34. 56. 78/24. – Each organization typically have one network number. – Using the subnet mask to allow the three-tie structure, sufficient for most organizations. • Using the bitwise AND operation on the IP address and the subnet mask produces the subnet number. – E. g: machine 128. 2. 194. 31 subnet mask: 255. 128 ==> subnet number: 128. 2. 194. 0 – All hosts on the same subnet share the same subnet mask – Example: FSU 128. 186. xxx. yyy, subnet mask 255. 0, FSU CS 128. 186. 121. xxx 128. 186. 120. xxx.

 • Question: Can a machine (router) have more than one IP address? Version

• Question: Can a machine (router) have more than one IP address? Version IHL Type of Service identification Time to live Total length DF MF protocol Fragment offset header checksum source address destination address Options/Padding • Version: Current 4, Next Generation 6, IPv 6 • IHL: 4 bits, header length, 16 * 32 bits • Type of service: Quality of Service requirement (not used before) • Total length: 16 bits, 65, 535 Bytes (64 K), including header

– Identification: unique for each IP (1) source increments a counter (2) gateway copies.

– Identification: unique for each IP (1) source increments a counter (2) gateway copies. All fragments of a datagram contain the same Identification number. – Flags: three bits (unused DF MF), DF if 1, means do not fragment, MF if 1, means more fragment (not end of packet. – Fragment Offset: offset in the original datagram in unit of 8 octets. » Why 8 octets? – Time to Live: was intended to count time. Now use to count hops. – Portocol: number of higher number protocols » ICMP : 1, TCP 6, UDP 17 – Question: is the header in an ip packet fixed throughout it journey?

– Routing: • two type of routers: – border router: <network> next hop –

– Routing: • two type of routers: – border router: <network> next hop – internal router: maintain routing table <this network, subnet, 0> nexthop <this network, this subnet, host> nexthop <network> nexthop • Intradomain routing in TCP/IP networks. – Routing Information Protocol (RIP, RFC 1058) » distance vector, hop count as metric » maximum hop count = 15, limited size » routing tables maintained by application level processes (daemons) (routed in unix) exchanging distance vector information using UDP port 520

– Routing: • new intradomain routing: – Open Shortest Path First (OSPF, RFC 1247)

– Routing: • new intradomain routing: – Open Shortest Path First (OSPF, RFC 1247) » link state routing using dijkstra algorithm » use reliable broadcast for flooding LS packets » two level hierarchy: backbone/area » Link state routing within each area/backbone • Interdomain routing: BGP (border gateway protocol) -- dealing more with the politics issues.

– Some control protocols used by IP • ICMP: Internet Control Message Protocol –

– Some control protocols used by IP • ICMP: Internet Control Message Protocol – control messages » source quench, too many packets (choke packet) » time exceeded: TTL zero, (wandering for too long) » destination unreachable » fragmentation required: MTU too small. » parameter problem: header invalid – for information messages: » echo request/reply » timestamp request/reply – Two programs that use the ICMP protocol: » ping and traceroute – IP invokes ICMP to report errors, ICMP encapsulates messages in IP for transmission: protocol number 1

– Some control protocols used by IP • ARP: address resolution protocol – find

– Some control protocols used by IP • ARP: address resolution protocol – find out the ethernet address for an IP address – a host broadcast to everyone asking “who owns IP address xxx” – The host with that IP address response with its Ethernet address. • RARP: reverse address resolution protocol. – Find out a host’s IP address. – The host broadcast to everyone asking “My Ethernet address is ? ? ? ? ? , who knows my IP address? ” – The RARP server looks up the configuration file and reply with its IP address.

 • CIDR - Classless Inter. Domain Routing • Problem? We are running out

• CIDR - Classless Inter. Domain Routing • Problem? We are running out of IP addresses. • CIDR is the temporary solution for this problem. – Many IP address are wasted due to the two levels structure. (Half of the class B networks have less than 50 machines, nobody wants class C networks). – Allocating the remaining Class C network address space without enforcing the logical structure -- otherwise the routing table may be too big. – Routing table contains an addition mask field (network address, mask, nexthop). – In routing: if (IP address AND mask == network address) then forward it the nexthop

 • IPv 6 – compatible with TCP, UDP, ICMP, …… – main problem:

• IPv 6 – compatible with TCP, UDP, ICMP, …… – main problem: IPv 4 is running out of address space – 16 bytes address space – less header fields -- more efficient to process – more hierarchy levels -- reduce routing table size – Qo. S(Quality of Service) – multicasting – mobile IP – security