Advertisement
GraionDilach

HálózatCLI 1/1

Mar 26th, 2013
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.93 KB | None | 0 0
  1. Hálózat:
  2. Router0/0-SW0/24
  3. SW0/1-PC0
  4. SW0/10-PC1
  5.  
  6. ==========================SWITCH1=============================
  7.  
  8. Switch#configure terminal
  9. Enter configuration commands, one per line. End with CNTL/Z.
  10. Switch(config)#vlan 10
  11. Switch(config)#vlan 20
  12. Switch(config-vlan)#^Z
  13.  
  14. %SYS-5-CONFIG_I: Configured from console by console
  15. Switch#show vlan
  16.  
  17. Switch#conf
  18. Switch#configure t
  19. Switch#configure terminal
  20. Enter configuration commands, one per line. End with CNTL/Z.
  21. Switch(config)#in
  22. Switch(config)#interface fa
  23. Switch(config)#interface fastEthernet 0/1
  24. Switch(config-if)#swit
  25. Switch(config-if)#switchport mo
  26. Switch(config-if)#switchport mode ac
  27. Switch(config-if)#switchport mode access
  28. Switch(config-if)#switch
  29. Switch(config-if)#switchport ac
  30. Switch(config-if)#switchport access vlan 10
  31. Switch(config-if)#^Z
  32. Switch#
  33. %SYS-5-CONFIG_I: Configured from console by console
  34. Switch#configure terminal
  35. Enter configuration commands, one per line. End with CNTL/Z.
  36. Switch(config)#interface fastEthernet 0/10
  37. Switch(config-if)#switchport access vlan 20
  38. Switch(config-if)#^Z
  39. Switch#
  40. %SYS-5-CONFIG_I: Configured from console by console
  41.  
  42. Switch#show vlan
  43.  
  44. Switch#conf
  45. Switch#configure t
  46. Switch#configure terminal
  47. Enter configuration commands, one per line. End with CNTL/Z.
  48. Switch(config)#int
  49. Switch(config)#interface fa
  50. Switch(config)#interface fastEthernet 0/24
  51. Switch(config-if)#switchport mode trunk
  52. Switch(config-if)#end
  53. Switch#
  54. %SYS-5-CONFIG_I: Configured from console by console
  55.  
  56. Switch#copy run start
  57. Destination filename [startup-config]?
  58. Building configuration...
  59. [OK]
  60. Switch#
  61.  
  62. =====================ROUTER1=============================
  63.  
  64. Router>enable
  65. Router#conf
  66. Router#configure t
  67. Router#configure terminal
  68. Enter configuration commands, one per line. End with CNTL/Z.
  69. Router(config)#int fa0/0.1
  70. Router(config-subif)#ip address 192.168.1.1 255.255.255.0
  71.  
  72. % Configuring IP routing on a LAN subinterface is only allowed if that
  73. subinterface is already configured as part of an IEEE 802.10, IEEE 802.1Q,
  74. or ISL vLAN.
  75.  
  76. Router(config-subif)#enc
  77. Router(config-subif)#encapsulation dot
  78. Router(config-subif)#encapsulation dot1Q 10
  79. Router(config-subif)#no shut
  80. Router(config-subif)#^Z
  81. Router#
  82. %SYS-5-CONFIG_I: Configured from console by console
  83.  
  84. Router#configure terminal
  85. Enter configuration commands, one per line. End with CNTL/Z.
  86. Router(config)#int fa0/0.2
  87. Router(config-subif)#ip address 192.168.2.1 255.255.255.0
  88.  
  89. % Configuring IP routing on a LAN subinterface is only allowed if that
  90. subinterface is already configured as part of an IEEE 802.10, IEEE 802.1Q,
  91. or ISL vLAN.
  92.  
  93. Router(config-subif)#encapsulation dot1Q 20
  94. Router(config-subif)#no shut
  95. Router(config-subif)#^Z
  96. Router#
  97. %SYS-5-CONFIG_I: Configured from console by console
  98. Router>enable
  99. Router#conf
  100. Router#configure t
  101. Router#configure terminal
  102. Enter configuration commands, one per line. End with CNTL/Z.
  103. Router(config)#int fa0/0.1
  104. Router(config-subif)#ip address 192.168.1.1 255.255.255.0
  105.  
  106. % Configuring IP routing on a LAN subinterface is only allowed if that
  107. subinterface is already configured as part of an IEEE 802.10, IEEE 802.1Q,
  108. or ISL vLAN.
  109.  
  110. Router(config-subif)#enc
  111. Router(config-subif)#encapsulation dot
  112. Router(config-subif)#encapsulation dot1Q 10
  113. Router(config-subif)#ip address 192.168.1.1 255.255.255.0
  114. Router(config-subif)#no shut
  115. Router(config-subif)#^Z
  116. Router#
  117. %SYS-5-CONFIG_I: Configured from console by console
  118.  
  119. Router#configure terminal
  120. Enter configuration commands, one per line. End with CNTL/Z.
  121. Router(config)#int fa0/0.2
  122. Router(config-subif)#ip address 192.168.2.1 255.255.255.0
  123.  
  124. % Configuring IP routing on a LAN subinterface is only allowed if that
  125. subinterface is already configured as part of an IEEE 802.10, IEEE 802.1Q,
  126. or ISL vLAN.
  127.  
  128. Router(config-subif)#encapsulation dot1Q 20
  129. Router(config-subif)#ip address 192.168.2.1 255.255.255.0
  130. Router(config-subif)#no shut
  131. Router(config-subif)#^Z
  132. Router#
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement