How does a multi-layer switch realize interconnection between different network segments ?, Multi-layer switch

Source: Internet
Author: User

How does a multi-layer switch realize interconnection between different network segments ?, Multi-layer switch

Lab Name:How does a multi-layer switch implement intercommunication between different network segments?

Lab requirements:

(1) layer-3 switches are gateways of vlan10, 20, 30, and 40 respectively.

(Gateway IP-192.168.X.250/24)

Vlan 10 192.168.10.0/24

Vlan 20 192.168.20.0/24

Vlan 30 192.168.30.0/24

Vlan 40 192.168.40.0/24

(2) The Gateway runs ospf to achieve network interconnection,

(3) Each vswitch can be remotely accessed.

Lab notes:This experiment requires eight PCs and one multi-layer switch of the 3560 model.

Command entered by four switches in the blue bold font

Experiment Configuration:Configure the IP address subnet mask and gateway for each pc.

 

① First achieve interconnection with network segments

Switch>

Switch> enable

Switch # config terminal

Switch (config) # hostname gw1 gw2 gw3

Gw1 gw2 gw 3 (config) # line con 0

Gw1 gw2 gw 3(Config-line) # exec-t

Gw1 gw2 gw 3(Config-line) # exec-timeout 0 0

Gw1 gw2 gw 3(Config-line) # exit

Gw1 gw2 gw 3(Config) # vlan 10

Gw1 gw2 gw 3(Config-vlan) # vlan 20

Gw1 gw2 gw 3(Config-vlan) # vlan 30

Gw1 gw2 gw 3(Config-vlan )#

Gw1 gw2 gw 3(Config-vlan) # vlan 40

Gw1 gw2 gw 3(Config-vlan) # exit

Gw1 (config) # inter vlan 10

Gw1 (config-if) # ip address 192.168.10.250 255.255.255.0

Gw1 (config-if) # exit

Gw1 (config) # inter fa0/1

Gw1 (config-if) # sw mo acc

Gw1 (config-if) # sw acc vl 10

Gw1 (config-if) # exit

Gw1 (config) # inter fa0/2

Gw1 (config-if) # sw mo acc

Gw1 (config-if) # sw acc vl 20

Gw1 (config-if) # exit

Gw2 (config) # inter vlan 20

Gw2 (config-if) # ip address 192.168.20.250 255.255.255.0

Gw2 (config-if) # exit

Gw2 (config) # inter fa0/1

Gw2 (config-if) # sw mo acc

Gw2 (config-if) # sw acc vl 10

Gw2 (config-if) # exit

Gw2 (config) # inter fa0/2

Gw2 (config-if) # sw mo acc

Gw2 (config-if) # sw acc vl 30

Gw2 (config-if) # exit

Gw3 (config) # inter vlan 30

Gw3 (config-if) # ip address 192.168.30.250 255.255.255.0

Gw3 (config-if) # exit

Gw3 (config) # inter fa0/1

Gw3 (config-if) # sw mo acc

Gw3 (config-if) # sw acc vl 40

Gw3 (config-if) # exit

Gw3 (config) # inter fa0/2

Gw3 (config-if) # sw mo acc

Gw3 (config-if) # sw acc vl 30

Gw3 (config-if) # exit

Gw4 (config) # inter vlan 40

Gw4 (config-if) # ip address 192.168.40.250 255.255.255.0

Gw4 (config-if) # exit

Gw4 (config) # inter fa0/1

Gw4 (config-if) # sw mo acc

Gw4 (config-if) # sw acc vl 20

Gw4 (config-if) # exit

Gw4 (config) # inter fa0/2

Gw4 (config-if) # sw mo acc

Gw4 (config-if) # sw acc vl 40

Gw4 (config-if) # exit

Gw1 gw2 gw 3(Config) # inter range fa0/23, fa0/24

Gw1 gw2 gw 3(Config-if-range) # channel-group 1 mode on

Gw1 gw2 gw 3(Config-if-range) # exit

Gw1 gw2 gw 3(Config) # inter port-channel 1

Gw1 gw2 gw 3(Config-if) # no shut

Gw1 gw2 gw 3(Config-if) # switchport trunk encapsulation dot1q

Gw1 gw2 gw 3(Config-if) # switchport mode t

Gw1 gw2 gw 3(Config-if) # exit

Gw1 gw2 gw 3(Config) # inter range fa0/21, fa0/22

Gw1 gw2 gw 3(Config-if-range) # channel-group 2 mode on

Gw1 gw2 gw 3(Config-if-range) # exit

Gw1 gw2 gw 3(Config) # inter port-channel 2

Gw1 gw2 gw 3(Config-if) # switchport trunk encapsulation d

Gw1 gw2 gw 3(Config-if) # sw mo tr

