Monday, October 27, 2014

Huawei – Router on a Stick (Router and Switch Config)

How to Configure Huawei router-on-a-stick

Requirements: The range on the host broadcast domain of communication can be reduced by VLAN configuration to the switch on the LAN. You can use a router that supports 802.1Q to realize interoperability of VLAN on the condition that part of the hosts need to communicate among VLAN while the switches doesn’t support the huawei three-layer switch, which requires the establishment of a sub-interface on the Ethernet port, assignment of the IP address as the related VLAN gateway, and start 802.1Q at the same time.

Networking: Connect E0 port of the router with uplink trunk port (24th ports) of the switch on the router, and divide 3 VLAN on switch downward port with several hosts.

Router Config

interface Ethernet0/0/4
ip address 10.0.0.1 255.255.255.0

interface Ethernet0/0/4.1           
  ip address 172.16.1.1 255.255.255.0
  vlan-type dot1q vid 1

Specify the Ethernet sub-interfaces belonging to VLAN1, and this command is applied to the Ethernet sub-interface. Only this command is configured, the Ethernet sub-interface will be embedded VLAN tag in the Ethernet frame header according to the configuration of the VLAN ID number so that the switch port connected to the switch interface can deal with the received frame correctly only the command has been configured.             

interface Ethernet0/0/4.2                     
ip address 172.16.2.1 255.255.255.0
dot1q termination vid 2

interface Ethernet0/0/4.3
  ip address 172.16.3.1 255.255.255.0

  dot1q termination vid 3

interface Ethernet0/0/4
  undo shut
% Interface Ethernet0/0/4 is up

Connect the E0 port with the 24th port of S3026 with the network cable                             
%19:46:32: Interface Ethernet0/0/4 changed state to UP
%19:46:32: Line protocol ip on interface Ethernet0/0/4, changed state to UP
%19:46:32: Line protocol ip on interface Ethernet0/0/4.1, changed state to UP
%19:46:32: Line protocol ip on interface Ethernet0/0/4.2, changed state to UP
%19:46:32: Line protocol ip on interface Ethernet0/0/4.3, changed state to UP

 

Switch Config

vlan 1

vlan 2
interface eth 0/17
interface eth 0/18
interface eth 0/19
interface eth 0/22

vlan 3
interface eth 0/21

interface eth 0/24
port link-type trunk
port trunk permit vlan all

Check out the TRUNK port configuration
display port trunk    
Now, the following trunking ports exist:
Ethernet0/24

Check out the VLAN2 configuration
display vlan 2     
VLAN ID: 2
VLAN Type: static
Route Interface: not configured
Description: VLAN 0002

Tagged Ports:
Ethernet0/24

Untagged Ports:
Ethernet0/17 Ethernet0/18 Ethernet0/19 Ethernet0/22

Check out the VLAN3 configuration
display vlan 3     
VLAN ID: 3
VLAN Type: static

Route Interface: not configured
Description: VLAN 0003

Tagged Ports:
Ethernet0/24

Untagged Ports:
Ethernet0/21

Check the network connectivity on the workstation. This workstation is connected to the 21st port of S3026, belonging to VLAN2.

C:\Documents 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 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

View the routing table on the Huawei router, can be found, as each of the network segments on the 172.16 are connected to the router directly, so the communication between the VLAN can be realized without starting the routing protocols or static routing.

[Router]display ip routing-table

Routing Tables:

Destination/Mask Proto Pref Metric Nexthop Interface

10.0.0.0/24 Direct 0 0 10.0.0.1 Ethernet0
10.0.0.1/32 Direct 0 0 127.0.0.1LoopBack0
127.0.0.0/8 Direct 0 0 127.0.0.1 LoopBack0
127.0.0.1/32 Direct 0 0 127.0.0.1 LoopBack0
172.16.1.0/24 Direct 0 0 172.16.1.1 Ethernet0.1
172.16.1.1/32 Direct 0 0 127.0.0.1 LoopBack0
172.16.2.0/24 Direct 0 0 172.16.2.1 Ethernet0.2
172.16.2.1/32 Direct 0 0 127.0.0.1 LoopBack0
172.16.3.0/24 Direct 0 0 172.16.3.1 Ethernet0.3
172.16.3.1/32 Direct 0 0 127.0.0.1 LoopBack0

Based On:

Related Links: