Лабораторно упражнение N 4
Забележка: Да се провежда след Модул 9
Gateway(config) # interface G 0/0
Gateway(config-if) # ip address 192.168.10.1 255.255.255.0
Gateway(config) # ip dhcp excluded-address 192.168.10.10 192.168.10.20
Gateway(config) # ip dhcp excluded-address 192.168.10.1 /Gateway/
Gateway(config) # ip dhcp pool CAMPUS
Gateway(dhcp-config) # network 192.168.10.0 255.255.255.0
Gateway(dhcp-config) # default-router 192.168.10.1
Gateway(dhcp-config) # dns-server 8.8.8.8
Gateway(dhcp-config) # domain-name cisconet.com
PC-1> ipconfig /release
PC-1> ipconfig /renew
PC-1> ipconfig /all
Gateway# show ip dhcp binding
Gateway# show ip dhcp server statistics
Customer-1(config) # interface G 0/0
Customer-1(config-if) # ip address 192.168.10.1 255.255.255.0
Customer-1(config-if) # ip helper-address 172.16.1.2
Customer-1(config) # ip route 0.0.0.0 0.0.0.0 S 0/0/0 172.16.1.2
ISP(config) # ip route 192.168.10.0 255.255.255.0 S 0/0 172.16.1.1
ISP(config) # ip dhcp excluded-address 192.168.10.1 /Gateway-Customer-1/
ISP(config) # ip dhcp pool REMOTE-1
ISP(dhcp-config) # network 192.168.10.0 /24
ISP(dhcp-config) # default-router 192.168.10.1
ISP(dhcp-config) # dns-server 4.4.4.4
ISP(dhcp-config) # domain-name cisconet-1
ISP(config) # ip route 192.168.20.0 255.255.255.0 S 0/0 172.16.2.1
ISP(config) # ip dhcp excluded-address 192.168.20.1 /Gateway-Customer-2/
ISP(config) # ip dhcp pool REMOTE-2
ISP(dhcp-config) # network 192.168.20.0 /24
ISP(dhcp-config) # default-router 192.168.20.1
ISP(dhcp-config) # dns-server 4.4.4.4
ISP(dhcp-config) # domain-name cisconet-2
PC-1> ipconfig /release
PC-1> ipconfig /renew
PC-1> ipconfig /all
ISP# show ip dhcp binding
ISP# show ip dhcp server statistics
2. Конфигуриране на DHCPv6:
a) конфигуриране на SLAAC
Router-1(config) # ipv6 unicast-routing
Router-1(config) # interface G 0/0
Router-1(config-if) # ipv6 address 2001:db8:acad:a::1/64
Router-1(config-if) # ipv6 address fe80::1 link-local
Router-1(config-if) # no shutdown
Router-1 # show ipv6 interface G 0/0
Switch-1(config) # sdm prefer dual-ipv4-and-ipv6 default
Switch-1 # reload
Switch-1(config) # interface vlan 1
Switch-1(config-if) # ipv6 address autoconfig
Switch-1 # show ipv6 interface
PC-1> ipconfig /all
б) конфигуриране на Stateless and DHCPv6
Router-1(config) # ipv6 dhcp pool IPV6POOL-A
Router-1(config-dhcpv6) # domain-name STATELESS-DHCP.net
Router-1(config-dhcpv6) # dns-server 2001:db8:acad:a::abcd
Router-1(config) # interface G 0/0
Router-1(config-if) # ipv6 nd other-config-flag
Router-1(config-if) # ipv6 dhcp server IPV6POOL-A
Router-1 # show ipv6 interface G 0/0
PC-1> ipconfig /all
PC-1> ipconfig /release6
PC-1> ipconfig /renew6
Router-1 # show ipv6 dhcp binding
Router-1 # show ipv6 dhcp pool
в) конфигуриране на Stateful DHCPv6
Router-1(config) # ipv6 dhcp pool IPV6POOL-A
Router-1(config-dhcpv6) # address prefix 2001:db8:acad:a::/64
Router-1(config-dhcpv6) # no domain-name STATELESS-DHCP.net
Router-1(config-dhcpv6) # domain-name SATEFULL-DHCP.net
Router-1 # show ipv6 dhcp pool
Router-1 # debug ipv6 dhcp detail
Router-1(config) # interface G 0/0
Router-1(config-if) # shutdown
Router-1(config-if) # ipv6 nd managed-config-flag
Router-1(config-if) # ipv6 nd prefix default no-autoconfig
Router-1(config-if) # ipv6 dhcp server IPV6POOL-A
Router-1(config-if) # no shutdown
Router-1 # show ipv6 interface G 0/0
PC-1> ipconfig /all
PC-1> ipconfig /release6
PC-1> ipconfig /renew6
Router-1 # show ipv6 dhcp binding
Router-1 # show ipv6 dhcp pool
г) конфигуриране на DHCPv6 Relay:
Router-2(config) # interface G 0/0
Router-2(config-if) # ipv6 nd managed-config-flag
Router-2(config-if) # ipv6 dhcp relay destination 2001:db8:acad:1::1 S 0/0
3. Конфигуриране на Hot Standby Router Protocol (HSRP) и Gateway Load Balancing Protocol (GLBP):
а) Конфигуриране на HSRP:
Router-1(config) # interface G 0/0
Router-1(config-if) # standby 1 ip 192.168.1.254
Router-1(config-if) # standby 1 priority 150
Router-1(config-if) # standby 1 preempt
Router-2(config) # interface G 0/0
Router-2(config-if) # standby 1 ip 192.168.1.254
Router-1 # show standby
Router-2 # show standby
Router-1 # show standby brief
Router-2 # show standby brief
PC-1> ping 10.10.10.10 -t /Loopback на Router-3/
Прекъсва се връзката между Switch-1 и Router-1 и се наблюдава превключването на трафика през другия Gateway.
б) Конфигуриране на GLBP:
Router-1(config) # interface G 0/0
Router-1(config-if) # no standby 1
Router-1(config-if) # glbp 1 ip 192.168.1.254
Router-1(config-if) # glbp 1 priority 150
Router-1(config-if) # glbp 1 preempt
Router-1(config-if) # glbp 1 load-balancing round-robin
Router-2(config) # interface G 0/0
Router-2(config-if) # no standby 1
Router-2(config-if)# glbp 1 ip 192.168.1.254
Router-2(config-if) # glbp 1 load-balancing round-robin
Router-1 # show glbp brief
Router-2 # show glbp brief
PC-1> ping 10.10.10.10 -t
PC-1> arp –a /кой е MAC адреса за 192.168.1.254 ?/
Да се натовари с още трафик и отново да се изпълни:
PC-1> arp –d *
PC-1> arp –a /има ли промяна на MAC адреса за 192.168.1.254 ?/