Gw1 gw2 gw 3(Config-if) # exit

Verify that the same network segment can communicate with each other. ping x. x

Achieve interconnection between different network segments

Gw1 (config) # vlan 12

Gw1 (config-vlan) # name gw1-gw2

Gw1 (config-vlan) # vlan 48

Gw1 (config-vlan) # name gw4-gw1

Gw1 (config-vlan) # exit

Gw1 (config) # inter vlan 12

Gw1 (config-if) # no shut

Gw1 (config-if) # ip address 10.10.12.1 255.255.255.0

Gw1 (config-if) # exit

Gw1 (config) # inter vlan 48

Gw1 (config-if) # no shut

Gw1 (config-if) # ip address 10.10.48.2 255.255.255.0

Gw1 (config-if) # exit

Gw1 (config) # ip routing

Gw1 (config) # router ospf 1

Gw1 (config-router) # network 192.168.10.250 0.0.0.0 area 0

Gw1 (config-router) # network 10.10.12.1 0.0.0.0 area 0

Gw1 (config-router) # network 10.10.48.2 0.0.0.0 area 0

Gw1 (config-router) # end

Gw2 (config) # vlan 12

Gw2 (config-vlan) # name gw1-gw2

Gw2 (config-vlan) # vlan 24

Gw2 (config-vlan) # name gw2-gw3

Gw2 (config-vlan) # exit

Gw2 (config) # inter vlan 12

Gw2 (config-if) # no shut

Gw2 (config-if) # ip address 10.10.12.2 255.255.255.0

Gw2 (config-if) # exit

Gw2 (config) # inter vlan 24

Gw2 (config-if) # no shut

Gw2 (config-if) # ip address 10.10.24.1 255.255.255.0

Gw2 (config-if) # exit

Gw2 (config) # ip routing

Gw2 (config) # router ospf 1

Gw2 (config-router) # network 192.168.255.250 0.0.0.0 area 0

Gw2 (config-router) # network 10.10.12.2 0.0.0.0 area 0

Gw2 (config-router) # network 10.10.24.1 0.0.0.0 area 0

Gw2 (config-router) # end

Gw3 (config) # vlan 24

Gw3 (config-vlan) # name gw2-gw3

Gw3 (config-vlan) # vlan 36

Gw3 (config-vlan) # name gw3-gw4

Gw3 (config-vlan) # exit

Gw3 (config) # inter vlan 24

Gw3 (config-if) # no shut

Gw3 (config-if) # ip address 10.10.24.2 255.255.255.0

Gw3 (config-if) # exit

Gw3 (config) # inter vlan 36

Gw3 (config-if) # no shut

Gw3 (config-if) # ip address 10.10.36.1 255.255.255.0

Gw3 (config-if) # exit

Gw3 (config) # ip routing

Gw3 (config) # router ospf 1

Gw3 (config-router) # network 192.168.30.250 0.0.0.0 area 0

Gw3 (config-router) # network 10.10.24.2 0.0.0.0 area 0

Gw3 (config-router) # network 10.10.36.1 0.0.0.0 area 0

Gw3 (config-router) # end

Gw4 (config) # vlan 36

Gw4 (config-vlan) # name gw3-gw4

Gw4 (config-vlan) # vlan 48

Gw4 (config-vlan) # name gw4-gw1

Gw4 (config-vlan) # exit

Gw4 (config) # inter vlan 36

Gw4 (config-if) # no shut

Gw4 (config-if) # ip address 10.10.36.2 255.255.255.0

Gw4 (config-if) # exit

Gw4 (config) # inter vlan 48

Gw4 (config-if) # no shut

Gw4 (config-if) # ip address 10.10.48.1 255.255.255.0

Gw4 (config-if) # exit

Gw4 (config) # ip routing

Gw4 (config) # router ospf 1

Gw4 (config-router) # network 192.168.40.250 0.0.0.0 area 0

Gw4 (config-router) # network 10.10.36.2 0.0.0.0 area 0

Gw4 (config-router) # network 10.10.48.1 0.0.0.0 area 0

Gw4 (config-router) # end

Verify that different network segments can communicate with each other using the show IP route command

Show IP route ospf

Ping x. x

Enable remote access

Gw1 gw2 gw 3# Config terminal

Gw1 gw2 gw 3(Config) # line vty 0 4

Gw1 gw2 gw 3(Config-line) # password 123123

Gw1 gw2 gw 3(Config-line) # exit

Gw1 gw2 gw 3(Config) # enable sec

Gw1 gw2 gw 3(Config) # enable secret 123123

Gw1 gw2 gw 3(Config )#

Verify the command telnet x. x (gateway IP)

Experiment conclusion: multi-layer switches enable intercommunication between different network segments, which is a route between VLANs.

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.