Как задать ip адрес роутеру cisco packet tracer

Configure
IP address to Router and PC in Packet Tracer

  • As a Network Engineer, it is compulsory to
    know how to configure an IP Address on networking devices like Router, Switch,
    PC, and Server.
  • Assigning an IP address to a device is a
    foundational requirement for all Cisco networking devices.
  • Networking devices communicate with each
    other with the help of IP address that configures on an individual device.

Router
Interfaces

  • The interface configuration is one of the
    most important router configurations because, without interfaces, a router does
    not communicate with other devices on a network.
  • Router interfaces also play a great role in
    troubleshooting, which often results in solving the connectivity problem by
    correcting the misconfigured interfaces of the router.

Configure an IP Address on Router’s Interface

There are two ways to configure an IP Address on the
Router’s Interface-

  • Configure an IP Address to Fast Ethernet
    Interface
  • Configure an IP Address to Serial Interface

Configure an IP Address to Fast Ethernet Interface

There are following steps involved to configure an IP
Address to Fast Ethernet Interface –

Step1: Open
the Cisco Packet Tracer.

Step2:
Drag
and drop any series of the router from the bottom of the interface into the
middle of the working area.

Step
3:
Select
cable from the bottom of the interface to connect the routers.

Step
4:
Click
on Router R0, then on CLI.

Step5: Go to the global configuration mode, and type slot/ port or interface Fast Ethernet 0/0 (or interface f0/0)

Configure ip address

Step
6:
Now
configure an IP address and subnet mask then give “no shutdown” command. (In our case, IP address is 10.0.0.2 and
subnet mask is 255.0.0.0)

Note:
Carefully
configure IP address with proper interfaces.

Configure ip address 1

Configure an IP Address to Serial Interface

There are following steps involved to configure an IP
Address to Serial Interface –

Step1:
Open
the Cisco packet tracer.

Step2:
Drag
and drop any series of the router from the bottom of the interface into the
middle of the working area.

Step
3:

Click the Router ->select then Physical->select then WIC-IT->switch
off the router.

Configure ip address 2

  • Add serial port -> Switch ON the router.

Configure ip address 3

  • Now Go to CLI, then the global configuration
    mode, and type interface serial 0 0/0 (or interface s0/0/0).

Configure ip address 4

  • Now, configure an IP address and subnet mask,
    and then give no shutdown command.
    (In our case IP address is 10.0.0.2 and subnet mask is 255.0.0.0)

Configure ip address 5

Note: Carefully configure IP address with proper interfaces.

Configure an IP Address to PC

There are following steps involved to configure an IP
Address to PC:

Step1: Open
the Cisco Packet Tracer.

Step2:
Drag
and drop PC from the bottom of the interface into the middle of the working
area.

Step3:
Click
on PC ->Config Gateway like 10.0.0.1

Configure ip address 6

Click on FastEthernet to assign an IP address and subnetmask to the PC, and close PC window. In our case IP is 10.0.0.10 and subnet mask is 255.0.0.0.0,

Configure ip address 7

  • Configuring Catalyst Switches
  • Configuring IP Routing in Our Network
  • Checking Network Connectivity and Troubleshooting
  • Saving, Erasing, and Verifying Configuration
  • OSI Reference Model
  • Internetworking Basics
  • Configure Password
  • Configure Hostname
  • Configuring OSPF
  • Configuring EIGRP

In this network, a router and 2 PCs are used. Computers are connected with routers using a copper straight-through cable. After forming the network, to check network connectivity a simple PDU is transferred from PC0 to PC1. The network simulation status is successful. From this network, it can be observed that the router handles data transfers between multiple devices.  

Procedure:

Step-1(Configuring Router1):

  1. Select the router and Open CLI.
  2. Press ENTER to start configuring Router1.
  3. Type enable to activate the privileged mode.
  4. Type config t(configure terminal) to access the configuration menu.
  5. Configure interfaces of Router1:

• Type interface FastEthernet0/0 to access FastEthernet0/0 and Configure the FastEthernet0/0 interface with the IP address 192.168.10.1 and Subnet mask 255.255.255.0.

• Type interface FastEthernet0/1 to access GigabitEthernet0/0 and Configure the FastEthernet0/1 interface with IP address 192.168.20.1 and Subnet mask 255.255.255.0.

      6. Type no shutdown to finish.

Router1 Command Line Interface:

Router>enable

Router#config t

Enter configuration commands, one per line.  End with CNTL/Z.

Router(config)#interface FastEthernet0/0

