Title: IP Addressing Revision'
1IP AddressingRevision.
2Session Aims
- Calculate IP addresses using Subnet masks
3The story so far
- Each computer has an address called a ? ? ?
Address. - Which OSI Layer is this?
- How does the device get the address?
- What devices join the computers together?
4How do we expand a LAN?
- Is there a limit to the size of an Ethernet LAN?
- What is it?
- Why ?
5Internetworking
Network A
NetworkB
Layer 3 Address (Network Number , Node Number)
6Routable Protocols
- Layer 3 protocols have to deliver the packet from
Source to destination across many intermediate
networks - Routable protocols,
- eg
- IP (Internet Protocol)
- IPX (Internet Packet Exchange) - Novell
Proprietary protocol
7Internetworking
R4
Router1
R5
R2
R6
1
3
2
Network66
Router3
1
2
3
Network42
8IP version 4 Addresses
- 32 bit binary number
- four octets
- Written as four decimal numbers separated by a
full stop or dot - One per octet
- E.g. 172.16.0.60
- How much of this address is network and how much
is node address depends on the actual address and
on the subnet mask being used
9IP Address Construction
10IP Network (Segment) Address vs. Node(host)
Address
11Subnet Mask
- IP address contains Network and node address
- First X bits are Network, rest is node
- indicate the number of bits as follows
- e.g
110.234.9.202 / 12
01101110.11101010.000001001.11001010
12Subnet mask tells us the value of X
- Subnet mask has first X bits are 1, rest 0
- Usually written in dotted decimal
- E.g. IP address
01101110.11101010.000001001.11001010
Subnet Mask
11111111.11110000.000000000.00000000
As dotted decimal
255.240.0.0
13Subnet Masks further example
255.0.0.0
14(No Transcript)
15QQuestions on the Diagram
- How many networks are shown in this diagram?
- What does the IP address on Interface 1, 2 etc
refer to? - Suggest suitable IP addresses for PCs shown
- If PC 192.168.2.1 sends to 192.168.2.2 what
happens? - If PC 192.168.2.1 sends to 192.168.1.1 what
happens? - If PC 192.168.2.1 sends to 192.168.3.1 what
happens?
16Exercise
- Work out the network address, host address and
subnet mask of the following - a) 192.168.3.15/24
- b) 10.24.130.16 /18
- c) 194.200.240.202/25
- What is the maximum decimal value of an IP
address octet?
17IP Address Classes
- Subnet mask may split address anywhere
- Classful addresses (old system)
- Class A, B, C distributed amongst user
organisations for use on Internet connected
networks - Class D used for multicasting
- Class E reserved for future use
18IPv4 Address Classes
19Problems with IPv4
- Running out of IP addresses
- particular problems with Classful addresses
- Wasted addresses
- Internet routing tables size problem
- Each network needs an entry
- Other issues
- Packet fragmentation / Quality of Service
implementation
20Solutions
- Private addresses / NAT
- Eg following cant be used on Internet
- 192.168.0.0/16
- 172.16.0.0/12
- 10.0.0.0/8
- NAT on border of the LAN converts any private
addresses to a public address ( vice versa).
21Solutions
- CIDR (Classless Internet Domain Routing)
- Subnetting not confined to the octet boundaries
- Eg organisation needing 500 public IP addresses
can be allocated /23 network rather than class B
(/16)
22Solutions IPv6
- IPng
- Replacement for IPv4
- Addressing
- 128 bits
- Written as 6 x 4byte hex, colon separated
- FF0E00A0B9023
- Note repeated zero suppression
- Direct mapping of IPv4 to IPv6 addresses
- a.b.c.d
- See loads on the web
23Routing and Subnetworking
NIC1
NIC3
NIC2
24Subnetting Example1
- Suppose an organisation has been allocated
193.1.1.0/24 - It requires 6 subnets
- Largest subnet requires 25 nodes
- How many bits needed to determine the subnet
number? - What is the subnet mask?
- How many hosts can we have on each subnet?
25193.1.1.0/24
26Allocated IP Address
193 . 1 . 1 .
0 /24 11000001.00000001.00000001.0000000
0
6 subnets requires 3 bits, thus
Subnet mask
255 . 255 . 255 .
224 /27 11111111.11111111.11111111.11100000
27Subnet
193 . 1 . 1 .
0 /27 11000001.00000001.00000001.00000000
0
193 . 1 . 1 .
32 /27 11000001.00000001.00000001.0010000
0
1
Router
193 . 1 . 1 .
64 /27 11000001.00000001.00000001.0100000
0
3
193 . 1 . 1 .
128 /27 11000001.00000001.00000001.10000000
4
193 . 1 . 1 .
160 /27 11000001.00000001.00000001.10100000
5
28Subnet 1 addresses
193 . 1 . 1 .
32 /27 11000001.00000001.00000001.0010000
0
Router
193.1.1.33
193.1.1.36
193 . 1 . 1 .
34 11000001.00000001.00000001.00100010
193 . 1 . 1 .
35 11000001.00000001.00000001.00100011
29Exercise
- Suppose there are 8 x PCs on Subnet 4.
- Work out all the addresses needed for that
subnet. - Does a switch have an IP address?
- Does a router have an IP address?
301. How many NICs in the Firewall?2. How many
subnets?3. What subnet mask?4. Allocate IP
Addresses
129.25.32.0 /24
Internet
Switch
Firewall
Border Router
31Summary
- Internetworking requires routable protocols
(Layer 3) - Address in 2 parts (Network / host)
- Subnet Mask determines split
- Calculate Subnets IP addresses