From c0251af1c2c9a35fc395a8e911aa345519f6b878 Mon Sep 17 00:00:00 2001 From: Silvino Silva Date: Wed, 28 Sep 2016 02:18:04 +0100 Subject: core network revision --- core/network.html | 44 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/core/network.html b/core/network.html index 9f2477e..39fc9c2 100644 --- a/core/network.html +++ b/core/network.html @@ -48,8 +48,25 @@

2.1.2. Static IP

+

Current example of /etc/rc.d/net;

+
-        # ip link
+        Address:   10.0.0.1              00001010.00000000.00000000 .00000001
+        Netmask:   255.255.255.0 = 24    11111111.11111111.11111111 .00000000
+        Wildcard:  0.0.0.255             00000000.00000000.00000000 .11111111
+        =>
+        Network:   10.0.0.0/24           00001010.00000000.00000000 .00000000 (Class A)
+        Broadcast: 10.0.0.255            00001010.00000000.00000000 .11111111
+        HostMin:   10.0.0.1              00001010.00000000.00000000 .00000001
+        HostMax:   10.0.0.254            00001010.00000000.00000000 .11111110
+        Hosts/Net: 254                   (Private Internet)
+        
+ +
+        # DEV=enp8s0
+        # ADDR=10.0.0.1
+        # MASK=24
+        # GW=10.0.0.1
         # ip addr flush dev ${DEV}
         # ip route flush dev ${DEV}
         
@@ -57,9 +74,34 @@
         # ip addr add ${ADDR}/${MASK} dev ${DEV} broadcast +
         # ip link set ${DEV} up
+        
+ +

Script don't add above network as gateway;

+ +
         # ip route add default via ${GW}
         
+

Other IP class used in home setups;

+ +
+        Address:   192.168.0.1           11000000.10101000.00000000 .00000001
+        Netmask:   255.255.255.0 = 24    11111111.11111111.11111111 .00000000
+        Wildcard:  0.0.0.255             00000000.00000000.00000000 .11111111
+        =>
+        Network:   192.168.0.0/24        11000000.10101000.00000000 .00000000 (Class C)
+        Broadcast: 192.168.0.255         11000000.10101000.00000000 .11111111
+        HostMin:   192.168.0.1           11000000.10101000.00000000 .00000001
+        HostMax:   192.168.0.254         11000000.10101000.00000000 .11111110
+        Hosts/Net: 254                   (Private Internet)
+        
+ +
+        # DEV=enp8s0
+        # ADDR=192.168.1.1
+        # MASK=24
+        # GW=192.168.1.254
+        

2.1.3. Iptables

-- cgit