程序代做CS代考 flex DHCP Network Layer COMP90007 Internet Technologies

Network Layer COMP90007 Internet Technologies
Lecturer: Semester 2, 2021
© University of Melbourne 2021

IP Addresses (1)
◼ IP address (IPv4) is 32-bit long, written in dotted decimal notation 128.18.3.11
27
26
25
24
23
22
21
20
128
64
32
16
8
4
2
1
0
0
0
1
0
0
1
0
range: 0-255
◼ Addresses are hierarchical and can be allocated in blocks e.g. 256 addresses in the block 128.18.3.0 – 128.18.3.255
◼ Overall, IP allocation is managed by Internet Corporation for Assigned Names and Numbers (ICANN)
31

IP Addresses (2)
◼ network portion + host portion
◼ Prefix: determined by the network portion, all hosts on a
single network has the same network portion. prefix is written as: lowest address/bit-length
128.18.3.0/24,18.2.0.0/16 ◼ Subnet mask: all 1s in the network portion
◼ Extract prefix: ANDed the IP address with the subnet mask
32

IP Addressing and Routing Tables
◼ Routing tables are typically built on a triplet: ❑ Prefix Address
❑ Subnet Mask
❑ Outgoing Line (physical or virtual)
◼ Example: a row of a routing table
Prefix
Subnet Mask
Interface
128.18.3.0/24
255.255.255.0
Eth 0
33

Subnets (1)
◼ Subnetting allows networks to be split into several parts for internal uses whilst acting like a single network for external use
Melbourne Uni Router
Network is divided into subnets internally, but looks like a single prefix outside the network
ISP gives Melbourne Uni a single prefix
34

Subnets (2)
128.208.0.0/16→number of addresses 216
block 128.208. 216
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
1
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
CS 128.208.
215 +
0
0
x
x
x
x
x
x
x
x
x
x
x
x
x
x
EE 128.208. 214 +
Art 128.208. 213 +
Left 128.208. 213 35
0
1
1
x
x
x
x
x
x
x
x
x
x
x
x
x
0
1
0
x
x
x
x
x
x
x
x
x
x
x
x
x
=

Classless Inter-Domain Routing (1)
◼ Routing table explosion? Backbone router connecting networks around the world→300k networks
◼ Aggregation: process of joining multiple IP prefixes into a single larger prefix to reduce size of routing table
36

Classless Inter-Domain Routing (2)
◼ Packets are forwarded to the entry with the longest matching prefix (i.e. smallest address block)
◼ Complicates forwarding process but adds flexibility
1) Check address whether matches the longest prefix→/22 2) If not, then see if it matches /19
Except for Main prefix goes this part! this way
Prefix Address
Subnet Mask
Interface
192.24.12.0/22
255.255.252.0
Eth 0 (to SF)
192.24.0.0/19
255.255.224.0
Eth 1 (to London)
37

Classless Inter-Domain Routing (3)
192.24.0.0/19→number of addresses 213 (8192)
London
Edinburgh
San Francisco
London
Oxford
213
0
0
0
x
x
x
x
x
x
x
x
x
x
x
x
x
London
London
192.24.
192.24. 211 Cambridge +
0
0
0
0
0
x
x
x
x
x
x
x
x
x
x
x
0
0
0
0
1
0
x
x
x
x
x
x
x
x
x
x
192.24. 192.24. 192.24.
210
+ 210
+ 212
0
0
0
0
1
1
x
x
x
x
x
x
x
x
x
x
0
0
0
1
x
x
x
x
x
x
x
x
x
x
x
x
38
=

Classful Addressing
◼ Old design: addresses came in blocks of fixed size (Class A, B, C, D, E)
❑ Carries size as part of address, but lacks flexibility
39

Private IP Ranges
◼ Range of IP addresses that CANNOT appear on the Internet
◼ Reserved only for private networks
❑ 10.0.0.0/8 (224 = 16,777,216 hosts)
❑ 172.16.0.0/12 (220 = 1,048,576 hosts) ❑ 192.168.0.0 /16 (216 = 65,536 hosts)
40

Network Address Translation (NAT)
◼ NAT box maps one external IP address to many internal IP addresses
❑ Uses TCP/UDP port to distinguish connections
❑ Violates layering; popular tool in conserving global address space
41

IPv6 (1)
◼ Larger address space: 128-bit address using hexadecimal colon notation
◼ Support for more security: encryption and authentication ◼ Transition: dual stack, tunneling, header translation
42

IPv6 (2)
◼ Required fields in IPv6 header (40 bytes)
43

Internet Control Protocols
◼ IP works with the help of several control protocols:
❑ ICMP (Internet Control Message Protocol) is a companion to IP that returns error info
◼ Required, and used in many ways, e.g., traceroute, ping
❑ ARP (Address Resolution Protocol) finds MAC address of a local IP address
◼ Host queries an address and the owner replies
❑ DHCP (Dynamic Host Control Protocol) assigns a local IP address to a host
◼ Gets host started by automatically configuring it
◼ Host sends request to server, which grants a lease
44

ICMP
◼ Used for testing and monitoring ambient conditions between hosts and routers
45