L3 switch comprehensive experiment

Source: Internet
Author: User

 

Step 1: Configure The VTP domain and create a VLAN

3550:

3550 # vlan database

3550 (vlan) # vtp server

3550 (vlan) # vtp domain sy

3550 (vlan) # vtp password cisco

3550 (vlan) # vlan 2

3550 (vlan) # vlan 3

3550 (vlan) # vtp pruning

3550 (vlan) # exit

 

SW1:

SW1 # vlan database

SW1 (vlan) # vtp client

SW1 (vlan) # vtp domain sy

SW1 (vlan) # vtp password cisco

SW1 (vlan) # exit

 

Step 2: Set Relay

3550:

3550 (config) # int f0/0

3550 (config-if) # switchport trunk encapsulation dot1q

3550 (config-if) # switchport mode trunk

3550 (config-if) # end

3550 # show vtp status

VTP Version: 2

Configuration Revision: 2

Maximum VLANs supported locally: 256

Number of existing VLANs: 7

VTP Operating Mode: Server

VTP Domain Name: sy

VTP Pruning Mode: Enabled

VTP V2 Mode: Disabled

VTP Traps Generation: Disabled

 

SW1:

SW1 (config) # int f0/15

SW1 (config-if) # switchport trunk encapsulation dot1q

SW1 (config-if) # switchport mode trunk

SW1 (config-if) # end

SW1 # show vtp status

VTP Version: 2

Configuration Revision: 2

Maximum VLANs supported locally: 256

Number of existing VLANs: 7

VTP Operating Mode: Client

VTP Domain Name: sy

VTP Pruning Mode: Enabled

VTP V2 Mode: Disabled

VTP Traps Generation: Disabled

 

Step 3: add the port to the VLAN

SW1:

SW1 # conf t

SW1 (config) # int f0/1

SW1 (config-if) # switchport mode access

SW1 (config-if) # switchport access vlan 2

SW1 (config-if) # exit

SW1 (config) # int f0/2

SW1 (config-if) # switchport mode access

SW1 (config-if) # switchport access vlan 3

SW1 (config-if) # end

 

Step 4: configure Layer-3 switches to achieve interconnection between VLANs

3550

3550 # conf t

3550 (config) # ip routing

3550 (config) # int vlan 2

3550 (config-if) # ip address 192.168.2.1 255.255.255.0

3550 (config-if) # no shutdown

3550 (config-if) # exit

3550 (config) # int vlan 3

3550 (config-if) # ip address 192.168.3.1 255.255.255.0

3550 (config-if) # no shutdown

3550 (config-if) # end

 

Step 5: client Verification

PC1 # ping 192.168.3.3

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.3.3, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 216/284/336 MS

PC2 # ping 192.168.2.2

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.2.2, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 144/211/276 MS

Step 6: Enable the routing function on the layer-3 Switch

3550:

3550 (config) # int f0/1

3550 (config-if) # no switchport

3550 (config-if) # ip address 172.16.1.1 255.255.255.0

3550 (config-if) # no shutdown

3550 (config-if) # exit

3550 (config) # int f0/2

3550 (config-if) # no switchport

3550 (config-if) # ip address 172.16.2.1 255.255.255.0

3550 (config-if) # no shutdown

3550 (config-if) # exit

 

Step 7: Configure two routers and enable HSRP

R1:

R1 (config )#

R1 (config) # int f0/0

R1 (config-if) # no ip address

R1 (config-if) # ip address 172.16.1.2 255.255.255.0

R1 (config-if) # no shutdown

R1 (config-if) # speed100

R1 (config-if) # duplex full

R1 (config-if) # exit

R1 (config) # int f1/0

R1 (config-if) # ip address 10.0.0.254 255.255.255.0

R1 (config-if) # no shutdown

R1 (config-if) # speed100

R1 (config-if) # duplex full

R1 (config-if) # standby 1 ip 10.0.0.252

R1 (config-if) # standby 1 priority 200

R1 (config-if) # standby 1 preempt

R1 (config-if) # standby 1 track f0/0 10

R1 (config-if) # end

R1 # show standby brief

P indicates configured to preempt.

|

Interface Grp Prio P State Active Standby Virtual IP

Fa1/0 1 200 P Active local 10.0.0.253 10.0.0.252

 

 

R2:

R2 # conf t

R2 (config) # int f0/0

R2 (config-if) # ip address 172.16.2.2 255.255.255.0

R2 (config-if) # no shutdown

R2 (config-if) # speed100

R2 (config-if) # duplex full

R2 (config-if) # exit

R2 (config) # int f1/0

R2 (config-if) # ip address 10.0.0.253 255.255.255.0

R2 (config-if) # no shutdown

R2 (config-if) # speed100

R2 (config-if) # duplex full

R2 (config-if) # standby 1 ip 10.0.0.252

R2 (config-if) # end

 

Step 8: configure the Dynamic Routing Protocol

3550:

3550 (config) # router ospf 1

3550 (config-router) # network 192.168.2.0 0.0.255 area 0

3550 (config-router) # network 192.168.3.0 0.0.255 area 0

3550 (config-router) # network 172.16.1.0 0.0.255 area 0

3550 (config-router) # network 172.16.2.0 0.0.255 area 0

3550 (config-router) # end

 

R1:

R1 (config) # router ospf 2

R1 (config-router) # network 172.16.1.0 0.0.255 area 0

R1 (config-router) # network 10.0.0.0 0.0.255 are 0

R1 (config-router) # end

 

R2:

R2 (config) # router ospf 3

R2 (config-router) # network 172.16.2.0 0.0.255 area 0

R2 (config-router) # network 10.0.0.0 0.0.0.255 area 0

R2 (config-router) # end

R2 # show ip route

Gateway of last resort is not set

172.16.0.0/24 is subnetted, 2 subnets

O 172.16.1.0 [110/2] via 172.16.2.1, 00:03:39, FastEthernet0/0

[110/2] via 10.0.0.254, 00:03:39, FastEthernet1/0

C 172.16.2.0 is directly connected, FastEthernet0/0

10.0.0.0/24 is subnetted, 1 subnets

C 10.0.0.0 is directly connected, FastEthernet1/0

O 192.168.2.0/24 [110/2] via 172.16.2.1, 00:03:39, FastEthernet0/0

O 192.168.3.0/24 [110/2] via 172.16.2.1, 00:03:39, FastEthernet0/0

 

Step 9: client Verification

PC3 # ping 192.168.2.2,

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.2.2, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 288/337/432 MS

PC3 # ping 192.168.3.3

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.3.3, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 240/300/336 MS

PC1 # ping 192.168.3.3

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.3.3, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 192/231/288 MS

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.