真实的国产乱ⅩXXX66竹夫人,五月香六月婷婷激情综合,亚洲日本VA一区二区三区,亚洲精品一区二区三区麻豆

成都創(chuàng)新互聯網站制作重慶分公司

服務器中如何配置三層交換機-創(chuàng)新互聯

這篇文章將為大家詳細講解有關服務器中如何配置三層交換機,小編覺得挺實用的,因此分享給大家做個參考,希望大家閱讀完這篇文章后可以有所收獲。

桃源ssl適用于網站、小程序/APP、API接口等需要進行數據傳輸應用場景,ssl證書未來市場廣闊!成為成都創(chuàng)新互聯的ssl證書銷售渠道,可以享受市場價格4-6折優(yōu)惠!如果有意向歡迎電話聯系或者加微信:18980820575(備注:SSL證書合作)期待與您的合作!

實驗拓撲:
服務器中如何配置三層交換機
實驗目的:pc1、pc2、pc3、pc4、server-pt實現互通

實驗需求:     
pc1: ip地址:192.168.10.1
子網掩碼:255.255.255.0
網關:192.168.10.254
pc2:  ip地址:192.168.20.1
子網掩碼:255.255.255.0
網關:192.168.20.254
pc3:   ip地址:192.168.30.1
子網掩碼:255.255.255.0
網關:192.168.30.254
pc4:  ip地址:192.168.40.1
子網掩碼:255.255.255.0
網關:  192.168.40.254
server-PT:   ip地址:192.168.60.1
子網掩碼:255.255.255.0
網關:192.168.60.254

實驗步驟:
1.配置PC機
pc1
服務器中如何配置三層交換機

pc2服務器中如何配置三層交換機
pc3
服務器中如何配置三層交換機
pc4
服務器中如何配置三層交換機
serve-pt
服務器中如何配置三層交換機

2.配置二層交換機
操作內容:
a、sw1和sw2分別創(chuàng)建vlan10、vlan20和vlan30、vlan40,并將端口加入到各自對應的vlan中,與PC機相連的端口設置access模式且允許各自所在vlan通過,其余端口創(chuàng)建trunk模式且允許所有vlan通過
b、sw3和sw4各自創(chuàng)建vlan10、vlan20、vlan30、vlan40,將所有端口創(chuàng)建trunk鏈路且允許所有vlan通過

sw1:
Switch>enable
Switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname sw1
sw1(config)#vlan 10
sw1(config-vlan)#vlan 20
sw1(config-vlan)#exit
sw1(config)#interface fa0/1
sw1(config-if)#switchport mode access
sw1(config-if)#switchport access vlan 10
sw1(config-if)#exit
sw1(config)#interface fa0/2
sw1(config-if)#switchport mode access
sw1(config-if)#switchport access vlan 20
sw1(config-if)#exit
sw1(config)#interface fa0/3
sw1(config-if)#switchport mode trunk
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed
sw1(config-if)#switchport trunk allowed vlan all
sw1(config-if)#exit
sw1(config)#interface fa0/4
sw1(config-if)#switchport mode trunk
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changed state to up
sw1(config-if)#switchport trunk allowed vlan all
sw1(config-if)#exit
sw1(config)#interface fa0/5
sw1(config-if)#switchport mode trunk
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/5, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/5, changed state to up
sw1(config-if)#switchport trunk allowed vlan all
sw1(config-if)#exit
sw1(config)#exit
sw1#write

sw2:
Switch>enable
Switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname sw2
sw2(config)#vlan 30
sw2(config-vlan)#vlan 40
sw2(config-vlan)#exit
sw2(config)#interface fa0/1
sw2(config-if)#switchport mode access
sw2(config-if)#switchport access vlan 30
sw2(config-if)#exit
sw2(config)#interface fa0/2
sw2(config-if)#switchport mode access
sw2(config-if)#switchport access vlan 40
sw2(config-if)#exit
sw2(config)#interface fa0/3
sw2(config-if)#switchport mode trunk
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed
sw2(config-if)#switchport trunk allowed vlan all
sw2(config-if)#exit
sw2(config)#interface fa0/4
sw2(config-if)#switchport mode trunk
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changed state to up
sw2(config-if)#switchport trunk allowed vlan all
sw2(config-if)#exit
sw2(config)#interface fa0/5
sw2(config-if)#switchport mode trunk
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/5, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/5, changed state to up
sw2(config-if)#switchport trunk allowed vlan all
sw2(config-if)#exit
sw2(config)#exit
sw2#write

sw3:
Switch>enable
Switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname sw3

