Switches, Hubs, and Modems
cancel
Showing results for 
Search instead for 
Did you mean: 

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
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
www.ingentive.net
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
www.ingentive.net
Ingentive Networks GmbH
Shadow13
Respected Contributor

Re: Beginners switch setup question.

what is the gateway configured on the pc ?
Pete13
Advisor

Re: Beginners switch setup question.

Thanks for your replies.

Michael:
Will test that tomorrow. If I can't ping 192.168.20.1 from the router what kind of route do I need to setup on the router?
A route from the router to the switch's IP adress (192.168.10.10) or to the specific VLAN IP?


Shadow:
"what is the gateway configured on the pc ?"
Gateway address on the pc used for testing is set to 192.168.20.1, which is the IP address of VLAN20.
EckerA
Respected Contributor
Solution

Re: Beginners switch setup question.

Hi Pete,

as i wrote earlier you need a route like:
ip route 192.168.20.0 255.255.255.0 192.168.10.10
to stay in HP terms, but the syntax might be different on your router.
The route means that all traffic for clients in the 192.168.20.0 should go to the device with the ip 192.168.10.10, cos this device knows of that subnet.

hth
alex
Pete13
Advisor

Re: Beginners switch setup question.

Adding the correct route on the router fixed it. Thanks all for ur input.
Pete13
Advisor

Re: Beginners switch setup question.

-