• 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.

Cấu hình multi DHCP server and relay agent.

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

  • Cấu hình multi DHCP server and relay agent.

    - mô tả cấu hình Router hoạt động như DHCP server, gồm

    + 2 Router là DHCP server

    DHCP01 : cấp IP cho vlan 2 : 192.168.2.0 (dải IP : 192.168.2.x, default-router, dns-server, netbios-nameserver 192.168.4.1)

    DHCP02 : cấp IP cho vlan 3 : 192.168.3.0 (dải IP : 192.168.3.x, default-router, dns-server, netbios-nameserver 192.168.4.1)

    + switch L3 : DHCP relay agent

    + Gateway to ISP : 192.168.4.1

    - mô hình:



    - cấu hình file .net

    [localhost]

    [[3640]]

    #gateway
    [[Router GW]]
    model = 3640
    image = D:\dynagenlabs\images\c3640-is-mz_120-7_t.bin
    ram = 64
    console = 2000
    slot 0 = NM-1FE-TX
    #idlepc =
    f0/0 = SW 2

    #dhcp server 1
    [[Router DHCP01]]
    model = 3640
    image = D:\dynagenlabs\images\c3640-is-mz_120-7_t.bin
    ram = 64
    console = 2001
    slot 0 = NM-1FE-TX
    #idlepc =
    f0/0 = SW 3

    #dhcp server 2
    [[Router DHCP02]]
    model = 3640
    image = D:\dynagenlabs\images\c3640-is-mz_120-7_t.bin
    ram = 64
    console = 2002
    slot 0 = NM-1FE-TX
    #idlepc =
    f0/0 = SW 4

    #ethernet switch
    [[ETHSW SW]]
    1 = access 1
    2 = access 1
    3 = access 1
    4 = access 1

    #switch L3
    [[Router SWL3]]
    model = 3640
    image = D:\dynagenlabs\images\c3640-jk9o3s-mz.123-14.T7.extracted.bin
    ram = 128
    slot 0 = NM-16ESW
    #idlepc =
    fa0/0 = SW 1
    #connect to Loopback adapter 01
    fa0/3 = NIO_gen_eth:\Device\NPF_{E698101A-D8CD-4367-8AE2-7FD0468E543A}
    #connect to Loopback adapter 02
    fa0/4 = NIO_gen_eth:\Device\NPF_{AA0AE4B6-6BB2-4ABF-82DE-4D509F32E971}
    (fa0/3 và fa0/4 connect với Microsoft Loopback Adapter trên PC)

    - GW:
    R1(config)#int f0/0
    R1(config-if)#ip address 192.168.4.1 255.255.255.0
    R1(config-if)#no shut

    - DHCP01:
    DHCP01(config)#int f0/0
    DHCP01(config-if)#ip address 192.168.4.2 255.255.255.0
    DHCP01(config-if)#no shut
    DHCP01(config-if)#exit
    DHCP01(config)#ip dhcp pool vlan2
    DHCP01(dhcp-config)#network 192.168.2.0
    DHCP01(dhcp-config)#default-router 192.168.4.1
    DHCP01(dhcp-config)#dns-server 192.168.4.1
    DHCP01(dhcp-config)#netbios-nameserver 192.168.4.1
    DHCP01(dhcp-config)#domain testing.com
    DHCP01(dhcp-config)#exit
    DHCP01(config)#ip dhcp excluded-address 192.168.2.1
    DHCP01(config)#ip dhcp excluded-address 192.168.2.201 192.168.2.254
    DHCP01(config)#router rip
    DHCP01(config-router)#network 192.168.4.0
    DHCP01(config-router)#end

    - DHCP02:
    DHCP02(config)#int f0/0
    DHCP02(config-if)#ip address 192.168.4.3 255.255.255.0
    DHCP02(config-if)#no shut
    DHCP02(config-if)#exit
    DHCP02(config)#ip dhcp pool vlan3
    DHCP02(dhcp-config)#network 192.168.3.0
    DHCP02(dhcp-config)#default-router 192.168.4.1
    DHCP02(dhcp-config)#dns-server 192.168.4.1
    DHCP02(dhcp-config)#netbios-nameserver 192.168.4.1
    DHCP02(dhcp-config)#domain testing.com
    DHCP02(dhcp-config)#exit
    DHCP02(config)#ip dhcp excluded-address 192.168.3.1
    DHCP02(config)#ip dhcp excluded-address 192.168.3.201 192.168.3.254
    DHCP02(config)#router rip
    DHCP02(config-router)#network 192.168.4.0
    DHCP02(config-router)#end

    - SWL3:
    SWL3#vlan database
    SWL3(vlan)#vlan 2 name vlan02
    SWL3(vlan)#vlan 3 name vlan03
    SWL3(vlan)#exit
    SWL3#conf t
    SWL3(config)#int f0/0
    SWL3(config-if)#no switchport
    SWL3(config-if)#ip address 192.168.4.4 255.255.255.0
    SWL3(config-if)#no shut
    SWL3(config-if)#int fa0/3
    SWL3(config-if)#switchport mode access
    SWL3(config-if)#switchport access vlan 2
    SWL3(config-if)#int fa0/4
    SWL3(config-if)#switchport mode access
    SWL3(config-if)#switchport access vlan 3
    SWL3(config-if)#int vlan 2
    SWL3(config-if)#ip address 192.168.2.1
    SWL3(config-if)#ip helper-address 192.168.4.2
    SWL3(config-if)#int vlan 3
    SWL3(config-if)#ip address 192.168.3.1
    SWL3(config-if)#ip helper-address 192.168.4.3
    SWL3(config-if)#exit
    SWL3(config)#ip routing
    SWL3(config)#router rip
    SWL3(config-router)#network 192.168.2.0
    SWL3(config-router)#network 192.168.3.0
    SWL3(config-router)#network 192.168.4.0
    SWL3(config-router)#exit
    #default route to Internet
    SWL3(config)#ip route 0.0.0.0 0.0.0.0 192.168.4.1
    SWL3(config)#end
    no car...no house...no money, but have only a sharing and friendly heart. What's the most important thing in this life "Heart or Money ?". Anything else can stead money ?

    :32::53::X:106:

    Nothing last forever...

  • #2
    Originally posted by trainingit View Post
    - mô tả cấu hình Router hoạt động như DHCP server, gồm

    + 2 Router là DHCP server

    DHCP01 : cấp IP cho vlan 2 : 192.168.2.0 (dải IP : 192.168.2.x, default-router, dns-server, netbios-nameserver 192.168.4.1)

    DHCP02 : cấp IP cho vlan 3 : 192.168.3.0 (dải IP : 192.168.3.x, default-router, dns-server, netbios-nameserver 192.168.4.1)

    + switch L3 : DHCP relay agent

    + Gateway to ISP : 192.168.4.1

    - mô hình:



    - cấu hình file .net



    (fa0/3 và fa0/4 connect với Microsoft Loopback Adapter trên PC)

    - GW:
    R1(config)#int f0/0
    R1(config-if)#ip address 192.168.4.1 255.255.255.0
    R1(config-if)#no shut

    - DHCP01:
    DHCP01(config)#int f0/0
    DHCP01(config-if)#ip address 192.168.4.2 255.255.255.0
    DHCP01(config-if)#no shut
    DHCP01(config-if)#exit
    DHCP01(config)#ip dhcp pool vlan2
    DHCP01(dhcp-config)#network 192.168.2.0
    DHCP01(dhcp-config)#default-router 192.168.4.1
    DHCP01(dhcp-config)#dns-server 192.168.4.1
    DHCP01(dhcp-config)#netbios-nameserver 192.168.4.1
    DHCP01(dhcp-config)#domain testing.com
    DHCP01(dhcp-config)#exit
    DHCP01(config)#ip dhcp excluded-address 192.168.2.1
    DHCP01(config)#ip dhcp excluded-address 192.168.2.201 192.168.2.254
    DHCP01(config)#router rip
    DHCP01(config-router)#network 192.168.4.0
    DHCP01(config-router)#end

    - DHCP02:
    DHCP02(config)#int f0/0
    DHCP02(config-if)#ip address 192.168.4.3 255.255.255.0
    DHCP02(config-if)#no shut
    DHCP02(config-if)#exit
    DHCP02(config)#ip dhcp pool vlan3
    DHCP02(dhcp-config)#network 192.168.3.0
    DHCP02(dhcp-config)#default-router 192.168.4.1
    DHCP02(dhcp-config)#dns-server 192.168.4.1
    DHCP02(dhcp-config)#netbios-nameserver 192.168.4.1
    DHCP02(dhcp-config)#domain testing.com
    DHCP02(dhcp-config)#exit
    DHCP02(config)#ip dhcp excluded-address 192.168.3.1
    DHCP02(config)#ip dhcp excluded-address 192.168.3.201 192.168.3.254
    DHCP02(config)#router rip
    DHCP02(config-router)#network 192.168.4.0
    DHCP02(config-router)#end

    - SWL3:
    SWL3#vlan database
    SWL3(vlan)#vlan 2 name vlan02
    SWL3(vlan)#vlan 3 name vlan03
    SWL3(vlan)#exit
    SWL3#conf t
    SWL3(config)#int f0/0
    SWL3(config-if)#no switchport
    SWL3(config-if)#ip address 192.168.4.4 255.255.255.0
    SWL3(config-if)#no shut
    SWL3(config-if)#int fa0/3
    SWL3(config-if)#switchport mode access
    SWL3(config-if)#switchport access vlan 2
    SWL3(config-if)#int fa0/4
    SWL3(config-if)#switchport mode access
    SWL3(config-if)#switchport access vlan 3
    SWL3(config-if)#int vlan 2
    SWL3(config-if)#ip address 192.168.2.1
    SWL3(config-if)#ip helper-address 192.168.4.2
    SWL3(config-if)#int vlan 3
    SWL3(config-if)#ip address 192.168.3.1
    SWL3(config-if)#ip helper-address 192.168.4.3
    SWL3(config-if)#exit
    SWL3(config)#ip routing
    SWL3(config)#router rip
    SWL3(config-router)#network 192.168.2.0
    SWL3(config-router)#network 192.168.3.0
    SWL3(config-router)#network 192.168.4.0
    SWL3(config-router)#exit
    #default route to Internet
    SWL3(config)#ip route 0.0.0.0 0.0.0.0 192.168.4.1
    SWL3(config)#end
    Chào !!!
    Xin bổ sung một điểm các bạn hay quên:
    Code:
    SWL3(config-if)#int vlan 2
    [B][B][COLOR="Red"]SWL3(config-if)#no shut[/COLOR][/B][/B]
    SWL3(config-if)#ip address 192.168.2.1
    SWL3(config-if)#ip helper-address 192.168.4.2
    Chúc các bạn vui !!!
    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


    • #3
      - cái này là lúc cấu hình

      SWL3(config)#int vlan 2

      vlan 2, 3 đã tự động up lên khi gán switchport access vlan 2 , switchporrt access vlan 3

      => vì vậy nên ko cần no shut để up lên nữa :D
      no car...no house...no money, but have only a sharing and friendly heart. What's the most important thing in this life "Heart or Money ?". Anything else can stead money ?

      :32::53::X:106:

      Nothing last forever...

      Comment


      • #4
        Originally posted by trainingit View Post
        - cái này là lúc cấu hình

        SWL3(config)#int vlan 2

        vlan 2, 3 đã tự động up lên khi gán switchport access vlan 2 , switchporrt access vlan 3

        => vì vậy nên ko cần no shut để up lên nữa :D
        chào !!!
        Xem tại đây :


        Chúc anh vui !!!
        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


        • #5
          Originally posted by tranmyphuc1988 View Post
          chào !!!
          Xem tại đây :


          Chúc anh vui !!!
          hi,

          - thực ra đây là lỗi cơ bản thôi, đã đến lab CCNP rồi thì ko khó để sửa được lỗi shut, hay no shut :D

          - ở đây là mình dùng lab dynagen, interface nó đã up sẵn lên rồi, nên mình ko gõ lệnh đó vào cấu hình nữa, nếu trong lab với switch thật mà interface ko tự up lên, thì chỉ cần thêm no shut vào là OK.

          - chỉ cần show interface vlan vlan-id là biết liền, nếu thấy báo administrative down, or line protocol down thì có thể biết ngay lỗi là ở layer 1, hay layer 2,

          - nếu down ở layer 1 thì no shut

          - nếu down ở layer 2 thì ...

          => nói chung lỗi interface ko up là lỗi ko khó sửa, chỉ có lỗi ở 2 layer dưới cùng thôi, nếu ko sửa được thì phải quay lại học lab CCNA mất :D
          Last edited by trainingit; 19-04-2008, 11:28 AM.
          no car...no house...no money, but have only a sharing and friendly heart. What's the most important thing in this life "Heart or Money ?". Anything else can stead money ?

          :32::53::X:106:

          Nothing last forever...

          Comment


          • #6
            Originally posted by trainingit View Post
            hi,

            - thực ra đây là lỗi cơ bản thôi, đã đến lab CCNP rồi thì ko khó để sửa được lỗi shut, hay no shut :D

            - ở đây là mình dùng lab dynagen, interface nó đã up sẵn lên rồi, nên mình ko gõ lệnh đó vào cấu hình nữa, nếu trong lab với switch thật mà interface ko tự up lên, thì chỉ cần thêm no shut vào là OK.

            - chỉ cần show interface vlan vlan-id là biết liền, nếu thấy báo administrative down, or line protocol down thì có thể biết ngay lỗi là ở layer 1, hay layer 2,

            - nếu down ở layer 1 thì no shut

            - nếu down ở layer 2 thì ...

            => nói chung lỗi interface ko up là lỗi ko khó sửa, chỉ có lỗi ở 2 layer dưới cùng thôi, nếu ko sửa được thì phải quay lại học lab CCNA mất :D
            Chào !!!
            Thực chất có thể nói bài LAB này là trình độ CCNA nhưng những ai học theo giáo trình academy mới phải học nâng cao như vậy.
            Ngoài ra ở CCNA academy còn học cả chứng thực OSPF... những phần từ trước đến giờ nhiều người thấy nó vẫn nằm tại giáo trình ccnp

            Thay mặt mọi người , cảm ơn anh về bài LAB rất chi tiết và hay này. chắc chắn nó sẽ là một học liệu quý giúp cho mọi người có thể ứng dụng nó vào mạng doanh nghiệp để cấu hình một mạng tối ưu hơn
            Chúc anh luôn khỏe
            Chúc anh vui !!!
            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

            Working...
            X