Hàn Minh Châu www.CMP3004* - : tailieuhoctap@hutech.1 HÌNH IPV4-IPV6 STATIC ROUTE VÀ DEFAULT ROUTE .2 HÌNH STATIC ROUTE .1 HÌNH EIGRP IPV4.2 HÌNH EIGRP CHO IPV6 .1 SINGLE-AREA OSPFV2 .2 MULTI-AREA OSPFV2 .3 MULTI-AREA OSPFV3 .1 EBGP TRÊN IPV4.3 ADVERTISING DEFAULT ROUTE. 118 BÀI 5: ETHERCHANNEL VÀ HSRP .1 HÌNH VLAN , TRUNK VÀ VTP. 147 BÀI 6: ACCESS CONTROL LIST .1 HÌNH VÀ TRA STANDARD ACL .2 HÌNH VÀ TRA VTY.3 HÌNH VÀ KI TRA EXTENDED ACL. 164 BÀI 7: NAT OVER IPV4.
169 BÀI 8: GRE VPN. ng quan v RP -cost load balancing, IV BÀI 5: ETHERCHANNEL VÀ HSRP khái - Etherchannel layer 3, HSRP. BÀI 6: ACCESS CONTROL LIST BÀI 7: NAT TRÊN IPv4 th BÀI 8: VPN OVER GRE V - .1 C U HÌNH IPV4-IPV6 STATIC ROUTE VÀ DEFAULT ROUTE Device Interface IP Address / Prefix 172.1 /24 G0/0/0 2001:db8:acad:2::1 /64 fe80::1 192.1 /24 G0/0/1 2001:db8:acad:1::1 /64 R1 fe80::1 10.1 /24 Loopback1 2001:db8:acad:10::1 /64 fe80::1 209.225 /27 Loopback2 2001:db8:acad:209::1 /64 fe80::1 2 BÀI 1: Device Interface IP Address / Prefix 172.2 /24 G0/0/0 2001:db8:acad:2::2 /64 fe80::2 192.2 /24 G0/0/1 2001:db8:acad:1::2 /64 R2 fe80::2 10.1 /24 Loopback1 2001:db8:acad:11::2 /64 fe80::2 209.193 /27 Loopback2 2001:db8:acad:210::1 /64 fe80::2 - - - hình static route và default route cho IPv4 trên R1, R2 - Gán tên cho router: router(config)# hostname R1 router(config)# hostname R2 Disable DNS lookup trên R1,R2: R1(config)# no ip domain lookup R2(config)# no ip domain lookup Gán class R1(config)# enable secret class R2(config)# enable secret class BÀI 1: 3 Gán cisco R1(config)# line console 0 R1(config-line)# password cisco R1(config-line)# login R2(config)# line console 0 R2(config-line)# password cisco R2(config-line)# login Gán cisco làm password cho VTY và enable login: R1(config)# line vty 0 4 R1(config-line)# password cisco R1(config-line)# login R2(config)# line vty 0 4 R2(config-line)# password cisco R2(config-line)# login Mã hóa password: R1(config)# service password-encryption R2(config)# service password-encryption R1(config)# banner motd $ Authorized Users Only! $ R2(config)# banner motd $ Authorized Users Only! $ R1(config)# exit R1# copy running-config startup-config R2(config)# exit R2# copy running-config startup-config : Gán tên cho switch: Gán tên cho router: switch(config)# hostname R1 switch(config)# hostname R2 4 BÀI 1: Disable DNS lookup trên R1,R2: S1(config)# no ip domain lookup S2(config)# no ip domain lookup Gán class S1(config)# enable secret class S2(config)# enable secret class Gán cisco S1(config)# line console 0 S1(config-line)# password cisco S1(config-line)# login S2(config)# line console 0 S2(config-line)# password cisco S2(config-line)# login Gán cisco làm password cho VTY và enable login: S1(config)# line vty 0 15 S1(config-line)# password cisco S1(config-line)# login S2(config)# line vty 0 15 S2(config-line)# password cisco S2(config-line)# login Mã hóa password: S1(config)# service password-encryption S2(config)# service password-encryption S1(config)# banner motd $ Authorized Users Only! $ S2(config)# banner motd $ Authorized Users Only! $ S1(config)# exit S1# copy running-config startup-config BÀI 1: 5 S2(config)# exit S2# copy running-config startup-config R1(config)# ipv6 unicast-routing R2(config)# ipv6 unicast-routing R1(config)# interface g0/0/0 R1(config-if)# ip address 172.0 6 BÀI 1: R2(config-if)# ipv6 address fe80::2 link-local R2(config-if)# ipv6 address 2001:db8:acad:1::2/64 R2(config-if)# no shutdown R2(config-if)# interface lo1 R2(config-if)# ip address 10.1 R1# show ip route Codes: L - local, 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 BÀI 1: 7 o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP a - application route + - replicated route, % - next hop override, p - overrides from PfR Gateway of last resort is 172.0/8 is variably subnetted, 3 subnets, 2 masks C 10.0/24 is directly connected, Loopback1 L 10.1/32 is directly connected, Loopback1 S 10.0/16 is variably subnetted, 2 subnets, 2 masks C 172.0/24 is directly connected, GigabitEthernet0/0/0 L 172.1/32 is directly connected, GigabitEthernet0/0/0 192.0/24 is variably subnetted, 2 subnets, 2 masks C 192.0/24 is directly connected, GigabitEthernet0/0/1 L 192.1/32 is directly connected, GigabitEthernet0/0/1 209.0/24 is variably subnetted, 2 subnets, 2 masks C 209.224/27 is directly connected, Loopback2 L 209.225/32 is directly connected, Loopback2 R2(config)# ipv6 route 2001:db8:acad:10::/64 2001:db8:acad:1::1 R2(config)# ipv6 route ::/0 2001:db8:acad:2::1 R2(config)# ipv6 route ::/0 2001:db8:acad:1::1 80 R1(config)# ipv6 route ::/0 2001:db8:acad:2::2 R2# show ipv6 route IPv6 Routing Table - default - 11 entries Codes: C - Connected, L - Local, S - Static, U - Per-user Static route B - BGP, R - RIP, H - NHRP, I1 - ISIS L1 8 BÀI 1: I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary, D - EIGRP EX - EIGRP external, ND - ND Default, NDp - ND Prefix, DCE - Destination NDr - Redirect, RL - RPL, O - OSPF Intra, OI - OSPF Inter OE1 - OSPF ext 1, OE2 - OSPF ext 2, ON1 - OSPF NSSA ext 1 ON2 - OSPF NSSA ext 2, a - Application S ::/0 [1/0] via 2001:DB8:ACAD:2::1 C 2001:DB8:ACAD:1::/64 [0/0] via GigabitEthernet0/0/1, directly connected L 2001:DB8:ACAD:1::2/128 [0/0] via GigabitEthernet0/0/1, receive C 2001:DB8:ACAD:2::/64 [0/0] via GigabitEthernet0/0/0, directly connected L 2001:DB8:ACAD:2::2/128 [0/0] via GigabitEthernet0/0/0, receive S 2001:DB8:ACAD:10::/64 [1/0] via 2001:DB8:ACAD:1::1 C 2001:DB8:ACAD:11::/64 [0/0] via Loopback1, directly connected L 2001:DB8:ACAD:11::1/128 [0/0] via Loopback1, receive C 2001:DB8:ACAD:210::/64 [0/0] via Loopback2, directly connected L 2001:DB8:ACAD:210::1/128 [0/0] via Loopback2, receive L FF00::/8 [0/0] via Null0, receive 1.2 C U HÌNH STATIC ROUTE BÀI 1: 9 - - - - Hostname Edge ipv6 unicast-routing interface GigabitEthernet0/0 ip address 192.0 ipv6 address FE80::E link-local ipv6 address 2001:DB8:1:10::1/64 interface GigabitEthernet0/1 ip address 192.0 ipv6 address FE80::E link-local ipv6 address 2001:DB8:1:11::1/64 interface Serial0/0/0 ip address 10.252 ipv6 address FE80::E link-local ipv6 address 2001:DB8:A:1::2/64 interface Serial0/0/1 ip address 10.252 ipv6 address FE80::E link-local ipv6 address 2001:DB8:A:2::2/64 ip route 0.0 Serial0/0/0 ip route 0.0 Serial0/0/1 5 10 BÀI 1: ipv6 route ::/0 2001:DB8:A:1::1 ipv6 route ::/0 2001:DB8:A:2::1 5 : hostname ISP1 ipv6 unicast-routing interface GigabitEthernet0/0 ip address 198.0 ipv6 address FE80::1 link-local ipv6 address 2001:DB8:F:F::1/64 interface Serial0/0/0 ip address 10.252 ipv6 address FE80::1 link-local ipv6 address 2001:DB8:A:1::1/64 ip route 192.0 Serial0/0/0 ip route 192.0 Serial0/0/0 ip route 192.0 GigabitEthernet0/0 5 ip route 192.0 GigabitEthernet0/0 5 ipv6 route 2001:DB8:1:10::/64 2001:DB8:A:1::2 ipv6 route 2001:DB8:1:11::/64 2001:DB8:A:1::2 ipv6 route 2001:DB8:1:10::/64 2001:DB8:F:F::2 5 ipv6 route 2001:DB8:1:11::/64 2001:DB8:F:F::2 5 hostname ISP2 ipv6 unicast-routing interface GigabitEthernet0/0 ip address 198.0 ipv6 address FE80::2 link-local ipv6 address 2001:DB8:F:F::2/64 interface Serial0/0/1 BÀI 1: 11 ip address 10.252 ipv6 address FE80::2 link-local ipv6 address 2001:DB8:A:2::1/64 ip route 192.0 Serial0/0/1 ip route 192.0 Serial0/0/1 ip route 192.0 GigabitEthernet0/0 5 ip route 192.0 GigabitEthernet0/0 5 ipv6 route 2001:DB8:1:10::/64 2001:DB8:A:2::2 ipv6 route 2001:DB8:1:11::/64 2001:DB8:A:2::2 ipv6 route 2001:DB8:1:10::/64 2001:DB8:F:F::1 5 ipv6 route 2001:DB8:1:11::/64 2001:DB8:F:F::1 5 IPv4: 198.1 IPv6: 2001:DB8:F:F::10 /64 GW: 2001:DB8:F:F::1 -A: IPv4: 192.1 IPv6: 2001:DB8:1:10::10 /64 GW: FE80::E -B: IPv4: 192.1 IPv6: 2001:DB8:1:11::10 /64 GW: FE80::E 12 BÀI 2: BÀI 2: EIGRP 2.1 C U HÌNH EIGRP IPV4 Cho topology: Device Interface IP Address Subnet Mask G0/0/0 10.0 PC1 NIC DHCP BÀI 2: 13 - - - Gán tên cho router: router(config)# hostname R1 router(config)# hostname R2 router(config)# hostname R3 Disable DNS lookup trên R1, R2, R3: R1(config)# no ip domain lookup R2(config)# no ip domain lookup R3(config)# no ip domain lookup R1(config)# banner motd $ Authorized Users Only! $ R2(config)# banner motd $ Authorized Users Only! $ R3(config)# banner motd $ Authorized Users Only! $ Gán class R1(config)# enable secret class R2(config)# enable secret class R3(config)# enable secret class Gán cisco n: R1(config)# line console 0 R1(config-line)# password cisco R1(config-line)# login 14 BÀI 2: R2(config)# line console 0 R2(config-line)# password cisco R2(config-line)# login R3(config)# line console 0 R3(config-line)# password cisco R3(config-line)# login Gán cisco làm password cho VTY và enable login: R1(config)# line vty 0 4 R1(config-line)# password cisco R1(config-line)# login R2(config)# line vty 0 4 R2(config-line)# password cisco R2(config-line)# login R3(config)# line vty 0 4 R3(config-line)# password cisco R3(config-line)# login Mã hóa password: R1(config)# service password-encryption R2(config)# service password-encryption R3(config)# service password-encryption R1(config)# exit R1# copy running-config startup-config R2(config)# exit R2# copy running-config startup-config R3(config)# exit R3# copy running-config startup-config BÀI 2: 15 Gán tên cho switch: switch(config)# hostname D1 switch(config)# hostname D2 Disable DNS lookup trên D1,D2: D1(config)# no ip domain lookup D2(config)# no ip domain lookup Gán class D1(config)# enable secret class D2(config)# enable secret class Gán cisco làm pass D1(config)# line console 0 D1(config-line)# password cisco D1(config-line)# login D2(config)# line console 0 D2(config-line)# password cisco D2(config-line)# login Gán cisco làm password cho VTY và enable login: D1(config)# line vty 0 15 D1(config-line)# password cisco D1(config-line)# login D2(config)# line vty 0 15 D2(config-line)# password cisco D2(config-line)# login Mã hóa password: D1(config)# service password-encryption D2(config)# service password-encryption 16 BÀI 2: D1(config)# banner motd $ Authorized Users Only! $ D2(config)# banner motd $ Authorized Users Only! $ D1(config)# exit D1# copy running-config startup-config D2(config)# exit D2# copy running-config startup-config R1(config)# interface g0/0/0 R1(config-if)# ip address 10.0 BÀI 2: 17 R1(dhcp-config)# default-router 192.0 D2(config-if)# no shutdown D2(config-if)# exit ) 27 trên R2: R2(config)# router eigrp 27 R2(config-router)# eigrp router-id 2.0 R2(config-router)# end R1(config)# router eigrp BASIC-EIGRP-LAB R1(config-router)# address-family ipv4 unicast autonomous-system 27 R1(config-router-af)# eigrp router-id 1.0 R1(config-router-af)# end R3(config)# router eigrp BASIC-EIGRP-LAB R3(config-router)# address-family ipv4 unicast autonomous-system 27 R3(config-router-af)# eigrp router-id 3.0 R3(config-router-af)# end D2(config)# router eigrp BASIC-EIGRP-LAB D2(config-router)# address-family ipv4 unicast autonomous-system 27 D2(config-router-af)# eigrp router-id 132.2 R1(config-router-af-interface)# passive-interface R1(config-router-af-interface)# end R2(config)# router eigrp 27 R2(config-router)# passive-interface default R2(config-router)# no passive-interface g0/0/0 R2(config-router)# no passive-interface g0/0/1 R2(config-router)# exit R2(config)# end BÀI 2: EIGRP 21 R3(config)# router eigrp BASIC-EIGRP-LAB R3(config-router)# address-family ipv4 unicast autonomous-system 27 R3(config-router-af)# af-interface default R3(config-router-af-interface)# passive-interface R3(config-router-af-interface)# exit R3(config-router-af)# af-interface g0/0/0 R3(config-router-af-interface)# no passive-interface R3(config-router-af-interface)# exit R3(config-router-af)# af-interface g0/0/1 R3(config-router-af-interface)# no passive-interface R3(config-router-af-interface)# end R3# show ip protocols | section Passive Passive Interface(s): Loopback0 y tính PC1 ping thành công R3 R1# show ip route 10.0/8 is variably subnetted, 3 subnets, 2 masks C 10.0/24 is directly connected, g0/0/0 L 10.1/32 is directly connected, g0/0/0 D 10.0/16 is variably subnetted, 3 subnets, 2 masks C 172.0/24 is directly connected, g0/0/1.1/32 is directly connected, g0/0/1.0/24 is variably subnetted, 2 subnets, 2 masks C 192.0/24 is directly connected, g0/0/1.1/32 is directly connected, g0/0/1. R1# show ip eigrp topology all-links P 192.0/24, 2 successors, FD is 196689920, serno 8 via 10.0/24, 1 successors, FD is 196608000, serno 7 via 172.0/24, 1 successors, FD is 131072000, serno 2 via Connected, g0/0/1.0/24, 1 successors, FD is 131072000, serno 1 via Connected, g0/0/1.0/24, 1 successors, FD is 196608000, serno 4 via 10.0/24, 1 successors, FD is 131072000, serno 3 via Connected, g0/0/0 nhau.
R3# show ip route eigrp | section 192.2, 04:01:06, g0/0/0 R2(config)# interface g0/0/0 R2(config-if)# bandwidth 800000 R2(config-if)# delay 10000 R2(config-if)# exit R2(config)# interface g0/0/1 R2(config-if)# bandwidth 800000 R2(config-if)# delay 10000 R2(config-if)# end R3# show ip route eigrp | section 192.2, 00:09:24, g0/0/1 EIGRP-AUTHEN-KEY trên R1, R2, R3, D2 key-string là $3cre7!! R1(config)# key chain EIGRP-AUTHEN-KEY R1(config-keychain)# key 1 24 BÀI 2: R1(config-keychain-key)# key-string $3cre7!! R1(config-keychain-key)# end R2(config)# interface g0/0/0 R2(config-if)# ip authentication key-chain eigrp 27 EIGRP-AUTHEN-KEY R2(config-if)# ip authentication mode eigrp 27 md5 R2(config-if)# exit R2(config)# interface g0/0/1 R2(config-if)# ip authentication key-chain eigrp 27 EIGRP-AUTHEN-KEY R2(config-if)# ip authentication mode eigrp 27 md5 R2(config-if)# end R1(config)# router eigrp BASIC-EIGRP-LAB R1(config-router)# address-family ipv4 unicast autonomous-system 27 R1(config-router-af)# af-interface g0/0/0 R1(config-router-af-interface)# authentication key-chain EIGRP-AUTHEN-KEY R1(config-router-af-interface)# authentication mode md5 R1(config-router-af-interface)# end R3(config)# router eigrp BASIC-EIGRP-LAB R3(config-router)# address-family ipv4 unicast autonomous-system 27 R3(config-router-af)# af-interface g0/0/0 R3(config-router-af-interface)# authentication key-chain EIGRP-AUTHEN-KEY R3(config-router-af-interface)# authentication mode md5 R3(config-router-af-interface)# end md5 R1# show ip eigrp interface detail | section G0/0/0 Authentication mode is md5, key-chain is "EIGRP-AUTHEN-KEY" - $3cre7!! trên R1 và D2 có cùng Named EIGRP.1 R1(config-router-af-interface)# authentication mode hmac-sha-256 $3cre7!! R1(config-router-af-interface)# end D2(config)# router eigrp BASIC-EIGRP-LAB D2(config-router)# address-family ipv4 unicast autonomous-system 27 D2(config-router-af)# af-interface g1/0/1 D2(config-router-af-interface)# authentication mode hmac-sha-256 $3cre7!! D2(config-router-af-interface)# end Authentication mode HMAC-SHA-256 R1# show ip eigrp interface detail | section G0/0/1.