You just applied for a job with Cisco. You passed the first round of the interviews. You are now back for the 2nd part. They want you to use a text editor like notepad/notepad++ to write out all the commands that you would need setup this simple network. You’ve been given the 192.168.1.0/24 network. You need to break it up into 5 networks making sure to optimize the amounts of IP addresses.

3 networks of at least 50 clients.

2 WAN links to connect the East and West wings of the building with the center.

On each subnet of the network Cisco wants to see your work on how you designed it.

They want to see:

Each subnet network

Each Broadcast

Each Range of each subnet network

Because it’s a small network they don’t want you to use routing protocols. All routes have to be static. All PC’s should be set to DHCP and “ro” will be the DHCP server for the entire network.

Once you are done all your work you will need to take the laptop that is running the text editor go to the network site and paste the commands onto real devices. Only the students that get 100% will be hired.

Test your Setup

To test your setup you need to be able to go to each PC and be able to ping every other PC on the network.

ServA through ServC will Need to be assigned the first 3 valid addresses of the network.

List the IP addresses, Subnet mask, Gateway of the first and last hosts in BOTH Network 1 AND Network 2. Network #1 Hosts start at the 10th valid address.

The first thing you need to do is look at how many IP addresses you will need in each network.

Network 1 –> 3 server + 40 hosts = 43 IP addresses.

Network 2 –> 10 Hosts = 10 IP addresses.

Network 3 –> 2 Hosts = 2 IP addresses.

Now that you have the numbers you need it’s a good idea you write out these numbers:

We also know we already have 8+8+8 bits from the /24 subnet. We will just add these bits on to the /24.

Let’s look at Network 1

Find out “block size intervals”… Why is this important? It allows us to easily see where subnet starts and Ends! What is the closest number in the chart that is larger than 43. We can see it is 64! A crucial piece of knowledge is finding out the block size intervals starting at Zero. 0,64,128… etc.

Let’s first write out the subnet for the first network. Because we were told we need to use 192.168.10.0 we know we should start with this.

192.168.10.0 /26 (8+8+8+2=26)

Because the first network needs to use 64 hosts we know that the mask will be 255.255.255.192. (128+64). Since we wrote the block sizes out we can easily see the first network is from 0-63, the next (if we required it) is 64-127 etc.

We know the last IP address in the subnet is the Broadcast Address. This means 192.168.10.63 is the broadcast address.

We know the first address 192.168.10.0 is not usable by a host so we know that the usable range of IP addresses is 192.168.10.1 to 192.168.10.62.

Now that we’ve got everything we need let’s write it out in a nice condenses format:

Subnet – 192.168.10.0/26

Broadcast – 192.168.10.63

Range – 192.168.10.1->62

Yay! The first network is done!

Because we’ve already carved out 0->63 we know the next VSLM network needs to start at 64. If we started at 63 or 62 the subnets would overlap and things just wouldn’t work.

Let’s do the same thing for Network 2!

What is the closest number that is larger that 10? We can see it is 16! Let’s find the block sizes starting at the first free network number: 64, 80, 96 …

Let’s first write out the subnet: 192.168.10.64/ 28 (8+8+8+4=28)

Because we of the /28 CIDR notation we know that the subnet mask will be 255.255.255.240 (We got the 240 from 128+64+32+16).

We wrote out the block earlier so we know 64-79 will be the block range for network #2.

The last address is the Broadcast address: 192.168.10.79

We know the usable range of the network will be 192.168.10.65->78

Similar to Network #1 let’s write out everything for Network #2

Subnet – 192.168.10.64/ 28

Broadcast – 192.168.10.79

Range 192.168.10.65->78

Network Number 3

We only need two IP addresses for the WAN link. You should have this burned into your mind that point-to-point networks use a /30 mask.

Because of #2 we know that this net network starts at 80. Remember we don’t want to over lap with a prior network.

So the Subnet will be 192.168.10.80/ 30.

The subnet mask will be 255.255.255.252 (We got the 252 from –> 128+64+32+16+8+4)

Let’s write out the block of 4. 80, 84, 88…81

We know that the 3rd network will be 80-83.

83 is going to be the broadcast address.

From the previous lines we know that our valid IP addresses are 81->82. Look… It’s two host addresses just like we wanted!

Let’s write everything down nicely.

Subnet –192.168.10.80 /30

Broadcast – 192.168.10.83

Range – 192.168.10.81->82

We know have everything we need to answer all the questions!

List the SE interfaces of the Routers:

R1 – 192.168.10.81, 255.255.255.252

R2 – 192.168.10.82, 255.255.255.252

