¿ Qué comandos serían necesarios ejecutar para que un sistema Linux pudiese sustituir el encaminador R2 mostrado en el diagrama ? Asume todos aquellos datos que necesites para realizar el ejercicio (nombre de interfaces, gateway, etc)
Previous Steps
Enable IP Forwarding
Temporal:
echo 1 > /proc/sys/net/ipv4/ip_forward
Permanent:
vim /etc/sysctl.conf
changue the value of net.ipv4.ip_forward = 1
sysctl -p /etc/sysctl.conf # enable changues
Configuring network intefaces
Temporal:
ifconfig eth0 down
ifconfig eth0 10.10.0.2 netmask 255.255.255.0 up
ifconfig eth1 down
ifconfig eth1 200.3.107.1 netmask 255.255.255.0 up
if you want to add more routes increment the numbers next to GATEWAY, for example: GATEWAY1=10.0.0.2 NETMASK1= 255.255.255.0 ADDRESS1=192.168.30.0
Pros
No extra processing and added resources as in the case of dynamic routing protocols
No extra bandwidth requirement caused by the transmission of excessive packets for the routing table update process
Extra security by manually admitting or rejecting routing to certain networks
Cons
Network Administrators need to know the complete network topology very well in order to configure routes correctly
Topology changes need manual adjustment to all routers something which is very time consuming
Option 2: Using NAT
Basically NAT works like static routing but changes the output ip maintaining a internal
temporal:
# delete old configuration, if any
#Flush all the rules in filter and nat tables
iptables –flush
iptables –table nat –flush
# delete all chains that are not in default filter and nat table, if any
iptables –delete-chain
iptables –table nat –delete-chain
# Set up IP FORWARDing and Masquerading (NAT)
iptables –table nat –append POSTROUTING –out-interface eth0 -j MASQUERADE
iptables –append FORWARD –in-interface eth1 -j ACCEPT
permanent:
store the rules into the ip tables into a rules set
Pros
same that static plus
It also benefits in a security sense as attackants can’t target a computer directly, they have to first get past the router.
Cons
Network Address Translation does not allow a true end-to-end connectivity that is required by some real time applications. A number of real-time applications require the creation of a logical tunnel to exchange the data packets quickly in real-time. It requires a fast and seamless connectivity devoid of any intermediaries such as a proxy server that tends to complicate and slow down the communications process.
NAT creates complications in the functioning of Tunneling protocols. Any communication that is routed through a Proxy server tends to be comparatively slow and prone to disruptions. Certain critical applications offer no room for such inadequacies. Examples include telemedicine and teleconferencing. Such applications find the process of network address translation as a bottleneck in the communication network creating avoidable distortions in the end-to-end connectivity.
NAT acts as a redundant channel in the online communication over the Internet. The twin reasons for the widespread popularity and subsequent adoption of the network address translation process were a shortage of IPv4 address space and the security concerns. Both these issues have been fully addressed in the IPv6 protocol. As the IPv6 slowly replaces the IPv4 protocol, the network address translation process will become redundant and useless while consuming the scarce network resources for providing services that will be no longer required over the IPv6 networks.
Option 3: Using RIP
Rip is a distance routing protocol, is more flexible that using static routers and necessary if the number of subnets grows. Do you want to fight against hundred of rules? or assume the risk of downtime’s created by a router malfunction?
Routing updates can require significant bandwidth because the entire routing table is sent
Prone to routing loops
Option 4: Using OSPF (Open Shortest Path First)
OSPF is a routing protocol that uses the Dijkstra algorithm for get the quickest way. into a set of subnets where the routers are connected at different speeds could work better than R.I.P.
ospfd(config-router)# network 200.3.107.0/24 area 0
ospfd(config-router)# passive-interface eth1
ospfd(config-router)# end
ospfd# write file
Configuration saved to /etc/zebra/ospfd.conf
pros
Scalability – OSPF is specifically designed to operate with larger networks.
Full subnetting support – OSPF can fully support subnetting
Hello packets – OSPF uses small hello packets to verify link operation with out transferring large tables
TOS routing – OSPF can route packets by different criterion based on their type of service field
Tagged routes – Routes can be tagged with arbitrary values, easing interoperation.
cons
very intensive processor
maintaining multiple copies of routing information, increasing the amount of memory needed
OSPF can be logically segmented by using areasnot as easy to learn as some other protocols
if an entire network is running OSPF, and one link within it is “bouncing” every few seconds, then OSPF updates would dominate the network by informing every other router every time the link changed state.
Vamos a empezar estudiar como el proceso es un parte fundamental para entender el funcionamiento del kernel. En este practica, vamos a compilar el kernel….
Otra conjunta de problemas que queremos ver tiene que ver con threads, como hemos visto en clase. Vamos a comprobar algunos problemas y ver como funcionan.
Escribe un código para comparar el tiempo de ejecución para crear N procesos de fork y N threads. Plot su resultado como función de N.
Comprobar como funciona el código de “mutexes” con threads. Intenta ejecutar este codigo sin los mutex locks. ¿Cuantos veces tiene un “race condition”. Puedes indicar como un % cuantos veces tienes un races?
Compilar el kernel para que se puede compilar un kernel. Para ello tiene que instalar las utilidades de make y el libraría de “libncurses-dev”.
Parte 1
Cuando queremos aprovechar las ventajas de los nuevos procesadores de varios núcleos tenemos que recurrir a hacer fork’s del proceso o invocar threads
¿Cual es mejor?, usando el codigo para los fork process y para los c threads (recordar añadir la opción -lpthread en gcc al compilar este ultimo)
aqui la tabla de tiempos en mi equipo
FORK
FORK
FORK
Threads
Threads
Threads
real
user
sys
real
user
sys
50
0.016
0.002
0.007
0.004
0.001
0.002
300
0.074
0.005
0.049
0.014
0.001
0.005
500
0.129
0.019
0.107
0.019
0.004
0.008
1000
0.238
0.023
0.226
0.037
0.000
0.017
5000
1.152
0.161
0.266
0.176
0.003
0.058
10000
2.306
0.255
2.685
0.354
0.018
0.114
30000
7.116
0.685
7.108
1.032
0.055
0.481
50000
11.665
1.048
11.665
1.764
0.114
0.693
y como interpretar datos de una tabla no es muy rapido ni intuitivo podemos crearemos unos gráficos con gnuplot, guardamos la tabla en un archivo de texto, (Fork and Threads Stats) abrimos el gnuplot y escribimos
set xlabel “Number of Process”
set ylabel “Seconds to Create”
plot “stats.txt” using 1:2 w lines title ‘Fork Real’,”stats.txt” using 1:3 w lines title “Fork User”,”stats.txt” using 1:4 w lines title ‘Fork Sys’,”stats.txt” using 1:5 w lines title ‘Threads Real’,”stats.txt” using 1:6 w lines title ‘Threads User’,”stats.txt” using 1:7 w lines title ‘Threads Sys’
y aparece en nuestra pantalla el siguiente gráfico
puede dar lugar a confusión así que lo sacaremos solo con el tiempo real
en definitiva si quieres ganar rendimiento el uso de los threads es mas adecuado.
Parte 2
Tras ejecutar los threads sin mutex varias veces el contador solo llega a valores entre 110-130 lo que significa que el 50-60% de los threads entran en “race condicion”
Parte 3
Documentación detallada para compilar el nucleo (Gentoo Handbook)
¿Has decidido pasarte a OpenDNS y no puedes ver la lista de host en samba?, simplemente modifica tu archivo smb.conf introduciendo o editando la resolución de nombres
la aceleración 3D no funciona pero en mi caso es algo con lo que podre sobrevivir fijaros en la configuración de las opciones que es lo importante
This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish.AcceptRejectRead More
Privacy & Cookies Policy
Privacy Overview
This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.