In this EVE-NG VLAN Configuration example, we will configure VLAN on Cisco switches with EVE-NG. In another lessons, we have configured VLANs on Cisco Packet Tracer. Here, we will use EVE-NG network simulator and we will configure VLANs on Cisco switches.
For EVE-NG VLAN Example, we will use the below Virtual LAN topology. Here, we have three switches and there are two PCs connected to each switch.
In this Virtual LAN Configuration example, we will configure access ports and trunk ports on Cisco switches. Here, the ports towards the PCs will be vlan access ports while the ports between the switches will be vlan trunk ports.
Before Virtual Lan Config, we will set the ip addresses of the PCs. After that we will ping each PC from one PC to see that all the PCs in the same network can ping each other. And after VLAN configuration, we will do this ping test again and we will see that only PCs in the same VLAN can ping each other.
Let’s start Cisco VLAN Configuration with EVE-NG.
Table of Contents
Our IP address configurations will be like below for the PCS. After these configurations we will ping each PC from PC1.
PC1: 10.0.0.1
PC2: 10.0.0.2
PC3: 10.0.0.3
PC4: 10.0.0.4
PC5: 10.0.0.5
PC6: 10.0.0.6
On PC1, we will use “ipconfig” command to check ip address configuration and then we will use ping command with other PC ip addresses to check the connectivity.
C:\> ipconfig
FastEthernet0 Connection:(default port)
Connection-specific DNS Suffix..:
Link-local IPv6 Address………: FE80::290:CFF:FE23:9A83
IPv6 Address………………..: ::
IPv4 Address………………..: 10.0.0.1
Subnet Mask…………………: 255.255.255.0
Default Gateway……………..: ::
0.0.0.0
C:\> ping 10.0.0.2
Pinging 10.0.0.2 with 32 bytes of data:
Reply from 10.0.0.2: bytes=32 time=4ms TTL=128
Reply from 10.0.0.2: bytes=32 time=4ms TTL=128
Reply from 10.0.0.2: bytes=32 time=4ms TTL=128
Reply from 10.0.0.2: bytes=32 time=4ms TTL=128
Ping statistics for 10.0.0.2:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 4ms, Maximum = 4ms, Average = 4ms
In this EVE-NG VLAN Configuration example, we will use three VLANs: VLAN 2, 3 and 4. We will assign two PCs to ach Virtual Local Area Network. To do this, we will use two key Cisco VLAN commands, these are:
With “switchport mode access” command, we set the switch port as access port.
With “switchport access vlan vlan-id” command, we will set the vlan on this port.
Let’s start with Switch0.
Switch0# configure terminal
Switch0(config)# interface FastEthernet2/1
Switch0(config-if)# switchport mode access
Switch0(config-if)# switchport access vlan 2
Switch0(config)# interface FastEthernet3/1
Switch0(config-if)# switchport mode access
Switch0(config-if)# switchport access vlan 3
Now, we will configure Switch1.
Switch1# configure terminal
Switch1(config)# interface FastEthernet2/1
Switch1(config-if)# switchport mode access
Switch1(config-if)# switchport access vlan 4
Switch1(config)# interface FastEthernet3/1
Switch1(config-if)# switchport mode access
Switch1(config-if)# switchport access vlan 2
Now, Switch2.
Switch2# configure terminal
Switch2(config)# interface FastEthernet2/1
Switch2(config-if)# switchport mode access
Switch2(config-if)# switchport access vlan 4
Switch2(config)# interface FastEthernet3/1
Switch2(config-if)# switchport mode access
Switch2(config-if)# switchport access vlan 3
After VLAN access port configuration on Cisco switches, now it is time to configure VLAN trunk ports. Here, we will configure the ports between the switches as trunk ports. To do this, we will use the below two vlan trunk commands:
Here, with “switchport mode trunk” command we set the port as trunk port.
With “switchport trunk allowed vlan vlan-range” command, we set the allowed VLANs on this trunk port.
Again, we will start with Switch0. After the configuration, we will save our configuration with “write” command.
Switch0(config)# interface FastEthernet0/1
Switch0(config-if)# switchport mode trunk
Switch0(config-if)# switchport trunk allowed vlan 2-4
Switch0(config)# interface FastEthernet1/1
Switch0(config-if)# switchport mode trunk
Switch0(config-if)# switchport trunk allowed vlan 2-4
Switch0(config-if)# end
Switch0# write
We will continue with Switch1.
Switch1(config)# interface FastEthernet0/1
Switch1(config-if)# switchport mode trunk
Switch1(config-if)# switchport trunk allowed vlan 2-4
Switch1(config)# interface FastEthernet1/1
Switch1(config-if)# switchport mode trunk
Switch1(config-if)# switchport trunk allowed vlan 2-4
Switch1(config-if)# end
Switch1# write
And lastly, we will configure vlan trunk ports of Switch2.
Switch2(config)# interface FastEthernet0/1
Switch2(config-if)# switchport mode trunk
Switch2(config-if)# switchport trunk allowed vlan 2-4
Switch2(config)# interface FastEthernet1/1
Switch2(config-if)# switchport mode trunk
Switch2(config-if)# switchport trunk allowed vlan 2-4
Switch2(config-if)# end
Switch2# write
After VLAN Configuration on each Cisco switches, now, it is time to verify our EVE-NG Cisco VLAN Configuration example. To do this, we will use ping test again. We will use ping between PCs in the same VLAN and between PCs in different VLANs. As we expected, ping between the PCs in different VLANs will fail.
When we ping PC3 from PC0, ping is successful. Because PC0 and PC3 are in the same VLAN, in VLAN 2.
C:\>ping 10.0.0.4
Pinging 10.0.0.4 with 32 bytes of data:
Reply from 10.0.0.4: bytes=32 time<1ms TTL=128
Reply from 10.0.0.4: bytes=32 time<1ms TTL=128
Reply from 10.0.0.4: bytes=32 time<1ms TTL=128
Reply from 10.0.0.4: bytes=32 time<1ms TTL=128
Ping statistics for 10.0.0.4:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
When we ping PC2 and PC4 from PC0, ping failed. Because they are not in the same VLAN with PC0.
C:\>ping 10.0.0.3
Pinging 10.0.0.3 with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Ping statistics for 10.0.0.3:
Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),
C:\>ping 10.0.0.5
Pinging 10.0.0.5 with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Ping statistics for 10.0.0.5:
Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),
Our configuration is OK.
We can also use some Cisco VLAN shows command to verify Virtual LAN configuration on EVE-NG simulator. These commands are given below:
Switch0# show vlan
VLAN Name Status Ports
—- ——————————– ——— ——————————-
1 default active Fa4/1, Fa5/1
2 VLAN0002 active Fa2/1
3 VLAN0003 active Fa3/1
1002 fddi-default active
1003 token-ring-default active
1004 fddinet-default active
1005 trnet-default active
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
1003 tr 101003 1500 – – – – – 0 0
1004 fdnet 101004 1500 – – – ieee – 0 0
1005 trnet 101005 1500 – – – ibm – 0 0
VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
—- —– ———- —– —— —— ——– —- ——– —— ——
Remote SPAN VLANs
——————————————————————————
Primary Secondary Type Ports
Switch0# show vlan brief
VLAN Name Status Ports
—- ——————————– ——— ——————————-
1 default active Fa4/1, Fa5/1
2 VLAN0002 active Fa2/1
3 VLAN0003 active Fa3/1
1002 fddi-default active
1003 token-ring-default active
1004 fddinet-default active
1005 trnet-default active
Switch#show vlan ?
brief VTP all VLAN status in brief
id VTP VLAN status by VLAN id
name VTP VLAN status by VLAN name
Switch0 # show vlan id 2
VLAN Name Status Ports
—- ——————————– ——— ——————————-
2 VLAN0002 active Fa2/1
VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
—- —– ———- —– —— —— ——– —- ——– —— ——
2 enet 100002 1500 – – – – – 0 0
In this Cisco EVE-NG VLAN Configuration example, we have configured three Cisco switches for three VLANs. We have set PC ip addresses of PCs, access and trunk ports of switches for the VLAN configuration. And then we have tested our VLAN Configuration with a ping test. To gain more hands-on experience on Virtual LANs, you can create your own lab on EVE-NG for VLAN practice.
Leave a Reply