04-20-2022
10:09 AM
- last edited on
04-25-2022
05:28 AM
by
Translator
Hi there,
I was wondering if anyone could help me out at all.
The scenario is that I have created 2 sub interfaces on a router for VLANs 10 and 20 and enabled dot1q trunking.
I have split 192.168.0.0/24 into 4 subnets with VLAN 10 being subnet 0 and VLAN 20 being subnet 1.
ARE THESE CORRECT FOR 4 SUBNETS?
Subnet 0 is 192.168.0.0 255.255.255.252 (1st usable 192.168.0.1 last usable 192.168.0.62 )
subnet 1 is 192.168.0.63 255.255.255.252 (1st usable 192.168.0.64 last usable 192.168.0.126 )
subnet 2 is 192.168.0.127 255.255.255.252 (1st usable 192.168.0.128 last usable 192.168.0.190 )
subnet 3 is 192.168.0.191 255.255.255.252 (1st usable 192.168.0.192 last usable 192.168.0.254 )
On the layer 2 switch VLAN 10 needs to be created and associated with interfaces Fa0/6 - 12 and VLAN 20 needs to be created and associated with interfaces Fa0/13 - 18.
Dot1q trunking needs to be enabled through Fa0/5.
Are the commands as follows:
config t
interface range Fa0/6 - 12
switchport mode access
switchport access vlan 10
interface range Fa0/13 - 18
switchport mode access
switchport access vlan 20
interface Fa0/5
switchport mode trunk
I am not sure if what i have done above is correct.
I then need to connect the PC to Fa0/18 and give it an IP address within subnet 1 so I can ping the router (99.0.0.2)
My current configuration does not work and any help would be very appreciated
Many thanks,
Neil
Solved! Go to Solution.
04-20-2022
10:29 AM
- last edited on
04-25-2022
05:35 AM
by
Translator
Neil
You are off to a good start but several details are not correct (subnet mask and beginning/ending addresses):
Subnet 0 is 192.168.0.0 255.255.255.192 subnet 1 is 192.168.0.64 255.255.255.192 (1st usable 192.168.0.65 last usable 192.168.0.126 ) subnet 2 is 192.168.0.128 255.255.255.192 (1st usable 192.168.0.129 last usable 192.168.0.190 ) subnet 3 is 192.168.0.192 255.255.255.192 (1st usable 192.168.0.193 last usable 192.168.0.254 )
Your switch commands look pretty good to assign ports to vlans and to configure the trunk port. On some switches you might need to explicitly configure the vlan and give it a name. Not sure if that applies to your switch or not. The output of the command show vlan would be a way to check on this.
To verify that the switch is as expected it would help if you post the output of the command show interface status on the switch.
We do not have any detail about the configuration of the router, especially its subinterfaces. So can not address that part yet.
04-20-2022 10:18 AM
if you like to make 4 subnet from /24 it will be /25 with mask of 255.255.255.192
192.168.0.0 | 192.168.0.1 - 192.168.0.62 | 192.168.0.63 |
192.168.0.64 | 192.168.0.65 - 192.168.0.126 | 192.168.0.127 |
192.168.0.128 | 192.168.0.129 - 192.168.0.190 | 192.168.0.191 |
192.168.0.192 | 192.168.0.193 - 192.168.0.254 | 192.168.0.255 |
If you configured router on stick all should work as expected.
you can look example :
still issue post show run from both the devices ?
I then need to connect the PC to Fa0/18 and give it an IP address within subnet 1 so I can ping the router (99.0.0.2)
not sure how your network, this ip looks for me public ?
04-20-2022 10:18 AM
Hello,
if this is a Packet Tracer project, post the zipped project (.pkt) file...
04-20-2022
10:29 AM
- last edited on
04-25-2022
05:35 AM
by
Translator
Neil
You are off to a good start but several details are not correct (subnet mask and beginning/ending addresses):
Subnet 0 is 192.168.0.0 255.255.255.192 subnet 1 is 192.168.0.64 255.255.255.192 (1st usable 192.168.0.65 last usable 192.168.0.126 ) subnet 2 is 192.168.0.128 255.255.255.192 (1st usable 192.168.0.129 last usable 192.168.0.190 ) subnet 3 is 192.168.0.192 255.255.255.192 (1st usable 192.168.0.193 last usable 192.168.0.254 )
Your switch commands look pretty good to assign ports to vlans and to configure the trunk port. On some switches you might need to explicitly configure the vlan and give it a name. Not sure if that applies to your switch or not. The output of the command show vlan would be a way to check on this.
To verify that the switch is as expected it would help if you post the output of the command show interface status on the switch.
We do not have any detail about the configuration of the router, especially its subinterfaces. So can not address that part yet.
04-21-2022 02:15 AM
Thankyou for your help everyone, managed to do this part of the activity. It was the subnet mask that was causing my problems.
I'm very grateful.
Neil
04-23-2022 02:56 PM - edited 04-24-2022 08:32 AM
Hi Neil,
If you saw my previous message I have sorted it out.
Many thanks anyway.
Rach
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide