Daryan997

InterVLAN Routing

Dec 20th, 2022
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.19 KB | None | 0 0
  1. [First enable switch and go to configuration terminal]
  2. enable
  3. configure terminal
  4.  
  5. [Go to all interfaces connected and switch to trunk mode]
  6. interface FastEthernet0/1
  7. switchport mode trunk
  8.  
  9. [Add VLAN 10 and 20]
  10. switchport trunk allowed vlan add 10
  11. switchport trunk allowed vlan add 20
  12.  
  13. [Repeat steps for other ethernets]
  14. interface FastEthernet0/2
  15. switchport mode trunk
  16. switchport trunk allowed vlan add 10
  17. switchport trunk allowed vlan add 20
  18. interface GigabitEthernet0/2
  19. switchport mode trunk
  20. switchport trunk allowed vlan add 10
  21. switchport trunk allowed vlan add 20
  22.  
  23.  
  24. [Enable router and go to configuration terminal and add VLAN 10 and 20]
  25. enable
  26. configure terminal
  27. vlan 10 name G06Lab
  28. vlan 20 name G14Lab
  29.  
  30. [Go to the interface and activate it]
  31. interface GigabitEthernet0/0
  32. no shutdown
  33.  
  34. [Go to sub-interface of VLAN 10 and 20]
  35. interface GigabitEthernet0/0.10
  36.  
  37. [configure to interface to respond to VLAN]
  38. encapsulation dot1Q 10
  39.  
  40. [add IP address to the sub-interface]
  41. ip address 192.168.10.1 255.255.255.0
  42. exit
  43.  
  44. [Repeat it for VLAN 20]
  45. interface GigabitEthernet0/0.20
  46. encapsulation dot1Q 20
  47. ip address 192.168.20.1 255.255.255.0
  48. exit
  49.  
  50. [Write changes to the router]
  51. do write
Add Comment
Please, Sign In to add comment