Packet Tracer 6 Activity – Basic IPv4 Network

Overview

This virtual networking activity involves setting up a basic IPv4 network by connecting two Cisco 1941 routers to two Cisco Catalyst 2960 switches to two PCs. The goal is to variously configure the PCs, switches, and routers with the following information:

{loadposition adposition5}• Basic network device security, by configuring access port passwords, banner message of the day and encryption on the routers and switches (see the network diagram in Packet Tracer),
• Interface IP address, subnet mask, and gateway addresses (see the network diagram in Packet Tracer),
• A static default route/gateway of last resort for the routers,
• Follow the instructions in the network diagram for additional required configurations

The scoring is based on the total number of items correctly configured. Remember that when entering configurations the system is case sensitive. In the end, you should be able to ping from PCA to PCB

Download

BasicIPv4NetworkConfiguration.zip

Note: You will need Packet Tracer version 6.0.1 to open this activity

 

Spoiler Alert – Only Read Below if you are stuck

IOS Command List

router>enable
router#configure terminal
router(config)#hostname R1
R1(config)#banner motd “No unauthorized access allowed!”
R1(config)#enable secret class
R1(config)#service password-encryption
{loadposition adposition5}R1(config)#line console 0
R1(config-line)#password cisco
R1(config-line)#login
R1(config-line)#line vty 0 4
R1(config-line)#password cisco
R1(config-line)#login
R1(config-line)#exit
R1(config)#interface g0/0
R1(config-if)#ip address 192.168.5.1 255.255.255.0
R1(config-if)#description toR2
R1(config-if)#no shut
R1(config)#interface g0/1
R1(config-if)#ip address 192.168.0.1 255.255.255.0
R1(config-if)#description toLAN
R1(config-if)#no shut
R1(config-if)#exit
R1(config)#ip route 0.0.0.0 0.0.0.0 192.168.5.2
R1#copy running-config startup-config
R1#show running-config
R1#show ip route
R1#show ip int brief

switch>enable
switch#configure terminal
switch(config)#hostname S1
S1(config)#banner motd “No unauthorized access allowed!”
S1(config)#enable secret class
S1(config)#service password-encryption
S1(config)#line console 0
S1(config-line)#password cisco
S1(config-line)#login
S1(config-line)#line vty 0 14
S1(config-line)#password cisco
S1(config-line)#login
S1(config-line)#exit
S1(config)#interface vlan 1
S1(config-if)#ip address 192.168.0.2
S1(config-if)#exit
S1(config)#ip default-gateway 192.168.0.1

S1(config)#exit
S1#copy running-config startup-config
S1#show running-config

IPv4 Addresses and Subnet Masks

The Format of an IPv4 Address

An IPv4 address can be written in two ways:

dotted decimal notation – 192.168.1.1
32-bit binary notation – 11000000.10101000.00000001.00000001

The address has 4 octets separated by periods and counted from let to right. There are three types of IPv4 addresses: a network address, a host address, and a broadcast address. In other words you could say a computer is on the 192.168.10.0 /24 network (network address), and is using a host address of 192.168.10.1. The address 192.168.10.1 represents the ip address in dotted decimal notation. That same address in binary notation is 11000000.10101000.00001010.00000001. The 1(00000001) is in the 4th octet.

Converting Binary to Decimal and Vice Versa

The most popular, and (in my opinion) easiest way to convert a binary number to decimal is using a table like so:

128 64 32 16 8 4 2 1
0 0 1 1 1 0 0 1
0 + 0 + 32 + 16 + 8 + 0 + 0 + 1 = 57
Aside from knowing the table well enough to use it without writing it all out, there are various tricks for binary/decimal conversion. Personally, I’ve never found them very practical, but this doubling trick for converting binary to decimal, and this halving trick for converting decimal to binary are pretty cool.

Network Portion and the Host Portion of an IP Address and Subnet Mask

The network portion and the host portion of an ip address is defined its subnet mask. This process is easy if the subnet mask is classful meaning either:

Class C  –  255.255.255.0  or /24,
Class B  –  255.255.0.0  or /16,
Class A  –  255.0.0.0  or /8

