Showing posts with label challenge. Show all posts
Showing posts with label challenge. Show all posts

The Sunday challenge: Minimalist networking

This week's challenge is all about minimalist networking. What do I mean by minimalist? Well, this one is all about routing table sizes. Smaller routing tables are more efficient.

This is what we are dealing with today:

Minimalist networking

Our goal is to get R7 to see all of the networks, but have as few entries in it's routing table as possible. There is a clue to the second challenge, and I promise that it's not a RED HERRING!

We will use OSPF for this one, and you can download the initial topology from the forum.

Let's start by planning the OSPF topology. Can we run area 0 though the entire network? Sure we can, but is that the best design? Not really. We have a number different sites, so we should use separate areas, something like this:


Challenge 1 (level: Medium):

1: Set up the basic OSPF configuration on the routers.
2: Advertise the /32 prefix for all the links (such as "network 5.6.7.7 0.0.0.0 area 0")
3: Add the loopback interfaces where necessary! Only add the preconfigured loopback interfaces (shown on the diagram) to OSPF.
4: I have put in one simple troubleshooting step.

By the end of this part, R7's routing table should look like this:
R7(config-if)#do sh ip route | b Gate
Gateway of last resort is not set

      1.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
O IA     1.1.1.1/32 [110/21] via 5.6.7.5, 00:06:31, Ethernet0/0
O IA     1.2.5.0/24 [110/20] via 5.6.7.5, 00:06:41, Ethernet0/0
      2.0.0.0/32 is subnetted, 1 subnets
O IA     2.2.2.2 [110/21] via 5.6.7.5, 00:06:31, Ethernet0/0
      3.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
O IA     3.3.3.3/32 [110/21] via 5.6.7.6, 00:04:04, Ethernet0/0
O IA     3.4.6.0/24 [110/20] via 5.6.7.6, 00:04:14, Ethernet0/0
      4.0.0.0/32 is subnetted, 1 subnets
O IA     4.4.4.4 [110/21] via 5.6.7.6, 00:04:04, Ethernet0/0
      5.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        5.6.7.0/24 is directly connected, Ethernet0/0
L        5.6.7.7/32 is directly connected, Ethernet0/0
      7.0.0.0/32 is subnetted, 1 subnets
C        7.7.7.7 is directly connected, Loopback0
R7(config-if)#

Challenge 2 (level: Advanced):

Get the routing table of R7 to look like this:
R7(config-if)#do sh ip route | b Gate
Gateway of last resort is not set

O IA  1.0.0.0/8 [110/20] via 5.6.7.5, 00:00:39, Ethernet0/0
O IA  2.0.0.0/8 [110/21] via 5.6.7.5, 00:00:10, Ethernet0/0
O IA  3.0.0.0/8 [110/20] via 5.6.7.6, 00:00:58, Ethernet0/0
O IA  4.0.0.0/8 [110/21] via 5.6.7.6, 00:00:02, Ethernet0/0
      5.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        5.6.7.0/24 is directly connected, Ethernet0/0
L        5.6.7.7/32 is directly connected, Ethernet0/0
      7.0.0.0/32 is subnetted, 1 subnets
C        7.7.7.7 is directly connected, Loopback0
R7(config-if)#
Make sure that R7 can reach the loopbacks on the diagram:
R7(config-if)#do ping 1.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
R7(config-if)#do ping 2.2.2.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
R7(config-if)#do ping 3.3.3.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
R7(config-if)#do ping 4.4.4.4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 4.4.4.4, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
R7(config-if)#
The key to this challenge is not so much getting the correct answer, but finding out how to get the correct answer. Challenge 2 is more CCNP level than CCNA, but the goal here is to try and find out how to get to the solution!

Answers:


Challenge 1:

R7(config)#router ospf 1
R7(config-router)# 
%OSPF-4-NORTRID: OSPF process 1 failed to allocate unique router-id and cannot start
R7(config-router)#network 5.6.7.7 0.0.0.0 a 0
R7(config-router)#
R7(config-router)#int lo0
R7(config-if)#ip add 7.7.7.7 255.255.255.255
R7(config-if)#interface Ethernet0/0
R7(config-if)#no shutdown

R5(config)#int lo0
R5(config-if)#ip add 5.5.5.5 255.255.255.255
R5(config-if)#router ospf 1
R5(config-router)#network 5.6.7.5 0.0.0.0 a 0
R5(config-router)#

