User avatar
scottsee
Post Whore
Posts:
1804
Joined:
Wed Feb 10, 2010 2:45 am
Certs:
NA:R&S, NA:Sec

Little PC configuration help

Fri Nov 12, 2010 1:53 am

How do you configure your PC to use both the Internet and SSH to your local rack at the same time without having to disable one of your interfaces?
This probably sounds weird, and you're thinking "dude, seriously?", but my desktop is connected to my rack, and using wifi for internet access, and because I have two different default gateways configured, one for Rack's 10.1.1.1, and my wifi's private 192.168.1.1 IP. When both are enabled and I try to connect to anything I just get timed out.. So, I've just been disabling one of the interfaces when I'm on the rack or when I use the internet.

My netstat -r shows duplicate static 0.0.0.0 routes to both 10.1.1.1 and 192.168.1.1. Do I just need to take the racks default gateway out, go into the PC's routing table and add a 10.0.0.0 route to 10.1.1.1?

I haven't put much thought into it, but I realized I didn't know how to do this.. :whistle:

User avatar
HighFreak1c
Ultimate Member
Posts:
673
Joined:
Wed Sep 01, 2010 7:14 am
Certs:
CCNA, CCNA Voice, CCNA Security

Re: Little PC configuration help

Fri Nov 12, 2010 2:01 am

Don't use 2 default gateways. Add a static route (docs here) for your private addressing within your racks to reach them. Specify your network ranges using the netmask, and make sure you specify the interface they should be exiting on.

Your default gateway really should only point toward your router (and thus the Internet).
Study, study, study...
Believe yourself~
Do more than say!
At proper time, try some dumps!
Then succeed belongs to you!!

User avatar
scottsee
Post Whore
Posts:
1804
Joined:
Wed Feb 10, 2010 2:45 am
Certs:
NA:R&S, NA:Sec

Re: Little PC configuration help

Fri Nov 12, 2010 2:09 am

Voila. Thanks.

User avatar
jdsilva
Post Whore
Posts:
5347
Joined:
Mon Jan 17, 2005 11:01 pm
Certs:
CCNP

Re: Little PC configuration help

Fri Nov 12, 2010 2:15 am

So then this means that you have a DHCP on your "rack" network? If not and you're using statics then just leave the default gateway blank and use statics (as needed) as HighFreak1c describes.

If you are using DHCP on your rack network then either remove that filed on the dhcp server or... hrm I'm not sure. I know there's a metric field in your netstat -r (or at least it's in 'route print' and since I don't have a windows box to look I'm guessing) that should indicate preference in which default gateway gets used.

I would hazard a guess that the static default gateway you're setting for your rack network has a better metric than the gateway learned from your internet connected router.

**edit, ok so in the time it took me to type this you fixed it. Nevermind... But i"m still posing it :P

User avatar
scottsee
Post Whore
Posts:
1804
Joined:
Wed Feb 10, 2010 2:45 am
Certs:
NA:R&S, NA:Sec

Re: Little PC configuration help

Fri Nov 12, 2010 2:37 am

That's exactly right Infinite.

Code: Select all
Network Destination        Netmask          Gateway       Interface  Metric
          0.0.0.0          0.0.0.0      192.168.1.1      192.168.1.2     25
          0.0.0.0          0.0.0.0         10.1.1.1       10.1.1.100    276


I took the 10.1.1.1 Default Gateway out, flushed the routing table, rebooted and things are A-OK.. For the moment I'm just using Static IP's

HighFreak1c wrote:Don't use 2 default gateways. Add a static route (docs here) for your private addressing within your racks to reach them. Specify your network ranges using the netmask, and make sure you specify the interface they should be exiting on.

Your default gateway really should only point toward your router (and thus the Internet).


I'll play around with the Route command later, it's something I need to get use to using.. Thanks Guys
Last edited by scottsee on Fri Nov 12, 2010 2:42 am, edited 1 time in total.

User avatar
HighFreak1c
Ultimate Member
Posts:
673
Joined:
Wed Sep 01, 2010 7:14 am
Certs:
CCNA, CCNA Voice, CCNA Security

Re: Little PC configuration help

Fri Nov 12, 2010 2:40 am

Here is what Infinite is talking about.

1) Jump under 'Control Panel' and 'Network Connections'
2) Under 'Tools' click 'Advanced'

Image

3) Select your adapter in order of preferred default gateway

Image

Scott: Whichever way is easiest is best mate :)

That said, I may be necessarily complicating things but I wonder if the fact your router to the Internet should reject private addressing going to the Internet, if you were trying to hit a private address within your rack, the connection to the private IP should be bounced by the primary gateway and theoretically be retried on the second default gateway?
Last edited by HighFreak1c on Fri Nov 12, 2010 2:44 am, edited 1 time in total.
Study, study, study...
Believe yourself~
Do more than say!
At proper time, try some dumps!
Then succeed belongs to you!!

