Subnet masks and packet tracer (help me get this router working!)
draught
Member Posts: 229 ■■■■□□□□□□
in CCNA & CCENT
I've been working on this all night. It started out simple but I need to go to bed and I'm not sure this a puzzle I can figure out tonight. I know how to use Cisco's IOS to a very limited amount otherwise it would be impossible to configure the vlans on the switch. Actually building a network excellent practice. The diagram is very simple.
Router IP 192.0.1.5 /27
| 1 subnet to link router and switch: 192.0.1.6 /30
Switch Default gateway for the switch: 192.0.0.33 /27
| 1 subnet for PCs: 192.0.0.33 /27
PC
For the PC I used the following IP address: 192.0.0.36 /27
The default gateway on the switch is as follows: 192.0.0.33 /27
I can say I've pinged both the PC from the switch and vice versa with no problems.
Router IP and mask: 192.0.1.5 /30 255.255.255.252
Switch to router LAN link IP and mask: 192.0.1.6 /30
This is where it breaks, I cannot ping the router I've also had some mask errors when trying various numbers so I think that's my problem. I understand subnet masks but I'll admit I was confused with this exercise on what IP address to use. Why 192.0.0.0 or 192.0.1.0 first subnet I picked. I know in theory how the larger IP address are created but yes I do get confused with say. 194.0.0.0 with a 128 block size. Let's say it 194.0.0.128 194.0.1.0, 194.0.1.128 and so on. Do have that right?
Anyway help is appreciated for this problem. I'm guessing just doing this subnetting wrong as I'm supposed to have two unique networks.
Router IP 192.0.1.5 /27
| 1 subnet to link router and switch: 192.0.1.6 /30
Switch Default gateway for the switch: 192.0.0.33 /27
| 1 subnet for PCs: 192.0.0.33 /27
PC
For the PC I used the following IP address: 192.0.0.36 /27
The default gateway on the switch is as follows: 192.0.0.33 /27
I can say I've pinged both the PC from the switch and vice versa with no problems.
Router IP and mask: 192.0.1.5 /30 255.255.255.252
Switch to router LAN link IP and mask: 192.0.1.6 /30
This is where it breaks, I cannot ping the router I've also had some mask errors when trying various numbers so I think that's my problem. I understand subnet masks but I'll admit I was confused with this exercise on what IP address to use. Why 192.0.0.0 or 192.0.1.0 first subnet I picked. I know in theory how the larger IP address are created but yes I do get confused with say. 194.0.0.0 with a 128 block size. Let's say it 194.0.0.128 194.0.1.0, 194.0.1.128 and so on. Do have that right?
Anyway help is appreciated for this problem. I'm guessing just doing this subnetting wrong as I'm supposed to have two unique networks.
Comments
-
iamme4eva Member Posts: 272I don't fully understand your network layout, but the first thing that jumps out is that your PC's default gateway should be the router, not the switch. The Default gateway should be within the same subnet as the PC - the PC will then contact it's default gateway if it needs to contact any IP addresses outside of it's own subnet range.
If you are trying to route between VLAN's, you need to have an interface (or sub-interface) connected per VLAN that has an IP address within that VLAN's subnet range.
The /30 (2 useable IP addresses) would probably not be appropriate in this scenario - that is generally used for point to point serial links between routers.
Hopefully this clarifies something, if not I'm sure somebody clevererer than me will be along soon!!!
In the mean time, there's plenty of stuff worth reading on Google about Inter-VLAN Routing.Current objective: CCNA Security
My blog: mybraindump.co.uk -
boredgamelad Member Posts: 365 ■■■■□□□□□□Sounds like you're getting a bit tripped up on where IP addresses go and what they do.
1 subnet to link router and switch: 192.0.1.6 /30
This is not really correct. This is something you'd configure between two routers, not a router and a switch.
Switches only use IP addresses for remote management, so your idea of setting a subnet between your router and switch is misguided. You can still assign an IP address to the switch but this is not used in regards to traffic between the PC and the router.
If I'm not mistaken, you've just got a simple network set up with 1 router, 1 switch, and 1 PC. If that's the case, you will want something like this (just an example, your IP addresses might be different but as long as your router and PC are in the same subnet it will work):
-
draught Member Posts: 229 ■■■■□□□□□□Thanks I don't know how I didn't realize the error .Probably because I was working at 4:00 AM. I feel dumb, I don't know how I forgot switches did not require their own settings unless they are managed. Switches lack IP addresses because they are multiport repeaters. I also realized the IP address for the router would not work in reality as 192.x.x.x is not a private address.