Routing question...
Jason R
Member Posts: 34 ■■□□□□□□□□
in CCNA & CCENT
Here's what I have:
ip dhcp pool DHCP
network 192.168.111.16 255.255.255.240
default-router 192.168.111.30
dns-server 192.168.111.67
The devices in the network is 1 router, 1 switch, and a couple clients. I know that the dns-server is in a different subnet than the PCs will be in. So, I know that I need a route in the routing table so that the router can forward packets from the client PCs to the to the network in which the DNS server resides. So.. I'm thinking a static route? My first thought is - ip route 192.168.111.64 255.255.255.240 192.168.111.30. My reasoning ...192.168.111.64 is the network address for the DNS server, and to contact it go threw the default gateway which is 192.168.111.30. I appreciate any insight on this. Hopefully I'm on the right track.
ip dhcp pool DHCP
network 192.168.111.16 255.255.255.240
default-router 192.168.111.30
dns-server 192.168.111.67
The devices in the network is 1 router, 1 switch, and a couple clients. I know that the dns-server is in a different subnet than the PCs will be in. So, I know that I need a route in the routing table so that the router can forward packets from the client PCs to the to the network in which the DNS server resides. So.. I'm thinking a static route? My first thought is - ip route 192.168.111.64 255.255.255.240 192.168.111.30. My reasoning ...192.168.111.64 is the network address for the DNS server, and to contact it go threw the default gateway which is 192.168.111.30. I appreciate any insight on this. Hopefully I'm on the right track.
Comments
-
Mrock4 Banned Posts: 2,359 ■■■■■■■■□□If you need a static route, why not just use:
ip route 192.168.111.67 255.255.255.255 192.168.111.30
This will just cover that one device..your static route which encompass the entire subnet (from 192.168.111.64 thru 192.168.111.79). If you want all traffic destined to .65 - 78 (usable addresses on that subnet), then your method will work. -
Jason R Member Posts: 34 ■■□□□□□□□□Mrock4 - I thought I had to designate the network in which the DNS server resided. I have been practicing static routes instead of using RIP, and I believe that is was caused me to get confused. Thank you for the advice. I appreciate it.
-
Jason R Member Posts: 34 ■■□□□□□□□□Question - For your route - ip route 192.168.111.67 255.255.255.255 192.168.111.30 - Why did you use 255.255.255.255 instead of 255.255.255.240? - Thanks.
-
Futura Member Posts: 191Mrock4 - I thought I had to designate the network in which the DNS server resided. I have been practicing static routes instead of using RIP, and I believe that is was caused me to get confused. Thank you for the advice. I appreciate it.
Your DNS Server could reside anywhere, so long as a route to it exists your good to go. -
Mrock4 Banned Posts: 2,359 ■■■■■■■■□□Question - For your route - ip route 192.168.111.67 255.255.255.255 192.168.111.30 - Why did you use 255.255.255.255 instead of 255.255.255.240? - Thanks.
Jason, the 255.255.255.255 will match exactly that one IP (192.168.111.67). The mask 255.255.255.240 will match 64 - 79 (the entire subnet) since the "interval" is 16...you find the interval/increment by subtrating the interesting octet (4th octet in your example) from 256. That leaves us 16. So your subnet address is 64- add 16 and that's the next subnet address..so the broadcast is one below, which is 79. -
Jason R Member Posts: 34 ■■□□□□□□□□Would my route cause unnecessary overhead or is it just not the most efficient route?
-
Mrock4 Banned Posts: 2,359 ■■■■■■■■□□In a way, neither. You see, it would route the traffic you want the same as the route I had posted, but it would also route other traffic which you may have not intended to be routed that way. I wouldn't call it inefficient, because it's still routing in the same manner either way you look at it.
Truthfully, though, often times if you do need static routes in production environments, you'll see them implemented in the manner you presented- so it's perfectly acceptable, but generally speaking you want to be as specific as possible so there's no unintended consequences. -
Jason R Member Posts: 34 ■■□□□□□□□□Mrock, when I plug in that route it says invalid next hop address (its this router) ... any ideas?
-
networker050184 Mod Posts: 11,962 ModYou need to point the next hop to the other side of the link.An expert is a man who has made all the mistakes which can be made.