User avatar
scottsee
Post Whore
Posts:
1804
Joined:
Wed Feb 10, 2010 2:45 am
Certs:
NA:R&S, NA:Sec

Re: Little PC configuration help

Fri Nov 12, 2010 2:41 am

That said, I may be necessarily complicating things but I wonder if the fact your router to the Internet should reject private addressing going to the Internet, if you were trying to hit a private address within your rack, the connection to the private IP should be bounced by the primary gateway and theoretically be retried on the second default gateway?


That's kinda what I thought, but apparently flushing my routing table fixed it permanently. I tried to duplicate the problem again, but no matter what I do, shit wont break.. Bahhh.

User avatar
Axis
Post Whore
Posts:
1049
Joined:
Thu Nov 04, 2010 9:55 am
Certs:
CCNA

Re: Little PC configuration help

Fri Nov 12, 2010 6:40 pm

HighFreak1c wrote:That said, I may be necessarily complicating things but I wonder if the fact your router to the Internet should reject private addressing going to the Internet, if you were trying to hit a private address within your rack, the connection to the private IP should be bounced by the primary gateway and theoretically be retried on the second default gateway?


Technically the 10. doesn't need a gateway because the traffic never needs to get out of that subnet. Since the ip he's ssh'ing to is on the same subnet as his 2nd NIC he'll be able to hit it without the gateway.

Therefore all internet traffic goes out the interface with the gateway on it, and all private traffic on the 10. subnet goes out the 2nd NIC....windows does not handle 2 NIC's with 2 different gateways very well without some deeper configurations.
The best part about telling UDP jokes is I don't really care if you get them or not.

User avatar
HighFreak1c
Ultimate Member
Posts:
673
Joined:
Wed Sep 01, 2010 7:14 am
Certs:
CCNA, CCNA Voice, CCNA Security

Re: Little PC configuration help

Fri Nov 12, 2010 7:01 pm

Axis wrote:Technically the 10. doesn't need a gateway because the traffic never needs to get out of that subnet. Since the ip he's ssh'ing to is on the same subnet as his 2nd NIC he'll be able to hit it without the gateway.


Well; not necessarily. He's got a bunch of different routers, and routers route between different subnets right?

If he had a network on a router interface somewhere he wanted to connect to it would go to his default gateway by default (unless he adds specific routes to those networks as previously mentioned).
Study, study, study...
Believe yourself~
Do more than say!
At proper time, try some dumps!
Then succeed belongs to you!!

User avatar
eaadams
Post Whore
Posts:
2611
Joined:
Fri Mar 11, 2005 10:26 pm

Re: Little PC configuration help

Sun Nov 14, 2010 6:51 am

I'd use the Windows CLI route add command that HighFreak1c suggested - that I've used many a time on PCs with 2 NICs. It's straightforward and also reinforces fundamental gateway and static routing concepts.

Aubrey
The illiterate of the 21st century will not be those who cannot read and write, but those who cannot learn, unlearn, and relearn. Alvin Toffler, "Future Shock" 1970

User avatar
mellowd
CCIE #38070
Posts:
13814
Joined:
Wed Jun 18, 2008 7:49 am
Certs:
CCIE (RS,SP), JNCIE-SP, BC-/SPNE/NP

Re: Little PC configuration help

Sun Nov 14, 2010 7:22 am

Just remember the -p switch in that route command

User avatar
scottsee
Post Whore
Posts:
1804
Joined:
Wed Feb 10, 2010 2:45 am
Certs:
NA:R&S, NA:Sec

Re: Little PC configuration help

Sun Nov 14, 2010 11:39 am

Thanks for the suggestions. After reading some documentation I'm a little embarrass to say I didn't know much about the route command and why it's important. It's a very useful command when using multiple nic's and wanting to configure redundancy, or disjointed networks not to mention a major windows troubleshooting command. Oh well, I guess that's what I'm here to do. Embarrass myself and learn as I go.. :)

User avatar
eaadams
Post Whore
Posts:
2611
Joined:
Fri Mar 11, 2005 10:26 pm

Re: Little PC configuration help

Mon Nov 15, 2010 5:10 am

scottsee wrote:Thanks for the suggestions. After reading some documentation I'm a little embarrass to say I didn't know much about the route command and why it's important. It's a very useful command when using multiple nic's and wanting to configure redundancy, or disjointed networks not to mention a major windows troubleshooting command. Oh well, I guess that's what I'm here to do. Embarrass myself and learn as I go.. :)
Don't worry about it Scott. I knew all about the netstat command but only this weekend discovered that there was a net command too. :oops:

Aubrey
The illiterate of the 21st century will not be those who cannot read and write, but those who cannot learn, unlearn, and relearn. Alvin Toffler, "Future Shock" 1970

'

Return to scottsee's CCNA Journey

Who is online

Users browsing this forum: No registered users and 5 guests

      cron