Показаны сообщения с ярлыком ethernet. Показать все сообщения
Показаны сообщения с ярлыком ethernet. Показать все сообщения

среда, 4 августа 2021 г.

Использование библиотеки pcap

Habr:
1) (linux, !) Программирование с использованием PCAP https://habr.com/ru/post/337840/
2) Raw socket programming on windows with Winpcap https://www.binarytides.com/raw-sockets-packets-with-winpcap/
3) (windows, -) Перехват и анализ сетевого трафика с помощью библиотеки pcap https://habr.com/ru/post/550148/

Wiki, doxygen docs:

Анализ сетевых пакетов в Wireshark и их генерация в Scapy

Применение фильтров траффика в wireshark:

Wireshark, tcpdump (habr, wiki):
1) Руководство и шпаргалка по Wireshark https://habr.com/ru/post/436226/
2) Wireshark — приручение акулы https://habr.com/ru/post/204274/
4) Wireshark для всех. Лайфхаки на каждый день https://habr.com/ru/company/vdsina/blog/562110/
5) Анализ сетевого трафика на сервере с помощью tshark 
6) Фильтры захвата для сетевых анализаторов (tcpdump, Wireshark, Paketyzer) https://habr.com/ru/post/211042/

Scapy:
1) Packet crafting как он есть https://habr.com/ru/post/208786/

вторник, 3 августа 2021 г.

WinSock, UDP, threads

msdn:

binarytides.com:
1) (!)UDP Socket programming in winsock – How to code Client and Server 

After run in VS2017 on Win7 x64 we have some errors. Errors fix:
1.1) warning C4996: 'inet_ntoa': Use inet_ntop() or InetNtop() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings src\core\MuninNodeServer.cpp 64 1 https://stackoverflow.com/questions/26947496/deprecated-commands-in-visual-c 
resolution: #pragma warning( disable : 4996)

1.2) gets function not found in <stdio.h> 
resolution: change "char buffer[BUFFERSIZE]; gets(buffer);" to "char buffer[BUFFERSIZE]; fgets(buffer, sizeof(buffer), stdin);" https://ru.wikipedia.org/wiki/Gets

2) (!)Winsock tutorial – Socket programming in C on windows https://www.binarytides.com/winsock-socket-programming-tutorial/
3) Raw socket programming on windows with winsock https://www.binarytides.com/raw-sockets-using-winsock/

winsocketdotnetworkprogramming.com:

habr:
1) (!)Сетевое программирование для разработчиков игр. Часть 1: UDP vs. TCP 
2) Сетевое программирование для разработчиков игр. Часть 2: прием и передача пакетов данных 
3) Особенности работы с Multicast https://habr.com/ru/post/141021/
4) (ругают в комментах) Простой и быстрый сервер на C/C++ с клиентом на C#: TCP версия https://habr.com/ru/post/327574/
5) (! c++)Кроссплатформенный многопоточный TCP/IP сервер на C++ https://habr.com/ru/post/503432/
6) IPv6 в новом TCP/IP стеке Windows https://habr.com/ru/post/85814/
7) Повесть о создании классической RTS в домашних условиях с нуля + разбор основных этапов разработки (AI, сеть и т.д.) https://habr.com/ru/post/280520/
8) Повесть о создании классической RTS в домашних условиях с нуля (часть 2: «Воскрешение») 
9) Повесть о создании классической RTS в домашних условиях с нуля (часть 2: «Воскрешение») Продолжение статьи: GUI https://habr.com/ru/post/328116/
10) (!)Повесть о создании классической RTS в домашних условиях с нуля (часть 2: «Воскрешение») Окончание статьи: Сеть https://habr.com/ru/post/328118/

udp sockets with threads:
1) What architecture should I use for a Multi-Threaded UDP Server https://forums.codeguru.com/showthread.php?76505-What-architecture-should-I-use-for-a-Multi-Threaded-UDP-Server
2) Creating high-performance UDP servers on Windows and Linux https://blog.grijjy.com/2018/08/29/creating-high-performance-udp-servers-on-windows-and-linux/

boost.asio

Перевод книги John Torjo «Boost.Asio C++ Network Programming» (habr):
1) «Boost.Asio C++ Network Programming». Глава 1: Приступая к работе с Boost.Asio https://habr.com/ru/post/192284/

вторник, 11 августа 2020 г.

ti tda3 ethernet

Статьи:
1) Сети для самых маленьких. Часть нулевая. Планирование https://linkmeup.ru/blog/1188/
2) Всё, что вы хотели знать о Ethernet фреймах, но боялись спросить, и не зря https://habr.com/ru/post/227729/
3) Взгляд на 10G Ethernet со стороны FPGA разработчика https://habr.com/ru/post/234369/


19.8.1 GMAC_SW Overview
The three-port gigabit ethernet switch subsystem (GMAC_SW) provides ethernet packet communication and can be configured as an ethernet switch. It provides the reduced gigabit media independent interface (RGMII), and the management data input output (MDIO) for physical layer device (PHY) management. Figure 19-156 shows the GMAC_SW subsystem overview.


19.8.1.1 Features

