serial interface cisco что это
Первые шаги по настройке оборудования Cisco
Компания Cisco является мировым лидером в области сетевых технологий. Она смогла создать многоуровневую систему сертификации инженеров по компьютерным сетям, благодаря которой проверяются знания не только продукции, но и знание сетевых технологий, протоколов и принципов работы сети.
Маршрутизаторы Cisco используют межсетевую операционную систему — Cisco IOS, которая выполняет функции сетевой организации, маршрутизации, коммутации и передачи данных.
Интерфейс IOS имеет набор команд, доступных в зависимости от установленных привилегий для пользователя. Это позволяет избежать ошибочных действий для неподготовленных специалистов. Для использования привилегированного режима используется команда enable, для конфигурационного — команда configure terminal.
Каждый интерфейс устройств Cisco называется портом и обозначается несколькими способами:
— в фиксированных конфигурациях интерфейсы нумеруются последовательно без привязки к слоту, в который они установлены (например ethernet0, serial0).
— в модульных конструкциях с заменяемыми платами интерфейсов, используется нумерация с использованием синтаксиса типа слот/порт (например ethernet0/1, serial0/1).
Команды IOS могут предоставить пользователю информацию о конфигурации, управлении и статусе отдельных частей оборудования.
Назначение имени устройству осуществляется командой hostname
HTTP сервер как правило отключается т.к. подвержен DoS. Для этого используется команда:
Несмотря на то, что логи обычно записываются на сервер, обычно выделяют буфер в оперативной памяти размером 256 Кб в качестве резервного варианта.
Для того чтобы не вызывать перегрузку необходимо поставить ограничение: не более 10 сообщений в секунду.
Из соображений безопасности отключаем опцию IP пакета source routing
Если по маршруту есть участники с размером MTU меньше чем 1500 байт, то необходимо включить path mtu discovery
Для того, чтобы заходить на устройство по команде telnet необходимо поставить защиту. В противном случае доступ по telnet не будет получен.
Для установки пароля на привилегированный режим необходимо сделать следующее
Внутреннее время задается с помощью команды clock set. Команда вводится в привилегированном режиме.
Часовой пояс настраиваем с помощью команды clock timezone
Настройка SSH подключения
Задаем имя роутеру:
Router1(config)# hostname R1
Назначаем доменное имяЖ
R1(config)# ip domain-name name.com
Генерируем RSA ключ:
R1(config)# crypto key generate rsa
Создаем пользователя root и назначает ему пароль admin
R1(config)# username root secret admin
создаем access-list, в котором можем задать например с каких IP адресов мы можем подключиться:
R1(config)# access-list 1 permit 10.1.1.12
Настраиваем виртуальный терминал с 0 по 4 и задаем проверку пароля локально
R1(config)# line vty 0 4
R1(config)# login local
С помощью списка доступа разрешаем доступ с IP-адреса
R1(config)# access-class 1 in
И разрешаем работать по протоколы SSH
R1(config)# transport input ssh
R1(config)# transport output ssh
R1(config)# end
Настройка NAT
Настраиваем интерфейс, который смотрит в интернет
interface FastEthernet0/0
ip nat outside
На локальном интерфейсе
interface vlan1
ip nat inside
Создаем список IP-адресов, имеющих доступ к NAT
ip access-list entended NAT
permit ip host 192.168.xxx.xxx any
Включаем NAT (PAT) на внешнем интерфейсе
ip nat inside source list NAT interface FastEthernet0/0 overload
И добавляем инспекцию протоколов
ip inspect name INSPECT_OUT http
ip inspect name INSPECT_OUT https
ip inspect name INSPECT_OUT ftp
Раздаем адреса по DHCP
Сохранение настроек роутера
Для того чтобы не повредить конфигурационные файлы после выключения устройства можно сделать сохранение настроек командой copy running-config startup-config
Просмотр интерфейса show interfaces
Позволяет просмотреть статус всех интерфейсов на устройстве. Если указать конкретный порт, то отобразится информация только по указанному интерфейсу. Например:
Основная полученная информация
Если инкапсулирование данных для интерфейсов локальной сети не нуждается в настройке, то для интерфейсов глобальных сетей это необходимо.
Интерфейс может быть в различном состоянии:
— «UP» — включен, поднят
— «DOWN» — выключен, нет линка
— «Administratively down» — административная блокировка
Различие заключается в том, что отключенный интерфейс находится в рабочем состоянии, но не обменивается данными с подключенной к нему средой, а в состоянии административной блокировки интерфейс отключен на уровне конфигурации.
Пример административной блокировки порта
Настройка интерфейса Ethernet
Заходим на интерфейс
router (config)# interface fastethernet 0/1
Устанавливаем IP на интерфейс
router (config)# ip add 10.0.0.1 255.255.255.0
Поднимаем интерфейс
router (config)# no shutdown
Посмотреть какой IP-адрес назначен интерфейсу можно командой show ip interface
Настройка интерфейса Serial
Заходим на интерфейс
router (config)# interface serial 0/0/0
Устанавливаем IP на интерфейс
router (config)# ip add 192.168.1.1 255.255.255.0
Устанавливаем скорость порта
router (config)# clock rate 56000
Поднимаем интерфейс
router (config)# no shutdown
Команда encapsulation определяет тип протокола канального уровня и формат передаваемых данных для конкретного интерфейса. Например:
Отключение порта shutdown
Команды выключения/включения интерфейса применяется, если необходимо изменить административное состояние интерфейса. Оборудование Cisco не передает данные на интерфейс, если он заблокирован на административном уровне. Выключение порта осуществляется путем входа на нужный интерфейс и ввода команды shutdown. Например:
Проверяем полученный результат с помощью уже известной команды show interfaces:
Включение интерфейса осуществляется командой no shutdown
Добавление описания/комментария с помощью команды description
К каждому из доступных интерфейсов доступно поле длиной не более 255 символов.
Просмотр информации о VLAN
Команда show vlan позволяет посмотреть информацию о созданных виртуальных каналах.
В рабочих конфигурациях использование VLAN с номером 1 не рекомендуется.
Команды конфигурирования IP-маршрутизации
Для просмотра таблицы IP-маршрутизации используется команда show ip route
Результаты данной команды дают администратору сети огромное количество данных. Они являются ключевым инструментом для определения пути, по которому пакет проходит по сети.
В приведенном выше примере строка Gateway of last resort — это сетевой адрес маршрутизатора, куда должны будут посылаться пакеты, имеющие пункт назначения вне данной сети. Если статические маршруты и протоколы динамической маршрутизации не заданы, то будет указано «is not set». После представлена сама таблица маршрутизации. Буква перед маршрутом означает код, пояснения к которому выводятся выше.
Команды для конфигурирования служб имен доменов
Большинство пользователей обращаются к серверам, рабочим станциям и другим IP-устройствам, используя их имя, а не IP-адрес. Роль преобразования IP-адреса в имя отводится DNS серверам. Маршрутизаторы также могут пользоваться DNS-системой для преобразования имен в IP-адреса.
Пример конфигурирования службы DNS маршрутизатора:
Проверка установок службы DNS на маршрутизаторе выполняется с помощью команды show host
Cisco 800M Series ISR Software Configuration Guide
Book Title
Cisco 800M Series ISR Software Configuration Guide
Chapter Title
Configuring the Serial Interface
View with Adobe Reader on a variety of devices
View in various apps on iPhone, iPad, Android, Sony Reader, or Windows Phone
View on Kindle device or Kindle app on multiple devices
Results
Chapter: Configuring the Serial Interface
Configuring the Serial Interface
This chapter describes configuring the serial interface for Cisco 800M Series ISRs in the following sections:
Configuring the Serial Interface
The Cisco 800M Series Integrated Services Router (ISR) provides serial WAN connectivity to remote sites using Cisco High-Level Data Link Control (HDLC), Point-to-Point Protocol (PPP), or Frame Relay encapsulation through the pluggable, serial WAN interface module. The Cisco 800M Series ISR supports both synchronous and asynchronous modes of communication.
Features Supported by Serial Module
The Cisco 800M Series ISR has 2 WAN slots that can host single-port serial module or multi-mode 3G module and supports the following combinations.
The features supported by the single-port serial module on Cisco 800M Series ISR is given as follows:
– HDLC
– PPP
– Frame Relay
– Serial Line Internet Protocol (SLIP)
– EIA-232
– EIA-449
– EIA-530
– EIA-530A
– V.35
– X.21
Table 4-1 Smart Serial Cabling for Cisco 800M Series ISRs
Table 4-2 describes the LEDs on the Cisco 800M series serial WAN module.
Table 4-2 LEDs on the Serial WAN Module
Indicates the interface status and shows that line protocol is up.
Shows that the line protocol is down.
Indicates that the hardware loopback status is configured on the serial interface.
Indicates that loopback is not configured.
Information About Configuring Serial Interfaces
To configure serial interfaces, you should understand the following concept:
Cisco HDLC Encapsulation
Cisco High-Level Data Link Controller (HDLC) is the Cisco proprietary protocol for sending data over synchronous serial links. Cisco HDLC also provides a simple control protocol called Serial Line Address Resolution Protocol (SLARP) to maintain serial link keepalives. Cisco HDLC is the default for data encapsulation at Layer 2 (data link) of the Open System Interconnection (OSI) stack for efficient packet delineation and error control.
Note Cisco HDLC is the default encapsulation type for the serial interfaces.
When the encapsulation on a serial interface is changed from HDLC to any other encapsulation type, the configured serial subinterfaces on the main interface inherit the newly changed encapsulation and they do not get deleted.
Cisco HDLC uses keepalives to monitor the link state, as described in the “Keepalive Timer” section.
PPP Encapsulation
PPP is a standard protocol used to send data over synchronous serial links. PPP also provides a Link Control Protocol (LCP) for negotiating properties of the link. LCP uses echo requests and responses to monitor the continuing availability of the link.
Note When an interface is configured with PPP encapsulation, a link is declared down and full LCP negotiation is re-initiated after five echo request (ECHOREQ) packets are sent without receiving an echo response (ECHOREP).
PPP provides the following Network Control Protocols (NCPs) for negotiating properties of data protocols that will run on the link:
PPP uses keepalives to monitor the link state, as described in the “Keepalive Timer” section.
PPP supports the following authentication protocols, which require a remote device to prove its identity before allowing data traffic to flow over a connection:
Use the ppp authentication command in interface configuration mode to enable CHAP, MS-CHAP, and PAP on a serial interface.
Note Enabling or disabling PPP authentication does not effect the local router’s willingness to authenticate itself to the remote device.
Multilink PPP
Multilink Point-to-Point Protocol (MLPPP) is supported on the Cisco 800M Series ISR serial interface. MLPPP provides a method for combining multiple physical links into one logical link. The implementation of MLPPP combines multiple PPP serial interfaces into one multilink interface. MLPPP performs the fragmenting, reassembling, and sequencing of datagrams across multiple PPP links.
MLPPP provides the same features that are supported on PPP Serial interfaces with the exception of QoS. It also provides the following additional features:
Keepalive Timer
Cisco keepalives are useful for monitoring the link state. Periodic keepalives are sent to and received from the peer at a frequency determined by the value of the keepalive timer. If an acceptable keepalive response is not received from the peer, the link makes the transition to the down state. As soon as an acceptable keepalive response is obtained from the peer or if keepalives are disabled, the link makes the transition to the up state.
Note The keepalive command applies to serial interfaces using HDLC or PPP encapsulation. It does not apply to serial interfaces using Frame Relay encapsulation.
For each encapsulation type, a certain number of keepalives ignored by a peer triggers the serial interface to transition to the down state. For HDLC encapsulation, three ignored keepalives causes the interface to be brought down. For PPP encapsulation, five ignored keepalives causes the interface to be brought down. ECHOREQ packets are sent out only when LCP negotiation is complete (for example, when LCP is open).
Use the keepalive command in interface configuration mode to set the frequency at which LCP sends ECHOREQ packets to its peer. To restore the system to the default keepalive interval of 10 seconds, use the keepalive command with the no keyword. To disable keepalives, use the keepalive disable command. For both PPP and Cisco HDLC, a keepalive of 0 disables keepalives and is reported in the show running-config command output as keepalive disable.
When LCP is running on the peer and receives an ECHOREQ packet, it responds with an ECHOREP packet, regardless of whether keepalives are enabled on the peer.
Keepalives are independent between the two peers. One peer end can have keepalives enabled; the other end can have them disabled. Even if keepalives are disabled locally, LCP still responds with ECHOREP packets to the ECHOREQ packets it receives. Similarly, LCP also works if the period of keepalives at each end is different.
Frame Relay Encapsulation
When Frame Relay encapsulation is enabled on a serial interface, the interface configuration is hierarchical and comprises the following elements:
Note The administrative state of a parent interface drives the state of the subinterface and its PVC. When the administrative state of a parent interface or subinterface changes, so does the administrative state of any child PVC configured under that parent interface or subinterface.
To configure Frame Relay encapsulation on serial interfaces, use the encapsulation (Frame Relay VC-bundle) command.
Frame Relay interfaces support two types of encapsulated frames:
Use the encap command in PVC configuration mode to configure Cisco or IETF encapsulation on a PVC. If the encapsulation type is not configured explicitly for a PVC, then that PVC inherits the encapsulation type from the main serial interface.
Note Cisco encapsulation is required on serial main interfaces that are configured for MPLS. IETF encapsulation is not supported for MPLS.
Before you configure Frame Relay encapsulation on an interface, you must verify that all prior
Layer 3 configuration is removed from that interface. For example, you must ensure that there is no IP address configured directly under the main interface; otherwise, any Frame Relay configuration done under the main interface will not be viable.
LMI on Frame Relay Interfaces
The Local Management Interface (LMI) protocol monitors the addition, deletion, and status of PVCs. LMI also verifies the integrity of the link that forms a Frame Relay UNI interface. By default, cisco LMI is enabled on all PVCs.
If the LMI type is cisco (the default LMI type), the maximum number of PVCs that can be supported under a single interface is related to the MTU size of the main interface. Use the following formula to calculate the maximum number of PVCs supported on a card:
Note The default setting of the mtu command for a serial interface is 1504 bytes. Therefore, the default numbers of PVCs supported on a serial interface configured with cisco LMI is 186.
How to Configure Serial Interfaces
This section contains the following tasks:
Configuring a Synchronous Serial Interface
To configure a synchronous serial interface, perform the tasks in the following sections. Each task in the list is identified as either required or optional.
Specifying a Synchronous Serial Interface
To specify a synchronous serial interface and enter interface configuration mode, use the following commands in global configuration mode.
Router(config)# interface serial wic/slot/port
Router# interface serial 0/0/0
Specifies the serial interface and enters interface configuration mode.
Specifying Synchronous Serial Encapsulation
By default, synchronous serial lines use the High-Level Data Link Control (HDLC) serial encapsulation method, which provides the synchronous framing and error detection functions of HDLC without windowing or retransmission. The serial interfaces support the following serial encapsulation methods:
To define the encapsulation method, use the following command in interface configuration mode.
Router(config-if)# encapsulation < hdlc| frame-relay | ppp >
Router(config-if)# encapsulation ppp
Configures synchronous serial encapsulation.
Encapsulation methods are set according to the type of protocol or application you configure in the Cisco IOS software.
Configuring Asynchronous Serial Interface
You can use the physical-layer async command to change the interface mode from the default synchronous mode to asynchronous mode
SUMMARY STEPS
1. physical-layer async
DETAILED STEPS
Router(config-if)# physical-layer async
Specifies the mode of a low-speed interface as either synchronous or asynchronous.
Note You cannot use the physical-layer async command for frame-relay encapsulation.
When you make a transition from asynchronous mode to synchronous mode in serial interfaces, the interface state becomes down by default. You should then use the no shutdown option to bring the interface up.
Configuration Examples
Example: PPP Configuration:
This example shows how to configure PPP encapsulation with CHAP authentication.
Router> enable Router# configure terminal Router(config)# hostname R1 R1(config)# username R2 password cisco R1(config)# interface serial 0/0/0 R1(config-if)# encapsulation ppp R1(config-if)# ppp authentication chap R1(config-if)# exit Router> enable Router# configure terminal Router(config)# hostname R2 R2(config)# username R1 password cisco R2(config)# interface serial 0/0/0 R2(config-if)# encapsulation ppp R2(config-if)# ppp authentication chap R2(config-if)# exit This example shows how to configure PPP encapsulation with PAP authentication. Router> enable Router# configure terminal Router(config)# hostname R1 R1(config)# username R2 password cisco R1(config)# interface serial 0/0/0 R1(config-if)# encapsulation ppp R1(config-if)# ppp authentication PAP R1(config-if)# ppp pap sent-username R1 password cisco R1(config-if)# end Router> enable Router#configure terminal Router(config)# hostname R2 R2(config)# username R1 password cisco R2(config)# interface serial 0/0/0 R2(config-if)# encapsulation ppp R2(config-if)# ppp authentication PAP R2(config-if)# ppp pap sent-username R2 password cisco R2(config-if)# end
Example: Frame Relay Configuration
This example shows how to configure frame relay encapsulation on a serial interface.
Router1(config)# interface Serial 0/0/0
Router1(config-if)# ip address 50.50.50.1 255.255.255.0 Router1(config-if)# encapsulation frame-relay Router1(config-if)# no keepalive Router1(config-if)# frame-relay interface-dlci 50 Router1(config-if)# end Router2>enable
Router2(config)# interface Serial 0/2/0
Router2(config-if)# ip address 50.50.50.2 255.255.255.0 Router2(config-if)# encapsulation frame-relay Router2(config-if)# no keepalive Router2(config-if)# clock rate 2000000 Router2(config-if)# frame-relay interface-dlci 50 Router2(config-if)# end
Example: MLPPP Configuration
This example shows how to configure Multilink PPP on a serial interface.
Router1# configure terminal
Router1(config)# interface Multilink 1
Router1(config-if)# ip address 120.120.120.1 255.255.255.0 Router1(config-if)# no ip route-cache Router1(config-if)# ppp multilink Router1(config-if)# ppp multilink group 1 Router1(config-if)# end
Router1(config)# interface Serial 0/2/0
Router1(config-if)# no ip address Router1(config-if)# encapsulation ppp Router1(config-if)# no ip route-cache Router1(config-if)# ppp multilink Router1(config-if)# ppp multilink group 1 Router1(config-if)# end
Router1(config)# interface Serial 0/2/1
Router1(config-if)# no ip address Router1(config-if)# encapsulation ppp Router1(config-if)# no ip route-cache Router1(config-if)# ppp multilink Router1(config-if)# ppp multilink group 1 Router1(config-if)# end
Example: Asynchronous Serial Configuration
This example shows how to configure a serial interface on asynchronous mode.
Router> enable Router# configure terminal
Router(config)# interface serial 0/0/0
Router(config-if)# physical-layer async
Router(config-if)# ip address 10.0.0.2 255.0.0.0