Router(config-if)#ip address 192.168.10.1 255.255.255.0

Router(config-if)#no shutdown

Router(config-if)#

%LINK-5-CHANGED: Interface GigabitEthernet0/0, changed state to up

Router(config-if)#interface FastEthernet0/1

Router(config-if)#ip address 192.168.20.1 255.255.255.0

Router(config-if)#no shutdown

Step-2(Configuring PCs):

  1. Assign IP Addresses to every PC in the network.
  2. Select the PC, Go to the desktop and select IP Configuration and assign an IP address, Default gateway, Subnet Mask
  3. Assign the default gateway of PC0 as 192.168.10.1.
  4. Assign the default gateway of PC1 as 192.168.20.1.

Step-3(Connecting PCs with Router):

  1. Connect FastEthernet0 port of PC0 with FastEthernet0/0 port of Router1 using a copper straight-through cable.
  2. Connect FastEthernet0 port of PC1 with FastEthernet0/1 port of Router1 using a copper straight-through cable.

Router Configuration Table:

Device Name IP address FastEthernet0/0 Subnet Mask IP Address FastEthernet0/1 Subnet Mask
   Router1          192.168.10.1 255.255.255.0          192.168.20.1 255.255.255.0

PC Configuration Table:

Device Name IP address  Subnet Mask Gateway
      PC 0 192.168.10.2 255.255.255.0 192.168.10.1
      PC 1 192.168.20.2 255.255.255.0 192.168.20.1

Designed Network topology:

Simulation of Designed Network Topology:

Sending a PDU From PC0 to PC1:

Acknowledgment From PC1 to PC0:

Last Updated :
10 Nov, 2021

Like Article

Save Article

How to assign an IP address to the switch, router, and PC in the Cisco packet tracer?

Assigning the IP address is the first step while creating a network in packet tracer. Before proceeding with any other configuration, we must assign the appropriate IP address and design the correct IP addressing scheme for the network.

Assigning IP address to switch in packet tracer

As the switch is a layer 2 device, we cannot assign the IP address to the layer 2 device however IP address can be assigned to the virtual interface.

We can assign the IP address to the VLAN1 interface.

The following commands can be used to configure the IP address on the Cisco switch

Switch(config)#interface vlan 1

Switch(config-if)#ip address 192.168.1.1 255.255.255.0

Switch(config-if)#no shut

Configure the IP address  on the router in packet tracer

We can assign the IP address on the different types of available interfaces on the router like Ethernet, fast Ethernet, serial, etc.

To assign the IP address, we will enter into the interface configuration mode and then the IP address can be assigned to the router.

The following commands can be used to configure the IP address on the Cisco router

Router(config)#interface gigabitEthernet 0/0

Router(config-if)#ip address 192.168.10.1 255.255.255.0

Router(config-if)#no shutdown

Configure PC IP address in the Cisco packet tracer

To configure the IP address on a PC, laptop, or server, we have to open the IP configuration utility provided in the packet tracer.

To assign the static IP address, we will select the static option available and then we will configure the IP address manually.

Please check the image below showing the manually configured IP address. To assign the IP address through DHCP, we must select the DHCP option however we should have the DHCP server configured to lease the IP address to the devices.

assign pc ip address

After assigning the IP addresses to different devices, we can check the connectivity with the ping command.

If we have configured the devices with the correct IP addresses then we can further develop our network in the packet tracer.

To assign appropriate IP addresses, we should know how IP subnets work. And how we can create different networks while setting up the network in simulation or the real world?

To learn IPv4 subnetting, you can check subnetting practice questions available for different classes of subnets.

The interface is the port at which the router connects to a given network. It acts as an entry or exit point for data that is to be transmitted through the router. Every interface must be labeled or assigned an IP address, which should be unique among all the IP addresses in the network. 

In Cisco Packet Tracer, to understand the process of assigning IP addresses, we will be using routers. This is because a router has many interfaces to connect to different networks and also after configuring a router by any routing protocol(RIP, static routing, etc.), we can observe how an interface and an IP address work in a router. 

Steps to configure an IP address for an interface of a router in Cisco Packet Tracer:

Step 1: Open Cisco Packet Tracer and select the following devices:

S.NO

Device

Quantity

1.

PC 4

2.

Router 2

IPv4 Addressing Table:

S.NO

Device

IPv4 Address

Subnet Mask

Default Gateway

1.

PC0 192.168.10.1 255.255.255.0 192.168.10.2

2.

PC1 192.168.20.1 255.255.255.0 192.168.20.2

