?
Solved

Find the interface a subnet is going out on a router

Posted on 2013-01-11
5
Medium Priority
?
198 Views
Last Modified: 2013-01-25
I want to know how to find the interface a subnet's traffic is leaving on a router for example:
subnet 192.168.0.0?
0
Comment
Question by:dsterling
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 

Expert Comment

by:128bits
ID: 38769406
Is it a consumer grade, i.e. home router or is it cisco, juniper etc router?
If it's a cisco router you can do:

show ip route 192.168.0.0

and it will show you the outgoing interface and ip address of the next hop
0
 
LVL 20

Accepted Solution

by:
rauenpc earned 2000 total points
ID: 38769421
If the above command responds with "subnet does not exist" use the command
Show ip route 192.168.0.0 255.255.255.0 longer-prefix

Substitute network and mask with whatever you're looking for. If there are no routes, it will show you your gateway of last resort.
0
 

Author Comment

by:dsterling
ID: 38769439
Comments are great, but I don't see a route and it's not showing the gateway of last resort, could that be the gateway of last resort is not set? It does have a default-gateway IP?
0
 
LVL 17

Expert Comment

by:rochey2009
ID: 38769594
Hi,

Which router do you have?
Is ip routing enabled?
Please can you post a sanitised version of the configuration.
0
 
LVL 20

Expert Comment

by:rauenpc
ID: 38770070
Normally the default-gateway command is only used if a router is only being used as a bridge.
ip route 0.0.0.0 0.0.0.0 1.1.1.1
Is the normal method to set the default gateway where 1.1.1.1 is the gateway to the rest of the network/internet.
0

Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will show you with short command examples how to obtain a packet footprint of all traffic flowing thru your Juniper device running ScreenOS. I do not know the exact firmware requirement, but I think the fprofile command is availab…
There are two basic ways to configure a static route for Cisco IOS devices. I've written this article to highlight a case study comparing the configuration of a static route using the next-hop IP and the configuration of a static route using an outg…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question