R6(config)#int lo0
R6(config-if)#ip add 6.6.6.6 255.255.255.255
R6(config-if)#
R6(config-if)#router ospf 1
R6(config-router)#network 5.6.7.6 0.0.0.0 a 0
R6(config-router)#
%OSPF-5-ADJCHG: Process 1, Nbr 5.6.7.5 on Ethernet0/1 from LOADING to FULL, Loading Done
%OSPF-5-ADJCHG: Process 1, Nbr 7.7.7.7 on Ethernet0/1 from LOADING to FULL, Loading Done
R6(config-router)#

R1(config)#router ospf 1
R1(config-router)#network 1.1.1.1 0.0.0.0 a 1
R1(config-router)#network 1.2.5.1 0.0.0.0 a 1
R1(config-router)#

R2(config)#router ospf 1
R2(config-router)#network 2.2.2.2 0.0.0.0 a 1
R2(config-router)#network 1.2.5.2 0.0.0.0 a 1
R2(config-router)#
%OSPF-5-ADJCHG: Process 1, Nbr 1.1.1.1 on Ethernet0/0 from LOADING to FULL, Loading Done
R2(config-router)#

R5(config-router)#
R5(config-router)#network 1.2.5.5 0.0.0.0 a 1
R5(config-router)#
%OSPF-5-ADJCHG: Process 1, Nbr 2.2.2.2 on Ethernet0/0 from LOADING to FULL, Loading Done
%OSPF-5-ADJCHG: Process 1, Nbr 1.1.1.1 on Ethernet0/0 from LOADING to FULL, Loading Done
R5(config-router)#

R3(config)#router ospf 1
R3(config-router)#network 3.3.3.3 0.0.0.0 a 2
R3(config-router)#network 3.4.6.3 0.0.0.0 a 2
R3(config-router)#

R4(config)#router ospf 1
R4(config-router)#network 4.4.4.4 0.0.0.0 a 2
R4(config-router)#network 3.4.6.4 0.0.0.0 a 2
R4(config-router)#
R4(config-router)#
%OSPF-5-ADJCHG: Process 1, Nbr 3.3.3.3 on Ethernet0/0 from LOADING to FULL, Loading Done
R4(config-router)#

R6(config-router)#
R6(config-router)#network 3.4.6.6 0.0.0.0 a 2
R6(config-router)#
%OSPF-5-ADJCHG: Process 1, Nbr 3.3.3.3 on Ethernet0/0 from LOADING to FULL, Loading Done
%OSPF-5-ADJCHG: Process 1, Nbr 4.4.4.4 on Ethernet0/0 from LOADING to FULL, Loading Done
R6(config-router)#

Challenge 2:

R5(config)#router ospf 1
R5(config-router)#
R5(config-router)#area 1 range 1.0.0.0 255.0.0.0 
R5(config-router)#area 1 range 2.0.0.0 255.0.0.0 
R5(config-router)#

R6(config)#router ospf 1
R6(config-router)#
R6(config-router)#area 2 range 3.0.0.0 255.0.0.0     
R6(config-router)#area 2 range 4.0.0.0 255.0.0.0
R6(config-router)#
How did you do?

Explanations:

The first challenge is all about making sure that we can actually start OSPF. We need to have a loopback interface up and working if OSPF is to pick a router ID automatically. Therefore we need to create loopback interfaces on R7, R6 and R5. The other option would be to manually assign a router id, using the command "router-id 7.7.7.7", and so on.

Did you catch that R7's interface was shut down? I hope so, otherwise nothing much would work!

Challenge 2 is more CCNP level. So, don't be upset if it took you a little time to get to the answer, and hopefully you did some googling to find out, but also never be afraid to use the context sensitive help. The key here is that we broke OSPF into different areas, that was the clue at the start. Because of this, we can area-based summarization:
R6(config-router)#area ?
  <0-4294967295>  OSPF area ID as a decimal value
  A.B.C.D         OSPF area ID in IP address format

R6(config-router)#area 1 ?
  authentication  Enable authentication
  capability      Enable area specific capability
  default-cost    Set the summary default-cost of a NSSA/stub area
  filter-list     Filter networks between OSPF areas
  nssa            Specify a NSSA area
  range           Summarize routes matching address/mask (border routers only)
  sham-link       Define a sham link and its parameters
  stub            Specify a stub area
  virtual-link    Define a virtual link and its parameters

R6(config-router)#area 1 ran
R6(config-router)#area 1 range ?
  A.B.C.D  IP address to match

R6(config-router)#
Area-based summarization allows us to keep greater control over our routing tables, and smaller routing tables are a good thing!

