Docsity

Internet Protocols - Operating Systems - Lecture Slides | CS 5523, Study notes of Operating Systems

Toggle sidebar
bg1
1
CS 5523 Lecture 6:
Internet Protocols
❚ General comments
❚ IP addressing
❚ IPv6 addressing
❚ IP routing
❚ IP connectivity and security
General comments about IP and the Internet
❚ Emerged from ARPANET of the early 1970’s
❚ Independent of underlying hardware
❚ The Internet protocols usually refer to TCP/IP
❚ Don’t quite fit into OSI model
❚ Were developed in a much smaller scale environment
❚ A lot of work has gone into tuning
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff

Partial preview of the text

Download Internet Protocols - Operating Systems - Lecture Slides | CS 5523 and more Study notes Operating Systems in PDF only on Docsity!

CS 5523 Lecture 6:

Internet Protocols

❚ General comments

❚ IP addressing

❚ IPv6 addressing

❚ IP routing

❚ IP connectivity and security

General comments about IP and the Internet

❚ Emerged from ARPANET of the early 1970’s

❚ Independent of underlying hardware

❚ The Internet protocols usually refer to TCP/IP

❚ Don’t quite fit into OSI model

❚ Were developed in a much smaller scale environment

❚ A lot of work has gone into tuning

IP protocol overview

❚ transmits datagrams from source to destination via

intermediate routers

❚ unreliable or best-effort delivery semantics

❚ has a header checksum, but no data checksum

❚ breaks up datagrams into fragments to fit MTU of underlying network

❚ obtains a physical address from underlying network address

resolution mechanism

What errors can occur in “best-effort” delivery?

Why does IP have a header checksum but no data checksum?

Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 3 © Addison-Wesley Publishers 2000

Figure 3.12 (CDK)

TCP/IP layers

Messages (UDP) or Streams (TCP)

Application

Transport

Internet

UDP or TCP packets

IP datagrams

Network-specific frames

Message

Layers

Underlying network

Network interface

Packet assembly:

❚ Transport layer usually handles assembly and reassembly

❚ Packets consist of a header and a data.

❚ If the data > MTU (maximum transfer unit), must be divided

into multiple packets.

❚ A transport address is network address of host + port

number.

Packet delivery:

Two approaches to delivery in the network layer

❚ Datagram delivery

❚ Virtual circuit packet delivery

Are these the same as connectionless and connection-oriented

protocols?

Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 3 © Addison-Wesley Publishers 2000

Figure 3.15 (CDK)

Internet address structure, showing field sizes in bits

Class A: 0 Network ID Host ID

14 16 Class B: 1 0 Network ID Host ID

21 8 Class C: 1 1 0 Network ID Host ID

28 Class D (multicast): 1 1 1 0 Multicast address

27 Class E (reserved): 1 1 1 1 0 unused

Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 3 © Addison-Wesley Publishers 2000

Figure 3.16 (CDK)

Decimal representation of Internet addresses

octet 1 octet 2 octet 3

Class A: (^) 1 to 127

0 to 255 0 to 255 1 to 254

Class B: (^) 128 to 191

Class C: (^) 192 to 223

Class D (multicast): 224 to 239

Network ID

Network ID

Network ID

Host ID

Host ID

Host ID

Multicast address

0 to 255 0 to 255 1 to 254

0 to 255 0 to 255 0 to 255

0 to 255 0 to 255 0 to 255

Multicast address

Class E (reserved): 240 to 255 0 to 255 0 to 255 1 to 254

1.0.0.0 to 127.255.255.

128.0.0.0 to 191.255.255.

192.0.0.0 to 223.255.255.

224.0.0.0 to 239.255.255. 128.0.0.0 to 247.255.255.

Range of addresses

Example: ARP on an Ethernet

❚ each host is running ARP

❚ the ARP module maintains a cache of pairs:

(IP address, Ethernet address)

❚ if the address is in the local cache, use it

❚ if address not in cache, broadcast a request

❚ the host with matching IP address responds and a new pair is

added to the local ARP cache

What does ARP stand for?

What happens if no host responds to an ARP broadcast?

Routing:

❚ decide the route for each packet

❚ update knowledge of the network

Internet routing:

❚ RIP-1 used the distance vector algorithm

❚ RIP-2 (1993) handles classless interdomain routing, better

multicast and authentication

❚ OSPF - open shortest path first - based on Dijkstra’s shortest

path algorithm converges better

❚ RIP routers exchanged information every 30 seconds, during

which time they didn’t send out any IP packets.

Link-state algorithm:

❚ keep a distance vector for destinations in routing table

❚ send a summary of routing table to neighbors using

RIP (router information protocol)

❚ read tables from neighbors and update as needed

Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 3 © Addison-Wesley Publishers 2000

Figure 3.9 (CDK)

Pseudo-code for RIP routing algorithm

