CMP2007M – Networks and Network Systems Workshop 5
Workshop 6 – IP Addressing and Subnets Basic networking and IP address configuration
In this workshop we’ll be recapping a few slides from the Network layer lecture; testing your knowledge of IP addressing and subnet masks; and configuring network settings to connect a computer to a network using manual IP settings (not DHCP).
Components covered in this workshop:
Understanding IP addresses and Subnet mask basics
Configuring a computer for the network
o Firewall
o Cable
o Network card
o Ping
o DHCP/manual input
Recap from Lecture slides
IPv4 addresses are made up of four Octets. There are three ‘main’ classes of addressing schema: A, B, and C. Depending on the class, the octets will be distributed differently for the number of networks and the number of hosts available. Host or client, refers to the device attached to the network, such as a desktop computer.
Note that the range for a Class A network only goes up to 126 and not 127. The 127 network is for loop back testing (see lecture notes – Subnetting).
In the example below we have a Class C network
Broadcast and Network Address
If we consider a Class C address where the first three octets make up the network portion of the IP address, the remaining 4th octet is reserved for host addresses. However, all 1’s is reserved for the broadcast address, and all 0’s is reserved for the network ID. The valid range for host IP addresses is from 1 to 254.
1st Octet
2nd Octet
3rd Octet
4th Octet
192
12864 32 16 8 4 2 1
11000000
168
12864 32 16 8 4 2 1
10101000
10
12864 32 16 8 4 2 1
00001010
3
12864 32 16 8 4 2 1
00000011
CMP2007M – Networks and Network Systems
Workshop 5
Example network addresses:
• 32.0.0.0 (class A network address)
• 146.176.0.0 (class B network address)
• 199.20.30.0 (class C network address)
• Example broadcast addresses:
• 32.255.255.255 (class A broadcast address for network 32.0.0.0)
• 146.176.255.255 (class B broadcast address for network 146.176.0.0)
• 199.20.30.255 (class C broadcast address for network 199.20.30.0) IP Address Ranges for class A, B and C
Mask
The mask can be thought of as a way of determining which part of the IP address represents the network identifier (NetID) and which part represents the HostID.
In the example below, we can see the default mask for the three types for networks.
CMP2007M – Networks and Network Systems Workshop 5
So why do we need a mask if we know that the first ‘required’ bits already determine which class type the IP address belongs to?
• There are not enough IP addresses available to provide every network with a default IP address. Scaling of the Internet to its present size was not accounted for.
• Subnetting is the practice of squeezing more network addresses out of a given IP address than are available by default.
• By default means: upon reading the first octet in an address, a router knows which bits to treat as network address bits.
In the real world, most enterprises need more network address space than what they are assigned by their ISPs. This creates the need to ‘cheat’ by claiming some of the default host bits for use in addressing networks. It is done by inserting a third zone between the default network and host address spaces. A subnet allows for a hierarchy of internets within a network.
If we assume a Class C address of 192.168.10.0 provided by the ISP, then we effectively have one network with the availability of 254 hosts. The problem here is that every computer will be on the same network… do we really want finance, payroll, and staff on the same network?
This is where the process of subnetting comes in – by changing the default mask, we can increase the number of networks.
This of course, impacts on the number of hosts on each subnetted network.
If we borrow 1bit we have a max of 2 subnets. Think about the permutations of 1bit.
Each subnet can have a max of 126 hosts (this is the permutations of the remaining host bits not including broadcast and netID). So 1bit = 2(21) network combinations and the remaining host bits to the power of 2 less 2… (27-2)=126.
If we borrow 3bits we have a max of 8 subnets: (23) = 8 network combinations with a max of 62 hosts on each subnet (25-2)=30.
CMP2007M – Networks and Network Systems Workshop 5
If we borrow 2bits we have a max of 4 subnets: (22) = 4 network combinations with a max of 62 hosts on each subnet (26-2)=62.
We will cover subnetting in next week’s workshop. In this workshop you will only be using default masks.
To help you get some familiarity with Class types, try out these questions:
Be the Router…
Which Class of network: A, B, or C do the following IP addresses belong?
See the Provided Mini Quiz handouts.
Configuring a computer for the network
All Programs> Control Panel
In the search field type: adapter
Network and Sharing Centre> View Network Connections Right Click on the ‘Local Area Connection’ icon
Here you have the option to Enable and Disable the Network card… this must be enabled! o It might not be enabled in the in-class test so you will need to check
o Select Properties
In ‘This connection uses the following items:’ select Internet Protocol Version 4 (TCP/IPv4) and then select Properties
Notice that the default setting selected – Obtain an IP address automatically. At the end of the tutorial, please reset this option back to the default! This option instructs the computer to obtain an IP address from the DHCP server.
Select: Use the following IP address
In the IP address field enter the IP address 192.168.10.# where # is the IP number of the
host number you choose. The subnet mask will automatically update for the class of network associated with the IP address.
o You can work in groups and allocate numbers within a range.
o Because of the number of students in the workshop, it very likely that the same IP
address will be allocated to more than one computer. If this happens, you should
see an IP conflict message. Try it out and see what happens.
o Once you have allocated your IP addresses, try to ping those machines. o Experiment with valid class A, B and C IP addresses.
Trouble shooting
If you receive an error an whilst performing the ping command, check to make sure the IP address and default mask are correct and on the same network as the computer you are attempting to ping.
CMP2007M – Networks and Network Systems Workshop 5
If you receive a destination unreachable error, it may be that the software firewall is blocking the communication.
Setting up a Workgroup
A workgroup allows the sharing of files and printers with specific computers on the network.
In your group, select a name for you workgroup and use this for all of the computers for your group. Click on the link for how to set up a Workgroup:
http://www.7tutorials.com/how-change-workgroup-windows-7
Once you have restarted your computer:
Create a folder in ‘Documents’, right click the folder and select Share with and choose your workgroup. Alternatively, make the folder public
Create a txt file in the shared folder and send it to someone within your group via the Workgroup folder.