So if the ip address is 192.168.1.100 and the subnet mask is classful meaning 255.255.255.0 then the 255s in the subnet mask tell you the network portion and the 0s tell you the host portion. For example, below the network portion is in red and the host portion is in black:

192.168.1.100
255.255.255.0
(So the network is 192.168.1.0, and the host is number 100)

Using the example above the first address in the network is the network address (192.168.1.0). The last address in the network is the broadcast address (192.168.1.255), and the host addresses in the network are the addresses between the network and the broadcast  (192.168.1.1 – 192.168.1.254).

The process is a little more difficult when a non-classful subnet mask is used. In this scenario binary conversion must be used to delineate the network and host portions of an address. Consider the following example:

192.168.1.100 /27 or

192.168.1.100
255.255.255.224
Where are the network and host portions now?

To easily solve the question convert to binary:
11000000.10101000.00000001.01100100  = 192.168.1.100
11111111.11111111.11111111.11100000 = 255.255.255.224
(The 1s in the subnet mask identify the network portion, the 0s the host portion)

The network and host portions are still defined by the subnet mask, just more accurately by seeing the address and mask in binary and identifying the 1s and 0s. The question that you now have to ask yourself is, what is the networkaddress, broadcast address and host addresses if the subnet mask is 255.255.255.224? To answer this question you need to, in binary, logically AND the ip address and subnet mask and you will get the network address. To understand this process and more see my video series on subnetting, ANDing and the Magic Number below.


Note: you have to have all subnet mask fields filled in.


3 Types of IP Addresses: Network Address, Host Address, and Broadcast Address

Network Address – The address by which we refer to the network
Uses the first address in the network,
The network address is reserved and is not usable by a host
All hosts in a network will have the same network address
All hosts in a network will have the same network bits or network portion

Broadcast Address – The address used to send data to all of the hosts on a network
Uses the highest (last) address in the network,
The broadcast address is reserved and is not usable by a host
The bits in host portion are all 1’s
Also called a directed broadcast

Host Address – The addresses assigned to the end devices in the network
Each and every device in the network needs a unique ip address,
The host addresses lie between the network and broadcast address

Public and Private Addressing

Private addresses are blocks of ip addresses that are not routable on the internet. The private address blocks are:

10.0.0.0 to 10.255.255.255   (10.0.0.0 /8)
172.16.0.0 to 172.31.255.255   (172.16.0.0 /12)
192.168.0.0 to 192.168.255.255   (192.168.0.0 /16)

Since private addresses are implemented on LANs behind a firewall different networks may use the same private address schemes. Private addressing requires Network Address Translation (NAT) in order to translate private addresses to public addresses for use on the internet. With this (NAT) technique, many hosts in a private network can channel all communications through a single public ip address allowing communicate over the internet.

Public Addresses are designed to be used by hosts that are publicly accessible from the internet. Public ip addresses are assigned by the InterNIC and consist of class-based network IDs called CIDR blocks.

 


Video Tutorial Series – IP Addresses, Binary Conversion, and Network Masks

In order to understanding of subnetting you need to be able to convert IP addresses from decimal to binary. Subnetting, subnetworks, and subnet masks only make sense from the perspective of binary. The reason you need to convert the addresses to binary is that it is the way routers find networks. Routers and computers find networks by ANDing IP addresses with the subnet masks. If you want to understand the logic behind the process you need to be able to see it from the perspective of the router. In the following video tutorials I lay out the simple process of converting IP addresses and subnet masks to binary. I also cover finding the network portion and host portion of a network or subnetwork mask. I recommend watching all of these videos as as my following series on the “Magic Number.”

Video Tutorial Series – Subnetting with the Magic Number – Parts 1 through 6

In this series of tutorials, I explain how you can easily find the network address, broadcast address, and first and last host addresses from any ip address and subnet mask combination. The ability to calculate subnets is the most important skill for success in the Cisco CCNA. The magic number trick will make that process a snap!

Unicast, Broadcast, and Multicast Messaging 

