Điện tử viễn thông code khotailieu

16 33 0
Điện tử viễn thông code khotailieu

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

3.3.1 Router A1 Config // bắt đầu vào cấu hình router hostname A1 // đổi tên router A1 ip cef // bật chuyển mạch ip cef ! interface Loopback0 // tạo mạng loopback ip address 10.10.10.10 255.255.255.0 // gán địa ip subnet ! interface f1/0 // truy cập cổng fastethernet 1/0 no shutdown // bật cổng ip address 192.168.1.2 255.255.255.0 // gán địa ip subnet ! router rip version network 10.0.0.0 network 192.168.1.0 // khai báo router chạy giao thức ripv2 no auto-summary // tắt chức auto-summary router End 3.3.2 Router B1 Config hostname B1 ip cef ! interface Loopback0 ip address 20.20.20.20 255.255.255.0 ! interface f1/0 no shutdown ip address 192.168.2.2 255.255.255.0 ! router rip version network 20.0.0.0 network 192.168.2.0 no auto-summary ! End 3.3.1 Router C1 Config // bắt đầu vào cấu hình router hostname C1 // đổi tên router A1 ip cef // bật chuyển mạch ip cef ! interface Loopback0 // tạo mạng loopback ip address 50.50.50.50 255.255.255.0 // gán địa ip subnet ! interface f1/0 // truy cập cổng fastethernet 1/0 no shutdown // bật cổng ip address 192.168.7.2 255.255.255.0 // gán địa ip subnet ! router rip // khai báo router chạy giao thức ripv2 version network 50.0.0.0 network 192.168.7.0 no auto-summary // tắt chức auto-summary router End 3.3.2 Router PE01 Config hostname PE01 ! ip vrf A1 // khởi tạo vrf A1 rd 1:100 // gán giá trị rd route-target export 1:100 // gán giá trị rt export import route-target import 1:100 ! ip vrf B1 // khởi tạo vrf B1 rd 1:200 route-target export 1:200 route-target import 1:200 ! ip vrf C1 // khởi tạo vrf A1 rd 1:300 // gán giá trị rd route-target export 1:300 // gán giá trị rt export import route-target import 1:300 ! ip cef ! interface Loopback0 ip address 1.1.1.1 255.255.255.0 ! interface f1/0 //truy cập cổng f2/0 no shutdown // bật cổng ip vrf forwarding A1 // gán vrf A1 cổng f2/0 ip address 192.168.1.1 255.255.255.0 // gán giá trị ip subnet ! interface f1/1 no shutdown ip vrf forwarding B1 ip address 192.168.2.1 255.255.255.0 ! // gán vrf B1 cổng f1/0 interface f2/0 no shutdown ip vrf forwarding C1 // gán vrf B1 cổng f1/0 ip address 192.168.7.1 255.255.255.0 ! interface f2/1 // truy cập cổng f2/1 no shutdown // bật cổng ip address 192.168.3.1 255.255.255.0 // gán giá trị ip subnet mpls label protocol ldp //khởi tạo cổng f2/1 chạy giao thức ldp tag-switching ip // (hoặc mpls ip) enable mpls chuyển tiếp gói tin ip ! router eigrp 100 // tạo tiến trình xử lý EIGRP network 1.0.0.0 network 192.168.3.0 no auto-summary ! router rip // enable giao thức ripv2 router version ! address-family ipv4 vrf B1 //chọn vrf B1 với giao thức định tuyến ipv4 redistribute bgp metric transparent // quảng bá route BGP vào RIP network 192.168.2.0 no auto-summary exit-address-family //kết thúc chọn ! address-family ipv4 vrf A1 redistribute bgp metric transparent network 192.168.1.0 no auto-summary exit-address-family ! address-family ipv4 vrf C1 redistribute bgp metric transparent network 192.168.7.0 no auto-summary exit-address-family ! router bgp //chọn cấu hình giao thức định tuyến BGP no synchronization //Tắt tính BGP synchronization neighbor 2.2.2.2 remote-as //Xác định địa IP kế cận neighbor 2.2.2.2 update-source Loopback0 // cho phép phiên IBGP dụng loopback cho kết nối TCP no auto-summary ! address-family vpnv4 // chọn tham số cấu hình địa vpnv4 neighbor 2.2.2.2 activate //cho phép route trao đổi với địa ip neighbor 2.2.2.2 next-hop-self // áp đặt bgp dùng địa khai báo thành next hop neighbor 2.2.2.2 send-community both // kíc hoạt viêc trao đổi vpnv4 exit-address-family ! address-family ipv4 vrf B1 // chọn vrf B1 với giao thức ipv4 redistribute rip // quảng bá giao thức RIP BGP no auto-summary // tắt chức auto-summary no synchronization //tắt chức synchronization exit-address-family ! address-family ipv4 vrf A1 redistribute rip no auto-summary no synchronization exit-address-family ! address-family ipv4 vrf C1 redistribute rip no auto-summary no synchronization exit-address-family ! End 3.3.3 Config Router P //bắt đầu vào cấu hình hostname P // đặt tên route P ip cef // bật chuyển mạch ip cef ! interface Loopback0 // khởi tạo loopback ip address 3.3.3.3 255.255.255.0 //gán địa ip subnet ! interface f1/0 //truy cập cổng f1/0 no shutdown //bật cổng ip address 192.168.3.2 255.255.255.0 // gán địa ip subnet mpls label protocol ldp //bật giao thức mpls ldp tag-switching ip // chuyển mạch mpls ip ! interfacef1/1 no shutdown ip address 192.168.4.1 255.255.255.0 mpls label protocol ldp tag-switching ip ! router eigrp 100 network 3.0.0.0 network 192.168.3.0 network 192.168.4.0 no auto-summary ! End 3.3.4 Router PE02 ( cấu trúc lệnh giống PE01 ) Config hostname PE02 ! ip vrf A2 rd 1:100 route-target export 1:100 route-target import 1:100 ! ip vrf B2 rd 1:200 route-target export 1:200 route-target import 1:200 ! ip vrf C2 rd 1:300 route-target export 1:300 route-target import 1:300 ! ip cef ! interface Loopback0 ip address 2.2.2.2 255.255.255.0 ! Interfacef 1/0 no shutdown ip address 192.168.4.2 255.255.255.0 mpls label protocol ldp tag-switching ip ! Interface f1/1 no shutdown ip vrf forwarding A2 ip address 192.168.5.1 255.255.255.0 ! Interface f2/0 no shutdown ip vrf forwarding B2 ip address 192.168.6.1 255.255.255.0 ! Interface f2/1 no shutdown ip vrf forwarding C2 ip address 192.168.8.1 255.255.255.0 ! router eigrp 100 network 2.0.0.0 network 192.168.4.0 no auto-summary ! router rip version ! address-family ipv4 vrf B2 redistribute bgp metric transparent network 192.168.6.0 no auto-summary exit-address-family ! address-family ipv4 vrf A2 redistribute bgp metric transparent network 192.168.5.0 no auto-summary exit-address-family ! address-family ipv4 vrf C2 redistribute bgp metric transparent network 192.168.8.0 no auto-summary exit-address-family ! router bgp no synchronization bgp log-neighbor-changes neighbor 1.1.1.1 remote-as neighbor 1.1.1.1 update-source Loopback0 no auto-summary ! address-family vpnv4 neighbor 1.1.1.1 activate neighbor 1.1.1.1 next-hop-self neighbor 1.1.1.1 send-community both exit-address-family ! address-family ipv4 vrf B2 redistribute rip no auto-summary no synchronization exit-address-family ! address-family ipv4 vrf A2 redistribute rip no auto-summary no synchronization exit-address-family ! address-family ipv4 vrf C2 redistribute rip no auto-summary no synchronization exit-address-family ! End 3.3.5 Router A2 ( cấu trúc lênh giống A1 ) Config hostname A2 ip cef ! interface Loopback0 ip address 30.30.30.30 255.255.255.0 ! interfacef1/0 no shutdown ip address 192.168.5.2 255.255.255.0 ! router rip version network 30.0.0.0 network 192.168.5.0 no auto-summary ! End 3.3.6 Router B2 ( cấu trúc lệnh giống B1 ) config hostname B2 ! ip cef ! interface Loopback0 ip address 40.40.40.40 255.255.255.0 ! interfacef1/0 no shutdown ip address 192.168.6.2 255.255.255.0 ! router rip version network 40.0.0.0 network 192.168.6.0 no auto-summary ! End 3.3.1 Router C2 config hostname C2 ! ip cef ! interface Loopback0 ip address 60.60.60.60 255.255.255.0 ! Interface f1/0 no shutdown ip address 192.168.8.2 255.255.255.0 ! router rip version network 60.0.0.0 network 192.168.8.0 no auto-summary ! End

Ngày đăng: 12/11/2019, 19:51

Từ khóa liên quan

Mục lục

  • 3.3.1. Router A1

  • 3.3.2. Router B1

  • 3.3.1. Router C1

  • 3.3.2. Router PE01

  • 3.3.3. Router P

  • 3.3.4. Router PE02

  • 3.3.5. Router A2

  • 3.3.6. Router B2

  • 3.3.1. Router C2

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan