局域網組建——數據交換區

場景描述:


    公司有3個部門,財務、銷售、it部,分別使用vlan10、vlan11、vlan12,要求各部門之間可以互相訪問。

      

wKioL1iHEDPwBTsqAAByRtlpNYY850.png-wh_50



實現原理:

   

   3個部門位於不同vlan且位於不同接入交換機,要實現互相訪問就必須要用到vlan間路由,需要一個3層設備,本實驗採用3層交換做路由使用,vlan數據跨交換機訪問需要在中繼通道中通過在轉發給交換機相應端口實現通信。


配置步驟:


1 基本配置:創建vlan、劃分端口(以it部交換機爲例)

分別在各交換機上創建vlan並與端口關聯(其它交換機配置相似)

Switch(config)#vlan 10

Switch(config)#vlan 100

Switch(config-vlan)#vlan 11

Switch(config-vlan)#vlan 12

Switch(config-vlan)#vlan 13

Switch(config)#int f0/2

Switch(config-if)#switch

Switch(config-if)#switchport mode access

Switch(config-if)#switchport access vlan 10


2 配置交換機trunk口,配置管理地址

Switch(config)#int f0/22

Switch(config-if)#switchport mode trunk

Switch(config-if)#switchport trunk allowed vlan all

Switch(config)# int vlan 100

Switch(config-if)#ip address 10.100.50.11 255.255.255.0


3 核心交換配置


Switch#show running-config

Building configuration...


Current configuration : 1551 bytes

!

version 12.2

no service timestamps log datetime msec

no service timestamps debug datetime msec

no service password-encryption

!

hostname Switch

!

!

!

!

!

!

!

ip routing

!

!

!

!

!

!

!

!

!

!

!

!

!

!

spanning-tree mode pvst

!

!

!

!

!

!

interface FastEthernet0/1

!

interface FastEthernet0/2

!

interface FastEthernet0/3

!

interface FastEthernet0/4

!

interface FastEthernet0/5

!

interface FastEthernet0/6

!

interface FastEthernet0/7

!

interface FastEthernet0/8

!

interface FastEthernet0/9

!

interface FastEthernet0/10

!

interface FastEthernet0/11

!

interface FastEthernet0/12

!

interface FastEthernet0/13

!

interface FastEthernet0/14

!

interface FastEthernet0/15

!

interface FastEthernet0/16

!

interface FastEthernet0/17

!

interface FastEthernet0/18

!

interface FastEthernet0/19

!

interface FastEthernet0/20

!

interface FastEthernet0/21

!

interface FastEthernet0/22

switchport trunk encapsulation dot1q

switchport mode trunk

!

interface FastEthernet0/23

switchport trunk encapsulation dot1q

switchport mode trunk

!

interface FastEthernet0/24

switchport trunk encapsulation dot1q

switchport mode trunk

!

interface GigabitEthernet0/1

!

interface GigabitEthernet0/2

!

interface Vlan1

no ip address

shutdown

!

interface Vlan10

ip address 10.100.10.1 255.255.255.0

!

interface Vlan11

ip address 10.100.11.1 255.255.255.0

!

interface Vlan12

ip address 10.100.12.1 255.255.255.0

!

interface Vlan100

ip address 10.100.50.10 255.255.255.0

!

ip classless

!

ip flow-export version 9

!

!

!

!

!

!

!

line con 0

!

line aux 0

!

line vty 0 4

login

!

!

!

end

wKioL1iHIIvwCr8BAAB0nnTyv0A697.png-wh_50

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章