ServA through ServC will Need to be assigned the first 3 valid addresses of the network.

ServA – 192.168.10.1, 255.255.255.192, Default Gateway 192.168.10.62

ServB – 192.168.10.2, 255.255.255.192, Default Gateway 192.168.10.62

ServC – 192.168.10.3, 255.255.255.192, Default Gateway 192.168.10.62

What is the first and last IP address of HOSTS on the network. Remember Network 1 starts at the 10th valid IP address.

We will focus most of this post on #2. Very much like all my post so it makes seeing what device is talking on the network I’ve handed out custom MAC addresses on each device. The MAC address will look like 0010.1111.1111 for PC1(192.168.1.1) and 0010.2222.2222 for PC2 (192.168.1.2). Each computer set to use ROUTER’s closest port as their “Default Gateway”.

All Devices all get turned on all at the same time. Non of them will have any information in their MAC or Routing tables.

I ran an “Arp –a” to prove it doesn’t know a thing about PC4’s MAC address yet. PC1 will ping PC4. Because PC1 has no idea PC4’s MAC address PC1 will need to send out an ARP request to figure out how to get to router one since 192.168.2.4 is not on the same network.

This is how the header will look (notice it doesn’t have a target MAC address yet!)

The Broadcast ARP request is sent to SWITCH1. SWITCH1 now has learned about PC1’s MAC address and put it in it’s MAC Address table.

The ARP broadcast is sent out all ports except the port it came in on. That means PC2, PC3 and ROUTER. Notice how the router breaks up the broadcast domain. PC4->PC6 do not get the request.

Router1 one sends back a request. It put’s PC1’s address in the “Target MAC” address field. It also puts it’s own address in the SRC MAC address field. It also put’s PC1’s MAC address into it’s own MAC Address table.

Because ROUTER’s MAC address is in the SRC MAC field SWITCH1 will now add that address to it’s own MAC Address table:

PC1 now knows how to get to it’s default gateway so that the packet can be routed to the external network 192.168.2.0 /24 network. The Router’s MAC address is added to it’s own MAC address table. PC1 creates a ICMP packet (layer 3) and encapsulates it in an Ethernet frame. That frame has a SRC MAC address of PC1 and a Destination MAC address of ROUTER.

The ping (ICMP) is sent to SWITCH1. Switch knows where 192.168.1.254 is so it directly sends the frame to ROUTER.

When the packet gets to ROUTER, ROUTER realized that it it doesn’t know what the MAC address is of PC4. Because ICMP requests are unicast, the router drops the packet. ROUTER then creates a ARP broadcast to find out what MAC address PC4 has.

Router sends the ARP broadcast out to onto the network to SWITCH2. SWITCH2 will add ROUTER’s mac address to it’s MAC address table.

Switch sends the ARP Broadcast out every port but the port it came in on. PC5 and PC6 drop the request. PC4 says “It’s Me!”

As you would expect PC4 replies back to ROUTER by sending the response back on the network. SWITCH2 will add PC4’s MAC address to it’s MAC address table.

It’s at this point something kind of funky happens. When I first started out I didn’t quite get it. It’s at this exact moment something will change on PC1’s command prompt. You will see a “Request timed out” message. The reason for this is the computer waited to hear back the ping (ICMP) reply but never received one because ROUTER dropped the packet because it didn’t know PC4’s MAC address. This does NOT mean that there is something wrong with the hardware!

PC1 at this point says.. I’ guess something happened to my first ICMP request. I guess I should send request 2 of 4. So it creates a new request.

PC1 will send out the 2nd ICMP ping out to the network. SWITCH1 get’s the frame. SWITCH2 says “Hey I know where ROUTER is” and forwards it directly to ROUTER.

ROUTER and decapsulates the frame. It see’s the packet is needing to be sent on to PC4. It encapsulates the packet in a brand new Ethernet frame. Because of the previous ARP request it now has PC4’s MAC address. **NOTE** – The source MAC address on the new Ethernet Frame is set to ROUTER’s MAC address (gig0/1). The internal SRC IP address in the packet remains the same. If ROUTER changed the SRC IP address to it own IP address, PC4 would never know how to send the packet back to PC1!

ROUTER sends the packet out to the network to SWITCH2

SWITCH receives the frame and looks at the header. Because it knows where PC4’s MAC address it can send the frame directly to PC4.

PC4 receives the frame and sends it back to PC1. It changes the Frame header by setting the originating MAC to itself and the destination address to ROUTER1. The IP address in the reply packet will be for PC1 and the SRC address is PC4’s.

SWITCH2 will send the frame directly to ROUTER because it has it’s MAC address in it’s MAC table.

