全面分析路由交換機配置實例應用
作者:佚名
也許很多人對路由交換機配置還不是特別的了解,沒有關系,下面我們主要針對路由交換及,詳細的分析其配置應用,希望對您有所幫助。
了解一些關于路由交換機配置的知識還是非常有用的,這里我們主要介紹路由交換機配置實例應用,在局域網中,通過路由交換機配置VLAN可以減少主機通信廣播域的范圍。
當VLAN之間有部分主機需要通信,但交換機不支持三層交換時,可以采用一臺支持802.1Q的路由交換機配置實現VLAN的互通.這需要在以太口上建立子接口,分配IP地址作為該VLAN的網關,同時啟動802.1Q。組網:路由器E0端口與交換機的上行trunk端口(第24端口)相連,交換機下行口劃分3個VLAN,帶若干主機。拓撲圖如下:
1.路由交換機配置
- [Router]
- [Router]inter e0
- [Router-Ethernet0]ip add 10.0.0.1 255.255.255.0
- [Router-Ethernet0]inter e0.1 //定義子接口E0.1
- [Router-Ethernet0.1]ip add 172.16.1.1 255.255.255.0
- [Router-Ethernet0.1]vlan-type dot1q vid 1 //指定以太網子接口屬于VLAN1,此命令應用在以太網子接口上。
- [Router-Ethernet0.1]inter e0.2 //定義子接口E0.2
- [Router-Ethernet0.2]ip add 172.16.2.1 255.255.255.0
- [Router-Ethernet0.2]vlan-type dot1q vid 2 //指定以太網子接口屬于VLAN2
- [Router-Ethernet0.2]inter e0.3 //定義子接口E0.3
- [Router-Ethernet0.3]ip add 172.16.3.1 255.255.255.0
- [Router-Ethernet0.3]vlan-type dot1q vid 3 //指定以太網子接口屬于VLAN3
- [Router-Ethernet0.3]inter e0
- [Router-Ethernet0]undo shut
- % Interface Ethernet0 is up
- [Router-Ethernet0] //用網線將E0端口連到S3026第24端口
- %19:46:32: Interface Ethernet0 changed state to UP
- %19:46:32: Line protocol ip on interface Ethernet0, changed state to UP
- %19:46:32: Line protocol ip on interface Ethernet0.1, changed state to UP
- %19:46:32: Line protocol ip on interface Ethernet0.2, changed state to UP
- %19:46:32: Line protocol ip on interface Ethernet0.3, changed state to
2.交換機的配置
- <Quidway>
- <Quidway>sys
- Enter system view , return user view with Ctrl+Z.
- [Quidway]vlan 1
- [Quidway-vlan1]vlan 2
- [Quidway-vlan2]port ethernet 0/17 to eth 0/19 eth 0/22
- [Quidway-vlan2]vlan 3
3.在工作站上檢查網絡是否連通。此工作站連接S3026第21端口,屬于VLAN2。
- C:\Documents and Settings\Administrator>ipconfig
- Windows 2000 IP Configuration
- Ethernet adapter 本地連接:
- Connection-specific DNS Suffix . :
- IP Address. . . . . . . . . . . . : 172.16.2.22
- Subnet Mask . . . . . . . . . . . : 255.255.255.0
- Default Gateway . . . . . . . . . : 172.16.2.1
- C:\Documents and Settings\Administrator>ping 172.16.3.1
- Pinging 172.16.3.1 with 32 bytes of data:
- Reply from 172.16.3.1: bytes=32 time<10ms TTL=255
- Reply from 172.16.3.1: bytes=32 time<10ms TTL=255
- Reply from 172.16.3.1: bytes=32 time<10ms TTL=255
- Reply from 172.16.3.1: bytes=32 time<10ms TTL=255
- Ping statistics for 172.16.3.1:
- Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
- Approximate round trip times in milli-seconds:
- Minimum = 0ms, Maximum = 0ms, Average = 0ms
責任編輯:王曉東
來源:
計世網