Hello Hive and POB community,
hope everyone's doing OK today!
hope everyone's doing OK today!
It's @trippymane and today I wanted to do a post about my Cisco Labs,
with some of the concepts I'm currently studying.
with some of the concepts I'm currently studying.
To be honest I haven't been studying much lately so this will be more of a lab with stuff that I should already know (CCNA level) to give myself a bit of a reminder, I hope slowly to be able to dive into more advanced stuff like the CCNP certification level which is the one I am currently "studying" for.
LAB Scenario
In today's lab I wanted to quickly review DHCP, simple OSPF routing and I wanted to try to add a Syslog server to collect all the logs from the routers in the network.
Software used: GNS3 It's available for free, the IOS images on the other hand will not be included with the software so if you do not have any IOS image there's another good free alternative that is Packet Traced (GNS3 is more advanced but for CCNA level Packet Tracer is still a good alternative.) If you're studying for Cisco stuff like me you probably already know anyway!
Syslog Kiwi - free syslog I will be using in the exercise.
Quick drawing of the network I made out for this exercise:

I did write v10 and v20 on the wrong side but I couldn't be bothered to upload the pic again so I quickly edited it in paint lol
Same network this time recreated in the GNS3 software adding all the needed devices and text descriptions (networks, ports, etc...) for the exercise (I also scratched PC5 and PC6 and the whole VLANs thing as I spent way too much time on this exercise overcomplicating things for myself ahahah so I just simplified it for this post):

