Presentation is loading. Please wait.

Presentation is loading. Please wait.

Wide Area Networks and Internet CT1403

Similar presentations


Presentation on theme: "Wide Area Networks and Internet CT1403"— Presentation transcript:

1 Wide Area Networks and Internet CT1403
Lecture3: Internet Network Layer

2 Outline Datagram format, fragmentation and assembly
IP addressing: Classes, Subnets CIDR: Classless Interdomain Routing DHCP: Dynamic Host Configuration Protocol CT1403

3 datagram format Fragmentation Reassembly

4 The Internet network layer
host, router network layer functions: transport layer: TCP, UDP IP protocol addressing conventions datagram format packet handling conventions routing protocols path selection RIP, OSPF, BGP network layer forwarding table ICMP protocol error reporting router “signaling” link layer physical layer

5 32 bit destination IP address
IP datagram format IP protocol version number ver length 32 bits data (variable length, typically a TCP or UDP segment) 16-bit identifier header checksum time to live 32 bit source IP address head. len type of service flgs fragment offset upper layer 32 bit destination IP address options (if any) total datagram length (bytes) header length (bytes) “type” of data for fragmentation/ reassembly max number remaining hops (decremented at each router) upper layer protocol to deliver payload to e.g. timestamp, record route taken, specify list of routers to visit. how much overhead? 20 bytes of TCP 20 bytes of IP = 40 bytes + app layer overhead

6 IP fragmentation, reassembly
network links have MTU (maximum transfer unit) - largest possible link-level frame different link types, different MTUs large IP datagram divided (“fragmented”) within net one datagram becomes several datagrams “reassembled” only at final destination IP header bits used to identify, order related fragments fragmentation: in: one large datagram out: 3 smaller datagrams reassembly

7 IP fragmentation, reassembly
ID =x offset =0 fragflag length =4000 example: 4000 byte datagram MTU = 1500 bytes ID =x offset =0 fragflag =1 length =1500 =185 =370 =1040 one large datagram becomes several smaller datagrams 1480 bytes in data field offset = 1480/8 offset 0: meaning the data should be inserted at the beginning go byte 0 offset 185: meaning the data should be inserted at the beginning go byte 1480 (185*8=1480) offset 370: meaning the data should be inserted at the beginning go byte 2960 (370*8=2960) Network Layer 4-36

8 IP Addressing Classes Subnets

9 IP Addressing IP address: 32-bit identifier for host, router interface
Interface: connection between host/router and physical link router’s typically have multiple interfaces (==>multiple IP addresses) host typically has one interface IP addresses associated with each interface = 1 1 1 223 Network Layer

10 Classes of IP Addresses

11 Classes of IP Addresses
44 CT1403

12 Classes of IP Addresses
.

13 Classless Interdomain Routing
CIDR Classless Interdomain Routing

14 IP addressing: CIDR CIDR: Classless InterDomain Routing
subnet portion of address of arbitrary length address format: a.b.c.d/x, where x is # bits in subnet portion of address subnet part host part /23

15 Classless Interdomain Routing : CIDR
Generalizes the notation of subnet addressing As within the subnet addressing, the 32-bit address is divided into two parts (net#, host # ) and has the dotted decimal form (a.b.c.d/x), where x indicates the number of bits in the first part of the address. CIDR replaces Classful addressing, where the network portion of IP addresses were constrained to 8, 16, or 24 Classful addressing waists IP addresses

16 Classless Interdomain Routing : CIDR
Most organizations needs more than class C but less than class B CIDR allocates IP address blocks of variable size without regard to classes Example: site needs 2000 addresses assign a block of 2048 addresses With CIDR address lookup is more complicated

17 reference: This slide was created by Dr. Mohammad Arafah
CIDR Example مثال 6: قناع الشبكة الفرعية (Subnet Mask) هو (/30). قناع الشبكة الفرعية ثابتة (رقم الشبكة) متغيرة (رقم الطرفية) (/22) قناع الشبكة الفرعية (Dotted Decimal Notation) = 2 طرفية عدد الطرفيات التي تدعمها الشبكة reference: This slide was created by Dr. Mohammad Arafah CT1403

18 Obtaining IP Addresses

19 IP addresses: how to get one?
Q: How does a host get IP address? hard-coded by system administrator in a file Windows: control-panel->network->configuration- >tcp/ip->properties UNIX: /etc/rc.config More often using ===> DHCP: Dynamic Host Configuration Protocol: dynamically get address from as server “plug-and-play”

20 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/“on”) support for mobile users who want to join network (more shortly) DHCP overview: host broadcasts “DHCP discover” msg [optional] DHCP server responds with “DHCP offer” msg [optional] host requests IP address: “DHCP request” msg DHCP server sends address: “DHCP ack” msg

21 DHCP client-server scenario
/24 arriving DHCP client needs address in this network /24 /24

22 DHCP client-server scenario
DHCP server: DHCP discover src : , 68 dest.: ,67 yiaddr: transaction ID: 654 arriving client DHCP offer src: , 67 dest: , 68 yiaddrr: transaction ID: 654 lifetime: 3600 secs DHCP request src: , 68 dest:: , 67 yiaddrr: transaction ID: 655 lifetime: 3600 secs DHCP ACK src: , 67 dest: , 68 yiaddrr: transaction ID: 655 lifetime: 3600 secs Network Layer 4-47

23 DHCP: more than IP addresses
DHCP can return more than just allocated IP address on subnet: address of first-hop router for client name and IP address of DNS sever network mask (indicating network versus host portion of address) Network Layer 4-48

24 DHCP: example DHCP UDP IP Eth Phy DHCP DHCP connecting laptop needs its IP address, addr of first- hop router, addr of DNS server: use DHCP DHCP DHCP request encapsulated in UDP, encapsulated in IP, encapsulated in Ethernet DHCP DHCP UDP IP Eth Phy DHCP Ethernet frame broadcast (dest: FFFFFFFFFFFF) on LAN, received at router running DHCP server router with DHCP server built into router Ethernet demuxed to IP demuxed, UDP demuxed to DHCP Network Layer 4-49

25 DHCP: example DHCP DHCP server formulates DHCP ACK containing client’s IP address, IP address of first-hop router for client, name & IP address of DNS server DHCP UDP IP Eth Phy encapsulation of DHCP server, frame forwarded to client, demuxing up to DHCP at client DHCP UDP IP Eth Phy DHCP DHCP router with DHCP server built into router client now knows its IP address, name and IP address of DSN server, IP address of its first-hop router DHCP Network Layer 4-50


Download ppt "Wide Area Networks and Internet CT1403"

Similar presentations


Ads by Google