日韩无码专区无码一级三级片|91人人爱网站中日韩无码电影|厨房大战丰满熟妇|AV高清无码在线免费观看|另类AV日韩少妇熟女|中文日本大黄一级黄色片|色情在线视频免费|亚洲成人特黄a片|黄片wwwav色图欧美|欧亚乱色一区二区三区

RELATEED CONSULTING
相關(guān)咨詢
選擇下列產(chǎn)品馬上在線溝通
服務(wù)時間:8:30-17:00
你可能遇到了下面的問題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
單臂路由實戰(zhàn)講解

單臂路由(router-on-a-stick)是指在路由器的一個接口上通過配置子接口(或“邏輯接口”,并不存在真正物理接口)的方式,實現(xiàn)原來相互隔離的不同VLAN(虛擬局域網(wǎng))之間的互聯(lián)互通。

創(chuàng)新互聯(lián)專注為客戶提供全方位的互聯(lián)網(wǎng)綜合服務(wù),包含不限于網(wǎng)站設(shè)計制作、成都網(wǎng)站制作、陽江網(wǎng)絡(luò)推廣、小程序制作、陽江網(wǎng)絡(luò)營銷、陽江企業(yè)策劃、陽江品牌公關(guān)、搜索引擎seo、人物專訪、企業(yè)宣傳片、企業(yè)代運營等,從售前售中售后,我們都將竭誠為您服務(wù),您的肯定,是我們最大的嘉獎;創(chuàng)新互聯(lián)為所有大學(xué)生創(chuàng)業(yè)者提供陽江建站搭建服務(wù),24小時服務(wù)熱線:18980820575,官方網(wǎng)址:www.cdcxhl.com

實驗步驟

新建 packer tracer 拓撲圖

當交換機設(shè)置兩個 Vlan 時,邏輯上已經(jīng)成為兩個網(wǎng)絡(luò),廣播被隔離了。兩個 Vlan 的網(wǎng)絡(luò)要通信,必須通過路由器,如果接入路由器的一個物理端口,則必須有兩個子接口分別與兩個 Vlan 對應(yīng),同時還要求與路由器相連得交換機的端口 fa 0/1 要設(shè)置為 trunk,因為這個接口要通過兩個 Vlan 的數(shù)據(jù)包。

檢查設(shè)置情況,應(yīng)該能夠正確的看到 Vlan 和 Trunk 信息。

計算機的網(wǎng)關(guān)分別指向路由器的子接口。

配置子接口,開啟路由器物理接口。

默認封裝 dot1q 協(xié)議。

配置路由器子接口 IP 地址。

實驗設(shè)備

PC 2 臺;Router_2811 1 臺;Switch_2960 1 臺

PC1
IP: 192.168.1.2
Submask: 255.255.255.0
Gateway:192.168.1.1

PC2
IP: 192.168.2.2
Submask: 255.255.255.0
Gateway:192.168.2.1

Switch
en
conf t
vlan 2
exit
vlan 3
exit
interface fastEthernet 0/2
switchport access vlan 2
exit
int fa 0/3
switchport access vlan 3
exit
int fa 0/1
switchport mode trunk
end
show vlan


Router
en
conf t
int fa 0/0
no shutdown
exit
interface fast 0/0.1
encapsulation dot1q 2 #將以太網(wǎng)子接口0/0.1劃分到vlan 2,并且封裝格式為802.1q
ip address 192.168.1.1 255.255.255.0
exit

int fa 0/0.2
encapsulation dot1q 3 #將以太網(wǎng)子接口0/0.2劃分到vlan 3,并且封裝格式為802.1q
ip address 192.168.2.1 255.255.255.0
end
show ip route

實戰(zhàn)演練

配置交換機

Switch>en
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#vlan 2
Switch(config-vlan)#exit
Switch(config)#vlan 3
Switch(config-vlan)#exit
Switch(config)#int fa 0/2
Switch(config-if)#sw access vlan 2
Switch(config-if)#exit
Switch(config)#int fa 0/3
Switch(config-if)#sw access vlan 3
Switch(config-if)#exit
Switch(config)#int fa 0/1
Switch(config-if)#sw mode trunk
Switch(config-if)#end
Switch#
%SYS-5-CONFIG_I: Configured from console by console

Switch#show vlan

VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/1, Fa0/4, Fa0/5, Fa0/6
Fa0/7, Fa0/8, Fa0/9, Fa0/10
Fa0/11, Fa0/12, Fa0/13, Fa0/14
Fa0/15, Fa0/16, Fa0/17, Fa0/18
Fa0/19, Fa0/20, Fa0/21, Fa0/22
Fa0/23, Fa0/24, Gig1/1, Gig1/2
2 VLAN0002 active Fa0/2
3 VLAN0003 active Fa0/3
1002 fddi-default act/unsup
1003 token-ring-default act/unsup
1004 fddinet-default act/unsup
1005 trnet-default act/unsup

VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1 enet 100001 1500 - - - - - 0 0
2 enet 100002 1500 - - - - - 0 0
3 enet 100003 1500 - - - - - 0 0
1002 fddi 101002 1500 - - - - - 0 0
--More--

配置路由器

--- System Configuration Dialog ---

Continue with configuration dialog? [yes/no]: no


Press RETURN to get started!



Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int fa 0/0
Router(config-if)#no shutdown

%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up

Router(config-if)#exit
Router(config)#int fa 0/0.1

%LINK-5-CHANGED: Interface FastEthernet0/0.1, changed state to up
Router(config-subif)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0.1, changed state to up

Router(config-subif)#encapsulation dot1q 2 #將以太網(wǎng)子接口0/0.1劃分到vlan 2,并且封裝格式為802.1q
Router(config-subif)#ip address 192.168.1.1 255.255.255.0
Router(config-subif)#exit
Router(config)#int fa 0/0.2

%LINK-5-CHANGED: Interface FastEthernet0/0.2, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0.2, changed state to up
Router(config-subif)#encapsulation dot1q 3 #將以太網(wǎng)子接口0/0.2劃分到vlan 3,并且封裝格式為802.1q
Router(config-subif)#ip address 192.168.2.1 255.255.255.0
Router(config-subif)#end
Router#
%SYS-5-CONFIG_I: Configured from console by console

Router#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route

Gateway of last resort is not set

C 192.168.1.0/24 is directly connected, FastEthernet0/0.1
C 192.168.2.0/24 is directly connected, FastEthernet0/0.2
Router#

測試

PC1 ping PC2

PC>ipconfig

IP Address......................: 192.168.1.2
Subnet Mask.....................: 255.255.255.0
Default Gateway.................: 192.168.1.1

PC>ping 192.168.2.2

Pinging 192.168.2.2 with 32 bytes of data:

Request timed out.
Reply from 192.168.2.2: bytes=32 time=20ms TTL=127
Reply from 192.168.2.2: bytes=32 time=22ms TTL=127
Reply from 192.168.2.2: bytes=32 time=23ms TTL=127

Ping statistics for 192.168.2.2:
Packets: Sent = 4, Received = 3, Lost = 1 (25% loss),
Approximate round trip times in milli-seconds:
Minimum = 20ms, Maximum = 23ms, Average = 21ms

PC>ping 192.168.2.2

Pinging 192.168.2.2 with 32 bytes of data:

Reply from 192.168.2.2: bytes=32 time=28ms TTL=127
Reply from 192.168.2.2: bytes=32 time=19ms TTL=127
Reply from 192.168.2.2: bytes=32 time=21ms TTL=127
Reply from 192.168.2.2: bytes=32 time=22ms TTL=127

Ping statistics for 192.168.2.2:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 19ms, Maximum = 28ms, Average = 22ms

PC2 ping PC1

PC>ipconfig

IP Address......................: 192.168.2.2
Subnet Mask.....................: 255.255.255.0
Default Gateway.................: 192.168.2.1

PC>ping 192.168.1.2

Pinging 192.168.1.2 with 32 bytes of data:

Reply from 192.168.1.2: bytes=32 time=22ms TTL=127
Reply from 192.168.1.2: bytes=32 time=26ms TTL=127
Reply from 192.168.1.2: bytes=32 time=24ms TTL=127
Reply from 192.168.1.2: bytes=32 time=21ms TTL=127

Ping statistics for 192.168.1.2:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 21ms, Maximum = 26ms, Average = 23ms

網(wǎng)頁題目:單臂路由實戰(zhàn)講解
本文地址:http://m.5511xx.com/article/cdhgdjs.html