Archive for the 'tmrc' Category
un piccolo recap
sull’ospf
r-sopra#sh run
Building configuration...
..
..
interface Ethernet0/0
ip address 192.168.106.4 255.255.255.192
full-duplex
!
interface Serial1/0
ip address 172.21.4.2 255.255.255.252
no fair-queue
..
..
router ospf 1
router-id 10.106.110.4
log-adjacency-changes
network 172.21.4.0 0.0.0.3 area 1
network 192.168.106.0 0.0.0.63 area 0
r-sotto#sh run
Building configuration...
..
..
interface Serial1/0
ip address 172.21.4.1 255.255.255.252
clock rate 115200
!
..
..
!
router ospf 1
router-id 172.21.4.1
log-adjacency-changes
network 172.21.4.0 0.0.0.3 area 1
!
in questo modo, r-sotto si becca la rotta 192.168.106.0/26 (inter-area):
r-sotto#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
192.168.106.0/26 is subnetted, 1 subnets
O IA 192.168.106.0 [110/791] via 172.21.4.2, 00:08:54, Serial1/0
172.21.0.0/30 is subnetted, 1 subnets
C 172.21.4.0 is directly connected, Serial1/0
se configuro l’area 1 stub, viene generata automaticamente la rotta di default:
r-sopra(config)#router ospf 1
r-sopra(config-router)#area 1 stu
r-sopra(config-router)#area 1 stub
r-sopra(config-router)#
r-sotto(config)#router ospf 1
r-sotto(config-router)#area 1 stu
r-sotto(config-router)#area 1 stub
r-sotto(config-router)#^Z
r-sotto#
r-sotto#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is 172.21.4.2 to network 0.0.0.0
192.168.106.0/26 is subnetted, 1 subnets
O IA 192.168.106.0 [110/791] via 172.21.4.2, 00:00:00, Serial1/0
172.21.0.0/30 is subnetted, 1 subnets
C 172.21.4.0 is directly connected, Serial1/0
O*IA 0.0.0.0/0 [110/782] via 172.21.4.2, 00:00:00, Serial1/0
se invece configuro l’area come NSSA, la rotta di default non viene automaticamente injectata:
r-sopra(config-router)#no area 1 stub
r-sopra(config-router)#ara 1
*Mar 1 00:53:07.873: %OSPF-5-ADJCHG: Process 1, Nbr 172.21.4.1 on Serial1/0 from FULL to DOWN, Neighbor Down: Adjacency forced to
r-sopra(config-router)#
r-sopra(config-router)#area 1 ns
r-sopra(config-router)#area 1 nssa
r-sopra(config-router)#
r-sotto(config-router)#no area 1 stub
r-sotto(config-router)#area 1 nssa
r-sotto(config-router)#
r-sotto#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
192.168.106.0/26 is subnetted, 1 subnets
O IA 192.168.106.0 [110/791] via 172.21.4.2, 00:00:13, Serial1/0
172.21.0.0/30 is subnetted, 1 subnets
C 172.21.4.0 is directly connected, Serial1/0
r-sotto#
due scelte: o si fa (sempre sull’ABR) area 1 nssa no-summary:
r-sopra(config-router)#area 1 nssa no-summary
r-sopra(config-router)#
e viene generata una rotta di default inter-area:
r-sotto#
*Mar 1 00:54:01.661: %SYS-5-CONFIG_I: Configured from console by console
r-sotto#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is 172.21.4.2 to network 0.0.0.0
172.21.0.0/30 is subnetted, 1 subnets
C 172.21.4.0 is directly connected, Serial1/0
O*IA 0.0.0.0/0 [110/782] via 172.21.4.2, 00:00:19, Serial1/0
r-sotto#sh ip ospf database
OSPF Router with ID (172.21.4.1) (Process ID 1)
Router Link States (Area 1)
Link ID ADV Router Age Seq# Checksum Link count
10.106.110.4 10.106.110.4 109 0x80000011 0x005973 2
172.21.4.1 172.21.4.1 109 0x80000010 0x00B43D 2
Summary Net Link States (Area 1)
Link ID ADV Router Age Seq# Checksum
0.0.0.0 10.106.110.4 48 0x80000001 0x006EE0
oppure si fa area 1 nssa default-information-originate, e si genera una LSA di tipo 7, rotta esterna:
r-sotto#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is 172.21.4.2 to network 0.0.0.0
192.168.106.0/26 is subnetted, 1 subnets
O IA 192.168.106.0 [110/791] via 172.21.4.2, 00:00:27, Serial1/0
172.21.0.0/30 is subnetted, 1 subnets
C 172.21.4.0 is directly connected, Serial1/0
O*N2 0.0.0.0/0 [110/1] via 172.21.4.2, 00:00:22, Serial1/0
r-sotto#sh ip ospf database
OSPF Router with ID (172.21.4.1) (Process ID 1)
Router Link States (Area 1)
Link ID ADV Router Age Seq# Checksum Link count
10.106.110.4 10.106.110.4 195 0x80000011 0x005973 2
172.21.4.1 172.21.4.1 195 0x80000010 0x00B43D 2
Summary Net Link States (Area 1)
Link ID ADV Router Age Seq# Checksum
192.168.106.0 10.106.110.4 39 0x80000001 0x0009A8
Type-7 AS External Link States (Area 1)
Link ID ADV Router Age Seq# Checksum Tag
0.0.0.0 10.106.110.4 35 0x80000001 0x00FA08 0
totally 2016
l’anno in cui vai in un locale dove si fanno le jam session, convinto di suonare la chitarra, e invece ti ritrovi dopo secoli a suonare la batteria
credo di essere totalmente afflitto dalla sindrome dell’eterno studente.
mi piace studiare, mi piace evadere coi pensieri.
ma adesso, rispetto al passato, mi sforzo di dare un senso pratico a quello che studio.
per questo ieri ho chiesto a Vinz di farmi “ruotare” qualcosa 🙂
grande incertezza, grande indecisione prima di fare “click” col mouse, ma poi ci ripensi e ti convinci che non può non funzionare (*), almeno se è vero che quella cosa la sai abbastanza da prevederne le conseguenze.
(*) si parla sempre di cose che se fai qualche cazzata, qualcuno deve prendere il doblò e farsi KM per raggiungere l’apparato 😀
No commentsvett (updated)
OK, non uscirò più di casa fin quando qualcuno non mi spiega questo:
#include <stdio.h> main() { int n, i, vetta[n], vettb[n], vettc[n]; printf("Immetti la lunghezza dei vettori: "); scanf("%d", &n); // immssione valori vettore A e B for (i=0; i<n; i++) { printf("Immetti il valore del vettore A posizione [%d]: ", i); scanf("%d", &vetta[i]); printf("Immetti il valore del vettore B posizione [%d]: ", i); scanf("%d", &vettb[i]); } // stampa vettore A for (i=0; i<n; i++) printf("vetta[%d]=%d ", i, vetta[i]); printf("\n"); // stampa vettore B for (i=0; i<n; i++) printf("vettb[%d]=%d ", i, vettb[i]); printf("\n"); }
stesso codice, compilato su due Linux diversi, risultato A:
sugo@vm:~/c$ ./esercizio7.1 Immetti la lunghezza dei vettori: 5 Immetti il valore del vettore A posizione [0]: 0 Immetti il valore del vettore B posizione [0]: 1 Immetti il valore del vettore A posizione [1]: 2 Immetti il valore del vettore B posizione [1]: 3 Immetti il valore del vettore A posizione [2]: 4 Immetti il valore del vettore B posizione [2]: 5 Immetti il valore del vettore A posizione [3]: 6 Immetti il valore del vettore B posizione [3]: 7 Immetti il valore del vettore A posizione [4]: 8 Immetti il valore del vettore B posizione [4]: 9 vetta[0]=9 vetta[1]=2 vetta[2]=4 vetta[3]=6 vetta[4]=8 vettb[0]=1 vettb[1]=3 vettb[2]=5 vettb[3]=7 vettb[4]=9
risultato B:
*siberia /home/sugo:==> ./es Immetti la lunghezza dei vettori: 5 Immetti il valore del vettore A posizione [0]: 0 Immetti il valore del vettore B posizione [0]: 1 Immetti il valore del vettore A posizione [1]: 2 Immetti il valore del vettore B posizione [1]: 3 Immetti il valore del vettore A posizione [2]: 4 Immetti il valore del vettore B posizione [2]: 5 Immetti il valore del vettore A posizione [3]: 6 Immetti il valore del vettore B posizione [3]: 7 Immetti il valore del vettore A posizione [4]: 8 Immetti il valore del vettore B posizione [4]: 9 vetta[0]=0 vetta[1]=2 vetta[2]=4 vetta[3]=6 vetta[4]=8 vettb[0]=1 vettb[1]=3 vettb[2]=5 vettb[3]=7 vettb[4]=9
perché nel primo caso (risultato A) vetta[0] = 9?
da capire :))
————
credo di aver capito.
forse il problema è nella dichiarazione dei vettori. se al posto di:
int n, i, vetta[n], vettb[n], vettc[n];
metto:
int n, i, vetta[10], vettb[10], vettc[10];
funziona come ci si aspetta.
per una sessione di debug carina vedere qui 🙂
No comments:fail:
mi sono stufato di non capire un cazzo di determinate cose.
così mi sono prefissato, per questo 2016, di arrivare almeno fino alla fine di Linguaggio C.
ovviamente sono ripartito da zero.
al capitolo 4 sono spiegati i cicli, if annidati, e tutte ‘ste storie qua.
a fine capitolo ci sono gli esercizi, che ovviamente ho fatto.
il primo diceva di
1) fare un programma che trovasse il maggiore tra 3 numeri.
poi
2) uno che trovasse il maggiore tra 4 numeri.
3) poi uno che contemplasse anche il caso in cui i numeri fossero tutti identici
4) poi diceva: adesso ripeti l’esercizio 2, ma devi trovare anche il minore.
allora mi sono messo a farlo (su carta), mi veniva incredibilmente lungo e pensavo “mah, chissà .. mo vado a vedere a fine libro e lo trovo fatto con 10 righe”.
anche perché la soluzione (che avevo visto con la coda dell’occhio a fine libro) mi sembrava molto corta.
alla fine l’ho fatto.
ho visto la soluzione e… ho capito che, come spesso mi capita, avevo sbagliato a leggere (o letto frettolosamente….)
l’esercizio diceva “ripeti l’esercizio n.1 (non n.2!), e trova il maggiore il minore tra TRE numeri (non QUATTRO!)”
cmq funziona 🙂
No commentsDebra
ciao
questi sono i miei primi 2 cd di debian..
chissa’, forse all’epoca non esisteva la netinstall 🙂
debian 3.0r2 credo.
fu un suggerimento dello Smilzo
il mio primo server era “katy”
perche’… mm , credo di averlo gia’ raccontato qui nel blog il perche’..
ho passato un sacco di guai perche’ dovevo ricompilare il kernel
oggi praticamente non si fa piu’ 🙂
ma all’epoca.. dovevo farlo per forza per far funzionare il modem (alcatel speedtouch usb)
lo compilavo e ogni volta NON bootava..
alla fine smilzo mi diede una mano in chat, su irc
praticamente io lanciavo il make menuconfig, e poi gli facevo copia/incolla
di tutto quello che c’era nel menu
e lui mi diceva cosa spuntare
mi ricordo che scrisse “arriviamo almeno a fare un kernel che SI AVVII
addio, Ian.
continuero’ a voler bene alla distribuzione che tu hai creato
:*****
che palle
https://communities.intel.com/message/329963
“We checked further about your inquiry and would like to inform that monitor mode and packet injection are not supported with Intel® WiFi adapters, such as the Intel® Dual Band Wireless-AC 7265. For details about supported features and specifications of this adapter you can review the following links:
Intel® Dual Band Wireless-AC 7265 Product Brief
Intel® Dual Band Wireless-AC 7265 Specifications
You would need to use a third party wireless adapter to achieve this type of functionality.”
root@inversion:~# lspci -k
[……..]
03:00.0 Network controller: Intel Corporation Wireless 7265 (rev 59)
Subsystem: Intel Corporation Dual Band Wireless-AC 7265
Kernel driver in use: iwlwifi
Vague version
sono venuto a conoscenza oggi di questo articolo 🙂
lo posto con piacere, visto che dentro.. c’è anche qualcosa di mio
Puzzle GNU/Linux: Integrated Pieces Create an Intriguing OS
The desktop environment is one of the best features distinguishing Puzzle GNU/Linux from all the others in Linuxland. It is an integration of Openbox, Kodi/xbmc and KDE. Openbox is perhaps best known for its simplicity and power. KDE is a classic Linux eye-candy-filled desktop. Kodi/xbmc is one of the leading media center shells. Puzzle GNU/Linux has a very unconventional look overall.
Puzzle GNU/Linux is a strange OS distribution that shows the value of open source ingenuity. This Linux distro is built around a hybrid desktop that is highly customizable.
You might get the impression when you start using it that the desktop environment is a new creation. That would not be completely accurate. Puzzle’s user interface is not new. What developer Roberto Pagliaro does with Puzzle GNU/Linux’s desktop environment is provide a new approach to controlling the user interface.
Puzzle GNU/Linux combines elements from Openbox, Kodi (formerly xbmc) and KDE. You do not have a choice of which one to use. You use them all interchangeably. Pagliaro integrates all three into a single desktop design to run simultaneously on all interfaces. The user experience is stunning.
Puzzle uses a different system management approach built around a series of modules that can be added or removed to suit the user’s preferences and needs. It has many customized applications.
Much like using any flavor of the Linux OS, Puzzle inside the box is Linux. It has most of what you find in any particular Linux desktop. Many of the software components are very familiar. It has the traditional menu and panel bar across the top of the screen, for example.
Puzzle GNU/Linux at first looks like a typical desktop with a menu and ample notification icons on the hide/unhide panel bar.
What is different is the way bits and pieces of GNOME 3, KDE and xbmc blend together to control their part of the desktop’s performance. For instance, the traditional bar hides off the top of the screen until you push the mouse pointer to the top edge. Then the panel bar covers the primary GNOME bar that otherwise is always visible at the top. Each of these bars provides different functions.
The Puzzle GNU/Linux Software Center application launches from a terminal window after you click its name in the main menu. Notice the nontraditional panel bar at the top of the screen.
Puzzle GNU/Linux has much more in store for users. The bombardment of features and display settings may render users temporarily bewildered until they get familiar with this awesome new approach.
Building Blocks
Puzzle GNU/linux is built on Canonical’s Ubuntu Distro — but the similarity ends right there. Forget Unity, or any of the other desktop environments or distro flavors available to replace the Unity shell.
The Ubuntu foundation allows the installation of all programs in the standard version available for Ubuntu. Then the Puzzle treatment kicks in.
An in-house software management system allows unique Puzzle packages — called “modules” — to be installed and removed without rebooting. This system correlates with the Jigsaw software center that allows for updating packages and adding to the software center with the append command.
So far the developer and his apparently small group of helpers has created 115 Puzzle packages optimized specifically for the distro. You can add some other Ubuntu-based packages using the apt-get commands in a terminal window. But Puzzle GNU/Linux seems more limited in what Debian-family applications it will accept this way.
Multifunction Distro
Not all Linux non-enterprise distros go beyond desktop functionality. This is another area that makes Puzzle GNU/Linux different.
Puzzle GNU/Linux can run as an Nginx (as in Engine-X) Server. You can use it as a mail server, an ftp server, a Mysql server and a management tool for ispconfig.
Puzzle GNU/Linux is built upon the modular concept. If you add some of those specialized packages, you also can use this distro as your own cloud platform.
Vague Versions
Puzzle GNU/Linux suffers from a lack of full disclosure. This may not be an issue for some users, but not disclosing some basic information about the age of the version releases makes me question the developer’s reliability.
The website is published in Italian, so I had to rely on generic translation engines to read the content. When dealing with technical information, translation accuracy matters. Even Google Translate can not fill in the gaps of poorly constructed syntax.
For those reasons, I initially was inclined to set aside Puzzle GNU/Linux as a review topic for this column. I came back to it, however, because of its uniqueness and very stable performance. Much about Puzzle GNU/Linux is impressive.
This is a very young distro. The downloadable ISO file was released as version 1.0 in July. However, Pagliaro told LinuxInsider he has been adding modules and updating the releases on a casual basis.
The latest release appears to be version 1.1, released Nov. 21. However, neither the website nor the software itself is not very clear about identifying dates and versions.
Hybrid Highlights
The Puzzle GNU/Linux desktop environment is one of the best features distinguishing this young distro from all of the others in Linuxland. It is an integration of Openbox, Kodi/xbmc and KDE.
Openbox is perhaps best known for its simplicity and power. KDE is a classic Linux eye-candy-filled desktop. Kodi/xbmc is one of the leading media center shells.
Openbox is tooled with multiple wallpapers that are timed on each of four virtual desktops. It shows an overall view of open programs and their location. It also lets you set specific sets of wallpaper images to run on each virtual desktop.
The Kodi Entertainment Center is open source media player software developed by the XBMC Foundation. Originally, it was the platform used as a media center application in the Xbox game console.
KDE is a powerful graphical desktop environment in its own right. Numerous Linux distros use the K Desktop Environment to drive the visual displays and control the user interface either as one option or as the only choice.
The KDE portion of the 3-in-1 desktop environment lets you place a variety of widgets on some or all of the four desktops. This is the desktop view as shown on the developer’s website, using the Nightly web browser on our review installation of Puzzle GNU/Linux.
About the Puzzle
The initial Puzzle GNU/Linux release was available only in a 32-bit version. The developer has hinted at a 64-bit version to follow soon. It is unclear if the version 1.1 release is the intended 64-bit version or if a separate ISO will be issued. Also planned is a Raspberry Debian version.
Puzzle GNU/Linux runs on older computers that meet minimum requirements of an OpenGL-compatible video card with 1 GB or 2 GB of RAM and at least 16 GB (preferably 20 GB) of space on hard disk.
Beyond those basic requirements, older computers and newer but less powerful hardware will run Puzzle GNU/Linux depending on the additional modules users install. This makes it more difficult to suggest a target user base for this distro. Users will depend on what they want to do with Puzzle GNU/Linux and what their hardware will permit them to do with it.
Another potential issue is installation. This young distro does not yet have a UEFI, or Unified Extensible Firmware Interface. It may not cooperate with dual-boot environments on newer computers running Microsoft Windows 8.* or under Legacy Boot BIOS settings as the only operating system.
Look and Feel
Puzzle GNU/Linux has a very unconventional look overall. Despite its first-generation version, this distro works well and has a lot of potential. You may be challenged by its three-in-one desktop integration, but it’s worth the effort. The desktop interface is really cool looking.
Some of its display traits are very clever. Take, for instance, the screen saver function.
The constantly changing array of screen saver images do not blank out the actual desktop view. Rather, the screen saver is a transparent overlay that subdues whatever is showing on the desktop. The screen saver image runs in the foreground and shows the running programs in a more distant background.
Switching Places
The virtual desktops are preset as Media Center, Preferences, Works1 and Works2. Those labels do not matter, though. You can put any app on any virtual desktop and move them from place to place just as you would in most any Linux distro.
However, the labels stay on the top panel and serve as a workspace switcher applet. They act as tabs and also show an icon that indicates all running programs. Clicking an icon for the current tab view minimizes/maximizes that application. Clicking an icon in one of the other workspace tabs on the top panel takes you to that open application window.
To change workspaces, right-click on the window’s top border and select the desired “move to” location. You also can use the Alt+Tab keyboard combination.
A more awesome effect comes with holding down the Ctrl+Alt keys and pressing the left and right arrow keys to view a spinning carousel of virtual workspaces that pull back into the center of the screen and spin left to right or right to left.
Or hold the Ctrl+Alt keys and press the up or down arrow keys to see a spinning carousel of virtual workspaces that rotate forward or backward in the center of the screen. Holding down the arrow causes the spinning speed to increase. If you take your fingers off the keys, the spinning view continues until you hit the enter key. Pretty cool indeed!
Stock Software
Another curious thing about Puzzle GNU/Linux is the assortment of software included. Some of the applications are influenced by the XMBC media center integration, as they are more of an Internet service app rather than installed programs.
In the Graphics category, you get Harmony music player, ImageMagick image editor, Photoshop Express Editor, Ristretto Image Viewer and Simple Scan.
The Internet category includes separate Facebook and Twitter browser apps, Geary email, Google Drive and Maps, and Nightly Web Browser.
The Office category includes Dexter address book, Getting Things GNOME, Microsoft Office Live and Outlook Web apps, and Zoo Mail.
The Sound and Video category includes guvcview, SoundCloud, WiFi Audio and YouTube.
These choices are seriously insufficient for my daily work routine. Programs typically found in most Debian-based Linux distros are missing. If I can not supplement the choices from the limited Puzzle repository or the Apt-Get process, this distro will fail to meet my work and play needs.
I perused the Software Center only to find a very few of my always-used Linux programs. One of the few I found was the LibreOffice suite. No Firefox, Google Chrome or Chromium Web browsers were available. The gEdit and Geany text editors — two of my staples along with the missing browsers — were among the preinstalled software offerings.
Bottom Line
Puzzle GNU/Linux is an interesting and promising young entry for Linux desktop users. However, developer Pagliaro has to step up his release schedule or at least supplement available application modules in rolling releases. Otherwise, this intriguing desktop environment integration may not outlive the distro’s overall usefulness.
Overall, Puzzle GNU/Linux has potential to provide an alternative offering that is off the typical Linux path. If you are curious, check it out. Nothing encourages a developer more than downloads and feedback.
No comments