2

enter image description here

I have network. I have three different networks and 2 vlans. PC0 is a member of vlan 10, PC1 is a member of vlan 20. One of the networks for vlan 10, another one is for vlan 20, third network is for switches. I use first layer 3 switch for vlans and i want to use the switch as a default gateway for switches. Their default gateway is 192.168.0.254, i gave this ip address to "int vlan 1" of the layer 3 switch.

 interface GigabitEthernet0/1
 switchport trunk encapsulation dot1q
 switchport mode trunk
!
interface GigabitEthernet0/2
 switchport trunk encapsulation dot1q
 switchport mode trunk
!
interface Vlan1
 ip address 192.168.0.254 255.255.255.0
!
interface Vlan10
 mac-address 00e0.a363.b601
 ip address 192.168.1.2 255.255.255.0
!
interface Vlan20
 mac-address 00e0.a363.b602
 ip address 192.168.2.2 255.255.255.0
!

But i want to use 2 switches. If i use the same configuration there will be ip address conflict, how can i fix this ?

2
  • I suggest reading about VRRP
    – manish ma
    Commented Mar 30 at 18:34
  • thank you so much
    – shiva13
    Commented Mar 30 at 18:46

3 Answers 3

1

There are several ways to do this, depending on your needs and the devices and versions.

  • The simplest way is if your two core switches are stackable, making them look like a single logical switch.
  • If they are not stackable, maybe they support VSS, which can accomplish the same thing, but it is more complicated to configure.
  • You could also consider a FHRP, such as HSRP or VRRP. This will set up a virtual gateway, and it can point to one of the core switches and change to the other in the event of the primary switch going down. You can even have the different networks use a different core switch as its gateway. Each network has its own FHRP gateway, and each can use a different primary core switch, failing to the other when its core switch is down.
1
  • thank you so much
    – shiva13
    Commented Mar 30 at 18:46
1

A redundant L3 gateway requires you to set up a router redundancy protocol like VRRP or HSRP with a virtual IP. The virtual IP is assigned to the active router and moves over to the standby on failure.

1
  • thank you so much
    – shiva13
    Commented Mar 30 at 18:46
0

I configured hsrp in "int vlan 'x'"

!
interface Vlan1
 ip address 192.168.0.5 255.255.255.0
 standby 3 ip 192.168.0.254
 standby 3 priority 255
 standby 3 preempt
!
interface Vlan10
 mac-address 0005.5ee1.d101
 ip address 192.168.1.3 255.255.255.0
 standby 1 ip 192.168.1.2
 standby 1 priority 255
 standby 1 preempt
!
interface Vlan20
 mac-address 0005.5ee1.d102
 ip address 192.168.2.3 255.255.255.0
 standby 2 ip 192.168.2.2
 standby 2 priority 255
 standby 2 preempt
!

Not the answer you're looking for? Browse other questions tagged or ask your own question.