fachinformatiker-wiki

it's easy when it's here

User Tools

Site Tools


linux:netzwerk

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
linux:netzwerk [2020/11/20 00:27] – external edit 127.0.0.1linux:netzwerk [2024/10/04 22:56] (current) – [Nützliche Befehle] gsys
Line 1: Line 1:
-====== Netzwerk Konfiguration ======+====== Netzwerkkonfiguration ======
  
 +===== Nützliche Befehle =====
  
-===== Wichtige Dateien =====+<code> 
 +sysctl -w net.ipv4.ip_default_ttl=128   # TTL temp. setzen 128 = Windows default 
 +ping 192.168.1.1                        # Dauerping 
 +ping -c 4 192.168.1.1                   # 4 Pings 
 +netstat -npl                            # offene Ports auflisten 
 +netstat -tulpn                          # offene Ports auflisten 
 +ss -tulpn                               # offene Ports auflisten 
 +lsof -i | grep -e LISTEN                # offene Ports auflisten 
 +cat < /dev/tcp/127.0.0.1/22             # Teste Ports mit cat 
 + 
 +</code> 
 + 
 +===== Debian ===== 
 +/etc/network/interfaces.d \\ 
 +/etc/network/interfaces 
 + 
 +<code> 
 +sudo systemctl restart networking.service 
 +</code> 
 + 
 +==== Static ==== 
 + 
 +<code> 
 +# This file describes the network interfaces available on your system 
 +# and how to activate them. For more information, see interfaces(5). 
 + 
 +source /etc/network/interfaces.d/
 + 
 +# The loopback network interface 
 +auto lo 
 +iface lo inet loopback 
 + 
 +# The primary network interface 
 +allow-hotplug ens192 
 +iface ens192 inet static 
 +  address 192.168.2.236 
 +  netmask 255.255.255.0 
 +  gateway 192.168.2.254 
 +  dns-domain sweet.home 
 +  dns-nameservers 192.168.2.254 1.1.1.1 8.8.8.8 
 +</code> 
 + 
 +<code> 
 +sudo ip addr add 123.222.111.123 dev ens192             #temporär 2. IP hinzufügen (bis reboot) 
 +</code> 
 +==== DHCP ===== 
 +<code> 
 +# This file describes the network interfaces available on your system 
 +# and how to activate them. For more information, see interfaces(5). 
 + 
 +source /etc/network/interfaces.d/
 + 
 +# The loopback network interface 
 +auto lo 
 +iface lo inet loopback 
 + 
 +# The primary network interface 
 +allow-hotplug ens192 
 +iface ens192 inet dhcp 
 + 
 +</code> 
 + 
 +===== SLES ===== 
 + 
 +==== Wichtige Dateien ====
  
 ^ Pfad                                          ^ Verantwortlich für            ^ ^ Pfad                                          ^ Verantwortlich für            ^
Line 13: Line 78:
  
  
-===== Route =====+==== Route ====
  
 ''/etc/sysconfig/network/routes'' ''/etc/sysconfig/network/routes''
Line 22: Line 87:
 </code> </code>
  
-===== Priorität der Adapter =====+==== Priorität der Adapter ====
  
 ''/etc/udev/rules.d/70-persistent-net.rules'' ''/etc/udev/rules.d/70-persistent-net.rules''
Line 35: Line 100:
 </code> </code>
  
-===== Netzwerkadapter Einstellungen =====+==== Netzwerkadapter Einstellungen ====
  
 ''/etc/sysconfig/network/ifcfg-eth0'' ''/etc/sysconfig/network/ifcfg-eth0''
Line 75: Line 140:
 </code> </code>
  
-===== Hostname für FQDN =====+==== Hostname für FQDN ====
  
 ''/etc/HOSTNAME'' ''/etc/HOSTNAME''
linux/netzwerk.1605828425.txt.gz · Last modified: (external edit)