Маршрутизация
Статические маршруты
Router(config)# ip route network-address subnet-mask { ip-address | interface-type interface-number [ ip-address ]} [ distance ] [ name name ] [ permanent ] [ tag tag ]
Router(config)# ipv6 route ipv6-prefix/prefix-length { ipv6-address | exit-intf }
ip route 0.0.0.0 0.0.0.0 {exit-intf | next-hop-ip}.
ipv6 route ::/0 {ipv6-address | interface-type interface-number}.
show ip(v6) route
show ip(v6) route static
show ip(v6) route network
Настройка RIP
R1# config t
R1(config)# router rip
R1(config-router)# version 2
R1(config-router)# passive-interface interface-id
R1(config-router)# network network
R1(config-router)# no auto-summary
R2(config-router)# default-information originate
Настройка RIPng
R1(config)# interface interface-id
R1(config)# ipv6 rip Test1 enable
R1(config)# ipv6 rip Test1 default-information originate
Настройка OSPF
R1(config)# router ospf process-id
R1(config-router)# network network netmask area area-id
R1(config-router)# passive-interface interface-id
Настройка OSPFv3
R1(config)# ipv6 router ospf process-id
R1(config-rtr)# passive-interface interface-id
R1(config)# interface interface-id
R1(config-if)# ipv6 ospf process-id area area-id
DHCP
Настройка DHCP на маршрутизаторе
R2(config)# ip dhcp excluded-address start-address end-address
R2(config)# ip dhcp pool pool_name
R2(dhcp-config)# network network netmask
R2(dhcp-config)# default-router ip-address
R2(dhcp-config)# dns-server ip-address
R2(dhcp-config)# domain-name domain-name
R2(dhcp-config)# lease time
R2(dhcp-config)# exit
R1(config)# interface interface-id
R1(config-if)# ip helper-address dhcp_server_ip-address
R1(config-if)# exit
Настройка DHCP на коммутаторе
S1# show sdm prefer
S1(config)# sdm prefer lanbase-routing
S1# reload
S1(config)# ip routing
Далее – аналогично маршрутизатору.
NAT
Статический:
Gateway(config)# ip nat inside source static 192.168.1.20 209.165.200.225
Gateway(config)# interface g0/1
Gateway(config-if)# ip nat inside
Gateway(config-if)# interface s0/0/1
Gateway(config-if)# ip nat outside
Gateway# show ip nat translations
Динамический:
Gateway# clear ip nat translation *
Gateway# clear ip nat statistics
Gateway(config)# access-list 1 permit 192.168.1.0 0.0.0.255
Gateway(config)# ip nat pool public_access 209.165.200.242 209.165.200.254
netmask 255.255.255.224
Gateway(config)# ip nat inside source list 1 pool public_access
Overload:
Gateway(config)# access-list 1 permit 192.168.1.0 0.0.0.255
Gateway(config)# ip nat pool public_access 209.165.200.225 209.165.200.230 netmask 255.255.255.248
Gateway(config)# ip nat inside source list 1 pool public_access overload
Gateway(config)# interface g0/1
Gateway(config-if)# ip nat inside
Gateway(config-if)# interface s0/0/1
Gateway(config-if)# ip nat outside
PAT:
Gateway(config)# no ip nat pool public_access 209.165.200.225 209.165.200.230 netmask 255.255.255.248
Gateway(config)# no ip nat inside source list 1 pool public_access overload
Gateway(config)# ip nat inside source list 1 interface serial 0/0/1 overload
HSRP И GLBP
R1(config)# interface g0/1
R1(config-if)# standby 1 ip 192.168.1.254
R1(config-if)# standby 1 priority 150
R1(config-if)# standby 1 preempt
R3(config)# interface g0/1
R3(config-if)# standby 1 ip 192.168.1.254
R1# show standby
R1# show standby brief
R1(config)# interface g0/1
R1(config-if)# glbp 1 ip 192.168.1.254
R1(config-if)# glbp 1 preempt
R1(config-if)# glbp 1 priority 150
R1(config-if)# glbp 1 load-balancing round-robin
R3(config)# interface g0/1
R3(config-if)# glbp 1 ip 192.168.1.254
R3(config-if)# glbp 1 load-balancing round-robin
R1# show glbp brief