The GMAC_SW subsystem provides the following features:
• Two Ethernet ports (port 1 and port 2) with RGMII interfaces plus internal Communications Port
Programming Interface (CPPI 3.1) on port 0
• Synchronous 10/100/1000 Mbit operation
• Wire rate switching (802.1d)
• Non-blocking switch fabric
• Flexible logical FIFO-based packet buffer structure
• Four priority level Quality Of Service (QOS) support (802.1p)
• CPPI 3.1 compliant DMA controllers
• Support for Audio/Video Bridging (P802.1Qav/D6.0)
• Support for IEEE 1588 Clock Synchronization (2008 Annex D and Annex F)
– Timing FIFO and time stamping logic embedded in the subsystem
• Device Level Ring (DLR) Support
• Energy Efficient Ethernet (EEE) support (802.3az)
• Flow Control Support (802.3x)
• Address Lookup Engine (ALE)
– 1024 total address entries plus VLANs
– Wire rate lookup
– Host controlled time-based aging
– Multiple spanning tree support (spanning tree per VLAN)
– L2 address lock and L2 filtering support
– MAC authentication (802.1x)
– Receive-based or destination-based multicast and broadcast rate limits
– MAC address blocking
– Source port locking
– OUI (Vendor ID) host accept/deny feature
– Remapping of priority level of VLAN or ports
• VLAN support
– 802.1Q compliant
• Auto add port VLAN for untagged frames on ingress
• Auto VLAN removal on egress and auto pad to minimum frame size
• Ethernet Statistics:
– EtherStats and 802.3Stats Remote network Monitoring (RMON) statistics gathering (shared)
– Programmable statistics interrupt mask when a statistic is above one half its 32-bit value
• Flow Control Support (802.3x)
• Digital loopback and FIFO loopback modes supported
• Maximum frame size 2016 bytes (2020 with VLAN)
• 8k (2048 × 32) internal CPPI buffer descriptor memory
• Management Data Input/Output (MDIO) module for PHY Management
• Programmable interrupt control with selected interrupt pacing
• Emulation support
• Programmable Transmit Inter Packet Gap (IPG)
• Reset isolation (switch function remains active even in case of all device resets except for POR pin
reset and ICEPICK cold reset)
• Full duplex mode supported in 10/100/1000 Mbps. Half-duplex mode supported only in 10/100 Mbps.
• IEEE 802.3 gigabit Ethernet conformant

Terminology:
AVB— Audio Video Bridging
AVBTP— Audio Video Bridging Trasport Protocol
BMCA— Best Master Clock Algorithm
CFI— Canonical Format Indicator
CPPI— Communications Port Programming Interface
DLR— Device Level Ring
DSCP— Differentiated Services Code Point
EEE— Energy Efficient Ethernet
EMAC— Ethernet Media Access Control
EOP— End of Packet
EOQ— End of Queue
IPG— Inter-Packet Gap
LPI— Low Power Indicator
MDIO— Management Data Input/Output
MOF— Middle of Frame
PTP— Precision Time Protocol
RMON— Remote Monitoring
RTCP— RTP Control Protocol
RTP— Real-time Transport Protocol
SCR— Switched Central Resource
SRP— Stream Reservation Protocol
TOS— Type of Service
VLAN— Virtual Local Area Network

19.8.2 GMAC_SW Environment

19.8.2.1 RGMII Interface

Figure 19-157 shows a device with integrated CPSW and MDIO interfaced via a RGMII connection in a typical system. The individual CPSW and MDIO signals for the RGMII interface are summarized in
Table 19-779.


verilog and mii:
1) Несколько слов об отладке 1Gb Ethernet-проектов на ПЛИС https://visuale.ru/blog/neskolko-slov-ob-otladke-1gb-ethernet-proektov-na-plis

stm32f107:
1) Промышленный Ethernet от ST: всё и сразу https://www.compel.ru/lib/54887

phy, mac, ethernet, osi (Канальный уровень):
1) MAC
6) (нет соотв. статьи в русской Вики, хорошо бы сделать перевод) 

phy, mac, ethernet, osi (Протоколы сетевого уровня):

phy, mac, ethernet, osi (Транспортный уровень):

phy, mac, ethernet, osi (Прикладной уровень):

winpcap (windows, не поддерживается), libpcap (linux), npcap (windows):

понедельник, 16 марта 2020 г.

Алгоритмы long prefix match, exact match на деревьях

Математика, алгоритмы поиска на графах (exact-match, longest prefix match и др.):
1) lpm https://en.wikipedia.org/wiki/Longest_prefix_match
2) lpm https://www.youtube.com/watch?v=5tAbyHAlS2M
3) lpm https://www.youtube.com/watch?v=1VMJt2-Kvq4
4) stp https://ru.wikipedia.org/wiki/STP
1) George Varghese - Network Algorithmics
2) Survey and Taxonomy of IP Address Lookup Algorithms
3) An_Efficient_IP_Address_Lookup_Algorithm

STP:
2) О ненужности Spanning Tree https://habr.com/ru/post/132312/
3) Сети для самых маленьких. Часть четвертая. STP https://habr.com/ru/post/143768/

пятница, 6 марта 2020 г.

Подключение к RaspberryPi через ethernet по ssh

Для подключения ssh-сервера на raspberry pi надо создать файл ssh в boot-разделе microsd-карты. Это можно сделать на компе с линуксом (Fedora 30) со вставленной через usb-microsd-переходник картой:

cd /run/media/adil/boot/
touch ./ssh

Подключаем raspberry pi по cross-обжатому кабелю к вашему роутеру, к которому подключен комп. В сети через mDNS плата регистрируется под именем raspberrypi.local. Можно пингануть ping raspberrypi.local, должен появиться в сети после включения. Подключаемся через ssh:

ssh pi@raspberrypi.local

login: pi
password: raspberry

После единичного подключения файл удаляется системой. Для "вечного" подключения надо настроить включение ssh через raspi-config, либо через службу systemd.

1. raspi-config:

sudo raspi-config

Выбираем Interfacing Options-SSH. Выбираем "Enable server".

2. systemd:

sudo systemctl enable ssh