3.

PC2 192.168.30.1 255.255.255.0 192.168.30.2

4.

PC3 192.168.40.1 255.255.255.0 192.168.40.2
  • Create the following topology and label the configuration as shown in the figure:

  • Also, assign the respective IP addresses and default gateways to all 4 PCs.

Step 2: In Cisco Packet Tracer, assigning IP addresses to an interface of a router can either be done through the command line or the GUI mode. Both of them are discussed as follows:

Through command line mode:

  • Firstly, enter the command line by clicking on any router and then selecting the CLI tab.
  • Enter config mode by typing the following commands in the command line:
en
config t
  • Now we can assign IP addresses to their respective interfaces. To do this, firstly we need to enter into the interface we want to assign the IP address. This is done by typing the keyword interface followed by the label of the interface.

Interface [label of the interface]:

For example:

interface fa0/0
  • After entering the interface, type the command IP address followed by the IP address you want to assign and also followed by the subnet mask of the IP address assigned.

IP address [IP address to be assigned] [subnet mask of the IP address]

For example:

IP address 192.168.20.2 255.255.255.0
  • After assigning the IP address type, the command no shutdown to activate the port. Initially, all the ports of the router are switched off, so we need to manually activate them. You would also note that the color of the triangles representing the ports of the router changes to green and also start pointing upward.

For example:

no shutdown
  • At last, exit the interface by typing the following command:
exit
  • Repeat the above steps for all the interfaces of the router, and then for all interfaces of other routers as well.

Following is the image of the command line of the router after configuring all interfaces:

For a better understanding of the process, you may refer to the following simulation:

Through GUI mode:

  • Click on any router and select the Config tab from the above tabs.
  • Now find the interface to which you want to assign the IP address, from the tabs available on the left side of the window.

For example:

  • After selecting the interface, fill in the IP address and the subnet mask in the fields named IPv4 Address and Subnet Mask.

For example:

  • Activate the port by checking the checkbox labeled as On for the Port Status option.

For example:

The interface of the router has been assigned an IP address.

  • Repeat the above steps for all the interfaces of the router, and then for all interfaces of other routers as well.

Simulation Result:

Last Updated :
21 Jul, 2022

Like Article

Save Article

Cisco Packet Tracer является отличным инструментом моделирования и визуализации сети, полезным как для обучения как студентов, так и продвинутых пользователей, у которых под рукой нет физического оборудования компании Cisco. Программа-симулятор позволяет настраивать (виртуально) различное телекоммуникационное оборудование фирмы Cisco (коммутаторы, маршрутизаторы, ip-телефоны, шлюзы, сервера, межсетевые экрана Cisco ASA и многое другое). Интерфейс прост и понятен, и вы сможете создать и сконфигурировать простые сети в Packet Tracer даже если обладаете глубокими познаниями в сетевых технологиях или оборудовании Cisco. Многие используют данное ПО для проектирования и моделирования сетей, обучения студентов, подготовке к сертификационным экзаменам CCNA/CCNP, получения практических навыков поиска и устранения проблем в сетях на оборудовании Cisco.

интерфейс Cisco Packet Tracer 7.2.1

Несмотря на то, что Cisco Packet Tracer недоступен для бесплатного скачивания (доступен только участникам программы сетевой академии Cisco Networking Academy), вы с легкостью найдете дистрибутив на просторах сети. На текущий момент актуальной является версия Cisco Packet Tracer 7.2.1. При использовании Cisco Packet Tracer вам нужно указать, что вы хотите использовать гостевой доступ. Кроме того, есть бесплатные версии Cisco Packet Tracer для Android и iOS.

Чтобы освоить основы использования Cisco Packet Tracer, изучим интерфейс программы и создадим небольшую сеть.

Интерфейс программы предельно прост. В интерфейсе программы нет сложных настроек, элементов управления и ветвящихся меню, что приятно удивляет пользователей.

  • Верх окна программы выполнен в классическом стиле, в котором нет ничего лишнего (базовые функции операции с файлами, отмена действии, масштабирование, сохранение, копирование).
  • В правой части окна собраны функции для пометок, выделения областей, удаления и перемещения объектов.
  • В нижней части размещена основные инструменты Cisco Packet Tracer, которые используются для создания вашей сети. В левом нижнем углу программы содержатся различные виды сетевого оборудования (коммутаторы, маршрутизаторы, телефоны, шлюзы, сервера, хабы, беспроводные источники, устройства защиты сети, эмуляция WAN-соединения, компьютеры, принтеры, телевизоры, мобильные телефоны и многое другое). При постоянном использовании программы Cisco Packet Tracer, часто используемые вами устройства запоминаются и отображаются в специальной папке (Custom Made Devices).

