In this post I will post how to create a cisco VLAN. Previously I've ever posted with the same material that is making VLAN cisco, but in this case I made a different topology than the previous one. Only this time I add a router that connects to the switch. You can see the topology below.
Read More : How to Configure a Cisco Vlan Switch
How to Create a VLAN With Cisco Packet Tracer
1. Setting Router 1, Switch 1 and Switch 2
First make the topology as above. Information:
1. Setting First Router
2. Setting First switch connected to the router
3. Setting the second switch
Setting the Router as follows:
1. Setting First Router
2. Setting First switch connected to the router
3. Setting the second switch
Setting the Router as follows:
01 | Router>en |
02 |
03 | Router #conf t |
04 |
05 | Router(config) #interface fastEthernet 0/1 |
06 |
07 | Router(config - if ) #ip address 192.168.5.6 255.255.255.128 |
08 |
09 | Router(config - if ) #no shutdown |
10 |
11 | Router(config - if ) #exit |
12 |
13 |
14 |
15 | Router(config) #interface fastEthernet 0/1.10 |
16 |
17 | Router(config - subif) #encapsulation dot1Q 10 |
18 |
19 | Router(config - subif) #ip address 192.168.10.33 255.255.255.224 |
20 |
21 | Router(config - subif) #description REZA |
22 |
23 | Router(config - subif) #no shutdown |
24 |
25 | Router(config - subif) #exit |
26 |
27 |
28 |
29 | Router(config) #interface fastEthernet 0/1.20 |
30 |
31 | Router(config - subif) #encapsulation dot1Q 20 |
32 |
33 | Router(config - subif) #ip address 192.168.20.65 255.255.255.224 |
34 |
35 | Router(config - subif) #description LUTFI |
36 |
37 | Router(config - subif) #no shutdown |
38 |
39 | Router(config - subif) #exit |
Then setting the first switch connected to the router as follows:
01 | Switch>en |
02 |
03 | Switch #conf t |
04 |
05 | Switch(config) #int vlan 1 |
06 |
07 | Switch(config - if ) #ip address 192.168.5.7 255.255.255.128 |
08 |
09 | Switch(config - if ) #description TRUNK |
10 |
11 | Switch(config - if ) #no shutdown |
12 |
13 | Switch(config - if ) #exit |
14 |
15 | Switch(config) #ip default-gateway 192.168.5.6 |
16 |
17 |
18 |
19 | Switch(config) #interface fastEthernet 0/1 |
20 |
21 | Switch(config - if ) #switchport mode trunk |
22 |
23 | Switch(config - if ) #exit |
24 |
25 | Switch(config) #exit |
26 |
27 |
28 |
29 | Switch #vlan database |
30 |
31 | Switch(vlan) #vlan 10 name REZA |
32 |
33 | Switch(vlan) #vlan 20 name LUTFI |
34 |
35 | Switch(vlan) #exit |
After that setting the second switch.
01 | Switch>en |
02 |
03 | Switch #vlan database |
04 |
05 | Switch(vlan) #vlan 10 name REZA |
06 |
07 | Switch(vlan) #vlan 20 name LUTFI |
08 |
09 | Switch(vlan) #exit |
10 |
11 |
12 |
13 | Switch #conf t |
14 |
15 | Switch(config) #interface fastEthernet 0/1 |
16 |
17 | Switch(config - if ) #switchport mode trunk |
18 |
19 | Switch(config - if ) #exit |
20 |
21 |
22 |
23 | Switch(config) #interface range fastEthernet 0/2-3 |
24 |
25 | Switch(config - if - range ) #switchport mode access |
26 |
27 | Switch(config - if - range ) #switchport access vlan 10 |
28 |
29 | Switch(config - if - range ) #exit |
30 |
31 |
32 |
33 | Switch(config) #interface range fastEthernet 0/4-5 |
34 |
35 | Switch(config - if - range ) #switchport mode access |
36 |
37 | Switch(config - if - range ) #switchport access vlan 20 |
38 |
39 | Switch(config - if - range ) #exit |
2. Adding Second Router and Third Switch
As already mentioned in the title of the post using 2 routers, at this stage you please create a topology as above after configuration in the early stages. At this point, we will configure vlan 30 and vlan 40 after it has configured vlan 10 and vlan 20. Please follow the following steps.
Second Router Configuration:
01 | Router>en |
02 |
03 | Router #conf t |
04 |
05 | Router(config) #interface fastEthernet 0/1 |
06 |
07 | Router(config - if ) #ip address 192.168.10.10 255.255.255.0 |
08 |
09 | Router(config - if ) #no shutdown |
10 |
11 | Router(config - if ) #exit |
12 |
13 |
14 |
15 | Router(config) #interface fastEthernet 0/1.30 |
16 |
17 | Router(config - subif) #encapsulation dot1Q 30 |
18 |
19 | Router(config - subif) #ip address 192.168.30.33 255.255.255.240 |
20 |
21 | Router(config - subif) #description PakEko |
22 |
23 | Router(config - subif) #no shutdown |
24 |
25 | Router(config - subif) #exit |
26 |
27 |
28 |
29 | Router(config) #interface fastEthernet 0/1.40 |
30 |
31 | Router(config - subif) #encapsulation dot1Q 40 |
32 |
33 | Router(config - subif) #ip address 192.168.40.49 255.255.255.240 |
34 |
35 | Router(config - subif) #description MasHeru |
36 |
37 | Router(config - subif) #no shutdown |
38 |
39 | Router(config - subif) #exit |
Third Switch Configuration:
01 | Switch>en |
02 |
03 | Switch #vlan data |
04 |
05 | Switch(vlan) #vlan 30 name PakEko |
06 |
07 | Switch(vlan) #vlan 40 name MasHeru |
08 |
09 | Switch(vlan) #exit |
10 |
11 |
12 |
13 | Switch #conf t |
14 |
15 | Switch(config) #interface vlan 2 |
16 |
17 | Switch(config - if ) #ip address 192.168.10.1 255.255.255.0 |
18 |
19 | Switch(config - if ) #description TRUNK |
20 |
21 | Switch(config - if ) #no shutdown |
22 |
23 | Switch(config - if ) #exit |
24 |
25 | Switch(config) #ip default-gateway 192.168.10.10 |
26 |
27 |
28 |
29 | Switch(config) #interface fastEthernet 0/1 |
30 |
31 | Switch(config - if ) #switchport mode trunk |
32 |
33 | Switch(config - if ) #exit |
34 |
35 |
36 |
37 | Switch(config) #interface range fastEthernet 0/2-3 |
38 |
39 | Switch(config - if - range ) #switchport mode access |
40 |
41 | Switch(config - if - range ) #switchport access vlan 30 |
42 |
43 | Switch(config - if - range ) #exit |
44 |
45 |
46 |
47 | Switch(config) #interface range fastEthernet 0/4-5 |
48 |
49 | Switch(config - if - range ) #switchport mode access |
50 |
51 | Switch(config - if - range ) #switchport access vlan 40 |
52 |
53 | Switch(config - if - range ) #exit |
3. Adding Connected Servers On The First Router
The next stage, connect the server with the router one by setting router as follows:
01 | Router>en |
02 |
03 | Router #conf t |
04 |
05 | Router(config) #interface fastEthernet 0/0 |
06 |
07 | Router(config - if ) #ip address 192.168.20.1 255.255.255.192 |
08 |
09 | Router(config - if ) #no shutdown |
10 |
11 | Router(config - if ) #exit |
4. Connect Second Router with Switch
At this point we live to connect the second router and give the IP to the router on FA 0/0 interface. The trick as follows:
01 | Router>en |
02 |
03 | Router #conf t |
04 |
05 | Router(config) #interface fastEthernet 0/0 |
06 |
07 | Router(config - if ) #ip address 192.168.5.5 255.255.255.128 |
08 |
09 | Router(config - if ) #no shutdown |
10 |
11 | Router(config - if ) #exit |
5. Opening the Data Access Path Using IP Route
In this last step, we just give access data path by using command "ip route" that is by entering command "ip route network subnetmask through ip".
Example "ip route 192.168.1.0 255.255.255.0 192.168.2.1"
Information :
192.168.1.0 is the network to be opened path.
255.255.255.0 is a subnetmask of network 192.168.1.0.
192.168.2.1 is the data entry path where network 192.168.1.0 will go.
For configuration you can follow the following ways:
Our first configuration on the first router.
1 | Router>en |
2 |
3 | Router #conf t |
4 |
5 | Router(config) #ip route 192.168.30.32 255.255.255.240 192.168.5.5 |
6 |
7 | Router(config) #ip route 192.168.40.48 255.255.255.240 192.168.5.5 |
8 |
9 | Router(config) #exit |
And for configuration on the second router as follows:
1 | Router>en |
2 | Router #conf t |
3 | Router(config) #ip route 192.168.10.32 255.255.255.224 192.168.5.6 |
4 | Router(config) #ip route 192.168.20.64 255.255.255.224 192.168.5.6 |
5 | Router(config) #ip route 192.168.20.0 255.255.255.224 192.168.5.6 |
6 | Router(config) #exit |
Ok finished my post which is How to Configure Vlan Cisco Switch and 2 Router. If I have any misconceptions or writing errors, I ask you to comment on suggestions or criticisms for me And hopefully this post is very useful for you to complete your work easily.
Posting Komentar
0 komentar
Dear readers, after reading the Content please ask for advice and to provide constructive feedback Please Write Relevant Comment with Polite Language.Your comments inspired me to continue blogging. Your opinion much more valuable to me. Thank you.
Click to see the code!
To insert emoticon you must added at least one space before the code.