Network Sheet
Network Sheet
Network Sheet
• ip link set eth0 down : set interface eth0 down. • brctl addif br0 eth0 : Add interface eth0 to bridge br0.
• ip link set eth0 up : set interface eth0 up. • brctl delif br0 eth0 : Delete interface eth0 from bridge br0.
• brctl stp on/off : Set STP on/off.
• ip link add dev eth0 eth0.1000 type vlan id 1000 :
add vlan interface eth0.1000 using eth0. • brctl setageing br0 0 : Set br0 in switch-mode.
• brctl help : Print help.
Address
• ip addr add 192.168.1.40/24 dev eth0 : add address 192.168.1.40 on interface eth0. Sysctl
• ip addr del 192.168.1.40/24 dev eth0 : del address 192.168.1.40 on interface eth0. • sysctl -w net.ipv4.ip forward=1 : activate IPv4 forwarding.
• sysctl -w net.ipv6.conf.all.forwarding=1 : activate IPv6 forwarding.
Route
• ip route add 10.0.0.0/24 via 192.168.0.254 : SSH
add gateway 192.168.0.254 for 10.0.0.0/24 network. Config
• ip route change default via 192.168.0.254 : • Host titan : Host selection.
change default gateway to 192.168.0.254. • User root : connect as root user.
• iptables-restore < rules.v4 : restore IPv4 rules from a file. mtr (replacing traceroute)
• iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -j MASQUERADE : • mtr tetaneutral.net : show route to tetaneutral.net.
nat 192.168.0.0/24 network.
C
CC BY:
• ip6tables : IPv6 rules command line tool. http://bde.enseeiht.fr/clubs/net7/formations/