单臂路由与三层交换技术简单介绍
單臂路由與三層交換技術(shù)簡單介紹
- 單臂路由與三層交換技術(shù)
- 一、單臂路由技術(shù)
- 二、使用實例
- 二、三層交換技術(shù)
- 使用實例
- 總結(jié)
單臂路由與三層交換技術(shù)
我們?nèi)绾螌崿F(xiàn)不同vlan之間的通信:
- 單臂路由技術(shù):二層交換機+路由器
- 三層交換技術(shù):三層交換機
一、單臂路由技術(shù)
單臂路由(router-on-a-stick)是指在路由器的一個接口上通過配置子接口(或“邏輯接口”,并不存在真正物理接口)的方式,實現(xiàn)原來相互隔離的不同VLAN(虛擬局域網(wǎng))之間的互聯(lián)互通。
二、使用實例
代碼如下(示例):
LSW5
The device is running!<Huawei>undo terminal monitor Info: Current terminal monitor is off. <Huawei>sys Enter system view, return user view with Ctrl+Z. [Huawei]sysname LSW5 [LSW5]vlan bat 2 3 Info: This operation may take a few seconds. Please wait for a moment...done. [LSW5]int e0/0/1 [LSW5-Ethernet0/0/1]port link-type trunk [LSW5-Ethernet0/0/1]port trunk allow-pass vlan all [LSW5-Ethernet0/0/1]int e0/0/2 [LSW5-Ethernet0/0/2]port link-type access [LSW5-Ethernet0/0/2]port default vlan 2 [LSW5-Ethernet0/0/2]int e0/0/3 [LSW5-Ethernet0/0/3]port link-type access [LSW5-Ethernet0/0/3]port default vlan 3R2
代碼如下(示例):
The device is running!<Huawei>undo terminal monitor Info: Current terminal monitor is off. <Huawei>sys Enter system view, return user view with Ctrl+Z. [Huawei]sysname R2 [R2]int e0/0/0 [R2-Ethernet0/0/0]undo shutdown Info: Interface Ethernet0/0/0 is not shutdown. [R2-Ethernet0/0/0.2]int e0/0/0.1 [R2-Ethernet0/0/0.1]vlan-type dot1q 2 default [R2-Ethernet0/0/0.1]ip add 192.168.2.1 24 [R2-Ethernet0/0/0.1]int e0/0/0.2 [R2-Ethernet0/0/0.2]vlan-type dot1q 3 default [R2-Ethernet0/0/0.2]ip add 192.168.3.1 24 [R2-Ethernet0/0/0.1]q通訊結(jié)果:
PC>ping 192.168.3.10Ping 192.168.3.10: 32 data bytes, Press Ctrl_C to break From 192.168.3.10: bytes=32 seq=1 ttl=127 time=125 ms From 192.168.3.10: bytes=32 seq=2 ttl=127 time=78 ms From 192.168.3.10: bytes=32 seq=3 ttl=127 time=78 ms From 192.168.3.10: bytes=32 seq=4 ttl=127 time=78 ms From 192.168.3.10: bytes=32 seq=5 ttl=127 time=78 ms--- 192.168.3.10 ping statistics ---5 packet(s) transmitted5 packet(s) received0.00% packet lossround-trip min/avg/max = 78/87/125 ms PC>ping 192.168.2.10Ping 192.168.2.10: 32 data bytes, Press Ctrl_C to break From 192.168.2.10: bytes=32 seq=1 ttl=127 time=78 ms From 192.168.2.10: bytes=32 seq=2 ttl=127 time=94 ms From 192.168.2.10: bytes=32 seq=3 ttl=127 time=78 ms From 192.168.2.10: bytes=32 seq=4 ttl=127 time=78 ms From 192.168.2.10: bytes=32 seq=5 ttl=127 time=94 ms--- 192.168.2.10 ping statistics ---5 packet(s) transmitted5 packet(s) received0.00% packet lossround-trip min/avg/max = 78/84/94 ms該處使用的url網(wǎng)絡請求的數(shù)據(jù)。
二、三層交換技術(shù)
三層交換(也稱多層交換技術(shù),或 IP 交換技術(shù))是相對于傳統(tǒng)交換概念而提出的。眾所周知,傳統(tǒng)的交換技術(shù)是在 OSI 網(wǎng)絡標準模型中的第二層 —— 數(shù)據(jù)鏈路層進行操作的,而三層交換技術(shù)是在網(wǎng)絡模型中的第三層實現(xiàn)了數(shù)據(jù)包的高速轉(zhuǎn)發(fā)。簡單地說,三層交換技術(shù)就是:二層交換技術(shù)+三層轉(zhuǎn)發(fā)技術(shù)。
使用實例
代碼如下(示例)
通信結(jié)果:
PC>ping 192.168.3.10Ping 192.168.3.10: 32 data bytes, Press Ctrl_C to break From 192.168.3.10: bytes=32 seq=1 ttl=127 time=94 ms From 192.168.3.10: bytes=32 seq=2 ttl=127 time=47 ms From 192.168.3.10: bytes=32 seq=3 ttl=127 time=46 ms From 192.168.3.10: bytes=32 seq=4 ttl=127 time=32 ms From 192.168.3.10: bytes=32 seq=5 ttl=127 time=47 ms--- 192.168.3.10 ping statistics ---5 packet(s) transmitted5 packet(s) received0.00% packet lossround-trip min/avg/max = 32/53/94 ms PC>ping 192.168.2.10Ping 192.168.2.10: 32 data bytes, Press Ctrl_C to break From 192.168.2.10: bytes=32 seq=1 ttl=127 time=31 ms From 192.168.2.10: bytes=32 seq=2 ttl=127 time=47 ms From 192.168.2.10: bytes=32 seq=3 ttl=127 time=47 ms From 192.168.2.10: bytes=32 seq=4 ttl=127 time=46 ms From 192.168.2.10: bytes=32 seq=5 ttl=127 time=47 ms--- 192.168.2.10 ping statistics ---5 packet(s) transmitted5 packet(s) received0.00% packet lossround-trip min/avg/max = 31/43/47 ms總結(jié)
單臂路由技術(shù):當只有二層交換機時,又要實現(xiàn)不同vlan間通信時,需要用到單臂路由技術(shù)。
三層交換技術(shù):三層交換機可配置vlanif接口,通過vlanif接口可配置ip地址,成為不同vlan對應的網(wǎng)關(guān),從而實現(xiàn)不同vlan間路由。
三層交換的出現(xiàn),解決了局域網(wǎng)中網(wǎng)段劃分之后,網(wǎng)段中子網(wǎng)必須依賴路由器進行管理的局面,從而緩解了由于路由器負擔過重而造成的網(wǎng)絡瓶頸問題。
總結(jié)
以上是生活随笔為你收集整理的单臂路由与三层交换技术简单介绍的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 爆款标题:掌握apu ddr4内存,电脑
- 下一篇: 内存当做SSD缓存,电脑速度提升有多快?