This is the network with all the devices turned on and ready to be configured on my GNS3 client (I'm using my laptop for this exercise, i7-6700HQ / 16GB RAM / NVIDIA GTX 960M, still goes strong for my daily usage ahahah)!
Let's dive into the concepts and what configurations we'll do in this exercise:
Basic IP configuration
We will configure first the IP addresses on the router interfaces and the syslog.DHCP
We will configure DHCP servers both on R1 and R2 to give out addresses to PC1-PC2 (10.10.0.0/16 network 1) and PC3-PC4 (192.168.50.0/24 network 2).
Testing: PC1 and PC2 should receive addresses in the 10.10.0.0 range. PC3 and PC4 should receive addresses in the 192.168.50.0 range.Simple OSPF
I will setup a very simple Area 0 OSPF instance between R1, R2 and R3 so they all can exchange routing information and route all the packets through the network. I will use networks 172.16.101.0/30 (R1 to R2 link), 172.16.101.4/30 (R1 to R3 link) and 172.16.101.8/30 (R2 to R3 link) for the OSPF uplinks.
Testing: Once the OSPF is up and running we should be able to communicate between Network 1 and 2, a ping between devices from Network 1 to Network 2 and vice-versa should be enough to test the routing.Syslog Server
As a last thing I will setup a device attached to R3 to act as a Syslog server to collect all the logs from the 3 routers. The Syslog server will be connected to R3 with network 100.200.300.0/30 (With the syslog using 100.200.300.1 static IP address, .2 will be the router side) (This network will be also added to OSPF to allow connectivity from any device on the network)
Hopefully now the drawing (especially the GNS3 one) makes more sense. (Also I'm not an expert lol I'm just a CCNA level engineer so this network may not even make sense 🤣 I'm just doing it really to check again some concepts in an exercise made up by myself rather than doing again one that you can find on the internet and so many people did already and put all the solutions online so it wouldn't really be that challenging for me! LOL).
Let's get to the exercise.
LAB Solution
- First I will configure all the basic IP addressing on the interfaces and on the Syslog server.
- Secondly I will configure the DHCP servers on R1 and R2 to give out addresses in range 10.10.0.0 for Network 1 devices and addresses in range 192.168.50.0 for Network 2 devices.(We can immediately check that PC1,PC2,PC3 and PC4 all have an IP address in their right range to make sure the DHCP servers are working.)
- Then I will configure the Area 0 OSPF instance on R1, R2 and R3. (Single area OSPF)
- Extra testing to check everything is working up to this point!
- Then I will configure our Syslog server connected to R3 and do the configs needed on the routers. The syslog will be configured so it will collect all the logs from R1, R2 and R3.
- For the very end we'll test the syslog and make sure is collecting all the logs, we can create some instances where the routers will create logs and see if the syslog gets them.
1. Basic IP addressing configuration:
First let us configure the basic IP addressing needed for the exercise. We need to set up the IP addresses on the 3 routers for the OSPF config needed later and also the IP addresses on the links facing the Switches (10.10.0.1 on R1 and 192.168.50.1 on R2 which will be respectively the Default Gateway for Network 1 and Network 2).
And the IP addresses on the syslog server and the R3 uplink.
So let's recap:
R1
Int G0/0 - 10.10.0.1 (/16) (Network 1 Default Gateway)
Int G1/0 - 172.16.101.5 (/30) - for OSPF
Int G3/0 - 172.16.101.1 (/30) - for OSPFR2
Int G0/0 - 192.168.50.1 (/24) (Network 2 Default Gateway)
Int G2/0 - 172.16.101.9 (/30) - for OSPF
Int G3/0 - 172.16.101.2 (/30) - for OSPFR2
Int G0/0 - 100.200.300.2 (/30) - for Syslog Server
Int G1/0 - 172.16.101.6 (/30) - for OSPF
Int G2/0 - 172.16.101.10 (/30) - for OSPFSyslog Server
Manual Static configuration - 100.200.300.1 (/30)
Quick config recap:
en
or short for enable
: enable the switch and enter in user mode (you can run just simple show commands from here)
conf t
or short for configure terminal
: enter in configuration mode, here you can change configurations of the switch/router, prompt will change from Router# to Router(config)#
int Gx/x
or short for interface GigabitEthernetx/x
: Enters in interface configuration mode, once you're here you'll see the prompt change from Router(config)# to Router(config-if)#Here depends of the port really, a gig port is Gx/x usually, a fast ethernet is Fx/x, and so on.
desc
or short for description
: Give a description to the interface you're on (in config interface mode)
ip addr
or short for ip address
: (In config interface mode) assigns an IP address to the interface, in format ip address <ipv4-address> <ipv4-subnet-mask>
no shut
or short for no shutdown
: enables the port, by default ports on a Router are in shutdown mode
R1 Config:
en
conf t
int g0/0
desc Def-Gat-Network1
ip addr 10.10.0.1 255.255.0.0
no shut
int g1/0
desc OSPF-Link-to-R3
ip addr 172.16.101.5 255.255.255.252
no shut
int g3/0
desc OSPF-Link-to-R2
ip addr 172.16.101.1 255.255.255.252
no shut
Inside the router:
And the output (just the part we want) of a sh run
(show running-config
) command on R1:
R2 Config:
en
conf t
int g0/0
desc Def-Gat-Network2
ip addr 192.168.50.1 255.255.255.0
no shut
int g2/0
desc OSPF-Link-to-R3
ip addr 172.16.101.9 255.255.255.252
no shut
int g3/0
desc OSPF-Link-to-R1
ip addr 172.16.101.2 255.255.255.252
no shut
Inside the router:
And the output (just the part we want) of a sh run
(show running-config
) command on R2:
R3 Config:
en
conf t
int g0/0
desc Syslog-Link
ip addr 100.200.255.2 255.255.255.252
no shut
int g1/0
desc OSPF-Link-to-R1
ip addr 172.16.101.6 255.255.255.252
no shut
int g2/0
desc OSPF-Link-to-R2
ip addr 172.16.101.10 255.255.255.252
no shut
Inside the router:
And the output (just the part we want) of a sh run
(show running-config
) command on R3:
Syslog Static IP config:
In the Syslog VM inside GNS3 we simply set up a static IP address of 100.200.255.1 subnet mask 255.255.255.252 with Default Gateway 100.200.255.2 (just in case):
Now that the IP address on R3 link to the Syslog and the Syslog are both set we can try to ping between them, let's see.
- Here we can see the Syslog VM inside GNS3 with the IP address we assigned statically and the ping to R3 interface being successful! Great stuff! 😎
- And here the ping from R3 to the syslog! NOT SUCCESSFULL!
The device is directly connected, we can see also in the ip routing table of R3 that the network on which the Syslog lives is known:
So I'm thinking Firewall, Windows may be blocking the connection, let's disable that on the Syslog VM and try again:
And now we can see the ping is successful, if was the Firewall indeed, good stuff, things are going our way! 😎
2. DHCP configuration and initial testing:
Now that the static IP addressing is done we need DHCP to give out the remaining addresses to PC1to4 hosts, OSPF to allow connectivity between left-right and the Syslog (that will be a whole different thing but a quick one 😅)
For the DHCP we're going to create 2 DHCP Pools (in each of those pools we'll add default gateway config too):
- POOL10 on R1 for the subnet 10.10.0.0/16
- POOL20 on R2 for the subnet 192.168.50.0/24
R1 Config:
conf t
ip dhcp excluded-address 10.10.0.1 10.10.0.2
ip dhcp pool POOL10
network 10.10.0.0 255.255.0.0
default-router 10.10.0.1
exit
service dhcp
In the router:
R2 Config:
conf t
ip dhcp excluded-address 192.168.50.1 192.168.50.2
ip dhcp pool POOL20
network 192.168.50.0 255.255.255.0
default-router 192.168.50.1
exit
service dhcp
In the router:
Now we can test DHCP, let's see if PC1-to-4 have the right addresses.
What we expect:
- PC1 and PC2 with IPs in range 10.10.0.x
- PC3 and PC4 with IPs in range 192.168.50.x
For PC1to6 I used a VPC on GNS3, it's a virtualized PC for really basic stuff, and for our scenario it's perfect as we only need to verify that the DHCP is working. (For the Syslog PC I used a proper VM as we need to do more advanced stuff there so a VPC only would have not sufficed!)
Here I leave attached the screen of the VPC once you log in to it:
Let's test the DHCP:
And it's in the right range, it took the first address available .3 (we reserved .1 and .2)
Let's do the same for PC2to4:
![]() | ![]() | ![]() |
---|
Brilliant! As expected PC2 got the .4 IP in 10.10.0.0 range and PC3 and PC4 got their respective .3 and .4 in 192.168.50.0 range! Super!
Super! Everything working as expected, let's move on!
3. OSPF Single Area config:
Here we will deploy a very simple Single Area OSPF Routing configuration.
To do so we just need to enable OSFP on both routers (with command router ospf ID
in global config mode, the ID number is only significant locally to the router but it's always good practice to use the same ID on all the routers in a certain area for better administration).
And then in config-router mode (in which we enter after typing the previous router ospf id command) we need to advertise the networks that we want to be part of the OSPF process with command network x.x.x.x y.y.y.y area z
where x.x.x.x = network, y.y.y.y = wildcard mask of the network (the inverse of the subnet mask basically) and z = ID process-number
Let's get to the config:
R1 Config:
conf t
router ospf 1
network 10.10.0.0 0.0.255.255 area 0
network 172.16.101.0 0.0.0.3 area 0
network 172.16.101.4 0.0.0.3 area 0
1st network statement : Left Network 1
2nd network statement : R1 to R2 link
3rd network statement : R1 to R3 link
In the router:
show run
output:
R2 Config:
conf t
router ospf 1
network 192.168.50.0 0.0.0.255 area 0
network 172.16.101.0 0.0.0.3 area 0
network 172.16.101.8 0.0.0.3 area 0
1st network statement : Right Network 2
2nd network statement : R2 to R1 link
3rd network statement : R2 to R3 link
In the router:
show run
output:
R3 Config:
conf t
router ospf 1
network 100.200.255.0 0.0.0.3 area 0
network 172.16.101.4 0.0.0.3 area 0
network 172.16.101.8 0.0.0.3 area 0
1st network statement : Syslog network
2nd network statement : R3 to R1 link
3rd network statement : R3 to R2 link
In the router:
show run
output:
During this part of the config as I was configuring routers Adjacencies started forming between the OSPF devices, here I leave attached some logs collected:
R1 log:
R2 log:
R3 log:
To end this part I leave attached the show ip route
output of the 3 routers!
As you can see all the networks are now advertised! In the next part we'll concentrate on some general testing to see if everything works well so far!
4: Extra testing (this will make sure everything up to this point is working as expected):
Until this point we tested the communication between R3 and the syslog, made sure the DHCP server is working for PC1to4 and configured OSPF, but we have not tested that yet!
Let's do some general ping testing:
PC1 ping to PC2, PC3, PC4, Syslog:
PC2 ping to PC1, PC3, PC4, Syslog:
PC3 ping to PC1, PC2, PC4, Syslog:
PC4 ping to PC1, PC2, PC3, Syslog:
Syslog ping to PC1, PC2, PC3, PC4:
Looks like all the pings went through with no issue, Great, all good up to here!
(You can see that some of the pings had 2 timeouts, this is most likely due to the fact that because the communication is happening for the very first time the routers have to figure out what's the best route for the packets to go and this is why we have these timeouts. If you notice they happen only when we try to go from Network 1 to 2 or viceversa, also they happen at the first test usually, the second test does not experience timeouts. The local pings between same networks being "local" do not experience any timeout. Also you can see in the last test, the Syslog one, the first ping in each test results with a much higher time above 3000ms, the next ones are normal between 35-45ms.)
5. Syslog configuration:
For the syslog I installed a Windows VM inside GNS3 (you can download any Windows image for free to use for 90 days, this advanced features are missing in Packet Tracer that's why I prefer using GNS3 as you can virtualize pretty much everything if your PC is strong enough) then I installed a free copy of Kiwi Syslog Server inside the VM and this will be our Syslog server where we'll check the logs from the 3 routers.
In order to collect logs in our Syslog server we need first to install the Syslog Kiwi software (a great free syslog software) on our Syslog VM.
To do this we can quickly connect our VM in GNS3 to the NAT and disable the static IP config so we can get an IP address that thorugh the NAT will share the internet from my client (the laptop I am using to do the exercise):
Ignore the static IP address as I temporarily disabled it for this step!
Here you can see inside the VM we got an IP address from NAT and we can ping 8.8.8.8 google dns so we know we have Internet:
Let's download the Syslog software from here and install it:
You know the drill... ahhaha
Now that we have the Kiwi Syslog installed let's remove the NAT and go back to our static 100.200.255.1 configuration! Then let's turn on the Syslog!
I'll quickly configure now on the routers a loopback interface that we'll use as the source of the logs:
R1 - 1.1.1.1
R2 - 2.2.2.2
R3 - 3.3.3.3
After doing this config and writing it to the startup-config I reloaded the 3 routers so the OSPF processes on them could pick up the new loopback addresses and set them up as their RID process number. (Just in case!)
Let's config the logging feature now on the routers, really easy:
conf t
logging 100.200.255.1
logging trap 7
logging source-interface loopback0
In this way we specified to who send the logs, the source interface of the logs and what level, in this case 7 Debugging so all types of logs will be sent out to the server!
Now the last thing to do is setup the addresses on the Kiwi Syslog software in our VM syslog server, to do so we need to go to the Kiwi Syslog Server Setup and specify the source IPs in the input settings:
And this should be it for our Syslog server, now finally let's go ahead to test it! 😎
6. Final syslog testing:
We already tested everything and we can happily say that everything is working as expected, now we only have left to test the Syslog!
To test the Syslog the best way would be to make some actions on the routers and generate some logs (like disconnecting links or bouncing them for example), to make a quick test that will show us all the logs from all the routers I did save all the configs on the three routers and decided to reload all 3 at the same time, in this way we should receive all sorts of logs in our server from the three routers turning on and rediscovering all the OSPF processes we configured earlier!
Let's have a check, to reload I simple select them on GNS3 and right-click Reload (It's like reloading them from the cli in the IOS, this simply pushes that command to the router/switch, but we can do 3 at the same time this way eheheh laziness lol):
And here you can see that the Syslog is working as expected and collecting all the log from the 3 routers (R1 1.1.1.1, R2 2.2.2.2 and R3 3.3.3.3):
Brilliant! This exercise took me a long time but I got to say that having to check and do things multiple times it really helps to memorize them better and it also makes sure that for the next time you configure something where you spent hours on it's going to be easy peasy lemon squeezy ehehe
Final comments:
And this is everything for this study sesh, as usual I miscalculated my timings and something that I thought would take me 2-3 days took me over a week ahahah Initially I was doing also some VLAN stuff in the exercise and I was trying to work with some DHCP Relay Agent configurations as well and at some point it was just too much stuff to get my head around, the post was getting very long, I got stuck at some bits for hours so finally I just decided to scratch the VLANs and DHCP Relay stuff and simplify the exercise to publish this post and be able to move on with a new exercise (and with my life ahahaha LOL) I tend to get stuck in Paralysis by Analysis so this time I tried to avoid it!