• 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 9.3: Cấu hình ADSL (PPPoE)

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

  • LAB 9.3: Cấu hình ADSL (PPPoE)



    ISP ABC triển khai hệ thống cung cấp dịch vụ ADSL cho các thuê bao, địa chỉ cung cấp xuống các thuê bao sẽ nằm trong phạm vi 205.1.1.2 đến 205.1.1.100, sử dụng công nghệ PPPoE và xác thực người dùng dùng PAP.
    Các thuê bao đầu cuối sẽ dùng DHCP để cấp cho người dùng của mình, đồng thời thực hiện cơ chế NAT Overload để mọi người trong LAN có thể đi được ra Internet.
    9.3.1. Cấu hình ban đầu cho hệ thống
    ISP1:
    Hostname ISP1
    !
    interface Loopback0
    ip address 205.1.1.1 255.255.255.255
    !
    interface FastEthernet0/0
    ip address 10.10.10.1 255.255.255.252
    duplex auto
    speed auto
    !
    CPE:
    hostname CPE
    !
    ip subnet-zero
    !
    !
    !Dùng DHCP để cấp địa chỉ cho các PC trong LAN
    ip dhcp excluded-address 10.10.10.1
    !Câu lệnh này dùng để loại bỏ địa chỉ 10.10.10.1 khi cấp cho PC
    ip dhcp pool DHCP
    import all
    network 10.10.10.0 255.255.255.0
    default-router 10.10.10.1
    !Xây dựng DHCP trên router(DHCP cũng có thể dùng server chuyên dụng thay thế cho router), DHCP này sẽ cấp xuống cho PC những địa chỉ trong mạng 10.10.10.0/24, default-gateway là 10.10.10.1 và cài đặt tất cả các thông số nhận được từ IPCP xuống cho PC (ví dụ: các thông tin DNS server…)
    !
    interface Ethernet0/0
    ip address 10.10.10.1 255.255.255.0
    half-duplex
    !
    9.3.2. Cấu hình các thông số kích hoạt đường ADSL
    CPE:
    Cổng ADSL trên thiết bị Cisco Router được đặt tên là cổng ATM.
    interface ATM0/0
    mac-address 0008.e354.8860
    !Nếu IOS trên router có phiên bản 12.2 phải nhập giá trị địa chỉ MAC này, địa chỉ MAC này được lấy từ địa chỉ MAC tương ứng trên cổng Ethernet của router. Từ phiên bản IOS 12.3, người dùng không cần nhập giá trị này
    no ip address
    no atm ilmi-keepalive
    pvc 8/35
    pppoe-client dial-pool-number 1
    !
    dsl operating-mode auto
    !
    !Giá trị PVI/VCI 8/35 là giá trị được cài đặt sẵn trên DSLAM và sẽ ánh xạ tới cổng uplink trên DSLAM
    !
    interface Dialer1
    ip address negotiated
    encapsulation ppp
    dialer pool 1
    ppp pap sent-username ssix password 0 ssix123
    ppp ipcp dns request accept
    !
    !Xây dựng interface dialer dùng để tạo ra cấu hình mẫu cho các kết nối dial, dial pool 1 dùng để liên kết mẫu cấu hình này với cổng ATM0/0 (pppoe-client dial-pool-number 1) và yêu cầu các thông tin về DNS
    !
    ISP1:
    !
    interface FastEthernet0/1
    no ip address
    duplex auto
    speed auto
    pppoe enable
    !
    !Cổng FastEthernet kết nối trực tiếp với cổng Uplink trên DSLAM, sẽ được bật chế độ hỗ trợ giao thức PPPoE
    !
    vpdn enable
    !
    !Bật tính năng hỗ trợ Virtual Private Dial-in Network
    !
    vpdn-group ADSL-SERVICE
    accept-dialin
    protocol pppoe
    virtual-template 1
    !
    !vpdn-group ADSL-SERVICE sẽ chấp nhận tất cả các cuộc gọi vào sử dụng giao thức pppoe và dùng cấu hình trong interface mẫu virtual-template 1 để xây dựng các interface ảo cho các cuộc gọi tương ứng
    !
    interface Virtual-Template1
    ip unnumbered Loopback0
    peer default ip address pool CLIENT-POOL
    !Cấp địa chỉ trong pool địa chỉ tên là CLIENT-POOL
    ppp authentication pap
    ppp ipcp dns 215.1.1.1 215.1.1.2
    !Dùng IPCP cấp các địa chỉ của DNS server cho thiết bị CPE
    !
    ip local pool CLIENT-POOL 205.1.1.2 205.1.1.100
    !Khai báo các địa chỉ cho pool tên CLIENT-POOL
    9.3.3. Khi hoàn tất cấu hình thì đường ADSL sẽ hoạt động
    CPE#
    *Mar 1 02:42:55.905: %DIALER-6-BIND: Interface Vi2 bound to profile Di1
    *Mar 1 02:42:55.909: %LINK-3-UPDOWN: Interface Virtual-Access2, changed state to up
    *Mar 1 02:42:58.998: %LINEPROTO-5-UPDOWN: Line protocol on Interface Virtual-Access2, changed state to up
    CPE#sh ip int brief
    Interface IP-Address OK? Method Status Protocol
    Ethernet0/0 10.10.10.1 YES manual up up
    Serial0/0 unassigned YES unset administratively down down
    Virtual-Access1 unassigned YES unset up up
    Virtual-Access2 unassigned YES unset up up
    Dialer1 205.1.1.2 YES IPCP up up
    ATM0/0 unassigned YES unset up up
    CPE#sh ip route
    Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
    D - EIGRP, EX - EIGRP external, O - OSPF, IA – OSPF
    inter area
    N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external
    type 2
    E1 - OSPF external type 1, E2 - OSPF external type 2
    i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia –
    IS-IS inter area
    * - candidate default, U - per-user static route, o - ODR
    P - periodic downloaded static route
    Gateway of last resort is 0.0.0.0 to network 0.0.0.0
    205.1.1.0/32 is subnetted, 2 subnets
    C 205.1.1.1 is directly connected, Dialer1
    C 205.1.1.2 is directly connected, Dialer1
    10.0.0.0/24 is subnetted, 1 subnets
    C 10.10.10.0 is directly connected, Ethernet0/0
    S* 0.0.0.0/0 is directly connected, Dialer1
    CPE#
    ISP1#sh ip route
    Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
    D - EIGRP, EX - EIGRP external, O - OSPF, IA – OSPF
    inter area
    N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external
    type 2
    E1 - OSPF external type 1, E2 - OSPF external type 2
    i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 –
    IS-IS level-2
    ia - IS-IS inter area, * - candidate default, U - per-
    user static route
    o - ODR, P - periodic downloaded static route
    Gateway of last resort is not set
    205.1.1.0/32 is subnetted, 2 subnets
    C 205.1.1.1 is directly connected, Loopback0
    C 205.1.1.2 is directly connected, Virtual-Access1.1
    ISP1#
    CPE#sh dsl interface atm0/0
    Alcatel 20150 chipset information
    ATU-R (DS) ATU-C (US)
    Modem Status: Showtime (DMTDSL_SHOWTIME)
    DSL Mode: ITU G.992.1 (G.DMT)
    ITU STD NUM: 0x01 0x1
    Vendor ID: 'ALCB' 'GSPN'
    Vendor Specific: 0x0000 0x0004
    Vendor Country: 0x00 0x00
    Capacity Used: 78% 107%
    Noise Margin: 14.5 dB 6.0 dB
    Output Power: 8.0 dBm 10.0 dBm
    Attenuation: 0.0 dB 1.0 dB
    Defect Status: None None
    Last Fail Code: None
    Selftest Result: 0x00
    Subfunction: 0x15
    Interrupts: 3990 (0 spurious)
    PHY Access Err: 0
    Activations: 2
    Init FW: embedded
    Operation FW: embedded
    SW Version: 3.8131
    FW Version: 0x1A04
    Interleave Fast Interleave Fast
    Speed (kbps): 8064 0 864 0
    Reed-Solomon EC: 0 0 29540 0
    CRC Errors: 10 0 1 0
    Header Errors: 9 0 0 0
    Bit Errors: 0 0
    BER Valid sec: 0 0
    BER Invalid sec: 0 0
    DMT Bits Per Bin
    00: 0 0 0 0 0 0 0 8 8 9 B C C C D D
    10: D D D D D C C B B A A 9 9 9 0 0
    20: 0 0 0 0 0 0 4 5 6 7 7 8 8 9 9 9
    30: A A A A A A A B B B B B B B B B
    40: 0 B B B B B B B B B B B B B B B
    50: B B B B B B B B B B B B B B 2 C
    60: B B B B B B B B B B B B B B B B
    70: B B B B B B B B B B B B B B B B
    80: B B B B B B B B B B B B B B B B
    90: B B B B B B B B B B B B B B B B
    A0: B B B B B B B B B B B B B B B B
    B0: B B B B B B B B B B B B B B B B
    C0: B B B B B B B B B B B B B B B B
    D0: B B B B B B B B B B B A A A A A
    E0: A A A A A A A A A A A 9 9 8 7 6
    F0: 5 4 5 4 3 0 0 0 0 0 0 0 0 0 0 0
    DSL: Training log buffer capability is not enabled
    CPE#
    9.3.4. Cấu hình NAT trên CPE
    !
    access-list 1 permit 10.10.10.0 0.0.0.255
    !
    ip nat inside source list 1 interface Dialer1 overload
    !
    interface Ethernet0/0
    ip address 10.10.10.1 255.255.255.0
    ip nat inside
    half-duplex
    !
    interface Dialer1
    ip nat outside
    !
    end
    9.3.5. Cấu hình hệ thống
    ISP1:
    ISP1#sh run
    Current configuration : 1304 bytes
    !
    version 12.3
    !
    hostname ISP1
    !
    ip subnet-zero
    !
    ip cef
    no ip dhcp use vrf connected
    !
    vpdn enable
    vpdn ip udp ignore checksum
    !
    vpdn-group ADSL-SERVICE
    accept-dialin
    protocol pppoe
    virtual-template 1
    !
    username ssix password 0 ssix123
    !
    !
    interface Loopback0
    ip address 205.1.1.1 255.255.255.255
    !
    interface FastEthernet0/0
    ip address 10.10.10.1 255.255.255.252
    duplex auto
    speed auto
    !
    interface FastEthernet0/1
    no ip address
    duplex auto
    speed auto
    pppoe enable
    !
    interface Virtual-Template1
    ip unnumbered Loopback0
    peer default ip address pool CLIENT-POOL
    ppp authentication pap
    ppp ipcp dns 215.1.1.1 215.1.1.2
    !
    ip local pool CLIENT-POOL 205.1.1.2 205.1.1.100
    ip route 0.0.0.0 0.0.0.0 10.10.10.2
    !
    ip http server
    no ip http secure-server
    !
    !
    control-plane
    !
    !
    line vty 0 4
    privilege level 15
    no login
    !
    !
    end
    ISP1#
    CPE:
    CPE#sh run
    !
    version 12.2
    service timestamps debug datetime msec
    service timestamps log datetime msec
    no service password-encryption
    !
    hostname CPE
    !
    logging queue-limit 100
    !
    ip subnet-zero
    !
    !
    ip dhcp excluded-address 10.10.10.1
    !
    ip dhcp pool DHCP
    import all
    network 10.10.10.0 255.255.255.0
    default-router 10.10.10.1
    !
    !
    interface ATM0/0
    mac-address 0008.e354.8860
    no ip address
    no atm ilmi-keepalive
    pvc 8/35
    pppoe-client dial-pool-number 1
    !
    dsl operating-mode auto
    !
    interface Ethernet0/0
    ip address 10.10.10.1 255.255.255.0
    ip nat inside
    half-duplex
    !
    interface Serial0/0
    no ip address
    shutdown
    !
    interface Dialer1
    ip address negotiated
    ip nat outside
    encapsulation ppp
    dialer pool 1
    ppp pap sent-username ssix password 0 ssix123
    ppp ipcp dns request accept
    !
    ip nat inside source list 1 interface Dialer1 overload
    no ip http server
    ip classless
    ip route 0.0.0.0 0.0.0.0 Dialer1
    !
    access-list 1 permit 10.10.10.0 0.0.0.255
    !
    !
    end
    CPE#
    CPE#sh ip dhcp import
    Address Pool Name: DHCP
    Domain Name Server(s): 215.1.1.1 215.1.1.2
    CPE#ping 205.1.1.1
    Type escape sequence to abort.
    Sending 5, 100-byte ICMP Echos to 205.1.1.1, timeout is 2 seconds:
    !!!!!
    Success rate is 100 percent (5/5), round-trip min/avg/max = 41/43/44 ms
    CPE#
    CPE# show pppoe session
    CPE# show ip dhcp binding
    Phạm Minh Tuấn

    Email : phamminhtuan@vnpro.org
    Yahoo : phamminhtuan_vnpro
    -----------------------------------------------------------------------------------------------
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
Working...
X