Создадим в Cisco Packet Tracer небольшую сеть, схема которой представлена ниже:

топология простой сети для симуляции в Cisco Packet Tracer

Общая сеть представляет из себя 2 сегмента (подсети 10.0.0.1/24 и 192.168.0.1/24), соединенных посредством маршрутизатора Cisco. Он будет осуществлять передачу данным между сетями в дуплексном режиме (прием и передача в обе стороны). К маршрутизатору (Router0) подключены 2 коммутатора. Интерфейс Fa 0/0 маршрутизатора подключен к порту Fa 0/3 левого коммутатора. С правым коммутатором (порт Fa 0/3) маршрутизатор подключен через интерфейс Fa 0/1. Switch0 будет осуществлять соединение ПК1 (Fa 0/2) и ПК2 (Fa 0/3), а ПК3 (Fa 0/2) и ПК4 (Fa 0/1) объединит Switch1. Порту Fa 0/0 маршрутизатора (слева) мы назначим адрес 10.0.0.1, а правому порту (Fa 0/1) – 192.186.0.1. На схеме мы видим, что все трассы (линии) подсвечены красным цветом. Это значит, что соединения нет и ни одно из устройств друг друга не «видят» в сети, потому что её ещё нет, а сетевые интерфейсы отключены (закрыты).

Настройки нашей сетей можно выполнить двумя способами:

  • В графическом режиме
  • В ручном режиме командами операционной системы Cisco IOS.

Левую половину сети будем настраивать графическим, а правую – ручным способами (изменения, которые мы вносим будут отражены выделены «жирным»).

Прежде всего начнем с графической настройки маршрутизатора (левая сторона):

  1. Щелкните левой кнопкой мыши по маршрутизатору Router0 -> Config -> FastEthernet0/0;
  2. Включите порт (Port Status – On);
  3. Присваиваем IP-адрес и маску подсети интерфейсу маршрутизатора FastEtherner0/0 (
    10.0.0.0/ 255.255.255.0
    );
    настройки порта маршрутизатора в Cisco Packet Tracer

В ходе внесения нами изменений, автоматически формируется управляющая в окне Equivalent IOS Commands. В дальнейшем вы сможете использовать эти команды для ручной настройки маршрутизатора через команды CLI.

  1. Переходим к настройке FastEthernet 0/1 (правая часть);
  2. Включаем порт;
  3. Присваиваем IP адрес и маску (
    192.168.0.1 255.255.255.0
    ).

настройка IP адресов оборудования в Cisco Packet Tracer

Теперь настроим коммутатор (левый):

  1. Нажали 1 раз левой кнопкой мышки > Config > FastEthernet0/1;
  2. Включаем порт (Port Status – On);
  3. Точно также включаем порты 0/2 и 0/3.

Теперь мы видим, что соединение установлено (индикация на соединениях стала зелёного цвета).

Зададим IP-адреса для компьютеров слева (в диапазоне указанных на маршрутизаторе адресов):

  1. Нажимаем на ПК1 левой кнопкой мыши -> Desktop -> IP Configuration;
  2. Указываем статический (опция Static) IP-адрес и маску, а также шлюз (Default Gateway – это будет IP адрес интерфейса Fa0/0 на маршрутизатор): IP:10.0.0.2 Mask:255.255.255.0 GW:10.0.0.1настройка статического IP адреса компьютера
  3. Нажимаем на ПК2 и производим аналогичные настройки, но с другим IP-адресом (10.0.0.3).

Проверим что оба компьютера стали доступны друг други (их пакеты проходят черех коммутатор):

  1. Нажимаем на ПК1 -> Desktop -> Command Prompt;
  2. В открывшемся окне командной строки, эмулирующей cmd выполните команду ping на ПК2:
    ping 10.0.0.3

Соединение между ПК1 и ПК2 было установлено посредством логического соединения их через коммутатор. На этом графическая настройка левой части завершена.

