E N D
Chapter 7 Routing Protocol and Concept
What is router? • Router ជា Center of Network .ហើយ Router ប្រើសំរាប់ភ្ជាប់ពី Network មួយទៅ Network មួយទៀត ។ ម្យ៉ាងវិញទៀត Router ទទូលខុសត្រូវខាងចែកចាយ Packet រវាង Network ដែលខុសៗគ្នា។ Destination នៃ IP Packet អាចជា Web Server ដែលស្ថិតក្នុងប្រទេសផ្សេងរឺ Email Server ដែលស្ថិតនៅក្នុងតំបន់តែមួយនោះដែល Router ទទូលខុសត្រូវខាងបញ្ជូន Packet ទាំងនោះ។ • Router • Router ជា Computer ដែល Router តំបូងគេប្រើសំរាប់ Advanced Research Project Agency Network (ARPANET) ដែលបង្កើតឡើងនៅ 30 August 1969 ដែល ARPANET បង្កើតឡើងដោយនាយកដ្ឋានការពារជាតិរបស់ USA ។
Router មាន Hardware និង softwareដូចជា៖ CPU, RAM, ROM, Operating System • stem.
Type of Router • Network និមួយៗដែលភ្ជាប់នឹង Router តំរូវអោយបែងចែកទៅតាមប្រភេទ Interface ដែល Interface ទាំងនោះត្រូវបានប្រើសំរាប់ផ្គុំភ្ជាប់ទាំង Local Area Network និង Wide Area Network។ LAN ជា Ethernet ធម្មតាដែលភ្ជាប់ Device ដូចជា PC, Printer និង Server ។ WAN ត្រូវបានប្រើសំរាប់ Network ធំដែលមានទីតាំងភូមិសាស្រ្តធំៗ ឧទាហរណ៏ការតភ្ជាប់ WAN ជាធម្មតាត្រូវបានភ្ជាប់រវាង LAN ទៅនឹង ISP Network ។
Router Interface: • Router មាន Port មួយប្រើសំរាប់គ្រប់គ្រងទៅលើ Routerដែលមិនដូច Ethernet និង Serial interface ទេដែល Port នោះហៅថា Console Portដែលមិនត្រូវបានប្រើសំរាប់ការបញ្ជូន Packet ទេហើយ Console port ត្រូវបានភ្ជាប់ជាមួយ PC នៅពេល Configuration Router និមួយៗ ។ • LAN interface:ត្រូវបានប្រើសំរាប់ភ្ជាប់ពី Router ទៅ LAN។ នៅពេល Router ភ្ជាប់ជាមួយ Switch ត្រូវប្រើខ្សែ Straight-Through ។ តែបើ Router ពីរភ្ជាប់គ្នាផ្ទាល់តាមរយៈ Ethernet Interface ឬ Router ភ្ជាប់ផ្ចាល់ជាមួយ PC គឺត្រូវប្រើខ្សែ Cross-over ។ • WAN interface:ត្រូវបានប្រើសំរាប់ភ្ជាប់ Router ទៅនឹង Network ខាងក្រៅដោយប្រើ Serial interface។
Basic Router Configure • New Software Cisco Package Tracer • Install it on computer …. • Feature of Package Tracer • After install show interface • Start the first for Design LAN.
Start configure Router • នៅពេលអ្នក Configuration លើ Router ការងារតំបូងមានដូចជា • Go to Package Tracer • Design LAN (router,Swich ,hub ,computer) • Click on 1 Router to configure as below(other have the same configure) • Naming the Router • Setting Password • Configuring interface • Saving change on Router
Start configure Router (con) • ការលិចឡើងតំបូងគឺ User Mode ដែលអនុញ្ញាតិអោយបង្ហាញ State of router • Router> • The enable Command ត្រូវបានប្រើសំរាប់ចូលក្នុង privileged exec mode ដែលអនុអនុញ្ញាតិអោយ User អាចចូល Configuration លើ Router prompt ប្តូរពី “>” ទៅ ”#” ។ • Router>enable • Router# • ហើយដើម្បីកំណត់លើ Router គឺត្រូវចូលទៅ Global Mode ។ • Router#Config t • Router(Config)#
Start configure Router(con) • Other Router configure the same but must be sure that it have the range of IP address yet? • After that ping to test it by commend • R1# ping 192.168.1.1 that it reply (example) • Or by click on the Letter in the right of package tracer and put on the router source and destination …it appeared that successful it mean that they know each other ( must be test router first before test computer to send letter)
Static Route • Static Route ជា Commandធម្មតានិងមិនត្រូវការ Processing ច្រើនទេ ហើយប្រើដើម្បី Configure អោយ Router ស្គាល់គ្នា។វាមិនមែនជាProtocol ទេ គឺវាប្រើសំរាប់ដាក់ IPaddress for route នៅក្នុង device route នៅក្នុង Table ដោយឆ្លងកាត់ការcounfigureដោយដៃ។ • Static routing is not really a routing protocol. Static routing is simply the process of manually entering routes into a device's routing table via a configuration file that is loaded when the routing device starts up. As an alternative, these routes can be entered by a network administrator who configures the routes manually • Use static routing when you have very few devices to configure (<5) and when you know the routes will probably never change.
Static route configure When we change name and put Ipddresshery…we must be configure route ip do below: R1#(config)ip route 192.168.2.0 255.255.255.0 172.16.1.2 R1#end When we change name and put Ipddresshery…we must be configure route ip do below: R2#(config)ip route 192.168.1.0 255.255.255.0 172.16.1.1 R2#end IP serial =172.16.1.1 Fast Eternet=192.168.1.1 IP serial =172.16.1.2 Ip FastEthernet:192.168.2.1 Dubble click on it hery Static ip Ip:192.168.1.2 Subnet 255.255.255.0 Get way :192.168.1.1 Dubble click on it hery Static ip Ip:192.168.2.2 Subnet 255.255.255.0 Get way :192.168.2.1 After that ping to eaochother.
Verify configure static • Show ip route: គឺជាសំរាប់បង្ហាញ Routing table ដើម្បីដឹងថាតើវាស្គាល់ Network ណាខ្លះ។ • Show running-config: គឺជាសំរាប់បង្ហាញគ្រប់ running configuration ទាំងអស់ដែល store នៅក្នុង RAM ។ • Show ip interface brief: គឺសំរាប់បង្ហាញពត៌មានទាំងអស់របស់ interface • Copy running-config startup-config: សំរាប់ Apply និង Saving
Introduction to Dynamic Routing Protocols • Data Network ដែលយើងប្រើក្នុងការរស់នៅរបស់យើងដើម្បីការសិក្សា ក្នុងការងារធុនតូចៗ និងការងារធុនធំលំដាប់អន្តរជាតិនោះជាទូទៅយើងត្រូវមាន Router មួយនិង Computer 2 ឬ ច្រើន។ ឯនៅក្នុងការងារក្រុមហ៊ុនរបស់អ្នកអាចមាន Router ច្រើននិង Switch ច្រើនហើយមានរាប់រយ Computer ។ • Dynamic Routing Protocols ត្រូវបានប្រើនៅក្នុង Network ធំៗដើម្បីងាយស្រូលគ្រប់គ្រងនិងប្រតិបត្តិ។ Network ប្រើផ្សំផ្គុំរវាង Dynamic Routing Protocol និង Static Route ជាទូទៅគេច្រើនប្រើ Dynamic Routing Protocol ។
Introduction Dynamic Routing (con) • Dynamic Routing Protocol គឺចាប់ផ្តើមអោយប្រើប្រាស់ RIP ក្នុងឆ្នាំ១៩៨០ ហើយដំបូងក្នុងការប្រើគឺសំរាប់តែ ARPANET តែប៉ួណ្ណោះ។តែដោយពីមួយថ្ងៃទៅមួយថ្ងៃ Network ចាប់ផ្តើមមានភាព Complex ទៅៗ ទើបមានការដាក់អោយប្រើនៅ Dynamic routing protocol បន្តៗដូចជាOSPF , RIPv2 , EIGRP, BGP, IS-IS,GRP……
Dynamic Routing • Dynamic routing protocols are supported by software applications running on the routing device (the router) which dynamically learn network destinations and how to get to them and also advertise those destinations to other routers. This advertisement function allows all the routers to learn about all the destination networks that exist and how to those networks.
Dynamic Routing (con) • A router using dynamic routing will 'learn' the routes to all networks that are directly connected to the device. Next, the router will learn routes from other routers that run the same routing protocol (RIP, RIP2, EIGRP, OSPF, IS-IS, BGP etc). Each router will then sort through it's list of routes and select one or more 'best' routes for each network destination the router knows or has learned.
Link-state & distance-vector • Link-State protocol គឺជាការកំនត់ផ្លូវនៃការបញ្ជូនទិន្នន័យពី Source ទៅកាន់ Destination តាមរយះRouter. មានន័យថាRouter ជាអ្នកកំនត់ផ្លូវសំរាប់ការបញ្ជូននូវ Data ទាំងនោះ។(ផ្លូវណាដែលខ្លីហើយធ្វើការបញ្ជូនទៅ) • Protocol of Link-state have: • (IS-IS) Intermediate System To Intermediate System • (OSPF) Open Shortest Path First
Distance-Vector • Distance-Vector គឺការបញ្ជូនData ទៅកាន់Destination ដោយធ្វើការទាក់ទងគ្នារវាងneighbors ដែលនៅជិតគ្នា(មានន័យថាវាបានកត់ត្រាទុកនៅ neighbors route’s Table)ដោយកំនត់ពេលវេលាសំរាប់ធ្វើការបញ្ជូន Data ។ហើយការប្រើប្រាស់ Distance-Vector គឺវាមិនមាន knowledge សំរាប់កំនត់ pathdesignation ដូច link-state ទេ។ • Protocol of Distance- Vector • Routing Information Protocol (RIP) • Interior Gateway Routing Protocol (IGRP) • Exterior Gateway Protocol (EGP) • Border Gateway Protocol (BGP)
Routing Information Protocol (RIP) • RIP is a distance vector protocol which uses hop count to determine the best path through the network. The path with the fewest number of routed hops is considered the shortest path • RIP គឺជា Command សំរាប់ធ្វើអោយ Router ពីររឺច្រើនស្គាល់គ្នា ។
Configuration RIP • Design router and switch computer…… • Give ip to R1,R2,R3
The Router in the middle configure (please see the table to put ip for each router) • After that we configure ip for rip the same table under router in image • Put the ip for compute in all subnet and ping to each other… • Before ping make sure the router have ip address yet? • Finish
Verify RIP • ដើម្បី Verify និងដោះស្រាយបញ្ហាតំបូងយើងត្រូវប្រើ Command Show ip route និង Show ip protocols ។ ប្រសិនបើមិនចបែងចែកនិងកំណត់បញ្ហាបានយើងត្រូវប្រើ Command Debug ip rip ដើម្បីមើលបញ្ហាជាក់លាក់ដែលកើតឡើង។
EIGRP • Enhanced Interior Gateway Routing Protocol (EIGRP) ជា distance vector classless routing protocol ដែលត្រូវបានបញ្ចេញអោយប្រើនៅឆ្នាំ១៩៩២
Configuration EIGRP • Router(Config)#router eigrp Autonomous-system • Router(Config)#network network-address • Note: • Autonomous-system ជាលេខ ID នៃបណ្តុំNetwork ដែល EIGRP តំរូវអោយ Router ទាំងអស់ដែលនៅក្នុង Domain ដូចគ្នាត្រូវតែ Configure Autonomous-system ដូចគ្នាទាំងអស់ ដែលមានលេខចាប់ពី 1 ដល់ 65535 ។
Se 0/0/0 =ip 10.10.10.2 Se 0/0/1 =ip 11.11.11.2 Fast 0/0 =ip 2.2.2.1 Se 0/0/0 =ip 11.11.11.1 Se 0/0/1 =ip 12.12.12.2 Fast 0/0 =ip 3.3.3.1 Se 0/0/0 =ip 10.10.10.1 Se 0/0/1 =ip 12.12.12.1 Fast 0/0 =ip 1.1.1.1
Start to configure Router 1 • In R1 we start to configure(after we give ip address ) so do : • R1(config)# router eigrp 1 • R1(config-router)#network 1.1.1.0 • R1(config-router)#network 10.10.10.0 • R1(config-router)#network 12.12.12.0 • R1(config-router)#end • R1#wr
Configure 2 • In R2 we start to configure(after we give ip address ) so do : • R2(config)# router eigrp 1 • R2(config-router)#network 2.2.2.0 • R2(config-router)#network 10.10.10.0 • R2(config-router)#network 11.11.11.0 • R2(config-router)#end • R2#wr
ConfigureRouter 3 • In R3 we start to configure(after we give ip address ) so do : • R3(config)# router eigrp 1 • R3(config-router)#network 3.3.3.0 • R3(config-router)#network 11.11.11.0 • R3(config-router)#network 12.12.12.0 • R3(config-router)#end • R3#wr
Verify EIGRP • ប្រើ Show ipeigrp neighbor ដើម្បីមើល neighbor table និងផ្ទៀងផ្តាត់ថា EIGRP បានបង្កើត Connection ជាមួយ Router ដែលនៅជិតបំផុត។
OSPF (Open Shortest Path First) • OSPF គឺជា routing protocol ដែលប្រើក្នុងប្រភេទ Link-State protocol។ ហើយគេនិយមប្រើវាជាមួយនិងប្រភេទ network ធំៗ ហើយគេនិយមប្រើវាជាង RIP។ • Open Shortest Path First (OSPF) ដែលបង្កើតឡើងសំរាប់ជំនូស Distance Vector Routing protocol RIP ដោយ Link-State routing protocol ។ OSPFv1 ត្រូវបានបង្កើតឡើង 1989 ហើយ OSPFv2 ត្រូវបានបង្កើតឡើងឆ្នាំ 1991 ។
Configuration OSPF • Router(Config)#router ospf 1 • Router(Config-router)#Network Network-address wildcard-mask area area-id • Note: area-id សំដៅលើ OSPF area ដែល OSPF area ជាក្រុមនៃ Router ដែលចែកចាយ Link-state information ។
HQ(router): Fast : 172.16.30.1 255.255.255.0 Se 0/0/0 : 172.16.20.2 255.255.255.0 se 0/0/1 : 172.16.40.1 255.255.255.0 R1: Fast : 172.16.10.1 255.255.255.0 Se 0/0/0 : 172.16.20.1 255.255.255.0 R2: Fast : 172.16.50.1 255.255.255.0 Se 0/0/0 : 172.16.40.1 255.255.255.0 All Client please put the ip to fit with the every fastethernetlan that we have configure
Stat to configure OSPF • R1 >enable • R1#config t • R1(config)# • R1(config)#router ospf 1 • R1(config-router)network 172.16.0.0 0.0.255.255 area 0 • R1#(config-router)end
Router HQ • RHQ >enable • RHQ #config t • RHQ(config)# • RHQ(config)#router ospf 1 • RHQ(config-router)#network 172.16.0.0 0.0.255.255 area 0 • RHQ(config-router)#end
Configure R2 • R2 >enable • R2#config t • R2(config)# • R2(config)#router ospf 1 • R2(config-router)#network 172.16.0.0 0.0.255.255 area 0 • R2(config-router)#end
Verify OSPF • ប្រើ Show IP ospf neighbor command ដើម្បីផ្ទាងផ្ទាតដោះស្រាយ ospfដែលនៅជិតហើយមានទំនាកទំនងគ្នា។ • HQ • R1