Subsistema de Red sobre GNU/Linux
Agenda Tecnologías Soportadas. Kernel. Ethernet Switching . IP Routing. Firewall. Alta Disponibilidad. Calidad de Servicio.
Tecnologías Soportadas
Tecnologías Soportadas Cobertura (1/7) PAN. Personal Area Network. SAN. System Area Network. LAN. Local Area Network. WAN Wide Area Network.
Tecnologías Soportadas (2/7) PAN :: Personal Area Network IrDA (Infrared Data Associations). Medio: Aereo. Cobertura: 2 metros. BW: 4 Mbps. Bluetooth. Cobertura: 10 metros. BW: 1 Mbps.
Tecnologías Soportadas (3/7) SAN :: System Area Network HPPI. Medio: Cobre, Fibra. Cobertura: 30 metros. BW: 1,6 Gbps. Myrinet 2000 Medio: Fibra. BW: 2 o 4 Gbps.
Tecnologías Soportadas (4/7) SAN :: System Area Network Fiber Channel Medio: Fibra. BW: 2 o 4 Gbps. InfiniBand. BW: 10 Gbps.
Tecnologías Soportadas (5/7) LAN :: Local Area Network IEEE 802.3 Medio: Cobre, Fibra. Cobertura: Base T, SX, MM. Norma: Ethernet, FastEthernet, GigaEthernet, TenGigaEthernet. BW: 10 Mbps, 100 Mbps, 1000 Mbps, 10000 Mbps.
Tecnologías Soportadas (6/7) LAN :: Local Area Network IEEE 802.4 Token Ring de IBM. BW: 4 Mbps, 16 Mbps. IEEE 802.5 FDDI. IEEE 802.11 Wireless Fidelity. Medio: Aereo. Norma: 802.11a, 802.11b, 802.11g. BW: 54 Mbps, 11Mbps, 54Mbps Lo nuevo 802.11n, ~ 150 Mbps, Banda 5.8 Ghz.
Tecnologías Soportadas (7/7) WAN :: Wide Area Network. X.25. Conmutación de Paquetes. BW: 2 Mbps. Frame Relay. Retrasmisión de Paquetes. ATM. Asynchronous Transfer Mode. BW: 622 Mbps.
Kernel 2.6
Kernel 2.6 ¿Donde obtenerlo? FTP ftp://ftp.kernel.org HTTP http://www.kernel.org <whoami>:/usr/src# tar jxvf linux- 2.6.xx.yy.tar.bz2 <whoami>:usr/src/linux-2.6.xx.yy# make menuconfig
Kernel 2.6 :: Entrada Linux Kernel Configuration
Kernel 2.6 :: Networking Linux Kernel Configuration
Kernel 2.6 :: Networking Linux Kernel Configuration -->> Networking
Kernel 2.6 :: Networking Networking -->> Networking Options (a)
Kernel 2.6 :: Networking Networking -->> Networking Options (b)
Kernel 2.6 :: Networking Networking -->> Networking Options (c)
Kernel 2.6 :: Networking Networking -->> Networking Options (d)
Kernel 2.6 :: Device Drivers Linux Kernel Configuration
Kernel 2.6 :: Device Drivers Linux Kernel Configuration -->> Device Drivers
Kernel 2.6 :: Device Drivers Device Drivers -->> Network Device Support (a)
Kernel 2.6 :: Device Drivers Device Drivers -->> Network Device Support (b)
Kernel 2.6 :: Salida
Kernel 2.6 :: Compilar <whoami>:/usr/src# make <whoami>:usr/src/linux-2.6.xx.yy# make modules_install <whoami>:/usr/src# make install
Linux IEEE 802.3
Linux IEEE 802.3 ¿Como saber las caracteristicas de mi Hardware ? Utilizar aplicación lspci Mirar Ethernet Controller <whoami>:# lspci -v 0000:01:03.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10) Subsystem: Elitegroup Computer Systems: Unknown device b551 Flags: bus master, medium devsel, latency 64, IRQ 11 I/O ports at c800 [size=256] Memory at e00ff400 (32-bit, non-prefetchable) [size=256] Capabilities: [50] Power Management version 2
Dispositivos IEEE 802.3
Dispositivos IEEE 802.3
Dispositivos Ethernet IEEE 802.3 :: Pasos a Seguir Cargar Modulo. <whoami>:# modprobe 8139too Configurar Interfaz. <whoami>:# ifconfig eth0 10.1.1.2 netmask 255.255.255.0 Configurar Ruta por Defecto. <whoami>:# route add default gw 10.1.1.100 Archivo de Configuración y Script(Debian GNU/Linux). <whoami>:# vi /etc/network/interfaces <whoami>:# /etc/init.d/networking [stop,start]
Dispositivos Ethernet IEEE 802.3 :: Pasos a Seguir Mostrar Datos de la Interfaz <whoami>:# ifconfig eth0 eth0 Link encap:Ethernet HWaddr 00:11:5B:1F:F3:CC inet addr:10.1.1.2 Bcast:10.1.1.255 Mask:255.255.255.0 inet6 addr: fe80::211:5bff:fe1f:f3cc/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:350737 errors:272 dropped:527 overruns:272 frame:0 TX packets:80237 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:129293091 (123.3 MiB) TX bytes:9908421 (9.4 MiB) Interrupt:11 Base address:0xc800
Linux Ethernet Bridge IEEE 802.1D
Linux Ethernet Bridge IEEE 802.1D :: Pasos para su Uso Cargar Modulo. <whoami>:# modprobe bridge Instalar Utilidades(Debian GNU/Linux). <whoami>:# apt-get install bridge-utils Crear un Dispositivo Bridge. <whoami>:# brctl addbr bridge0 Agregar Dispositivos al Bridge. <whoami>:# brctl addif bridge0 eth0 <whoami>:# brctl addif bridge0 eth1
Linux Ethernet Bridge IEE 802.1D :: Pasos para su Uso Mostrar Configuración del Bridge <whoami>:# brctl show bridge name bridge id STP enabled interfaces bridge0 8000.00004c9f0bd2 no eth0 eth1 Mostrar Direcciones MACs. <whoami>:# brctl showmacs bridge0 port no mac addr is local? ageing timer 1 00:00:4c:9f:0b:ae no 17.84 1 00:00:4c:9f:0b:d2 yes 0.00 2 00:00:4c:9f:0b:d3 yes 0.00
Linux Ethernet Bridge IEEE 802.1D + Spanning Tree IEEE 802.1s Habilitación Spanning Tree <whoami>:# brctl stp bridge0 on Mostrar Spanning Tree <whoami>:# brctl showstp bridge0 bridge0 bridge id 8000.00004c9f0bd2 designated root 0000.000480295a00 root port 1 path cost 104 max age 20.00 bridge max age 200.00 hello time 2.00 bridge hello time 20.00 forward delay 150.00 bridge forward delay 15.00 ageing time 300.00 gc interval 0.00 hello timer 0.00 tcn timer 0.00 topology change timer 0.00 gc timer 0.33 flags
Linux Ethernet Bridge IEEE 802.1D + Spanning Tree IEEE 802.1s port id 8001 state forwarding designated root 0000.000480295a00 path cost 100 designated bridge 001e.00048026b901 message age timer 17.84 designated port 80c1 forward delay timer 0.00 designated cost 4 hold timer 0.00 flags eth1 (2) port id 8002 state disabled designated root 8000.00004c9f0bd2 path cost 100 designated bridge 8000.00004c9f0bd2 message age timer 0.00 designated port 8002 forward delay timer 0.00 designated cost 0 hold timer 0.00
Linux VLAN IEEE 802.1q
Linux VLAN IEEE 802.1q Pasos para su Uso Cargar Modulo. <whoami>:# modprobe 8021q Instalar Utilidades(Debian GNU/Linux). <whoami>:# apt-get install vlan Agregar una VLAN a un Dispositivo. <whoami>:# vconfig add eth0 5 Quitar una VLAN de un Dispositivo. <whoami>:# vconfig rem eth0.5
IP Routing Utilidad sysctl <whoami>:# sysctl -a | grep net Habilitación de Reenvio de Paquetes. <whoami>:# sysctl -w net.ipv4.ip_fordward=1 Instalación de Iproute2(Debian GNU/Linux) <whoami>:# apt-get install iproute
IP Routing ip link <whoami>:# ip link ls eth0 <whoami>:# ip -s link ls eth0 ip address <whoami>:# ip address ls eth0 ip neighbour <whoami>:# ip neigh ls ip route <whoami>:# ip route ls
Network Address Translation ¿Cuando ocupar NAT ? Generalmente para Compartir acceso a Internet. Traduce de Dirección IP publica a IP privada. DNAT Destination NAT. SNAT Source NAT.
Firewall ebtables. Filtering para Bridge. http://ebtables.sourceforge.net/ iptables. Filtering para IP. www.netfilter.org
NetFilter
Netfilter Cargar Módulo. <whoami>:# modprobe ip_conntrack Instalar utilidad iptables <whoami>:# apt-get install iptables Ver Reglas. <whoami>:# iptables -L Ver Reglas para NAT. <whoami>:# iptables -L -t nat
Netfilter Construir una Regla. <whoami>:# iptables -A INPUT -s 127.0.0.1 -j ACCEPT Borrar Reglas. <whoami>:# iptables -F Borrar Reglas NAT. <whoami>:# iptables -F -t nat
Redundancia Cargar Modulo. <whoami>:# modprobe bonding Instalar aplicación ifenslave. <whoami>:# apt-get install ifenslave Tecnicas. Balanceo RR, XOR. LACP. Fault Tolerance.
QoS Diffserv ToS. CBQ. Shaper.
Preguntas y Respuestas