Чтобы настроить правую часть сети, нужно только открыть порты на коммутаторе и назначить IP-адреса ПК3 и ПК4. Начнём с маршрутизатора. Ручная настройка несколько сложнее, нежели графическая, но на данном уровне она не составит особого труда. Приступим:

  1. Заходим на коммутатор -> CLI (командная строка коммутатора);
  2. Заходим в привилегированный режим (пишем
    enable
    или
    en
    );
  3. Заходим в режим конфигурирования (
    configure terminal
    или
    conf t
    );
  4. Нам нужно включить 3 интерфейса (FastEthernet 0/1-0/3), поэтому начнем с 0/1 (пишем
    int f
    и нажимаем tab, затем дописываем
    0/1
    , enter);
  5. Мы зашли на интерфейс 0/1. Теперь активируем его (разрешим передачу данных по нему) командой
    no sh
    и нажимаем tab, потом enter. Теперь этот порт открыт (активен);сгенерированные команды Equivalent IOS Commands
  6. Выходим из настроек интерфейса командой
    ex
    и enter;
  7. Такие же настройки произведите с портами FastEthernet 0/2 и 0/3.

Осталось лишь назначить IP-адреса компьютерам ПК3 и ПК4. Но мы усложним задачу и настроим автоматическое получение IP-адресов компьютерами по протоколу DHCP. В качестве DHCP сервера, который раздает IP адреса клиентам будет выступать маршрутизатор:

  1. Заходим на маршрутизатор -> CLI;
  2. Так как мы уже производили настройки графическим методом, то мы изначально находимся в привилегированном режиме. Переходим в режим конфигурирования (
    conf t
    );
  3. Пишем
    ip dhcp pool XXX
    (XXX – название пула формирования адресов DHCP):

    network 192.168.0.0 255.255.255.0
    (из этой сети будут присваиваться наши IP-адреса компьютерам)
    default-router 192.168.0.1
    (указываем адрес маршрутизатора, который будет шлюзом по-умолчанию для компьютеров)
    ex
    (вышли обратно в режим конфигурирования)
    ip dhcp excluded-address 192.168.0.1 192.168.0.5
    (этот диапазон адресов будет исключен из раздачи, назначить IP-адрес из этого диапазона можно будет только вручную);
  4. Заходим на ПК3 -> Desktop -> IP Configuration;
  5. Выбираем DHCP и смотрим на правильность назначенного IP адреса. В большинстве сетей IP адреса компьютерам назначаются именно так, путем получения настроек с DHCP сервера. Это исключает возможность конфликта IP-адресов, а также экономит время настройки.

Проверяем соединение между компьютерами, соединёнными через маршрутизатор:

  1. Нажимаем на ПК3 -> Desktop -> Command Prompt;
  2. Выполняем ping на ПК1 и ПК2:

    ping 10.0.0.2

    ping 10.0.0.3

выполнить ping в cisco packet tracer

Теперь мы видим, что коммутация пакетов успешно установлена.

Усложним задачу. Свяжем между собой ПК1 и ПК2, а также ПК3 и ПК4. Выполнить эту задачу можно с помощью создания vlan (виртуальная локальная сеть). Она нужна для логического разграничения устройств. Так как мы не имеем возможности разделить сеть физически, воспользуемся vlan. Приступим:

  1. Создадим VLAN 10 на коммутаторах:
  2. Заходим на коммутатор (Switch0, затем также настраиваем и Switch1) -> CLI, пишем
    conf t

  3. vlan 10
    (создался VLAN)

  4. Interface FastEthernet 0/2
    (для ПК1),
    interface FastEthernet 0/1
    (для ПК2),
    interface FastEthernet 0/2
    (для ПК3), или
    interface FastEthernet 0/1
    (для ПК4). Далее команды одинаковы для всех четырёх интерфейсов:

    switchport mode access


    switchport access vlan 10

Теперь ПК1 и ПК2 «общаются» в рамках своей сети, а ПК3 и ПК4, в рамках своей.

проверка доступности компьютеров по сети

Вы можете получить текущую конфигурацию любого устройства в вашей сети, выполнив в CLI команду
show running-config
.

Итак, мы рассмотрели одну из самых простых схем типовой сети, использующейся для небольшой организации. Эта база, на которой строятся более сложные сети. Вы можете усложнить сеть путем добавления сетевого оборудования (дополнительные коммутаторы, маршрутизаторы, сервера, телефоны, беспроводные устройства и т.д.) и введением новых протоколов в работу (например, настройка IP-телефонов по протоколу SIP). Таким образом Cisco Packet Tracer будет отличным инструментом как для начинающего, так и для опытного сетевого инженера.

  • Как загрузить конфиг в роутер
  • Как задать ip адрес компьютера в роутере
  • Как зажать кабель на роутер
  • Как загрузить настройки роутера с файла
  • Как загрузить настройки в роутер