09-02-2019 11:08 PM
Hi team,
I am using 192.168.128.0/20 subnet for my network. I am dividing this network as VLSM concept, as attached document, i am using two cisco sg550 switches, in this switch i have configured four vlans, but i in real switch i am unable to do routing different vlans not communicating ech other, please help me to configure needed commands on my switch.
Gateway of last resort is 192.168.139.66 to network 0.0.0.0
10.0.0.0/24 is subnetted, 1 subnets
C 10.1.1.0 is directly connected, Vlan4
20.0.0.0/24 is subnetted, 1 subnets
C 20.1.1.0 is directly connected, Vlan5
C 192.168.128.0/20 is directly connected, FastEthernet0/3
S* 0.0.0.0/0 [1/0] via 192.168.139.66
second switch:
Gateway of last resort is 192.168.139.65 to network 0.0.0.0
C 192.168.132.0/23 is directly connected, Vlan2
192.168.137.0/25 is subnetted, 1 subnets
C 192.168.137.128 is directly connected, Vlan3
192.168.139.0/29 is subnetted, 1 subnets
C 192.168.139.64 is directly connected, FastEthernet0/3
S* 0.0.0.0/0 [1/0] via 192.168.139.65
09-02-2019 11:22 PM - edited 09-02-2019 11:37 PM
Hi there,
What device is connected to Fa0/3 on both switches, a router?
For the VLANs routed on the switches to talk with eachother, the router needs to have routing entries in its own routing table detailing which subnets are available via each segment. Say for example:
Sw1, fa0/3 ---> fa0/1, router
SW2, fa0/3 ---> fa0/2, router
Then the router will need the following routing table entries:
! ip route 10.1.1.0 255.255.255.0 <switch1_fa0/3_ip_address> ip route 20.1.1.0 255.255.255.0 <switch1_fa0/3_ip_address> ip route 192.168.132.0 255.255.254.0 <switch2_fa0/3_ip_address> ip route 192.168.139.0 255.255.254.0 <switch2_fa0/3_ip_address> !
cheers,
Seb.
09-02-2019 11:27 PM
09-02-2019 11:30 PM
09-02-2019 11:32 PM
09-02-2019 11:53 PM - edited 09-03-2019 02:11 AM
OK, below is the config to have switch1 provide the routing function for all subnets.
! no vlan 2 no vlan 3 no int vlan 2 no int vlan 3 ! int gi1/0/1 no ip address ! vlan 10 name A vlan 11 name B vlan 12 name C vlan 13 name D vlan 14 name E vlan 15 name F vlan 16 name G vlan 17 name H vlan 18 name I vlan 19 name J vlan 20 name K vlan 21 name L ! int vlan 10 ip address 192.168.139.65 255.255.255.248 int vlan 11 ip address 192.168.132.1 255.255.254.0 int vlan 12 ip address 192.168.128.1 255.255.252.0 int vlan 13 ip address 192.168.134.1 255.255.254.0 int vlan 14 ip address 192.168.136.1 255.255.255.128 int vlan 15 ip address 192.168.136.129 255.255.255.128 int vlan 16 ip address 192.168.137.1 255.255.255.128 int vlan 17 ip address 192.168.138.129 255.255.255.192 int vlan 18 ip address 192.168.139.193 255.255.255.192 int vlan 19 ip address 192.168.139.1 255.255.255.192 int vlan 20 ip address 192.168.137.129 255.255.255.128 int vlan 21 ip address 192.168.138.1 255.255.255.128 ! int gi1/0/1 switchport mode trunk switchport trunk allowed vlan all no shut !
no ip default-gateway
!
...and switch2 will just operate at layer2:
! no vlan 5 no int vlan 5 ! vlan 10 name A vlan 11 name B vlan 12 name C vlan 13 name D vlan 14 name E vlan 15 name F vlan 16 name G vlan 17 name H vlan 18 name I vlan 19 name J vlan 20 name K vlan 21 name L ! int gi1/0/1 switchport mode trunk switchport trunk allowed vlan all no shut !
no ip default-gateway
!
Of course if you want both switches to take part in routing, then you can move some of the SVIs onto switch2. Just make sure you reinstate the static routing between the switches for the selected subnets.
cheers,
Seb.
09-03-2019 12:00 AM
09-03-2019 12:37 AM
I thought from the title of this post that this was a routing question.
If you want to prevent the subnets from communicating with each other you will need a Layer3 ACL. For each SVI the ACL will permit traffic from the connected subnet and drop all other traffic.
cheers,
Seb.
09-03-2019 12:53 AM
09-03-2019 02:12 AM
on switch1 for VLAN10 the config would be:
! ip access-list VLAN-10-IN permit 192.168.139.64 255.255.255.248 ! int vlan10 service-acl input VLAN-10-IN default-action deny-any !
cheers,
Seb.
09-03-2019 05:42 AM
09-03-2019 06:22 AM
Hi there,
The reason the routing does not work is that you have the default route on each switch directing traffic to the other switch.
Where does the firewall fit into this topology? Is it connected to one switch? Both?
Regarding the routing, the switches should have a default directed to the firewall. The firewall should then have a route for the 192.168.128.0/20 summary address directed back towards the switch.
cheers,
Seb.
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: