• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.
Xin chào ! Nếu đây là lần đầu tiên bạn đến với diễn đàn, xin vui lòng danh ra một phút bấm vào đây để đăng kí và tham gia thảo luận cùng VnPro.

Announcement

Collapse
No announcement yet.

Lab 6-1: Cấu hình vlan và trunk

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Lab 6-1: Cấu hình vlan và trunk

    Lab 6-1: Cấu hình vlan và trunk

    MultiLayer Sitching & InterVlan Routing



    Mô tả đặc tính hoạt động đa lớp (Multilayer) của dòng sản phẩm Catalyst 3550 của Cisco Access Layer Switch (ALSwitch). Chia switch thành các Vlan1, Vlan 10, Vlan 20 phân phối cho từng nhóm người dùng. Thông thường các Vlan hoạt động ở lớp liên kết dữ liệu (Data-link Layer). Các Vlan này xem như thuộc các Broadcast Domain khác nhau, không thể nói chuyện với nhau được (mặc dù cùng kết nối vật lý đến ALSwitch). Các Vlan muốn nói chuyện với nhau phải thông qua một External Router có chức năng định tuyến. Trong phạm vi bài Lab này, sử dụng khả năng Multilayer Switching của Catalyst 3550 để định tuyến giữa các vlan cũng như giữa các Vlan với Remote office kết nối bởi Remote router. Trong trường hợp này Catalyst 3550 có khả năng hoạt động như một External Router.
    Yêu cầu thiết bị: Remote router: Cisco 2600 (có cổng FastEthernet). Distribute Layer Switch (DLSwitch): Catalyst 3550. Access Layer Switch (ALSwitch): Catalyst 2900 trở lên (vì cấu hình Trunking đòi hỏi thiết bị hỗ trợ FastEthernet). Các máy trạm kết nối vào các Vlan phục vụ việc kiểm tra cấu hình và các tính năng định tuyến.
    Để triển khai tính năng MultiLayer Switching (MLS):
    Giai đoạn 1: Thiết lập các cấu hình cơ sở bao gồm: chia Vlan, Trunking giữa các switch.
    Giai đoạn 2: Cấu hình cho Catalyst 3550 (DLSwitch) hoạt động ở chế độ MLS, cấu hình các giao thức định tuyến trên Router. Trong phạm vi bài Lab này, dùng giao thức định tuyến OSPF. Trước khi triền khai bài Lab, nên xoá tất cả cấu hình cũ trên Switch và Router để tránh các ảnh hưởng đến hoạt động của hệ thống
    Tiến hành giai đoạn:
    DLSwitch và ALSwitch kết nối với nhau qua đường Trunk. Hai Switch này cùng một VTP domain, chia thành các Vlan gồm: Vlan 1 (Native), Vlan 10 (Admin), Vlan 20 (User).
    Cấu hình trên DLSwitch
    Cấu hình các thông số cơ bản: gồm tên, các loại password:
    Switch>enable
    Switch#config terminal
    Enter configuration commands, one per line. End with CNTL/Z.
    Switch(config)#hostname DLSwitch
    DLSwitch(config)#enable password cisco
    DLSwitch(config)#enable secret vnpro
    DLSwitch(config)#line vty 0 15
    DLSwitch(config-line)#password cisco
    DLSwitch(config-line)#login
    DLSwitch(config-line)#^Z
    00:15:08: %SYS-5-CONFIG_I: Configured from console by console
    Cấu hình Vlan và Trunking:
    DLSwitch#vlan database
    DLSwitch(vlan)#vtp domain Vnpro
    Changing VTP domain name from NULL to Vnpro
    DLSwitch(vlan)#vtp server
    Device mode already VTP SERVER.
    DLSwitch(vlan)#vlan 10 name Admin
    VLAN 10 added:
    Name: Admin
    DLSwitch(vlan)#vlan 20 name User
    VLAN 20 added:
    Name: User
    DLSwitch(vlan)#apply
    APPLY completed.
    DLSwitch(vlan)#exit
    APPLY completed.
    Exiting....
    DLSwitch#config terminal
    Enter configuration commands, one per line. End with CNTL/Z.
    DLSwitch(config)#interface vlan 1
    DLSwitch(config-if)#ip address 192.168.1.1 255.255.255.0
    DLSwitch(config-if)#no shutdown
    DLSwitch(config-if)#exit
    00:17:26: %LINK-3-UPDOWN: Interface Vlan1, changed state to up
    DLSwitch(config)#interface vlan 10
    DLSwitch(config-if)#ip address 192.168.10.1 255.255.255.0
    DLSwitch(config-if)#no shutdown
    00:18:20: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan10, changed state to down
    DLSwitch(config-if)#exit
    DLSwitch(config)#interface vlan 20
    DLSwitch(config-if)#ip address 192.168.20.1 255.255.255.0
    DLSwitch(config-if)#no shutdown
    00:19:06: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan20, changed state to down
    DLSwitch(config-if)#exit
    DLSwitch(config)#interface FastEthernet 0/1
    DLSwitch(config-if)#switchport trunk encapsulation dot1q
    DLSwitch(config-if)#switchport mode trunk
    DLSwitch(config-if)#^Z
    00:20:11: %SYS-5-CONFIG_I: Configured from console by console
    Kiểm tra thông tin Vlan mới:
    DLSwitch#show vlan
    VLAN Name Status Ports
    ---- -------------------------------- --------- -------------------------------
    1 default active Fa0/2, Fa0/3, Fa0/4, Fa0/5
    Fa0/6, Fa0/7, Fa0/8, Fa0/9
    Fa0/10, Fa0/11, Fa0/12, Fa0/13
    Fa0/14, Fa0/15, Fa0/16, Fa0/17
    Fa0/18, Fa0/19, Fa0/20, Fa0/21
    Fa0/22, Fa0/23, Fa0/24, Gi0/1
    Gi0/2
    10 Admin active
    20 User active
    1002 fddi-default act/unsup
    1003 token-ring-default act/unsup
    1004 fddinet-default act/unsup
    1005 trnet-default act/unsup
    Cấu hình trên ALSwitch
    Cấu hình các thông số cơ bản: gồm tên, các loại password:
    Switch>enable
    Switch#config terminal
    Enter configuration commands, one per line. End with CNTL/Z.
    Switch(config)#hostname ALSwitch
    ALSwitch(config)#enable password cisco
    ALSwitch(config)#enable secret vnpro
    ALSwitch(config)#line vty 0 4
    ALSwitch(config-line)#password cisco
    ALSwitch(config-line)#login
    ALSwitch(config-line)#^Z
    00:07:40: %SYS-5-CONFIG_I: Configured from console by console
    Cấu hình Vlan và Trunking
    Chỉ cần cấu hình Trunking, sau đó đưa ALSwitch vào cùng VTP domain Vnpro ở mode client, ALSwitch sẽ tự động học thông tin Vlan từ VTP server (DLSwitch).
    ALSwitch#vlan database
    ALSwitch(vlan)#vtp domain Vnpro
    Changing VTP domain name from NULL to Vnpro
    ALSwitch(vlan)#vtp client
    Setting device to VTP CLIENT mode.
    ALSwitch(vlan)#exit
    In CLIENT state, no apply attempted.
    Exiting....
    ALSwitch#config terminal
    Enter configuration commands, one per line. End with CNTL/Z.
    ALSwitch(config)#interface FastEthernet 0/1
    ALSwitch(config-if)#switchport trunk encapsulation dot1q
    ALSwitch(config-if)#switchport mode trunk
    ALSwitch(config-if)#exit
    ALSwitch(config)#interface range FastEthernet0/4 - 8
    ALSwitch(config-if)#switchport access vlan 10
    ALSwitch(config-if)#exit
    ALSwitch(config)#interface FastEthernet0/9 - 12
    ALSwitch(config-if)#switchport access vlan 20
    ALSwitch(config-if)#exit
    ALSwitch(config)#^Z
    ALSwitch#
    00:13:00: %SYS-5-CONFIG_I: Configured from console by console
    Kiểm tra thông tin Vlan trên ALSwitch:
    ALSwitch#show vlan
    VLAN Name Status Ports
    ---- -------------------------------- --------- -------------------------------
    1 default active Fa0/2, Fa0/3
    10 Admin active Fa0/4, Fa0/5, Fa0/6, Fa0/7,
    Fa0/8
    20 User active Fa0/9, Fa0/10, Fa0/11, Fa0/12
    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
    10 enet 100010 1500 - - - - - 0 0
    20 enet 100020 1500 - - - - - 0 0
    1002 fddi 101002 1500 - 0 - - - 0 0
    1003 tr 101003 1500 - 0 - - srb 0 0
    1004 fdnet 101004 1500 - - - ieee - 0 0
    1005 trnet 101005 1500 - - - ibm - 0 0
    ALSwitch#
    Tiến hành giai đoạn 2:
    DLSwitch(config)#interface FastEthernet 0/2
    DLSwitch(config-if)#no switchport
    DLSwitch(config-if)#ip address 10.200.1.1 255.255.255.0
    DLSwitch(config-if)#no shutdown
    00:14:35: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to downxit
    Lệnh “no switchport” kích hoạt tính năng hoạt động ở lớp 3 cho Catalyst 3550. Lúc này port FastEthernet 0/2 có khả năng hoạt động như một cổng trên Router. Tuy nhiên kết nối giữa DLSwitch và Remote Router qua port này vẫn sử dụng Straight Cable, kết nối giữa DLSwitch và ALSwitch qua port FastEthernet 0/1 dùng Cross Cable. Cấu hình định tuyến:
    DLSwitch(config)#ip routing
    DLSwitch(config-router)#router ospf 0
    DLSwitch(config-router)#network 10.200.0.0 0.0.0.255 area 0
    DLSwitch(config-router)#network 192.168.1.0 0.0.0.255 area 0
    DLSwitch(config-router)#network 192.168.10.0 0.0.0.255 area 0
    DLSwitch(config-router)#network 192.168.20.0 0.0.0.255 area 0
    DLSwitch(config-router)#^z
    Cấu hình trên Remote Router
    Cấu hình các thông số cơ bản:
    Router>enable
    Router#config terminal
    Router(config)#hostname Remote
    Remote(config)#enable password cisco
    Remote(config)#enable secret vnpro
    Remote(config)#line vty 0 4
    Remote(config-line)#password cisco
    Remote(config-line)#login
    Remote(config-line)#exit
    Remote(config)#interface interface ethernet0/0
    Remote(config-if)#ip address 10.200.1.2 255.255.255.0
    Remote(config-if)#no shut
    Remote(config-if)#
    *Mar 1 00:10:39.175: %LINK-3-UPDOWN: Interface Ethernet0/0, changed state to up
    Remote(config-if)#exit
    Remote(config)#interface loopback 0
    Remote(config-if)#ip address 172.168.0.1 255.255.255.0
    Remote(config-if)#no shutdown
    Remote(config-if)#exit
    *Mar 1 00:11:26.749: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback0, changed state to up
    Remote(config)#router ospf 1
    Remote(config-router)#network 172.168.0.0 0.0.0.255 area 0
    Remote(config-router)#network 10.200.1.0 0.0.0.255 area 0
    Remote(config-router)#^Z
    Mar 1 00:13:35.347: %SYS-5-CONFIG_I: Configured from console by console
    Cấu hình các interface và cấu hình định tuyến
    Xem thông tin định tuyến trên DLSwitch
    DLSwitch>enable
    DLSwitch#show ip route
    Gateway of last resort is not set
    C 192.168.10.0/24 is directly connected, Vlan10
    172.168.0.0/32 is subnetted, 1 subnets
    O 172.168.0.1 [110/11] via 10.200.0.2, 00:22:50, FastEthernet0/2
    C 192.168.20.0/24 is directly connected, Vlan20
    10.0.0.0/24 is subnetted, 1 subnets
    C 10.200.0.0 is directly connected, FastEthernet0/2
    C 192.168.1.0/24 is directly connected, Vlan1
    Xem thông tin bản định tuyến trên Remote router:
    DLSwitch#telnet 10.200.0.2
    Trying 10.200.0.2 ... Open
    User Access Verification
    Password: cisco
    Remote>enable
    Password: vnpro
    Remote#show ip route
    Gateway of last resort is not set
    O 192.168.10.0/24 [110/11] via 10.200.0.1, 00:23:53, Ethernet0/0
    172.168.0.0/24 is subnetted, 1 subnets
    C 172.168.0.0 is directly connected, Loopback0
    O 192.168.20.0/24 [110/11] via 10.200.0.1, 00:23:53, Ethernet0/0
    10.0.0.0/24 is subnetted, 1 subnets
    C 10.200.0.0 is directly connected, Ethernet0/0
    O 192.168.1.0/24 [110/11] via 10.200.0.1, 00:23:53, Ethernet0/0
    Kiểm tra tính kết nối bằng cách dùng một máy trạm nối vào một Vlan bất kỳ. Ping thấy



    interface Looback 0 trên Remote Router. Work Station có địa chỉ truộc về Vlan 10. Với Default Gateway là Mangement IP của Vlan 10. Dùng WorkStation trên Vlan 10 có địa chỉ như trên ping đến Looback 0 trên Remote Router và ghi nhậm kết quả. Kiểm tra khả năng InterVlan Routing bằng cách dùng một Work Station trên Vlan 20 ping dến Work Station trên Vlan 10 và ghi nhận kết quả




    Email : vnpro@vnpro.org
    ---------------------------------------------------------------------------------------------------------------
