Dumb question
jscimeca715
Member Posts: 280
in CCNA & CCENT
Okay, I know there are no dumb questions, but I really think this is a dumb question. I'm studying for the CCENT and every now and then come up with a problem I can't work through conceptually in my head. Here's a scenario:
You have two routers: Router A and Router B. Each have a LAN connection to a switch and five hosts or so. That part really isn't important, but let's say Router A and B are connected via leased line (T1) for example. However, Router A is the only one set up to use NAT and has a connection to the internet. Do the hosts on Router B send their packets to Router A, then use NAT to get out to the internet? Or does each Router need an internet connection?
My gut feeling is that the answer to the second question is no, and the first one is yes. I'm just struggling with it conceptually. I'm assuming that Router B would have a connected route to router A, but what if a packet was destined for an internet address? Would Router B need a default route? Again, I'm assuming the answer would be yes?
I know this is a dumb question, and I'm pretty confident that I'm understanding it properly, especially after I've written it down. However, this forum is always good for pointing out things that I'm not catching...so any help is appreciated.
You have two routers: Router A and Router B. Each have a LAN connection to a switch and five hosts or so. That part really isn't important, but let's say Router A and B are connected via leased line (T1) for example. However, Router A is the only one set up to use NAT and has a connection to the internet. Do the hosts on Router B send their packets to Router A, then use NAT to get out to the internet? Or does each Router need an internet connection?
My gut feeling is that the answer to the second question is no, and the first one is yes. I'm just struggling with it conceptually. I'm assuming that Router B would have a connected route to router A, but what if a packet was destined for an internet address? Would Router B need a default route? Again, I'm assuming the answer would be yes?
I know this is a dumb question, and I'm pretty confident that I'm understanding it properly, especially after I've written it down. However, this forum is always good for pointing out things that I'm not catching...so any help is appreciated.
Comments
-
meadIT Member Posts: 581 ■■■■□□□□□□Hosts connected to Router B wouldn't send their data directly to Router A to get to the internet. They would give them to Router B and then Router B would forward them to Router A. So Router B would need to have Router A as its default gateway.CERTS: VCDX #110 / VCAP-DCA #500 (v5 & 4) / VCAP-DCD #10(v5 & 4) / VCP 5 & 4 / EMCISA / MCSE 2003 / MCTS: Vista / CCNA / CCENT / Security+ / Network+ / Project+ / CIW Database Design Specialist, Professional, Associate
-
jscimeca715 Member Posts: 280Hosts connected to Router B wouldn't send their data directly to Router A to get to the internet. They would give them to Router B and then Router B would forward them to Router A. So Router B would need to have Router A as its default gateway.
Is there a way to set up a default gateway on a Cisco router? Is that the same as setting up a default route? -
meadIT Member Posts: 581 ■■■■□□□□□□jscimeca715 wrote: »Is there a way to set up a default gateway on a Cisco router? Is that the same as setting up a default route?
Yep, same thing, different terms. Also called gateway of last resort. Although there are different commands to use depending on the situation:
You use ip default-gateway when ip routing is disabled.
ip default-network or ip route 0.0.0.0 0.0.0.0 xxx.xxx.xxx.xxx is used when routing is enabled.
You can learn more here: Configuring a Gateway of Last Resort Using IP Commands - Cisco SystemsCERTS: VCDX #110 / VCAP-DCA #500 (v5 & 4) / VCAP-DCD #10(v5 & 4) / VCP 5 & 4 / EMCISA / MCSE 2003 / MCTS: Vista / CCNA / CCENT / Security+ / Network+ / Project+ / CIW Database Design Specialist, Professional, Associate -
jscimeca715 Member Posts: 280Yep, same thing, different terms. Also called gateway of last resort. Although there are different commands to use depending on the situation:
You use ip default-gateway when ip routing is disabled.
ip default-network or ip route 0.0.0.0 0.0.0.0 xxx.xxx.xxx.xxx is used when routing is enabled.
You can learn more here: Configuring a Gateway of Last Resort Using IP Commands - Cisco Systems
Excellent, I appreciate your help. I'm familiar with how to set up a default route and understand the real-life implications now. -
daJway Member Posts: 15 ■□□□□□□□□□dealing with NAT. If you have two routers connected together Router A and Router B. You have a lan comming off Router A and the internet gateway is through Router B. Only Router B (The gateway) needs to have NAT running.
Remember IP addresses do not change from hop to hop, so if you have a host off router A trying to connect to the internet with the IP of 192.168.1.2 when it reaches router B the source IP will still be 192.168.1.2 and the internet gateway (aka router will have to use NAT to turn translate it into a public address.
As for default routes. the host will use router A as its default gateway because that's what it is connected to. Router A if it does not have a protocol running such as RIP (which you will need to know how to set up in a simulation on the ccent) you will need to set up a default static route on router A (ip route 0.0.0.0 0.0.0.0 next hop address/or exit interface). Router B will need a static route to the LAN.
hope that helps.
need any help you can message me if you need a more clear explanation. daJway@hotmail.comJason -
jscimeca715 Member Posts: 280dealing with NAT. If you have two routers connected together Router A and Router B. You have a lan comming off Router A and the internet gateway is through Router B. Only Router B (The gateway) needs to have NAT running.
Remember IP addresses do not change from hop to hop, so if you have a host off router A trying to connect to the internet with the IP of 192.168.1.2 when it reaches router B the source IP will still be 192.168.1.2 and the internet gateway (aka router will have to use NAT to turn translate it into a public address.
As for default routes. the host will use router A as its default gateway because that's what it is connected to. Router A if it does not have a protocol running such as RIP (which you will need to know how to set up in a simulation on the ccent) you will need to set up a default static route on router A (ip route 0.0.0.0 0.0.0.0 next hop address/or exit interface). Router B will need a static route to the LAN.
hope that helps.
need any help you can message me if you need a more clear explanation. daJway@hotmail.com
Thanks a lot, I have this pretty clear in my head now. I have RIP configuration down hard and I am currently practicing NAT using SDM. I think I should be good to go. I may ask you a few questions if I'm struggling with concepts. I'm pretty confident now that I'll pass but with two weeks to go I could probably use a little help here and there.