Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lectu re 1 Recap: “Operational” view of Internet r Internet: “network of networks” m Requires sending, receiving of messages r protocols control sending,

Similar presentations


Presentation on theme: "Lectu re 1 Recap: “Operational” view of Internet r Internet: “network of networks” m Requires sending, receiving of messages r protocols control sending,"— Presentation transcript:

1 Lectu re 1 Recap: “Operational” view of Internet r Internet: “network of networks” m Requires sending, receiving of messages r protocols control sending, receiving of messages m e.g., TCP, IP, HTTP, Skype, Ethernet etc. r Design of protocols is the key for Internet Home network Institutional network Mobile network Global ISP Regional ISP 1-1

2 r application m support host/network applications m Email, FTP, HTTP (HTML) r transport m process-process data transfer m TCP, UDP r network m routing of datagrams from src. to destn. m IP address, routing protocols r link m data transfer between neighboring network elements m Ethernet, PPP r physical m bits “on the wire” 1-2 Internet protocol stack application transport network link physical Lectu re 3

3 Network Layer4-3 Network layer r Network layer protocols in every host, router r Router examines header fields in all IP datagrams passing through it application transport network data link physical application transport network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical

4 Network Layer4-4 Key Network-Layer Functions r Forwarding: move packets from router’s input to appropriate router output r Routing: determine route taken by packets from source to dest. analogy: r forwarding: process of getting through single interchange r routing: process of planning trip from source to dest

5 Network Layer4-5 Key Network-Layer Function requirement: r Need to know the addresses r Zip codes ~ e.g., 10019 r What is the address for computers / routers?

6 IP Address Network Layer4-6

7 7 IP Address r An IP address is a 32-bit sequence of 1s and 0s. r To make the IP address easier to use, the address is usually written as four decimal numbers separated by periods. r This way of writing the address is called the dotted decimal format. 11011111 00000001 00000001 00000001 223 111

8 Network Layer4-8 IP Addressing example network r IP address: 32-bit identifier for host, router interface r interface: connection between host/router and physical link m router’s typically have multiple interfaces m host typically has one interface m IP addresses associated with each interface 223.1.1.1 223.1.1.2 223.1.1.3 223.1.1.4 223.1.2.9 223.1.2.2 223.1.2.1 223.1.3.2 223.1.3.1 223.1.3.27 223.1.1.1 = 11011111 00000001 00000001 00000001 223 111

9 9 A quick look at Binary and Decimal Number format

10 Decimal (base 10) r Uses positional representation r Each digit corresponds to a power of 10 based on its position in the number r The powers of 10 increment from 0, 1, 2, etc. as you move right to left 1,234 = 1 * 10 3 + 2 * 10 2 + 3 * 10 1 + 4 * 10 0

11 Binary (base 2) r Two digits: 0, 1 r To make the binary numbers more readable, the digits are often put in groups of 4 or 8 1010 = 1 * 2 3 + 0 * 2 2 + 1 * 2 1 + 0 * 2 0 = 8 + 2 = 10 1100 1001 = 1 * 2 7 + 1 * 2 6 + 1 * 2 3 + 1 * 2 0 = 128 + 64 + 8 + 1 = 201

12 Conversion r From binary to decimal m Use positional representation as shown in last slide r From decimal to binary (tricky!) m Keep dividing by 2 m Remainders give the digits, starting from lowest power r Let’s look at some examples… r Now we are ready for IP addressing

13 IP address Class Handouts… (provided in class) Network Layer4-13

14 Every IP address has two parts: 1. Network part 2. Host part IP addresses are divided into classes A,B and C to define -- large, -- medium, and -- small networks. The Class D address class was created to enable multicasting. Class E addresses reserved for future and research. IP Address

15 IP Address classes

16 Some special IP addresses Network Layer4-16

17 Network Layer4-17 DHCP: Dynamic Host Configuration Protocol Goal: allow host to dynamically obtain its IP address from network server when it joins network Can renew its lease on address in use Allows reuse of addresses (only hold address while connected an “on”) Support for mobile users who want to join network (more shortly) DHCP overview: m host broadcasts “DHCP discover” msg [optional] m DHCP server responds with “DHCP offer” msg [optional] m host requests IP address: “DHCP request” msg m DHCP server sends address: “DHCP ack” msg

18 Network Layer4-18 DHCP client-server scenario 223.1.1.1 223.1.1.2 223.1.1.3 223.1.1.4 223.1.2.9 223.1.2.2 223.1.2.1 223.1.3.2 223.1.3.1 223.1.3.27 A B E DHCP server arriving DHCP client needs address in this network

19 Network Layer4-19 DHCP client-server scenario DHCP server: 223.1.2.5 arriving client time DHCP discover src : 0.0.0.0, 68 dest.: 255.255.255.255,67 yiaddr: 0.0.0.0 transaction ID: 654 DHCP offer src: 223.1.2.5, 67 dest: 255.255.255.255, 68 yiaddrr: 223.1.2.4 transaction ID: 654 Lifetime: 3600 secs DHCP request src: 0.0.0.0, 68 dest:: 255.255.255.255, 67 yiaddrr: 223.1.2.4 transaction ID: 655 Lifetime: 3600 secs DHCP ACK src: 223.1.2.5, 67 dest: 255.255.255.255, 68 yiaddrr: 223.1.2.4 transaction ID: 655 Lifetime: 3600 secs IP: 223.1.2.4

20 Numerical example r A software company has 100 employees. m What would be the ideal class from which the company would choose its network IP to prevent wastage of IP addresses? m How many bits would be assigned for network part and m how many bits would be assigned for host part? r The company suddenly goes through increase in number of employees from 100 to 2040. m What would be the ideal class from which the company would choose its network IP to prevent wastage of IP addresses? m How many bits would be assigned for network part and m how many bits would be assigned for host part? r Solve! Network Layer4-20

21 Network Layer4-21 IP addressing: CIDR CIDR: Classless InterDomain Routing m subnet portion of address of arbitrary length m address format: a.b.c.d/x, where x is # bits in subnet portion of address r Back to the previous numerical example? How many address wastage? 11001000 00010111 00010000 00000000 subnet part host part 200.23.16.0/21

22 Network Address Translation (NAT) Network Layer4-22

23 Home network local network (e.g., home network) rest of Internet

24 NAT: Network Address Translation 10.0.0.1 10.0.0.2 10.0.0.3 10.0.0.4 138.76.29.7 local network (e.g., home network) 10.0.0/24 rest of Internet Datagrams with source or destination in this network have 10.0.0/24 address for source, destination (as usual) All datagrams leaving local network have same single source NAT IP address: 138.76.29.7, different source port numbers

25 NAT: Network Address Translation r Advantages: m local network uses just one IP address as far as outside world is concerned: min. IP address wastage m can change addresses of devices in local network without notifying outside world: flexibility m devices inside local net not explicitly addressable, visible by outside world (a security plus).

26 NAT: Network Address Translation 10.0.0.1 10.0.0.2 10.0.0.3 S: 10.0.0.1, 3345 D: 128.119.40.186, 80 1 10.0.0.4 138.76.29.7 1: host 10.0.0.1 sends datagram to 128.119.40.186, 80 NAT translation table WAN side addr LAN side addr 138.76.29.7, 5001 10.0.0.1, 3345 …… S: 128.119.40.186, 80 D: 10.0.0.1, 3345 4 S: 138.76.29.7, 5001 D: 128.119.40.186, 80 2 2: NAT router changes datagram source addr from 10.0.0.1, 3345 to 138.76.29.7, 5001, updates table S: 128.119.40.186, 80 D: 138.76.29.7, 5001 3 3: Reply arrives dest. address: 138.76.29.7, 5001 4: NAT router changes datagram dest addr from 138.76.29.7, 5001 to 10.0.0.1, 3345

27 NAT: Network Address Translation r 16-bit port-number field: m 60,000 simultaneous connections with a single LAN-side address!

28 NAT traversal problem r client wants to connect to server with address 10.0.0.1 m server address 10.0.0.1 local to LAN (client can’t use it as destination addr) m only one externally visible NATted address: 138.76.29.7 r solution 1: statically configure NAT to forward incoming connection requests at given port to server 10.0.0.1 10.0.0.4 NAT router 138.76.29.7 Client ?

29 NAT traversal problem r solution 2: relaying (used in Skype) m NATed client establishes connection to relay m External client connects to relay m relay bridges packets between connections 138.76.29.7 Client 10.0.0.1 NAT router 1. connection to relay initiated by NATted host 2. connection to relay initiated by client 3. relaying established


Download ppt "Lectu re 1 Recap: “Operational” view of Internet r Internet: “network of networks” m Requires sending, receiving of messages r protocols control sending,"

Similar presentations


Ads by Google