cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
738
Views
0
Helpful
3
Replies

Two static routes on a switch possible and how to configure?

BW100
Level 1
Level 1

Hello,

because my last question was a bit of missunderstanding I created a new one.

 

I have an Cisco SG350-20 Switch, which is a Layer 3 switch. To this switch are connected a Notebook A with the IP 192.168.3.1 which should simmulate a server (just need to simmulate the IP-Adresse, something I can get access to) and another Notebook B which is in the Network 192.168.2.1.

My Notebook B needs access to the Notebook A and also a connection to the Internet.

The IP of the router is 192.168.0.1.
I really don't know how to configure this, but my instructor said I can do it with static routes on the switch.  I don't have access to the router so I can't configure anything on this.
Maybe it's to easy but all of my tryings are running into nowhere and I really need some help.

Thank you!

3 Replies 3

Hello

Do you need to used static routes?

Below is a very basic L3 switch performing inter-vlan routing enabled and one static route towards the rtr:

Interface vlan 10
Description RTR vlan
ip address 192.168.0.254 255.255.255.0
no shut

Interface vlan 2
Description Notebook B VLAN
ip address 192.168.2.254 255.255.255.0
no shut

 

Interface vlan 3
Description Notebook A VLAN
ip address 192.168.3.254 255.255.255.0
no shut

vlan 2.3.10
exit
ip routing


int x/x
description Access=Port -to- Rtr
switchport mode access
switchport access vlan 10
spanning-tree portfast
no shut


 

int x/x
description Access-Port -to- HostB
switchport mode access
switchport access vlan 2
spanning-tree portfast
no shut


int x/x
description Access-Port -to- HostA
switchport mode access
switchport access vlan 3
spanning-tree portfast
no shut

ip route 0.0.0.0 0.0.0.0 192.168.0.1


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

Well, if I understand you solution right I need to change the port to rather got conneted with the internet or Notebook A. But I can't change the ports of Notebook B. And I must access to the internet and Notebook A coincidently.
If I missunderstand this, can you please explain me why do you assign an interface to each Network? And why do you gave the VLANS an IP-address with XXX.XXX.XX.254?

Sorry for this stupid questions, I'm just a beginner!

Hi

The topology is: 

 

A router is connected to the switch and 2 computers as well. 

If the router support sub-interfaces the gateway for each vlan should be on the router and configured under the sub interfaces, also the router must has a default route pointing to the ISP and configure a NAT. 

 

In the other hand the switch is layer 3, so you can configure the default gateway for each vlan through SVI (interface VLAN), then create a default route pointing to the router who will be working with a NAT. (The router must know how to reach the internal networks it can be static route)

 

Hope it is useful

 

:-)




>> Marcar como útil o contestado, si la respuesta resolvió la duda, esto ayuda a futuras consultas de otros miembros de la comunidad. <<
Review Cisco Networking products for a $25 gift card