ROUTER decapsulates the frame and see’s the packet is being sent to the IP address of PC1. It sees that it has PC1’s MAC address. It encapsulates the packet again and makes the SRC address it’s own MAC address. It makes the destination address that of PC1. It sends the packet on its way to to SWITCH1.

Again SWITCH1 knows where to send the frame so it sends it directly to PC1. It knows because it has PC1’s mac address in it’s MAC address table. PC1 receives the ping ICMP reply.

It’s at this very instant that we have completed the loop. PC1 has sent the ICMP request and it was routed to PC4. PC4 responded and it’s response was routed back to PC1. The Command prompt on PC1 will change ever so slightly to inform you that

All subsequent requests (3 to 4) will all get replies assuming that there is no issues with the networking equipment.

Today we are going to see how do switches and hubs interact with each other by tracing packet flow. Here’s the network we are going to be playing with today.

Like my previous article PC1 will have an IP address of 192.168.1.1 — It will be plugged into PORT 1 of the closest networking device and have a mac address with the last 8 characters the same as the number of the PC like 1111.1111. PC2 will have an IP address of 192.168.1.2 — plugged into PORT 2 etc…

Like a Magician I am going to show you nothing is up my sleeve. In order to do this I need to show you the Mac address table on “SWITCH”

As you can see there the switch hasn’t learned any MAC addresses. Reading text books you might here things like “A switch can break up collision domains”. What the heck does that actually mean?

Well in order to understand it you need to know a bit on how Ethernet Works. When a computer on the network say PC1 wants to talk to another computer say PC4 it will always look to it’s own MAC address table. It will ask “Have I talked with host PC4 before?”. If it has it’s arp table will have that computer’s IP address and matching MAC address. If not that means the PC1 will need to use ARP to send out a broadcast message “FFFF:FFFF:FFFFF” and ask the computers if they have the IP address of 192.168.1.4 and if so, please send back their mac address.

What makes this layout a bit harder to understand than if it were just two switches is a HUB is a dumb device. All it does is forward incoming frames out every port but the port it came in on.

Ok. Let’s just get to work and see how the packets will flow:

Let’s start with the same scenario we just talked about. PC1 will Ping PC4. PC1 will try and ping 192.168.1.4 but will have to resort to ARP before it can send the ICMP request out on the line.

The ARP broadcast will be sent down the wire to the HUB.

Because the HUB is dumb it will need to forward the packet out all ports except the one it came from. PC2 and PC3 both know this packet is not for them.

SWITCH doesn’t know anything about PC1. Because the broadcast frame will have the host MAC address as .1111.1111 it will add this to it’s MAC Address list.

It will now forward the packet off to all ports except the port the frame came in on.

PC5 & PC6 reject the frame because it’s not for them. PC4 says… Hey… I have the address of 192.168.1.4. It sends back a reply making sure to set it’s MAC address as the originating address and puts PC1’s address in the destination field. Because PC4 now knows PC1’s MAC address he does not need to send an ARP request to figure it out. He will also add PC1’s MAC address in his MAC address table.

PC4 sends the reply back to SWITCH.

SWITCH will put PC4’s MAC address into it’s MAC address table so when the PC1 actually sends the ICMP ping request it will know how to resolve IP Address 192.168.1.4 down to the MAC address of: 0010.4444.44444

SWITCH will send the response back to HUB.

Again since HUB is dumb he has to send it out every port except the one it came in on. PC2 and PC3 will drop the frame. PC1 will now know how to send the ping request!

PC1 can now ping PC4 as directly as it can. The frame will be sent down to the Hub.

Similar to how the arp broadcast went PC2 and PC3 will get the same frame because the NUB just blurts out everything it hears on the ports the information didn’t come in on.

This is where the smarts of the switch come in. Because it knows what port the MAC address 0001.1111.1111 is it sends it to only that port. ie. PC5 and PC6 don’t get the frame like PC2 and PC3 did in the last step.

PC4 will send the frame down to SWITCH

SWITCH will send the frame to HUB

You got it! Hub will forward it out ALL ports except the one it came in on. PC2 and PC3 will drop the frame.

When PC1 gets the reply you will notice the command prompt change on PC1 and look something like this:

This process will happen three more times and the pings will be done:

At this point other than PC1 and PC4 no other computers on this network knows any other MAC address.

A good question you might ask yourself… Right after all this happened… What would happen if PC6 were to ping PC3?

After going through a ton of books and videos I am making a full series of Mind Maps and how technology links to “Ethernet Networking”. This post will cover some of more common types of cables, their lengths, speeds what they look like.