Switches, Hubs, and Modems
1748106 Members
4808 Online
108758 Solutions
New Discussion юеВ

Re: Beginners switch setup question.

 
SOLVED
Go to solution
Pete13
Advisor

Beginners switch setup question.

I have a Procurve switch which I want to connect to a router. On the switch there are 2 VLANs - the default one and VLAN20.

Port 1 on the switch is connected to the router (192.168.10.1)

The switch is configured as follows:
IP address: 192.168.10.10
Default GW address: 192.168.10.1

VLAN20 settings:
name "LOCATION"
untag 2-24
tag 1
ip address 192.168.20.1/24
exit

From a pc connected to the switch I can ping the VLAN Ip address (192.168.20.1) and the default VLAN ip address (192.168.10.10). I can not ping anything beyond 192.168.10.10.

Working from the switch's CLI I can ping the router so the connection is there.

Not sure if I have tagged the right ports and what (static) route I need to setup to be able to ping the router from a pc in VLAN20.

Any help would be grately welcomed!
13 REPLIES 13
Shadow13
Respected Contributor

Re: Beginners switch setup question.

ip route 0.0.0.0/0 192.168.10.1
Michael_Breuer
Esteemed Contributor

Re: Beginners switch setup question.

Hi Pete,

please clarify what you want to achieve. Is VLAN 1 the transfer VLAN to the router and the VLAN 20 the user VLAN?

Cheers,

Michael
Ingentive Networks GmbH
Pete13
Advisor

Re: Beginners switch setup question.

Yes, the idea was to use VLAN1 as the transfer VLAN to the router and use VLAN 20 as the user VLAN.

Maybe there are better ways to do it, e.g. create a seperate VLAN for the transfer?

Pete13
Advisor

Re: Beginners switch setup question.

This is how my config looks like.

@@@@@@@@@@@@@@@

ip default-gateway 192.168.10.1
vlan 1
name "DEFAULT_VLAN"
ip address 192.168.10.10 255.255.255.0
tagged 1
no untagged 2-24
exit
vlan 20
name "VLAN20"
untagged 2-24
ip address 192.168.20.1 255.255.255.0
tagged 1
exit
snmp-server community "public" Unrestricted
ip route 0.0.0.0 0.0.0.0 192.168.10.1

@@@@@@@@@@@@@@@

The switch is connected to a router via port 1 on the switch.
Pete13
Advisor

Re: Beginners switch setup question.

Ignore the above message - This is how my config looks like.

@@@@@@@@@@@@@@@

vlan 1
name "LOCATION"
ip address 192.168.10.10 255.255.255.0
untagged 1
no untagged 2-24
exit

vlan 20
name "VLAN20"
untagged 2-24
ip address 192.168.20.1 255.255.255.0
exit

snmp-server community "public" Unrestricted
ip route 0.0.0.0 0.0.0.0 192.168.10.1

@@@@@@@@@@@@@@@

The switch is connected to a router via port 1 on the switch.

When using the CLI on the switch I can ping VLAN 20 and the test machine which is connected to port 5. I can also ping the router on 192.168.10.1.
From the router I can ping the switch on 192.168.10.10.
From the test pc connected to the switch I can ping the VLAN IP (192.168.20.1) and the switch's IP address 192.168.10.10 but not 192.168.10.1.
When I do a trace, I can see the packages going from 192.168.20.2 (test machine's IP address - static IP) to 192.168.20.1 (VLAN 20's IP address) but then it stops. It does not direct traffic any further.
EckerA
Respected Contributor

Re: Beginners switch setup question.

Hi,
your Router 192.168.10.1 needs a route
to know of the subnet 192.168.20.0/24
something like
192.168.20.0/24 192.168.10.10


and you need to enable routing at the switch with:
ip routing

hth
alex
Pete13
Advisor

Re: Beginners switch setup question.

Hi Alex,

i have "ip routing" enabled - just missed it when copying and pasting.
In regards to the router: I know what you mean but by the looks of it nothing gets to the router in the first place.
If I ping the router from 192.168.20.2 I would expect the route travelled to be as follows:
192.168.20.2 -> 192.168.20.1 -> 192.168.10.10 -> 192.168.10.1

Pete
Michael_Breuer
Esteemed Contributor

Re: Beginners switch setup question.

Hi Pete,

the config of the switch is fine. Can you ping from the router to 192.168.20.1? If this is not working then you router is the problem. Please check routing table and subnet masks on the router.

Cheers,

Michael
Ingentive Networks GmbH
Shadow13
Respected Contributor

Re: Beginners switch setup question.

what is the gateway configured on the pc ?