Send: Each t seconds or when Tl changes, send Tl on each non-faulty outgoing link.

Receive: Whenever a routing table Tr is received on link n :

for all rows Rr in Tr {

if ( Rr.link | n ) {

Rr.cost = Rr.cost + 1;

Rr.link = n ;

if ( Rr.destination is not in Tl ) add Rr to Tl;

// add new destination to Tl

else for all rows Rl in Tl {

if ( Rr.destination = Rl.destination and

(Rr.cost < Rl.cost or Rl.link = n )) Rl = Rr;

// Rr.cost < Rl.cost : remote node has better route

// Rl.link = n : remote node is more authoritative

Details:

❚ t is typically 30 seconds

❚ when a faulty link is detected, cost is set to ∞∞∞∞

❚ costs can be based on bandwidth rather than hops

❚ slow convergence and loops are a problem

❚ how big a database should each router maintain?

Routing scalability:

❚ In 1993 introduced some location-dependence in IP addresses:

❚ Default routers close to backbone have more complete tables

❚ Addresses on same subnet use local address resolution

194.0.0.0 to 195.255.255.255 Europe

198.0.0.0 to 199.255.255.255 North America

200.0.0.0 to 201.255.255.255 Central and South America

202.0.0.0 to 195.203.255.255 Asia and Pacific

CIDR:

❚ Uses a mask in the routing table to select portion of address to

be compared with routing table

❚ Can use any part of address for subnet

❚ UTSA does not currently subnet, but are planning to subnet

within the year

What political consequences will subnetting have at UTSA?

Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 3 © Addison-Wesley Publishers 2000

Figure 3.20 (CDK)

Firewall configurations

Internet

Router/ Protected intranet

a) Filtering router

Internet

b) Filtering router and bastion

filter

Internet

c) Screened subnet for bastion (^) R/filter Bastion R/filter

R/filter Bastion

web/ftp server

web/ftp server

web/ftp server

Discovering network topology (Stevens I p. 22)

jazz% netstat -ni Name Mtu Net/Dest Address Ipkts Ierrs Opkts Oerrs Collis Queue lo0 8232 127.0.0.0 127.0.0.1 847616 0 847616 0 0 0 hme0 1500 129.115.0.0 129.115.11.19 68827133 2 22886432 0 0 0

jazz% netstat -rn Routing Table: Destination Gateway Flags Ref Use Interface


129.115.0.0 129.115.11.19 U 3 71360 hme 224.0.0.0 129.115.11.19 U 3 0 hme

default 129.115.3.253 UG 0 255703 127.0.0.1 127.0.0.1 UH 0 217427 lo

❚ Do a man netstat to look at the command options.

❚ Try netstat -a

Looking at details of an interface (Stevens I p. 23)

jazz% ifconfig hme hme0: flags=863<UP,BROADCAST,NOTRAILERS,RUNNING,MULTICAST> mtu 1500 inet 129.115.11.19 netmask ffff0000 broadcast 129.115.255.

jazz% ifconfig lo lo0: flags=849<UP,LOOPBACK,RUNNING,MULTICAST> mtu 8232 inet 127.0.0.1 netmask ff

❚ Do a man ifconfig to look at the command options.

❚ Look at docs.sun.com for more information on commands

Finding connectivity to other hosts (Stevens I p. 23)

jazz% ping -s 129.115.255. PING 129.115.255.255: 56 data bytes 64 bytes from jazz (129.115.11.19): icmp_seq=0. time=7. Ms 64 bytes from ten59 (129.115.11.183): icmp_seq=0. time=9. Ms 64 bytes from ten13 (129.115.11.122): icmp_seq=0. time=9. Ms 64 bytes from vip.cs.utsa.edu (129.115.12.1): icmp_seq=0. time=9. Ms

... records omitted ...

64 bytes from 129.115.106.119: icmp_seq=0. time=73. Ms 64 bytes from cajal.utsa.edu (129.115.106.117): icmp_seq=0. time=76. Ms 64 bytes from ten41 (129.115.11.94): icmp_seq=0. time=76. Ms 64 bytes from 129.115.233.136: icmp_seq=0. time=121. Ms 64 bytes from 129.115.100.1: icmp_seq=0. time=125. Ms 64 bytes from owl.cs.utsa.edu (129.115.11.28) ... ^C ... ping interrupted... ----129.115.255.255 PING Statistics---- 1 packets transmitted, 173 packets received, 173.00 times amplification round-trip (ms) min/avg/max = 7/57/

Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 3 © Addison-Wesley Publishers 2000

Figure 3.

Tunnelling for IPv6 migration

A B

IPv6 IPv

IPv6 encapsulated in IPv4 packets

Encapsulators

IPv4 network

For next time:

❚ Read CDK Chapter 4.1 and 4.

❚ Read Stevens Vol. I Chapter 8