It is very useful to know some knowledge about route Switch configuration. Here we mainly introduce the application of Route Switch configuration instance, in Lan, you can use a route switch to configure VLANs to reduce the range of host communication broadcast domains.
When some hosts need to communicate with each other, but the switch does not support layer-3 switching, you can use a routing switch that supports 802.1Q to achieve VLAN interconnection. this requires creating a sub-interface on the Ethernet port, assigning an IP address as the gateway of the VLAN, and starting 802.1Q at the same time. Networking: The vroee0 port is connected to the uplink trunk port (Port 24th) of the vswitch. the downlink port of the vswitch is divided into three VLANs with several hosts. The topology is as follows:
1. Route Switch configuration
- [Router]
- [Router] inter e0
- [Router-Ethernet0] ip add 10.0.0.1 255.255.255.0
- [Router-Ethernet0] inter e0.1 // define sub-interface E0.1
- [Router-Ethernet0.1] ip add 172.16.1.1 255.255.255.0
- [Router-Ethernet0.1] vlan-type dot1q vid 1 // specify that the Ethernet sub-interface belongs to vlan1. this command is applied to the Ethernet sub-interface.
- [Router-Ethernet0.1] inter e0.2 // define sub-interface E0.2
- [Router-Ethernet0.2] ip add 172.16.2.1 255.255.255.0
- [Router-Ethernet0.2] vlan-type dot1q vid 2 // specify that the Ethernet sub-interface belongs to VLAN2
- [Router-Ethernet0.2] inter e0.3 // define sub-interface E0.3
- [Router-Ethernet0.3] ip add 172.16.3.1 255.255.255.0
- [Router-Ethernet0.3] vlan-type dot1q vid 3 // specify that the Ethernet sub-interface belongs to VLAN3
- [Router-Ethernet0.3] inter e0
- [Router-Ethernet0] undo shut
- % Interface Ethernet0 is up
- [Router-Ethernet0] // connect E0 port to S3026 24th port with network cable
- % 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
-
2. Switch configuration
- <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. Check whether the network is connected on the workstation. This workstation connects to port S3026 21st, which belongs to vlan2.
- C: \ Documents ents and Settings \ Administrator> ipconfig
- Windows 2000 IP Configuration
- Ethernet adapter local connection:
- Connection-specific DNS Suffix .:
- IP Address ......: 172.16.2.22
- Subnet Mask ......: 255.255.255.0
- Default Gateway ......: 172.16.2.1
- C: \ Documents ents 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 <10 ms TTL = 255
- Reply from 172.16.3.1: bytes = 32 time <10 ms TTL = 255
- Reply from 172.16.3.1: bytes = 32 time <10 ms TTL = 255
- Reply from 172.16.3.1: bytes = 32 time <10 ms TTL = 255
- Ping statistics for 172.16.3.1:
- Packets: Sent = 4, stored ED = 4, Lost = 0 (0% loss ),
- Approximate round trip times in milli-seconds:
- Minimum = 0 ms, Maximum = 0 ms, Average = 0 ms
-