Cisco роутер настройка маршрутизации

IP Routing Configuration Guide, Cisco IOS Release 15.2(7)Ex (Catalyst 1000 Switches)

The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.

Book Title

IP Routing Configuration Guide, Cisco IOS Release 15.2(7)Ex (Catalyst 1000 Switches)

Configuring IP Unicast Routing

  • PDF — Complete Book (2.04 MB)PDF — This Chapter (1.21 MB) View with Adobe Reader on a variety of devices
  • ePub — Complete Book (537.0 KB) View in various apps on iPhone, iPad, Android, Sony Reader, or Windows Phone
  • Mobi — Complete Book (363.0 KB) View on Kindle device or Kindle app on multiple devices

Results

Chapter: Configuring IP Unicast Routing

  • Configuring IP Unicast Routing
  • Information About IP Unicast Routing
    • IP Routing Overview
    • Types of Routing
    • Static Unicast Routes
    • Default Routes and Networks
    • Routing Information Protocol
    • Default RIP Configuration
    • Enabling IP Unicast Routing
    • Assigning IP Addresses to SVIs
    • Configuring Default Routes and Networks
    • Configuring Basic RIP Parameters
    • Configuring RIP Authentication
    • Example: Enabling IP Unicast Routing
    • Example: Assigning IP Addresses to SVIs
    • Example: Displaying Current Status of the Routing Table

    Configuring IP Unicast Routing

    Information About IP Unicast Routing

    This module describes how to configure IPv4 unicast routing on a device.

    In addition to IPv4 traffic, you can also enable IPv6 unicast routing and configure interfaces to forward IPv6 traffic

    IP Routing Overview

    In some network environments, VLANs are associated with individual networks or subnetworks. In an IP network, each subnetwork is mapped to an individual VLAN. Configuring VLANs helps control the size of the broadcast domain and keeps local traffic local. However, network devices in different VLANs cannot communicate with one another without a Layer 3 device (router) to route traffic between the VLAN, referred to as inter-VLAN routing. You configure one or more routers to route traffic to the appropriate destination VLAN.

    When Host A in VLAN 10 needs to communicate with Host B in VLAN 10, it sends a packet addressed to that host. Switch A forwards the packet directly to Host B, without sending it to the router.

    When Host A sends a packet to Host C in VLAN 20, Switch A forwards the packet to the router, which receives the traffic on the VLAN 10 interface. The router checks the routing table, finds the correct outgoing interface, and forwards the packet on the VLAN 20 interface to Switch B. Switch B receives the packet and forwards it to Host C.

    Types of Routing

    Routers and Layer 3 switches can route packets in these ways:

    The switch supports static routes and default routes. It supports RIP for both IPv4 and IPv6 versions.

    Static Unicast Routes

    Static unicast routes are user-defined routes that cause packets moving between a source and a destination to take a specified path. Static routes can be important if the router cannot build a route to a particular destination and are useful for specifying a gateway of last resort to which all unroutable packets are sent.

    The switch retains static routes until you remove them. However, you can override static routes with dynamic routing information by assigning administrative distance values. Each dynamic routing protocol has a default administrative distance, as listed in the following table. If you want a static route to be overridden by information from a dynamic routing protocol, set the administrative distance of the static route higher than that of the dynamic protocol.

    Enhanced IRGP summary route

    Static routes that point to an interface are advertised through RIP and other dynamic routing protocols, whether or not static redistribute router configuration commands were specified for those routing protocols. These static routes are advertised because static routes that point to an interface are considered in the routing table to be connected and hence lose their static nature. However, if you define a static route to an interface that is not one of the networks defined in a network command, no dynamic routing protocols advertise the route unless a redistribute static command is specified for these protocols.

    When an interface goes down, all static routes through that interface are removed from the IP routing table. When the software can no longer find a valid next hop for the address specified as the forwarding router’s address in a static route, the static route is also removed from the IP routing table.

    Default Routes and Networks

    A router might not be able to learn the routes to all other networks. To provide complete routing capability, you can use some routers as smart routers and give the remaining routers default routes to the smart router. (Smart routers have routing table information for the entire internetwork.) These default routes can be dynamically learned or can be configured in the individual routers. Most dynamic interior routing protocols include a mechanism for causing a smart router to generate dynamic default information that is then forwarded to other routers.

    If a router has a directly connected interface to the specified default network, the dynamic routing protocols running on that device generate a default route. In RIP, it advertises the pseudonetwork 0.0.0.0.

    A router that is generating the default for a network also might need a default of its own. One way a router can generate its own default is to specify a static route to the network 0.0.0.0 through the appropriate device.

    When default information is passed through a dynamic routing protocol, no further configuration is required. The system periodically scans its routing table to choose the optimal default network as its default route. In Interior Gateway Routing Protocol (IGRP) networks, there might be several candidate networks for the system default. Cisco routers use administrative distance and metric information to set the default route or the gateway of last resort.

    If dynamic default information is not being passed to the system, candidates for the default route are specified with the ip default-network global configuration command. If this network appears in the routing table from any source, it is flagged as a possible choice for the default route. If the router has no interface on the default network, but does have a path to it, the network is considered as a possible candidate, and the gateway to the best default path becomes the gateway of last resort.

    Routing Information Protocol

    The Routing Information Protocol (RIP) is an Interior Gateway Protocol (IGP) created for use in small, homogeneous networks. It is a distance-vector routing protocol that uses broadcast UDP data packets to exchange routing information. The protocol is documented in RFC 1058. You can find detailed information about RIP in IP Routing Fundamentals, published by Cisco Press.

    Using RIP, a device sends routing information updates (advertisements) every 30 seconds. If a router does not receive an update from another router for 180 seconds or more, it marks the routes served by that router as unusable. If there is still no update after 240 seconds, the router removes all routing table entries for the non-updating router.

    RIP uses hop counts to rate the value of different routes. The hop count is the number of routers that can be traversed in a route. A directly connected network has a hop count of zero; a network with a hop count of 16 is unreachable. This small range (0 to 15) makes RIP unsuitable for large networks.

    If the router has a default network path, RIP advertises a route that links the router to the pseudonetwork 0.0.0.0. The 0.0.0.0 network does not exist; it is treated by RIP as a network to implement the default routing feature. The device advertises the default network if a default was learned by RIP or if the router has a gateway of last resort and RIP is configured with a default metric. RIP sends updates to the interfaces in specified networks. If an interface’s network is not specified, it is not advertised in any RIP update.

    Источник

    Статическая маршрутизация на роутерах Cisco

    В прошлой шпаргалке мы выполнили базовую настройку роутера и назначили IP-адреса интерфейсам роутера («Базовая настройка роутера Cisco»).

    Однако (надеюсь Вы помните из готового примера), у нас еще нет возможности отправить удачный пинг в другую сеть (из PC1 к PC3).

    Для этого мы и настроим статическую маршрутизацию, которая будет объяснять роутеру где находится другая сеть.

      Устанавливаем консольное соединение через гипертерминал со следующими настройками:
    • Скорость: 9600; Биты данных: 8; Четность: Нет; Стоповые биты: 1; Управление потоком: Нет;
    • //при входе на роутер вводим пароль — cisco
    • R1>enable//Входим в привилегированный режим.
    • //вводим пароль — class
    • R1#
    • R1#configure terminal//заходим в режим глобальной конфигурации
    • R1(config)#ip route 172.16.0.0 255.255.255.128 Serial0/0/0//это команда для ввода статического маршрута/ Объясняю вкратце: ip route — это команда, говорящая роутеру, что сейчас будет введен статический маршрут; 172.16.0.0 — это удаленная и неизвестная роутеру сеть; 255.255.255.128 — это маска удаленной сети; serial0/0/0 — это на какой интерфейс слать пакеты, предназначающиеся для той, удаленной сети.
    • //помимо вышеназванного способа можно воспользоваться другими командами:
      ip route 172.16.0.0 255.255.255.128 192.168.0.194 — в этом случае все тоже самое, только вместо указания интерфейса на какой слать пакеты, указан IP-адрес подключенного интерфейса следующего роутера.
      ip route 172.16.0.0 255.255.0.0 Serial0/0/0 — здесь мы увеличили диапазон адресов маской. Теперь на интерфейс уйдут не только пакеты с адресами 172.16.0.1-126, но и 172.16.255.254. Это называется суммированием маршрутов, и заслуживает другой статьи.
      ip route 0.0.0.0 0.0.0.0 Serial0/0/0 — а это называется маршрут по умолчанию, т.е. всё, что не предназначается для известных роутеру сетей уйдёт на интерфейс Serial0/0/0.
    • R1(config-line)#end//выходим в привилегированный режим EXEC Mode
    • R1#show running-config//Проверяем введенные данные.
    • R1#copy running-config startup-config//Сохраняем произведенную настройку в энерго-независимую память.

    Скачать выполненное задание настройки роутера

    Предлагаю скачать файл с выполненным заданием для программы эмулятора PacketTracer, открыть его и посмотреть на реализацию. Роутер R2 тоже настроен со статической маршрутизацией, следовательно теперь всё удачно пингуется.

    Настройка роутера копированием конфигурации

      Для автоматической базовой настройки (всё, что выше) маршрутизатора выполните следующие действия:
    • 1. Скопируйте текст ниже в буфер обмена: выделите всё, кликните правой кнопкой по выделенному и выберите «Копировать».
    • 2. При необходимости очистите роутер от всех настроек и перезагрузите его.
    • 3. Войдите в режим глобальной конфигурации и вызовите меню Гипер Терминала «Правка», а в нём «Передать главному компьютеру».
    • 4. Обязательно проверьте настройки с помощью команды show running-config
    • 5. При необходимости включите интерфейсы командой no shutdown из режима каждого интерфейса

    Источник

    Читайте также:  Обжать коннектор rj 45 роутер компьютер
Оцените статью
Adblock
detector