Trung Tâm Tin Học VnPro
149/1D Ung Văn Khiêm P25 Q.Bình thạnh TPHCM
Tel : (08) 35124257 (5 lines)
Fax: (08) 35124314

Home page: http://www.vnpro.vn
Support Forum: http://www.vnpro.org
- Chuyên đào tạo quản trị mạng và hạ tầng Internet
- Phát hành sách chuyên môn
- Tư vấn và tuyển dụng nhân sự IT
- Tư vấn thiết kế và hỗ trợ kỹ thuật hệ thống mạng

Network channel: http://www.dancisco.com
Blog: http://www.vnpro.org/blog

  • #2
    không biết Dynamips có giã lập Catalyst 3550 làm VLAN không ? nếu có xin chỉ giúp cảm ơn nhiều.
    HOẢ KỲ LÂN
    Director
    www.hoakylan.com

    Comment


    • #3
      Originally posted by hoakylan View Post
      không biết Dynamips có giã lập Catalyst 3550 làm VLAN không ? nếu có xin chỉ giúp cảm ơn nhiều.
      Chào anh!!!
      Hiện nay Dynamip chưa thể nào giả lập được Switch thật mà chỉ giả lập được những router có 1 vài chức năng thông dụng của Switch thôi như tạo VLan, SP, VTP .... như 3620,3640,3660,3745,3725.

      Chúc anh vui 1!!
      Trần Mỹ Phúc
      tranmyphuc@hotmail.com
      Hãy add nick để có thông tin đề thi mới nhất :tranmyphuc (Hỗ trợ tối đa cho các bạn tự học)

      Cisco Certs : CCNP (Passed TSHOOT 1000/1000)

      Juniper Certs :
      JNCIP-ENT & JNCIP-SEC
      INSTRUCTORS (No Fee) : CISCO (Professional) , JUNIPER (Professional) , Microsoft ...

      [version 4.0] Ôn tập CCNA


      Comment


      • #4
        Mode ơi, hình die rồi.
        Xin mode up lại dùm.

        Comment


        • #5
          mấy cái hình die hết rùi anh admin ơi!:(

          Comment


          • #6
            Sao cái picture bị del rùi nhỉ? Ai up lại cái hình topo mạng được ko? Sory vì tôi là newbie. Mới tập tọe học ccna
            But' he^t' mu+c. oy`!!! Ky' sau dc hem? :106:

            Comment


            • #7
              picture is die ! help me !

              Comment


              • #8
                admin up giúp cái hình đi :)

                Comment

                • Working...
                  X