/etc/network/interfaces: Unterschied zwischen den Versionen

Aus Foxwiki
Die Seite wurde neu angelegt: „= /etc/network/interfaces = == Persistente Routen == Dauerhafte (persistente) statische Routen werden in /etc/network/interfaces eingetragen #---------------…“
 
Kamalalhassan (Diskussion | Beiträge)
Keine Bearbeitungszusammenfassung
Zeile 42: Zeile 42:
== Quelle ==
== Quelle ==
https://www.cyberciti.biz/tips/configuring-static-routes-in-debian-or-red-hat-linux-systems.html
https://www.cyberciti.biz/tips/configuring-static-routes-in-debian-or-red-hat-linux-systems.html
[[Category:Linux:Dateisystem]]

Version vom 18. März 2021, 10:12 Uhr

/etc/network/interfaces

Persistente Routen

Dauerhafte (persistente) statische Routen werden in /etc/network/interfaces eingetragen

#---------------------------------------#
# Feel free to change IP and gateway    #
# as per your local setup and routing   #
# policy                                #
# Last edited by root @ 23/Oct/2012     #
#---------------------------------------#

#--------------------------------------------#
# Setup the loopback network interface (lo0) #
#--------------------------------------------#
auto lo
iface lo inet loopback

#--------------------------------------------#
# Setup eth0 - connected to private LAN/VLAN #
#--------------------------------------------# 
auto eth0
allow-hotplug eth0
iface eth0 inet static
       address 10.70.201.5
       netmask 255.255.255.192
       ### add persistent route command ###
       post-up route add -net 10.0.0.0 netmask 255.0.0.0 gw 10.70.201.6
#----------------------------------------#
# Setup eth1 - connected to the Internet #
#----------------------------------------#
auto eth1
allow-hotplug eth1
iface eth1 inet static
       address 205.153.203.98
       netmask 255.255.255.248
       ### default gateway ###
       gateway 205.153.203.97
 # service networking restart

Quelle

https://www.cyberciti.biz/tips/configuring-static-routes-in-debian-or-red-hat-linux-systems.html