Switch>enable
Switch#configure
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
sw3(config)#vlan 10
sw3(config-vlan)#vlan 20
sw3(config-vlan)#vlan 30
sw3(config-vlan)#vlan 40
sw3(config-vlan)#exit
sw3(config)#interface fa0/1
sw3(config-if)#switchport mode trunk
sw3(config-if)#switchport trunk allowed vlan all
sw3(config-if)#exit
sw3(config)#int fa0/2
sw3(config-if)#switchport mode trunk
sw3(config-if)#switchport trunk allowed vlan all
sw3(config-if)#exit
sw3(config)#interface fa0/3
sw3(config-if)#switchport mode trunk
sw3(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed
sw3(config-if)#switchport trunk allowed vlan all
sw3(config-if)#exit
sw3#write

sw4:
Switch>enable
Switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname sw4
sw4(config)#vlan 10
sw4(config-vlan)#vlan 20
sw4(config-vlan)#vlan 30
sw4(config-vlan)#vlan 40
sw4(config-vlan)#exit
sw4(config)#interface fa0/1
sw4(config-if)#switchport mode trunk
sw4(config-if)#switchport trunk allowed vlan all
sw4(config-if)#exit
sw4(config)#int fa0/2
sw4(config-if)#switchport mode trunk
sw4(config-if)#switchport trunk allowed vlan all
sw4(config-if)#exit
sw4(config)#interface fa0/3
sw4(config-if)#switchport mode trunk
sw4(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed
sw4(config-if)#switchport trunk allowed vlan all
sw4(config-if)#exit
sw4#write

3.配置三層交換機
操作內容:
創(chuàng)建vlan10、vlan20、vlan30、vlan40,創(chuàng)建虛擬端口并設置網關,fa0/3設置ip地址及子網掩碼,開啟路由功能,配置下一跳到192.168.60.0網段

Switch>en
Switch#configure
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#ip routing
Switch(config)#vlan 10
Switch(config-vlan)#vlan 20
Switch(config-vlan)#vlan 30
Switch(config-vlan)#vlan 40
Switch(config-vlan)#exit
Switch(config)#int vlan 10
Switch(config-if)#
%LINK-5-CHANGED: Interface Vlan10, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan10, changed state to up
Switch(config-if)#no shutdown
Switch(config-if)#ip address 192.168.10.254 255.255.255.0
Switch(config-if)#exit
Switch(config)#int vlan 20
%LINK-5-CHANGED: Interface Vlan20, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan20, changed state to up
Switch(config-if)#no shutdown
Switch(config-if)#ip address 192.168.20.254 255.255.255.0
Switch(config-if)#exit
Switch(config)#int vlan 30
Switch(config-if)#
%LINK-5-CHANGED: Interface Vlan30, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan30, changed state to up
Switch(config-if)#no shutdown
Switch(config-if)#ip address 192.168.30.254 255.255.255.0
Switch(config-if)#exit
Switch(config)#int vlan 40
%LINK-5-CHANGED: Interface Vlan40, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan40, changed state to up
Switch(config-if)#no shutdown
Switch(config-if)#ip address 192.168.40.254 255.255.255.0
Switch(config-if)#exit
Switch(config)#interface fa0/3
Switch(config-if)#no switchport
Switch(config-if)#no shutdown
Switch(config-if)#ip address 192.168.50.1 255.255.255.0
Switch(config-if)#exit
Switch(config)#ip route 192.168.60.0 255.255.255.0 192.168.50.2
Switch(config)#exit
Switch#
%SYS-5-CONFIG_I: Configured from console by console
Switch#write

4.配置路由器
操作內容:配置端口的IP及子網掩碼,配置默認路由

Router>en
Router#configure
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#interface fastEthernet 0/1
%Invalid interface type and number
Router(config)#interface gigabitEthernet 0/0
Router(config-if)#no shutdown
%LINK-5-CHANGED: Interface GigabitEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0, changed state to up
Router(config-if)#ip address 192.168.50.2 255.255.255.0
Router(config)#interface gigabitEthernet 0/1
Router(config-if)#no shutdown
%LINK-5-CHANGED: Interface GigabitEthernet0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/1, changed state to up
Router(config-if)#ip address 192.168.60.254 255.255.255.0
Router(config-if)#exit
Router(config)#ip route 0.0.0.0 0.0.0.0 192.168.50.1
Router(config)#exit
%SYS-5-CONFIG_I: Configured from console by console
Router#write

驗證與測試:
服務器中如何配置三層交換機
服務器中如何配置三層交換機


關于“服務器中如何配置三層交換機”這篇文章就分享到這里了,希望以上內容可以對大家有一定的幫助,使各位可以學到更多知識,如果覺得文章不錯,請把它分享出去讓更多的人看到。

另外有需要云服務器可以了解下創(chuàng)新互聯scvps.cn,海內外云服務器15元起步,三天無理由+7*72小時售后在線,公司持有idc許可證,提供“云服務器、裸金屬服務器、高防服務器、香港服務器、美國服務器、虛擬主機、免備案服務器”等云主機租用服務以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡單易用、服務可用性高、性價比高”等特點與優(yōu)勢,專為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應用場景需求。


當前文章:服務器中如何配置三層交換機-創(chuàng)新互聯
當前網址:http://weahome.cn/article/dopecj.html

其他資訊

在線咨詢

微信咨詢

電話咨詢

028-86922220(工作日)

18980820575(7×24)

提交需求

返回頂部