NETWORKSTIP Networking CCNA,Centos,Ubuntu,Sql,

Made By Muhammad Nafees

Breaking

Thursday 30 November 2017

Intervlan routing using two Layer 3 Switches

Intervlan routing using two Layer 3 Switches

The configuration for PC1 is,

IP:     192.168.10.1
Subnet: 255.255.255.0
Default Gateway: 192.168.10.254 
 
Similarly for PC2,

IP:     192.168.20.1

Subnet: 255.255.255.0 
Default Gateway: 192.168.20.254
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Now for the left Switch, I set the Fa0/1 to trunk mode, and enabled created a Vlan 10
and moved the Pc1 to that Vlan, 

Switch(config)#vlan 10
Switch(config-vlan)#name forPC1
Switch(config-vlan)#exit 
 
Switch(config)#vlan 20
Switch(config-vlan)#name PC2
Switch(config-vlan)#exit 
 
Switch(config)#interface vlan 10
Switch(config-if)#ip address 192.168.10.254 255.255.255.0
Switch(config-if)#exit

Switch(config)#ip routing

Switch(config)#interface fastEthernet 0/24

Switch(config-if)#switchport mode access 

Switch(config-if)#switchport access vlan 10


Switch(config)#interface fastEthernet 0/1
Switch(config-if)#switchport trunk encapsulation dot1q 

Switch(config-if)#switchport mode trunk
 
and Similarly, I have done the following configuration for the right switch,
 
Switch(config)#vlan 10
Switch(config-vlan)#name forPC1
Switch(config-vlan)#exit  
 
Switch(config)#vlan 20
Switch(config-vlan)#name PC2
Switch(config-vlan)#exit

Switch(config)#interface vlan 20

Switch(config-if)#ip address 192.168.20.254 255.255.255.0
Switch(config-if)#exit

Switch(config)#ip routing 
Switch(config)#interface fastEthernet 0/1
Switch(config-if)#switchport trunk encapsulation dot1q 
Switch(config-if)#switchport mode trunk 
Switch(config-if)#exit


Switch(config)#interface fastEthernet 0/24

Switch(config-if)#switchport mode access 
Switch(config-if)#switchport access vlan 20
Switch(config-if)#exit  
 

No comments:

Post a Comment