Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to Networks

Similar presentations


Presentation on theme: "Introduction to Networks"— Presentation transcript:

1 Introduction to Networks
CSEN 404 Introduction to Networks Amr El Mougy Ali Saudi ** Slides are attributed to J. F. Kurose

2 Network layer transport segment from sending to receiving host
application transport network data link physical network data link physical transport segment from sending to receiving host on sending side encapsulates segments into datagrams on receiving side, delivers segments to transport layer network layer protocols in every host, router router examines header fields in all IP datagrams passing through it application transport network data link physical Network Layer

3 Datagram networks no call setup at network layer
routers: no state about end-to-end connections no network-level concept of “connection” packets forwarded using destination host address packets between same source-dest pair may take different paths application transport network data link physical application transport network data link physical 1. Send data 2. Receive data Network Layer

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

5 Forwarding in Datagram Networks
Forwarding is based on a table of destination addresses at the routers IP addresses are 32-bits

6 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 Network Layer

7 32 bit destination IP address
IP datagram format 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 IP protocol version number header length (bytes) max number remaining hops (decremented at each router) for fragmentation/ reassembly total datagram length (bytes) upper layer protocol to deliver payload to head. len type of service “type” of data flgs fragment offset upper layer 32 bit destination IP address Options (if any) E.g. timestamp, record route taken, specify list of routers to visit. how much overhead with TCP? 20 bytes of TCP 20 bytes of IP = 40 bytes + app layer overhead Network Layer

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

9 Subnets IP address: What’s a subnet ? subnet
subnet part (high order bits) host part (low order bits) What’s a subnet ? device interfaces with same subnet part of IP address can physically reach each other without intervening router subnet network consisting of 3 subnets Network Layer

10 Subnets /24 /24 /24 Recipe To determine the subnets, detach each interface from its host or router, creating islands of isolated networks. Each isolated network is called a subnet. Subnet mask: /24 Network Layer

11 Subnets How many? Network Layer

12 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 /23

13 Original IPv4 Address Classes
32 bits (4 bytes) unique value for each host Address composed of 2 parts (2-level hierarchy): Prefix(network ID): identifies network to which host attaches Suffix(host ID): identifies host on that network

14 Special IP Addresses All 1’s: All 0’s:
Broadcast address for same network as source All 0’s: Used for IP address assignment

15 Subnetting A class B address is divided into two parts:
network part and local part Local part is further divided locally into: subnet and host parts Splitting is done internally, yet looks like a single network to the outside world Network

16 Subnet Mask Subnet mask needed to differentiate between different subnets Allows hosts to determine if another IP address is on the same subnet or the same network 1’s represent network part, 0’s represent host part

17 Classful addressing: Good or Bad?
Pros: simple, easy to understand self-identifying Can determine boundary between prefix and suffix from the address itself No additional state needed to store boundary information Cons: limited address space 2^32 = 4G addresses, not enough? limited network size choices (3) Ex.: what if a class C net needs to grow beyond 255 hosts? moving to a new network requires changing IP address

18 Example An organization has 7 LANs as shown in the figure. The organization has a network address x. Determine: The network address for each LAN. The IP addresses of the hosts (H1H6) and the routers shown in the figure. Note that LAN 7 has no hosts but requires IP addresses. The maximum number of hosts that can be connected to each of the first 6 LANs (LAN1  LAN 6).

19 Q6: Solution 7 networks  3 subnet bits and 5 host bits. Network address LAN 1: LAN 2: LAN 3: LAN 4: LAN 5: LAN 6: LAN 7: Host address LAN 1: , LAN 2: , LAN 3: , LAN 4: , LAN 5: , LAN 6: , LAN 7: , Number of hosts 2^5 = = 30 Transport Layer

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

21 Dynamic Host Configuration Protocol
Host sends DHCP discovery using as src IP and as dest IP The DHCP server port number is 67 Server responds with an address offer yiaddr = If the client accepts, then a Request/Ack transaction will follow


Download ppt "Introduction to Networks"

Similar presentations


Ads by Google