cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1344
Views
0
Helpful
6
Replies

Two subnets with 1 router and switch?

jasonfaas
Level 1
Level 1

I may very well be overlooking something as I am still very new to this but one of my practices for an exam coming up is having to be able to use 1 router(4221 it says), 1 switch (2960), and 2 pcs, and I have to create two subnets.  It says in the table that I have to use G0/0/0 AND g0/0/1 on the router, but if there is only one switch, how does that work?

1 Accepted Solution

Accepted Solutions

jasonfaas
Level 1
Level 1

Thank you for the replies.  After a second look, I checked out the topology at the top of the project and it showed the router being directly connected to one of the PC's on one subnet (G0/0/1) and a switch and PC on the other subnet (G0/0/0) so it finally made sense.  I eventually did it all and everything worked, except I got to the point where I could ping everything EXCEPT the VLAN 1 interface on the switch and only with IPv6.  I could ping it with IPv4.  I made sure I had IPv6 unicast-routing enabled on the router and had "sdm prefer dual-ipv4-and-ipv6 default" and reloaded the switch and still couldnt get it.  The odd thing was I could ping right through it to the PC attached to the switch.  Any ideas?  I eventually went and made static routes on the switch and router and I think it worked, however I didnt think at the time that this was necessary since it would ping through the switch to the PC.

View solution in original post

6 Replies 6

balaji.bandi
Hall of Fame
Hall of Fame

In most cases 1 Interface towards the internet, 1 connected to Lan. with that assumption below example help you :

 

Router on a stick is the config :

 

https://networklessons.com/cisco/ccna-routing-switching-icnd1-100-105/how-to-configure-router-on-a-stick

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Hello


@jasonfaas wrote:

I may very well be overlooking something as I am still very new to this but one of my practices for an exam coming up is having create two subnets.  It says in the table that I have to use G0/0/0 AND g0/0/1 on the router,

 

 how does that work?


You would use say gig0/0 for the WAN ( internet) connection and Gig0/1 for the two subnets, so making the router itself perform the inter-vlan routing (between the subnets) , I would also say you require Network Translation but as the question doesnt mention providing internet connectivity for the subnets we can leave this out.

Example router on a stick with two subnets (lets call them vlan 10 & 11)  :

Router

int gig0/0

description WAN
ip address x.x.x.x y.y.y.y.
no shut

interface gig0/1
description LAN
no shut

interface gig0/1.10
description Vlan10
encapsulation dot1q 10
ip address 192.168.10.1 255.255.255.0

interface gig0/1.11
description Vlan11
encapsulation dot1q 11
ip address 192.168.11.1 255.255.255.0

ip dhcp pool LAN
network 192.168.10.0/24
default-router 192.168.10.1
network 192.168.11.0/24 secondary
override default-router 192.168.11.1
lease 0 8


Switch
vlan 10,11
exit


interface gig0/1
description trunk to router
switchport trunk encapsulation dot1q
switchport mode trunk
no shut

interface gig0/2
description host in vlan 10
switchport host
switchport access vlan 10
no shut

interface gig0/3
description host in vlan 11
switchport host
switchport access vlan 11
no shut


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

Jon Marshall
Hall of Fame
Hall of Fame

 

If that is all the question asks then there is no mention of the internet so no need for routing on a stick. 

 

Just create two vlans on the switch with a subnet each and then put g0/0/0 and one of the PCs in the first vlan and gi0/0/1 and the second PC in the other vlan.

 

Jon

Hello,

 

this sounds like a Packet Tracer project. I think what they want you to do is create two Vlans on the switch. The entire thing would look like the project in the attachment.

Hello

Creating two vlans on a 2960 -well yes but with limited L3 functionality as its really just access-layer switch.


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

jasonfaas
Level 1
Level 1

Thank you for the replies.  After a second look, I checked out the topology at the top of the project and it showed the router being directly connected to one of the PC's on one subnet (G0/0/1) and a switch and PC on the other subnet (G0/0/0) so it finally made sense.  I eventually did it all and everything worked, except I got to the point where I could ping everything EXCEPT the VLAN 1 interface on the switch and only with IPv6.  I could ping it with IPv4.  I made sure I had IPv6 unicast-routing enabled on the router and had "sdm prefer dual-ipv4-and-ipv6 default" and reloaded the switch and still couldnt get it.  The odd thing was I could ping right through it to the PC attached to the switch.  Any ideas?  I eventually went and made static routes on the switch and router and I think it worked, however I didnt think at the time that this was necessary since it would ping through the switch to the PC.

Review Cisco Networking for a $25 gift card