






Studia grazie alle numerose risorse presenti su Docsity
Guadagna punti aiutando altri studenti oppure acquistali con un piano Premium
Questa pagina non è visibile nell’anteprima
Non perderti parti importanti!







ls <-l> //List files [-l show permissions] cd //Change directory pwd //Show current directory mkdir //Make directory cp //Copy path rm //Remove mv //Move diff //Show the difference between files chown //Change owner chmod //Change permission ln //Link mc //Files Explorer nano //Text editor [gedit graphic variant] ssh <-p> ** @ ** //To access the command line of a remote host [-p specify post] [-X tunnelling of graphic application, require a execution of a local server X-Windows, like Xming for MS Windows or Xquartz for MAC] scp ** ** @ **** : ** //Secure copy to host**
tcpdump //Analyzer of internet data [wireshark graphic variant] last //Accessi più recenti who //User now connected ps //Active process top //Usage of resources kill //Close a process du //Show dimension of a file system
Private Network IPs: 10.0.0.0/8 172.16.0.0/1 2 192.168.0.0/ 16 Reti contigue e allineate (stessi N bit) : 192.168. 2 .0/24 – 192.168. 3 .0/24 = 192.168.2.0/ Reti NON allineate: 192.168.3.0/24 – 192.168.4.0/ ping ; traceroute - n **** show ip/vlan/etc iperf3 <-s> //To measure the bitrate - s from server below some option
/etc/dhcp/dhcpd.conf //Where to configure the Linux machine like a DHCP server /usr/sbin/dhcpd //Demon used. It can be started from: systemctl **** dhcpd /var/lib/dhcpd/dhcpd.leases //Register of the assignments dhclient - v ** //To start the dhcp client** dhclient - v - r ** //To stop the dhcp client Editing of the file dhcpd.conf (example with 500 address needed) :** Subnet 192.168.1.0 netmask 255.255.255.0 { range 192.168.1.1 192.168.1.2 53 default-lease-time 3600 ; max-lease-time 10800 ; option subnet-mask 255.255.255.0 ; //Pari alla NetMask option broadcast-address 192.168.1.255 ; //Indirizzo del broadcast option routers 192.168.1.254 ; //Router indirizzo del server DHCP option domain-name-server 192.168.1.254 ; //Dove trovare il DNS }
bridge vlan add vid **** dev **** pvid untagged
bridge vlan add vid **** dev ****
brctl show //Show Linux bridge LB brctl addbr ** //Add linux bridge** brctl delbr ** //Delete** ip link set **** up //Activation of LB brctl addif ** //Adding interface to LB** brctl delif ** //Removing interface from LB** brctl showmacs ** //Showing MAC address learnt from LB**
arp - n //Show content of ARP Cache [ ip neigh == arp ] arp - i **** - d ** //Eliminate an ARP voice** arp - i **** - s ** ** [ temp ] //Add voice arping - l ** //To generate ARP request**
sysctl net.ipv4.ip_forward //Verify if Ip forwarding is enable sysctl - w net.ipv4.ip_forward=1 //1 to enable, 0 to disable
To start the needed operator: Fedora: systemctl start openvswitch Ubuntu: service openvswitch-switch start ovs-vsctl add-br ** //Create a switch [del-br to delete it]** ovs-vsctl add-port ** //Create interface from a switch [del-port do delete it]** ovs-vsctl show //Show list of switch OvS and relative ports ovs-appctl fdb/show //Show the forwarding table of a switch ovs-vsctl set port **** tag= ** The default is that ALL ports of a switch OvS is on a TRUNK MODE on ALL VLAN, To set a porta in access mode on a specific VLAN** ovs-vsctil set port **** tag= ** To set a port in mode trunk on only some VLAN with for example id=1,** ovs-vsctl set port **** trunks=1, To give permission to use a VLAN without tagging on a trunk port ovs-vsctil set port **** vlan_mode=native-untagged To show the configuration of a specific port ovs-vsctl list port ** To reset a configuration of a VLAN to default of a port** Ovs-vsctl clear port **** tag trunks vlan_mode
Switch :Bridge with more ports route thorough MAC address Router :Level 3. Route thorugh IP address HTTP :Secure use the TCP port 80 Firewall can be implemented thourgh a packet filter or a application layer NAPT :Network Address and Port Translation
Lan_Caio: 400 necessari, +3 < 512=2^9 ; 32-9= 23 192.168.6.0/23 (.6.0 - .7.255) Scrivere Intervalli!!!