How to connect 2 networks with one router

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Jessuzz94
Posts: 162
Joined: Thu Jun 04, 2015 12:08 pm

Re: How to connect 2 networks with one router

Post by Jessuzz94 »

In bad words, now i can monitor devices with the subnet 2 (192.168.2.0) and can´t with 192.168.1.0 devices
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: How to connect 2 networks with one router

Post by jolson »

Please give the previous article a try and see if you missed anything in the config of your router/switch.
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
Jessuzz94
Posts: 162
Joined: Thu Jun 04, 2015 12:08 pm

Re: How to connect 2 networks with one router

Post by Jessuzz94 »

Okay, i will do from 0 to not lost anything step
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: How to connect 2 networks with one router

Post by jolson »

Sounds good, let us know what you find out!
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
Jessuzz94
Posts: 162
Joined: Thu Jun 04, 2015 12:08 pm

Re: How to connect 2 networks with one router

Post by Jessuzz94 »

Looks like ends in the same way, can ping from pc to the server but from the server to the pc not.

and the tutorial miss the command:

S>configure terminal
S>interface interface fa0/1
S>switchport trunk encapsulation dot1q
S>switchport mode trunk

i dont know whats is missed
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: How to connect 2 networks with one router

Post by jolson »

Does your Windows machine have a firewall? By default, Windows will block icmp traffic. Try turning your firewall off and see if the results are the same.
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
Jessuzz94
Posts: 162
Joined: Thu Jun 04, 2015 12:08 pm

Re: How to connect 2 networks with one router

Post by Jessuzz94 »

disabling the firewall works to ping from nagios to the laptop, (192.168.1.10 to 192.168.2.248), the issue is that now nagios cant ping or monitoring 12.168.1.0 devices, the trunk configuration its supossed to view 1 and 2 subnets right? or just the subnet 2?
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: How to connect 2 networks with one router

Post by jolson »

Those devices will need to be on the same VLAN as Nagios - make sure they're all on switchports with access to VLAN 10.
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
Jessuzz94
Posts: 162
Joined: Thu Jun 04, 2015 12:08 pm

Re: How to connect 2 networks with one router

Post by Jessuzz94 »

So if i have in my laptop (192.168.2.248), a virtualbox with a linux client that have a 192.168.1.40 address, it cant be monitoring?
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: How to connect 2 networks with one router

Post by jdalrymple »

If I understand correctly you have a router on a stick with 2 network segments, 192.168.1.???/?? and 192.168.2.???/??
You have a laptop on the 192.168.2.???/?? segment and you're creating a new network attached to a locally hosted virtual switch within the laptop with a 192.168.1.???/?? network?

If you're hoping that the network inside the laptop will reach outside, you'll have to have an 802.1q capable physical interface and you'll have to create a trunk bridge to get inside then tag the traffic on your virtualbox vswitch. I don't know if virtualbox is capable of that. If the 192.168.1.???/?? network on the opposite side of the vswitch is intended to not be the same segment as that on the other side of the ROOS you'll have to either provide NAT rules or a router and the segments will have to have a different address scheme/mask.

This question really is outside of the scope of the Nagios support forums. I suggest getting help from the folks at stackexchange or Cisco support forums. They'll be better able to make sense of layer 2 and 3 network principals than we will. We will be better able to teach you about enterprise monitoring Cisco switches than they will. That's just how it works.
Locked