cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1011
Views
5
Helpful
3
Replies

vlan gateway issue

astutemed
Level 1
Level 1

It's been a while but I'm missing something in my set-up

I have 2 switches.  3750 (which is acting as our router) and a 2960 on another floor.  They are both using the same subnet, I want to separate them via 2 separate vlans

vlan10 and vlan 20.  I've add the vlans to both devices and well as the vlan interfaces.  Change the switchport access on the ports to the new vlan and it seems to work only with the gateway for vlan10

my problem is the default gateway.  I'm not sure how to go about it, the helper address is to our dhcp server.

vlan 10 router 192.168.1.1/24  gateway 192.168.1.254

vlan 20 switch 192.168.4.1/24 should be gateway 192.168.4.254

If I change the default gateway on the dhcp server for vlan20 to 192.168.4.254 I get intermitted connectivity

ip routing is enabled

I'm just not sure what I need to do so I can keep the dhcp default gateway correct and have traffic route correctly.  I can leave the vlan10 gateway in for vlan 20 and it works, but I don't believe that is correct?

I'm assuming I need to add trunk encapsulation, but I'm not positive. 

On the router the connecting port is configured as such:

switchport trunk encapsulation dot1q

switchport mode trunk

 

Do I need to add trunk encapsulation for vlan 20?  and/or what changes need to be made so that I can get the correct default gateway working

I appreciate any help, I know this is basic but just not 100% on which way to go

3 Replies 3

Hello

Enabling inter-vlan routing on the 3750 would make this switch act like a router

Your topology explanation is quite vague so apologies for some assumptions I may make.

You don’t say where the dhcp resides, however if its not on the 3750 switch itself then the helper address is required

I am assuming:

 You have two dhcp scopes created for the vlan10,20 clients and reservations to excluded the SVI interfaces on the 3750.

You already have a default routing or dynamic routing to for your external traffic?
 

Note: I have created an additional vlan 99 as a management vlan for the switches if this isnt applicable you use either vlan 10, or 20 address range not forgetting to give the 2960 a default-gateway of either vlan 10 or 20 svi interface

 

Basic configuration:


3750

Int vlan 99
description management vlan
ip address 192.168.99.254 255.255.255.0


int vlan 10
ip address 192.168.1.254 255.255.255.0
ip helper-address ( dhcp server)

int vlan 20
ip address 192.168.4.254 255.255.255.0
ip helper-address ( dhcp server)



vlan 10, 20,99
exit

ip routing

 

int x/x
Description trunk to switch 2960

switchport trunk encap dot1
switchport mode trunk
switchport trunk allowed vlan 10.20.99
 

vtp domain STAN
vtp mode server

int fax/x
description access port
switchport host
switchport access vlan 10

int fax/x
description access port
switchport host
switchport access vlan 20

 

etc…

 

2960

Int vlan 99
description management vlan
ip address 192.168.99.2 255.255.255.0

int x/x
Description trunk to switch 3750
switchport trunk encap dot1
switchport mode trunk
switchport trunk allowed vlan 10.20.99
 

vtp domain STAN
vtp mode client

 

int fax/x
description access port
switchport host
switchport access vlan 10

int fax/x
description access port
switchport host
switchport access vlan 20
 

etc….

 

ip default-gateway 192.168.99.254

 

res

Paul


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

Sorry about the vagueness, the dhcp server is a windows server and resides on vlan 10

I don't have a management vlan, however you're pretty spot on for everything else

switchport trunk allowed vlan 10.20 ... ( i was missing allow 20)

 about the ip default gateway, on the 2960 the address is 0.0.0.0

should the IP default gateway on the 2960 be 192.168.4.254?

routing is dynamic

If I do change the 2960 default IP to 192.168.4.254, do I need to note it in the 3750?

lastly the ip of the 2960 is a vlan 10 address, does that need to be change to a vlan 20 address?

 

thanks again

John Blakley
VIP Alumni
VIP Alumni

Configuring your interconnected switchports to trunk both vlans is possibly the answer. I'm not understanding how you're able to get traffic to another subnet when you have the incorrect gateway.

Technically, if you add vlan 10 and 20 on the 3750 and 2960, then you would trunk the connection on both sides between the 3750 and the 2960. On the 2960, if you have a host on a port configured as an access port for vlan 20, then the default gateway should work for 192.168.4.254 all of the time. If you configure a host on vlan 10 on the 2960 switch, the default gateway for 192.168.1.254 should work all of the time. The router probably doesn't need to be on a trunk port, but an access port if the 3750 is doing all of your routing. Do you possibly have more than one path back to the 3750 (multiple connections from 2960 that should be configured with an etherchannel for example)?

HTH,

John

HTH, John *** Please rate all useful posts ***
Review Cisco Networking for a $25 gift card