A message or packet sent to a unique ip host address is called a unicast message. A unicast message is a message addressed to a single unique host. By contrast a message or packet sent to a broadcast address is called a broadcast message. It is a message meant for all hosts on a network. A multicast message is a message sent to a multicast address, typically an address starting with 224 like 224.0.0.1. An address that starts with 224 is a Class D address which is an address space reserved for multicasts. A multicast message is like a broadcast message in that most, or all, hosts on the network will open the packet and examine its contents before deciding whether or not to drop the message or send it up the layers for decapsulation.

Network Layer

Network Layer Overview

The Network Layer is all about networks and routing packets to the correct network, it is the “Layer of The Internet” the layer of the IP protocol. The IP protocol is a connectionless protocol, it doesn’t care about setting up a connection prior to sending like TCP’s three way handshake, it just sends. IP is also a best effort protocol in that it isn’t reliable, it leaves reliability up to TCP with its sequence numbers and syns and acks. IP is only concerned with getting the packets to the right network, i.e the Best Path. The Network Layer header specifies the network addressing i.e. source and destination IP addresses. Along the packet’s travels across the internet the source and destination ip addresses never change. IP or the Internet Protocol is a special protocol that we call a routed protocol. In other words IP is a protocol that is routable, it gets this from the fact that it uses hierarchical addressing that can be tiered into levels of greater and smaller networks as well as the ability to differentiate between the network portion and the host portion of the address. This last part is crucial, think of another hierarchical addressing scheme for instance, a post office mailing address. When you mail a letter, it is sent to a host or recipient like “John Doe,” but what if you only wrote the person’s name on the letter, like “To: John Doe,” would it get there? No, it wouldn’t, because it wouldn’t contain any routable information like State, City, and street address only the recipient John Doe. We can liken a complete mailing address to an IP address like 192.168.1.108 /24. The routable portion like city, state, and street address is the network portion the 192.168.1 part and the recipient is the host portion or the .108 part. We can easily differentiate the network portion from the host portion by means of the network mask or subnet mask. The network mask has 4 octets just like the IP address. The portions with the 255’s (255.255.255.0) identify the network portion and the portion with the 0’s tells us where the host portion is.

IP Addressing – Example

192.168.1.111  – If this is the ip address
255.255.255.0  – and this is the netmask or subnet mask
192.168.1.111   – then the network is red, and the host is green … why?
255.255.255.– the network portion is defined by the red 255s and the host portion is defined by the green 0 portion.
192.168.1.0  – the first address is the network address and cannot be assigned to a host
192.168.1.255  – the last address is the broadcast address and cannot be assigned to a host{loadposition adposition6}
192.168.1.1 thru 254  – are available for host addresses

If we convert the 255.255.255.0 netmask from decimal to binary the 1s represent the network portion and the zeros represent the host portion:
11111111.11111111.11111111.00000000 – Binary
255.255.255.0 – Decimal

The above ip address and netmask together can be represented as:
192.168.1.111 /24 – The /24 represents the number of binary 1s in the netmask counted from left to right
11111111.11111111.11111111.00000000 – 24 x1s or /24

Broadcast Domains

The Protocols of the Network Layer

IPv4 – The most widely used network layer protocol, and part of the TCP/IP suite used on the internet. A connectionless, best effort protocol.

IPv6 – The successor to IPv4, with 128 bit addresses instead of 32 bit addresses to solve address space and other issues.

ICMP – Internet Control Message Protocol, part of the TCP/IP suite responsible for error messages when services or destinations are unreachable. ICMP is used directly by the ping and trace route utilities.

IPsec – Internet Protocol Security is a TCP/IP suite protocol that provides authentication and encryption similar to SSH, but at the network level for packets, making any type of TCP/IP communication secure. It has been back-engineered into IPv4, and is required under IPv6 for interoperability.

IPX – Novell Internetwork Packet Exchange, a protocol used by Novell NetWare systems that has become depreciated since the acceptance of TCP/IP

Appletalk – A proprietary Apple protocol, depreciated and no longer supported in the latest releases of Apple’s operating system.

CLNS/DECNet – Connectionless Network Service. A connectionless protocol that is not found on the internet, but still used in many telecommunications networks.

Video Tutorials – Routing Basics