I hope you have enjoyed this challenge! More to come soon.

The Sunday Subnetting challenge: Less is more

A little subnetting challenge for today! Time to brush off the weekend cobwebs, put the hangover to one side and exercise the grey matter!

This one is all about address space restrictions and conservation of IPs.

Network topology:


Subnetting: Less is More!

Task:

Using the network 10.50.1.0, with the smallest (but usable) network mask, set up IP addressing on all the nodes, and make sure that one node can ping its neighbor. If you want to confirm end to end connectivity through an IGP, then go ahead!

Click here to download the UNL file from the forum.

Solution:

Subnet:

We need to use a /27 subnet here (255.255.225.224). But why?

A /27 subnet will give us 32 addresses. Less the subnet and broadcast address, this leaves us with 30 usable host addresses. A /28 would not give us enough addresses, and a /26 would give us too many.
We can work out the number of addresses we need by counting the number of links in the network that require IP addresses (16), and work out the subnet as follows.

On a piece of paper, write out the octet numbers:
128 64 32 16 8 4 2 1
Then start adding the numbers from the right to the left, until we get to a place that gives us enough addresses:
1+2 = 3 (not enough)
1+2+4 = 7 (not enough)
1+2+4+8 = 15 (not enough)
1+2+4+8+16 = 31 (perfect!)
Then take this number away from 255, to give us the subnet mask:
255-31=224

We now have our subnet mask of 255.255.255.224!

Addressing:

We cannot just start addressing the interfaces using this subnet though, as we cannot have two interfaces with overlapping subnets. Instead we need to further sub-divide our subnet into four groups. We need to address R1 to R2, R2 to R3 and R4, and the office network.

R1 to R2 will need a point-to-point link (a /31), as will R2 to R3 and R2 to R4.

We use /31 subnet masks (255.255.255.254) as these give us just two addresses, which is ideal. Therefore we can number the links as follows:

R1 (e0/0): 10.50.1.2 - R2 (e0/0): 10.50.1.3
R2 (e0/1): 10.50.1.4 - R3 (e0/0): 10.50.1.5
R2 (e0/2): 10.50.1.6 - R4 (e0/0): 10.50.1.7

Notice that I have started R1 with an IP address of 10.50.1.2. We cannot number R1 with 10.50.1.1, and R2 with 10.50.1.2, as these are in different subnets. We could have used 10.50.1.0 an 10.50.1.1, but I don't really like numbering hosts with an IP address with .0 (though it is valid).

The office will use a larger subnet masks

There are 10 interfaces here, so using the same method as above, we need to borrow the first four octets, which will give us 15 addresses (/28), so the subnet for this will be 255-15, which gives us a subnet mask of 255.255.255.240. We cannot start from where the first set ends though, as there will be an overlap. This is why it makes sense to work out the largest section first. Nevertheless, let's work out where we need to start from, it makes for good practice.

With a subnet mask of 255.255.255.224, we can have two /28 subnets, each with 16 addresses in them (14 of which as usable). The first will start at 10.50.1.0, and end at 10.50.1.15, and the second will start at 10.50.1.16 and end at 10.50.1.31. So, we cannot start numbering our office network at 10.50.1.7, as this will overlap into the subnet configured for the other network. Remember that we lose the first and last address to the subnet and broadcast addresses.

So we can start numbering as follows:
R3 (e0/1): 10.50.1.17
R4 (e0/1): 10.50.1.18
R5 (e0/0): 10.50.1.19
R6 (e0/0): 10.50.1.20
R7 (e0/0): 10.50.1.21
R8 (e0/0): 10.50.1.22
R9 (e0/0): 10.50.1.23
R10 (e0/0): 10.50.1.24
R11 (e0/0): 10.50.1.25
R12 (e0/0): 10.50.1.26

If we add an IGP into the mix, then we can get from one side to the other:
R1#sh ip route eigrp | b Gate
Gateway of last resort is not set

      10.0.0.0/8 is variably subnetted, 5 subnets, 3 masks
D        10.50.1.4/31 [90/307200] via 10.50.1.3, 00:01:55, Ethernet0/0
D        10.50.1.6/31 [90/307200] via 10.50.1.3, 00:01:55, Ethernet0/0
D        10.50.1.16/28 [90/332800] via 10.50.1.3, 00:01:55, Ethernet0/0
R1#ping 10.50.1.26           
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.50.1.26, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/2 ms
R1#

How did you get on?