In these kind of diagrams, we only see the L3 part (routers). But the actual topology contains a switch.
E0/0 of all routers are connected to the switch in a star topology where the switch is in the middle.
Sub interfaces must be created as 802.1Q trunks from both router end and switch end.
VLANs must be created on the switch for each and every sub-interface network segment.
Configuration
R1(config)#int e0/0R1(config-if)#no shutdown
R1(config-if)#int e0/0.12
R1(config-if)#encapsulation dot1Q 12
R1(config-if)#ip address 192.168.12.1 255.255.255.0
R1(config-if)#int e0/0.13
R1(config-if)#encapsulation dot1Q 13
R1(config-if)#ip address 192.168.13.1 255.255.255.0
R2(config)#int e0/0
R2(config-if)#no shutdown
R2(config-if)#int e0/0.12
R2(config-if)#encapsulation dot1Q 12
R2(config-if)#ip address 192.168.12.2 255.255.255.0
R2(config-if)#int e0/0.13
R2(config-if)#encapsulation dot1Q 23
R2(config-if)#ip address 192.168.23.2 255.255.255.0
R3(config)#int e0/0
R3(config-if)#no shutdown
R3(config-if)#int e0/0.13
R3(config-if)#encapsulation dot1Q 13
R3(config-if)#ip address 192.168.13.3 255.255.255.0
R3(config-if)#int e0/0.23
R3(config-if)#encapsulation dot1Q 23
R3(config-if)#ip address 192.168.23.3 255.255.255.0
SW(config)#vlan 13
SW(config)#vlan 23
SW(config)#int e0/1
SW(config-if)#switchport trunk encapsulation dot1q
SW(config-if)#switchport mode trunk
SW(config-f)#int e0/2
SW(config-if)#switchport trunk encapsulation dot1q
SW(config-if)#switchport mode trunk
SW(config-if)#int e0/3
SW(config-if)#switchport trunk encapsulation dot1q
SW(config-if)#switchport mode trunk
Anyhow, final outputs must be like this,
No comments:
Post a Comment