Загрузить файлы в «/»

This commit is contained in:
2024-02-22 16:36:55 +07:00
parent 7cdaf2739b
commit a518ec92d1
3 changed files with 182 additions and 0 deletions

View File

@ -0,0 +1,120 @@
Настройка для RTR-HQ
config
vlan 100,200,300
exit
int te1/0/1.100
ip address 10.0.10.1/27
ip firewall disable
exit
int te1/0/1.200
ip address 10.0.10.33/27
ip firewall disable
exit
int te1/0/1.300
ip address 10.0.10.65/27
ip firewall disable
exit
int gi1/0/1
ip address 3.3.3.100/24
ip firewall disable
exit
ip dhcp-server
ip dhcp-server pool CLI
network 10.0.10.32/27
address-range 10.0.10.33-10.0.10.60
default-router 10.0.10.33
dns-server 10.0.10.2
exit
router ospf 1
area 0.0.0.0
network 10.0.0.0/27
network 10.0.0.32/27
network 10.0.0.64/27
network 3.3.3.0/24
enable
exit
enable
exit
int te1/0/1.100
ip ospf instance 1
ip ospf
exit
int te1/0/1.200
ip ospf instance 1
ip ospf
exit
int te1/0/1.300
ip ospf instance 1
ip ospf
exit
int gi1/0/1
ip ospf instance 1
ip ospf
exit
do commit
do confirm
Настройка для ISP
config
int gi1/0/1
ip address 3.3.3.1/24
ip firewall disable
exit
int te1/0/1
ip address 4.4.4.1/24
ip firewall disable
exit
router ospf 1
area 0.0.0.0
network 4.4.4.0/24
network 3.3.3.0/24
enable
exit
enable
exit
int gi1/0/1
ip ospf instance 1
ip ospf
exit
int te1/0/1
ip ospf instance 1
ip ospf
exit
do commit
do confirm
Настройка для RTR-BR
config
int te1/0/1
ip address 4.4.4.100/24
ip firewall disable
exit
router ospf 1
area 0.0.0.0
network 4.4.4.0/24
enable
exit
enable
exit
int te1/0/1
ip ospf instance 1
ip ospf
exit
do commit
do confirm
Очистка
copy system:factory-config system:candidate-config
y
commit
confirm
ip link add link ens192 name ens192.200 type vlan id 200
ip link ens192 type vlan id 200

Binary file not shown.

View File

@ -0,0 +1,62 @@
Для начало работы нужно установить docker
Установить docker можно следующей командой:
# apt-get install docker-engine
В старых репозиториях пакет называется docker-ce:
# apt-get install docker-ce
Затем необходимо запустить соответствующую службу:
# systemctl enable --now docker
Для установки образа
docker run --rm -it alt
docker run --rm -it alt:sisyphus
Создаем файл name.txt b
vim name.txt
Добавляем следующие содержание: experts
Создаем файл скрипта
vim file.sh
Добавляем следующим содержимым
#!/bin/bash
echo "Hello, FIRPO Greetings from"
cat name.txt
Даем права файлу
chmod 777 file.sh
Создаем директорию
mkdir /usr/src/home
Копируем туда файл name.txt и file.sh
cp name.txt /usr/src/hello
cp file.sh /usr/src/hello
Теперь в usr/src/hello создаем Dockerfile
vim Dockerfile
Заполняем его следующим содержимым
FROM alt:latest
WORKDIR /usr/src/hello/
COPY . /usr/src/hello/
EXPOSE 5000
CMD ["bash", "file.sh"]
Находясь в usr/src/hello создаем контейнер
docker build -t hellofirpo .
Запускаем наш контейнер для проверки
docker run hellofirpo
Для просмотра списка контейниров
docker ps -a
Для просмотра images
docker images
Для удаления сначало удаляем контейнер, потом images
docker rm название
docker rmi