tc в Rocky

Содержание
Introduction
Установка
Пример
Related Articles

Introduction

Установка

yum install -y tc

Пример

Выполним пинг сайта topbicycle.ru

ping www.topbicycle.ru

PING www.topbicycle.ru (87.236.16.208) 56(84) bytes of data. 64 bytes from ssl.kirk.beget.com (87.236.16.208): icmp_seq=1 ttl=63 time=29.8 ms 64 bytes from ssl.kirk.beget.com (87.236.16.208): icmp_seq=2 ttl=63 time=35.3 ms 64 bytes from ssl.kirk.beget.com (87.236.16.208): icmp_seq=3 ttl=63 time=33.3 ms 64 bytes from ssl.kirk.beget.com (87.236.16.208): icmp_seq=4 ttl=63 time=41.0 ms

Ping приходит примерно через каждые 30 ms

Нужно узнать через какой сетевой интерфейс идёт подключение во внешний интернет.

Сделать это можно с помощью iftop или nethogs

В этом примере нужный интерфейс - enp0s3

tc -s qdisc ls dev enp0s3

qdisc pfifo_fast 0: root refcnt 2 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1 Sent 278060 bytes 3193 pkt (dropped 0, overlimits 0 requeues 0) backlog 0b 0p requeues 0

Зададим задержку в 100 ms

tc qdisc add dev enp0s3 root netem delay 100ms

Теперь, если выполнить ping запросы пойдут на 100 ms медленнее

ping www.topbicycle.ru

PING www.topbicycle.ru (87.236.16.208) 56(84) bytes of data. 64 bytes from ssl.kirk.beget.com (87.236.16.208): icmp_seq=1 ttl=63 time=130 ms 64 bytes from ssl.kirk.beget.com (87.236.16.208): icmp_seq=2 ttl=63 time=129 ms 64 bytes from ssl.kirk.beget.com (87.236.16.208): icmp_seq=3 ttl=63 time=127 ms 64 bytes from ssl.kirk.beget.com (87.236.16.208): icmp_seq=4 ttl=63 time=126 ms

tc Rocky www.aredel.com
tc в Rocky 8

Article author: Andrei Olegovich

Похожие статьи
Firewall Rocky
Firewall Rocky
hostname в Rocky
iftop в Rocky
ip в Rocky
iperf в CentOS
nethogs в Rocky
netstat в Rocky
Добавить новый сетевой интерфейс Rocky
tc в Rocky
Сгенерировать uuid для сетевого интерфейса Rocky
Banner image

Search this site

Subscribe to Telegram channel @aofeed to follow new articles and updates to old ones

Go to channel

@aofeed

Ask a question in the Telegram group

@aofeedchat

Contacts and cooperation:
I recommend our hosting beget.com
Write to info@aredel.com if you:
1. Want to write an article for our site or translate an article into your native language.
2. Want to place thematically relevant ads on the site.
3. Ads on my site pass maximum censorship. If you see an ad block unsuitable for school-age children, shocking or misleading - please contact us by e-mail
4. Found a mistake, inaccuracy, bug, etc. on the site. ... .......
5. Articles can be shared on social media by clicking a network icon: