A cisco lab asks: "create a static route to direct all traffic destined for network 172.16.3.0/24 to use the next hope address of 192.168.2.1 with a distance value of 255"
The way the sentence is built, it took me a while to understand that the traffic is coming out of 192.168.2.1 and is going to 172.16.3.0. Therefore the command will be:
# ip route 172.16.3.0 255.255.255.0 192.168.2.1 255
What I do not understand is why don't we enter the subnet mask for
192.168.2.1, which in this case is the gateway.
Can someone please tell me why don't we put subnetmasks for gateways?
Any 'gateway' used by a host has to locally signifcant to the host. eg. it would be pointless telling a pc is in network "A", that its default route is via router in network "B" ... how does it know how to get to network "B"? So the gateway you give it is in the same subnet as it already and therefpre is using the same network mask.
10.0.0.0/24 is subnetted, 1 subnets C 10.1.1.0 is directly connected, Ethernet0
Router#sh ip int br Interface IP-Address OK? Method Status Protocol Ethernet0 10.1.1.1 YES manual up up Serial0 unassigned YES unset administratively down down Serial1 unassigned YES unset administratively down down
###################################
If you had a network say, 192.168.0.0/16 that resided on the other side of 10.0.0.22 as a gateway: well if you look at the routing table above, 10.0.0.0/24 already has a class C subnet mask. (24 bits) So the router knows that
10.0.0.22 is included in 10.0.0.0/24 which resides on ethernet0. the letter "C" in the routing table means "Connected".
If you'd a coupon to access one of my routers so you can fool around, just go to my website and send email to the support department. They'll hook you up.
Thanks! Matt Sibley Crosswire Labs Real Gear for Real Exams
I appreciate your answers, but I think I have a hard time understanding English here: " .... in the routing table as a connected net." or "... to locally signifcant to the host." etc. The gateway and the host obviously reside on _different_subnets. Why giving the subnet for the host and not giving the subnet for the gateway it's not clear to me.
This is a class A private IP address and format /24 means that there are 8 bits borrowed for subnets or 2^8-2=254 usable subnets
The router table does not show any connection whatsoever to the gateway!
This command is basically to see what IP address is assigned to an interface
So the router knows that
I still do not see your point and find these facts totally irrelevant to my question: why don't we assign a subnet mask to the gateway, which resides on a totally different subnet.
Buddy, I understand your desire to make money, but you do not seem to know your stuff to begin with. I think you _tried_ to answer to my question, so you could advertise your website!!
I do not give a shit about money, and I have plenty of routers and switches in my network. I just could not find the right instructor and course. I dropped from the cisco academy because I joined only for CCNA and they offer
4 semesters, including stuff for Intro 640-821 and ICND 640-811. Simply to make more money!!
Actually they are completely relevant. You are obviously getting hung up on the network classes, which are a red herring in CIDR. Network "Classes" are not significant to the actual practice of subnetting. The only reason anyone even calls a classfull net by its class anymore is that it is easier to say "Class C" than "Slash 24". In CIDR a /24 is a /24, NOT a subnetted class A. The router does NOT care about the class.
Of course your excellent text will undoubtedly "teach" you about classfull networks that have been completely ignored since the early
90's. The only significance of classfull nets for the exam, is what actual number ranges reside in the original classes. Everything else is CIDR.
Now that we've cleared that up, does 10.0.0.22 reside on 10.0.0.0/24? Yes. Does the router know how to get to: 10.0.0.0/24? Yes. So if
10.0.0.22 is a next hop (gateway), why should you specify the subnet mask? The router already knows where it is.
I just offered to give you something for free, and you flame me. Great attitude! Obviously all those resources of your are doing a great job teaching you. Thats why asking questions here right?
If your interested, the "Fast Subnetting" guide on my website explains how to subnet CIDR nets quickly. You won't have time on the exam to screw around with "X bits of class A". Of course at $150 a pop for the exam, I'm sure you'll figure that out eventually.
My offer still stands if your interested in help. But I understand if you choose to decline. Obviously your current study program is helping you effectively.
Best wishes on the exam. Matt Sibley Crosswire Labs Real Gear for Real Exams
A host and its gateway are not in different subnets ... that's the point. How can they be? A host has to use a gateway to get OUT of the subnet so its gateway must be in the same subnet otherwise how is it going to get to it? That's why a host doesn't need to be told the mask for the gateway ... it's in the hosts subnet so must be using the same mask.
Think of a gateway as a door. If you want to get out of your house you use your own door right? I mean, you can't use the door in your neighbours house because you have to get out of your own house to get their so 'your' door must be in 'your' house. Same as a host and its gateway. To get out of its subnet it has to use 'its' door which must be in 'its' subnet.
The > only reason anyone even calls a classfull net by its class anymore is
The format or slash /24 is another way of expressing the subnet mask
255.255.255.0 I repeat, it's exactly the same thing expressed in 2 different ways.
The IP address 10.0.0.0/24 that you used to answer my question (now I understand why you were uncomfortable using the IP addresses in my question) is nothing else but a class A private network IP address with subnet mask
255.255.255.0. That means that there are 2 octets borrowed from the host portion to create subnets. I was in a rush earlier, as a matter of fact there are 16 bits borrowed for subnets or 2^16-2 usable subnets.
The router does NOT care about the class.
I do, because I am the one supposed to create static routing!
Buddy, I am talking about a network, called destined network 172.16.3.0/24, where I am supposed to direct the packets. I am going to do that by using a gateway with an ip address 192.168.2.1, which _should_be_the next_ hope_address. Therefore, we are dealing with 3 different sub/networks, whereas you think as if I am using the gateway of my network.
I can avoid using the subnet mask for the default gateway only if my sub/network IP address ((the source) is the same as the subnet/network of the next-hop IP address of the routed packet. Is this always the case?
Sorry, maybe I was out of line. In an earlier post, there was another guy that suggested me to buy cheap routers and play around with them. That pisses me off because in both cases, I never asked help for routers. I have plenty of routers and switches.
Of course, all the questions on this newsgroup will be related to routers and switches, but does it mean that you are going to offer coupons to every one that asks for help in this field?
This current study program is called cisco academy, and obviously is not helping me effectively because there are many holes in it. TestOUT was the best, unfortunately, it is too difficult for cisco to design a similar exam interface where you can have the text window beside the topology. Cisco likes to hide one behind the others.
Yes, they are! The host is in the network that is the source of the packet, the gateway is the interface (normally the serial interface) of the next hope router via which you send the packets through, so the packet reach the destined network. Just look at the original question.
The command # ip route 172.16.3.0 255.255.255.0 192.168.2.1 is executed on router 1 of the sub/network A, so the packet from the source - sub/network A go to the destination - sub/network B (172.16.3.0 255.255.255.0) via the gateway - serial interface of router 2 (192.168.2.1). Am I missing something simple here, please?
In static routing you specify the door of the neighbour as a gateway, not your door. In other words, if I want to make sure that a certain packet has to be delivered to that neighbour, I have to specify his door. Otherwise, the packets that leave my premises will never get there.
No, you are sounding like an idiot! In static routing, you are specifying the next hop - not gateway. Before you get to that next hop, you have to go through your door!
I'm very rusty 'cos i was studying for CCNA, but haven't looked at this stuff for a while, and haven't done labs. A few things have got in the way. I haven't added static routes before 'cos I haven't doen any labs. But since you clarified. I think I can see the answer
no, they really did change the system. Not only do they not call them classes anymore, but there are a few technical differences
This i'm not so rusty on because I did look into it quite a bit a while back!
It just looks like a Class C. But if they gave you /25, you couldn't call it a class. It's not a subnet either. It's called a block.
And you can't use the block address or block broadcast, there is no such thing. You have to subnet it. That is a technical difference. Beyond semantics.
what if they gave you 210.4.35.6/8 That is not a Class anything.
they may well know/care. An advantage classful addressing was that if an address was for example, 192.168.4.5 then the router didn't need to be told the mask, it knows it's a Class C. This may have took up less memory, and may have been faster to advetise routes. But it used up the available pool of IPs more than was necessary.
Cabling-Design.com Forums website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.